/* whitelist-portal — HostingSecure look & feel (matches ip./login.hostingsecure.com).
   Self-hosted Inter; no external CDN. */

/* ── Self-hosted Inter (variable, latin + latin-ext) ── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --primary: #0069ff;
  --secondary: #0053c8;
  --brand-dark: #1a2b6d;
  --ink: #333333;
  --muted: #475467;
  --value: #1976d2;
  --bg: #f8f9fa;
  --card: #ffffff;
  --border: #e4e7ec;
  --error: #e74c3c;
  --success: #2ecc71;
  --success-ink: #15803d;
  --warn: #f59e0b;
  --warn-ink: #b45309;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --banner: linear-gradient(to right, rgba(30, 58, 138, 1) 0%, rgba(23, 37, 84, 1) 100%);
  --radius: 8px;
}

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

html, body { height: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: 850px; margin: 0 auto; padding: 0 2rem; }

/* ── Banner / header ── */
header.site {
  background: var(--banner);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
  color: #fff;
  padding: 2.25rem 0 3rem;
}
header.site .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; }
header.site .topbar {
  width: 100%; display: flex; align-items: center; justify-content: flex-end;
  margin-bottom: 1rem; gap: 1rem;
}
header.site .brand {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: .2px; text-decoration: none;
}
header.site .brand img { width: 22px; height: 22px; display: block; }
header.site .langs a {
  color: rgba(255, 255, 255, .75); font-size: .8rem; font-weight: 600; margin-left: .6rem; text-decoration: none;
}
header.site .langs a.active { color: #fff; }
header.site h1 { color: #fff; font-size: 2rem; font-weight: 600; letter-spacing: .5px; line-height: 1.25; }
header.site .subtitle { color: rgba(255, 255, 255, .85); font-size: 1.05rem; font-weight: 400; max-width: 620px; }

header.site nav.tabs { display: flex; gap: .35rem; margin-top: 1.1rem; flex-wrap: wrap; justify-content: center; }
header.site nav.tabs a {
  color: rgba(255, 255, 255, .82); font-size: .9rem; font-weight: 600; text-decoration: none;
  padding: .4rem .9rem; border-radius: 999px; transition: background .2s, color .2s;
}
header.site nav.tabs a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
header.site nav.tabs a.active { background: #fff; color: var(--brand-dark); }

/* ── Main / cards ── */
main.wrap { padding-top: 0; padding-bottom: 2.5rem; flex: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  padding: 2rem;
  margin-top: -32px;          /* overlap the banner, HostingSecure signature */
  margin-bottom: 1.5rem;
}
.card + .card, .results .card, .card.flush { margin-top: 0; }
.card h2 { color: var(--brand-dark); font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; }
.lead { color: var(--muted); margin-bottom: 1.25rem; }

/* ── IP detection rows (info-row pattern) ── */
.ipbox { display: flex; flex-direction: column; gap: 0; }
.ip-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--border);
}
.ip-row:last-child { border-bottom: 0; }
.ip-label { font-weight: 600; color: var(--ink); }
.ip-value { color: var(--value); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; word-break: break-all; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: #fff; color: var(--ink); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1.4rem; font-family: var(--font);
  font-size: 1rem; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 2px 5px rgba(0, 0, 0, .1); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--primary); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--secondary); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.block, .form .btn.primary { width: 100%; }

#checkBtn { margin-top: 1.25rem; min-width: 220px; }

/* ── Forms ── */
.form label { display: block; font-weight: 600; color: var(--ink); margin: 1.1rem 0 .4rem; }
.form label:first-of-type { margin-top: 0; }
input, select, textarea {
  width: 100%; background: #fff; color: var(--ink);
  border: 1px solid #d5dbe3; border-radius: 6px; padding: .75rem; font-size: 1rem; font-family: var(--font);
  transition: border-color .2s, box-shadow .2s;
}
input[readonly] { background: #f2f4f7; color: var(--muted); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0, 105, 255, .2);
}
.form .btn.primary { margin-top: 1.5rem; }
.cf-turnstile { margin-top: 1.25rem; }

.manual { margin-top: 1.25rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.manual summary { color: var(--muted); cursor: pointer; font-weight: 600; font-size: .95rem; }
.manual-row { display: flex; gap: .6rem; margin-top: .9rem; flex-wrap: wrap; }
.manual-row input { flex: 1; min-width: 200px; }

/* ── Lookup results ── */
.results { margin-top: 1.5rem; }
.result-card {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 4px 10px rgba(0, 0, 0, .06);
  padding: 1.25rem 1.4rem; margin-bottom: 1rem;
}
.result-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .25rem; }
.result-card .server { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: var(--muted); }
.result-card p { margin-top: .6rem; }
.result-card .meta { margin-top: .7rem; font-size: .9rem; color: var(--muted); }
.result-card .actions { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.result-card.sev-block { border-left-color: var(--error); }
.result-card.sev-block h3 { color: var(--error); }
.result-card.sev-challenge { border-left-color: var(--warn); }
.result-card.sev-challenge h3 { color: var(--warn-ink); }
.result-card.sev-white { border-left-color: var(--success); }
.result-card.sev-white h3 { color: var(--success-ink); }

.result-clear {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 4px solid var(--success);
  color: var(--success-ink); border-radius: var(--radius); padding: 1rem 1.25rem; font-weight: 600; margin-bottom: 1rem;
}

/* ── Status cards (temp/permanent success + polling) ── */
.status-card { border-left: 4px solid var(--border); }
.status-card.ok { border-left-color: var(--success); }
.status-card.warn { border-left-color: var(--warn); }
.status-card.err { border-left-color: var(--error); }
.spinner {
  display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0, 0, 0, .12);
  border-left-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite;
  vertical-align: -2px; margin-right: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.err { color: var(--error); font-size: .95rem; margin-top: .9rem; }
.muted { color: var(--muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .wrap { padding: 0 1rem; }
  header.site { padding: 1.75rem 0 2.5rem; }
  header.site h1 { font-size: 1.4rem; }
  header.site .subtitle { font-size: .95rem; }
  .card { padding: 1.5rem; margin-top: -28px; }
  #checkBtn { width: 100%; }
}
@media (max-width: 480px) {
  header.site h1 { font-size: 1.25rem; }
}
