:root{
  --bg: #0b0e14;
  --surface: #12151f;
  --surface-2: #1a1f2c;
  --border: #262c3b;
  --text-1: #e8eaf0;
  --text-2: #8b93a7;
  --text-3: #565f76;
  --accent: #6a6cf2;
  --accent-soft: rgba(106,108,242,0.12);
  --amber: #f2a93c;
  --amber-soft: rgba(242,169,60,0.1);
  --cyan: #35d1e0;
  --red: #f2665a;
  --red-soft: rgba(242,102,90,0.1);
  --radius: 10px;
}

*{ box-sizing: border-box; margin:0; padding:0; }

body{
  background: var(--bg);
  color: var(--text-1);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a{ color: inherit; text-decoration: none; }
.mono{ font-family: 'IBM Plex Mono', monospace; }

input, button{ font-family: inherit; }

/* ---------- auth pages (login/signup) ---------- */
.auth-wrap{
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 20px;
  gap: 32px;
}
.auth-logo{
  display:flex; align-items:center; gap:8px;
  font-family:'Space Grotesk'; font-weight:700; font-size:18px;
}
.auth-card{
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 36px 32px; width: 100%; max-width: 380px;
}
.auth-card h1{ font-family:'Space Grotesk'; font-size: 22px; margin-bottom: 8px; letter-spacing: -0.3px; }
.auth-sub{ font-size: 13.5px; color: var(--text-2); margin-bottom: 24px; }
.auth-error{
  background: var(--red-soft); border: 1px solid rgba(242,102,90,0.3); color: var(--red);
  font-size: 13px; padding: 10px 14px; border-radius: 8px; margin-bottom: 18px;
}
.auth-card form{ display:flex; flex-direction: column; gap: 6px; }
.auth-card label{ font-size: 12.5px; color: var(--text-2); margin-top: 12px; }
.auth-card input{
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 13px; color: var(--text-1); font-size: 14px; outline: none;
  transition: border-color .15s ease;
}
.auth-card input:focus{ border-color: var(--accent); }
.btn-primary{
  margin-top: 22px; background: var(--accent); color: #fff; border: none;
  border-radius: 8px; padding: 12px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: opacity .12s ease;
}
.btn-primary:hover{ opacity: 0.92; }
.auth-switch{ margin-top: 20px; font-size: 13px; color: var(--text-2); text-align: center; }
.auth-switch a{ color: var(--accent); }

/* ---------- dashboard ---------- */
.dash-wrap{ max-width: 880px; margin: 0 auto; padding: 0 24px 64px; }
.dash-nav{
  display:flex; align-items:center; justify-content:space-between; padding: 24px 0;
  border-bottom: 1px solid var(--border); margin-bottom: 36px;
}
.dash-nav .auth-logo{ font-size: 18px; }
.dash-nav-right{ display:flex; align-items:center; gap: 18px; font-size: 13.5px; color: var(--text-2); }
.dash-nav-right a:hover{ color: var(--text-1); }
.dash-user{ display:flex; align-items:center; gap:8px; }
.dash-avatar{
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display:flex; align-items:center; justify-content:center;
  font-size: 12px; font-weight: 700; font-family:'Space Grotesk';
}

.dash-header{ display:flex; align-items:flex-end; justify-content:space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.dash-header h1{ font-family:'Space Grotesk'; font-size: 28px; letter-spacing: -0.6px; }
.dash-header p{ color: var(--text-2); font-size: 14px; margin-top: 6px; }

.notice{
  font-size: 13.5px; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px;
}
.notice.success{ background: rgba(53,209,224,0.08); border: 1px solid rgba(53,209,224,0.25); color: var(--cyan); }
.notice.error{ background: var(--red-soft); border: 1px solid rgba(242,102,90,0.3); color: var(--red); }

.add-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 32px;
}
.add-card h2{ font-family:'Space Grotesk'; font-size: 16px; margin-bottom: 16px; }
.add-form{ display:flex; gap: 12px; flex-wrap: wrap; }
.add-form .field{ display:flex; flex-direction: column; gap: 6px; flex: 1; min-width: 180px; }
.add-form label{ font-size: 12px; color: var(--text-2); }
.add-form input{
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 11px 13px; color: var(--text-1); font-size: 13.5px; outline: none;
}
.add-form input:focus{ border-color: var(--accent); }
.add-form button{
  align-self: flex-end;
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 11px 20px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.add-form button:hover{ opacity: 0.92; }

.wh-list{ display:flex; flex-direction: column; gap: 12px; }
.wh-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; display:flex; align-items:center; justify-content:space-between; gap: 16px; flex-wrap: wrap;
}
.wh-card.revoked{ opacity: 0.55; }
.wh-main{ min-width: 0; flex: 1; }
.wh-label{ font-family:'Space Grotesk'; font-size: 15px; margin-bottom: 4px; display:flex; align-items:center; gap: 8px; }
.wh-badge{
  font-family:'IBM Plex Mono'; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: 999px; background: var(--red-soft); color: var(--red);
}
.wh-url{
  font-family:'IBM Plex Mono'; font-size: 12.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px;
}
.wh-meta{ font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.wh-actions{ display:flex; gap: 8px; flex-shrink: 0; }
.wh-actions button, .wh-actions a{
  font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-1);
}
.wh-actions button:hover, .wh-actions a:hover{ border-color: var(--text-3); }
.wh-actions .danger{ color: var(--red); }
.wh-actions .accent{ color: var(--cyan); }

.empty-state{
  text-align: center; padding: 48px 20px; color: var(--text-2);
  border: 1px dashed var(--border); border-radius: 14px; font-size: 14px;
}

@media (max-width: 640px){
  .add-form button{ align-self: stretch; }
  .wh-card{ flex-direction: column; align-items: flex-start; }
  .wh-url{ max-width: 100%; }
}
