/* MailHunterPro — shared tokens and components */
:root {
  --ink: #070912;
  --night: #0b0f1d;
  --panel: #111628;
  --panel-2: #161c33;
  --line: #222a47;
  --line-2: #2e3760;
  --text: #dfe4f5;
  --dim: #8a93b5;
  --faint: #5a6390;
  --mint: #4fffb0;
  --mint-ink: #04170e;
  --mint-soft: rgba(79, 255, 176, 0.1);
  --mint-line: rgba(79, 255, 176, 0.35);
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, 0.12);
  --coral: #ff6b6b;
  --coral-soft: rgba(255, 107, 107, 0.12);
  --sky: #6cb6ff;
  --violet: #b49bff;
  --violet-soft: rgba(180, 155, 255, 0.12);
  --display: 'Syne', system-ui, sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.01em; margin: 0; line-height: 1.15; color: #fff; }
p { margin: 0; }
a { color: var(--mint); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(79, 255, 176, 0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, transform .1s; }
.btn:hover { border-color: var(--mint-line); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--mint); color: var(--mint-ink); border-color: var(--mint); font-weight: 600; }
.btn-primary:hover { background: #8dffcf; border-color: #8dffcf; color: var(--mint-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-danger { background: transparent; border-color: rgba(255, 107, 107, .45); color: var(--coral); }
.btn-danger:hover { background: var(--coral-soft); border-color: var(--coral); color: var(--coral); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 16px; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--dim); }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.input, .select, .textarea { width: 100%; background: var(--night); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; min-height: 42px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(79, 255, 176, .14); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238a93b5' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--mint); flex: none; }
.check small { display: block; color: var(--faint); font-size: 12.5px; }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--night); border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.seg button { min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--dim); font-family: var(--mono); font-size: 13px; cursor: pointer; position: relative; }
.seg button[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); font-weight: 600; }
.seg button:disabled { cursor: not-allowed; opacity: .45; }
.seg button:not([aria-pressed="true"]):not(:disabled):hover { background: var(--panel-2); color: var(--text); }

/* surfaces */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid var(--line-2); color: var(--dim); background: var(--panel-2); white-space: nowrap; }
.pill.mint { color: var(--mint); border-color: var(--mint-line); background: var(--mint-soft); }
.pill.amber { color: var(--amber); border-color: rgba(255, 181, 71, .4); background: var(--amber-soft); }
.pill.coral { color: var(--coral); border-color: rgba(255, 107, 107, .4); background: var(--coral-soft); }
.pill.violet { color: var(--violet); border-color: rgba(180, 155, 255, .4); background: var(--violet-soft); }
.pill.sky { color: var(--sky); border-color: rgba(108, 182, 255, .4); background: rgba(108, 182, 255, .1); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 0; text-decoration: none; color: #fff; font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.logo svg { width: 28px; height: 28px; flex: none; margin-right: 10px; }
.logo b { color: var(--mint); font-weight: 800; }

/* toast */
.toasts { position: fixed; z-index: 1000; right: 16px; bottom: 16px; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--sky); border-radius: var(--r-sm); padding: 11px 14px; font-size: 14px; box-shadow: var(--shadow); animation: toast-in .2s ease; }
.toast.ok { border-left-color: var(--mint); }
.toast.warn { border-left-color: var(--amber); }
.toast.err { border-left-color: var(--coral); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 500; background: rgba(5, 7, 14, .78); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 26px; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
