:root {
    --bg: #0B0F19;
    --bg-soft: #0f1524;
    --card: #141B2D;
    --card-2: #182136;
    --card-3: #1d2841;
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.24);
    --text: #E8ECF5;
    --text-soft: #C7D0E0;
    --muted: #94A3B8;
    --accent: #6366F1;
    --accent-2: #818CF8;
    --accent-soft: rgba(99, 102, 241, 0.15);
    --success: #22C55E;
    --success-soft: rgba(34, 197, 94, 0.13);
    --warning: #F59E0B;
    --warning-soft: rgba(245, 158, 11, 0.14);
    --danger: #EF4444;
    --danger-soft: rgba(239, 68, 68, 0.13);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 9px;
    --sidebar: 268px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.16);
    --font: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1100px 700px at 78% -8%, rgba(99, 102, 241, 0.16), transparent 62%),
        radial-gradient(800px 500px at 8% 8%, rgba(59, 130, 246, 0.07), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 78%);
    z-index: 0;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #A5B4FC; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.45rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.03em; line-height: 1.18; }
h3 { font-size: 1.02rem; letter-spacing: -0.01em; }
h4 { font-size: .92rem; }
strong { font-weight: 650; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
::selection { background: rgba(99, 102, 241, .4); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #26314a; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #33415f; }

.skip-link {
    position: absolute;
    left: 12px;
    top: -80px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
}
.skip-link:focus { top: 12px; }

.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
    width: var(--sidebar);
    flex: 0 0 var(--sidebar);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 16px 18px;
    background: rgba(11, 15, 25, 0.78);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
    z-index: 40;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 16px;
    color: var(--text);
}
.brand:hover { color: var(--text); }
.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #6366F1, #4338CA);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .04em;
    box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { color: #64748B; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 8px 12px 6px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--text-soft);
    font-size: 13.2px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.nav-item .icon { width: 18px; height: 18px; color: #7C8AA5; }
.nav-item:hover { background: rgba(148, 163, 184, .07); color: var(--text); transform: translateX(1px); }
.nav-item.is-active {
    background: linear-gradient(100deg, rgba(99, 102, 241, .2), rgba(99, 102, 241, .07));
    border-color: rgba(99, 102, 241, .28);
    color: #E0E7FF;
    box-shadow: inset 0 0 0 1px rgba(99,102,241,.06);
}
.nav-item.is-active .icon { color: var(--accent-2); }
.sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.nav-admin { border-color: var(--border); background: rgba(20, 27, 45, .6); }
.sidebar-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11.5px; }
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
    animation: pulse 2.2s infinite;
    display: inline-block;
    flex: 0 0 7px;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.sidebar-overlay { display: none; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 30px 16px;
    background: rgba(11, 15, 25, .76);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
}
.topbar-title { flex: 1; min-width: 0; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; color: #64748B; font-size: 11.5px; margin-bottom: 3px; }
.breadcrumbs a { color: #7C8AA5; }
.crumb-sep { color: #475569; }
.topbar h1 { font-size: 1.3rem; }
.topbar-title p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; padding-top: 5px; }
.menu-toggle { display: none; }
.content { flex: 1; width: 100%; max-width: 1520px; margin: 0 auto; padding: 24px 30px 42px; display: flex; flex-direction: column; gap: 20px; }
.app-footer {
    border-top: 1px solid var(--border);
    padding: 18px 30px 26px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 11.5px;
}
.footer-sep { margin: 0 6px; color: #475569; }

.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, #6366F1, #4F46E5); color: #fff; box-shadow: 0 10px 24px rgba(79, 70, 229, .28); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 30px rgba(79, 70, 229, .38); }
.btn-ghost { background: rgba(148, 163, 184, .06); border-color: var(--border); color: var(--text-soft); }
.btn-ghost:hover { background: rgba(148, 163, 184, .1); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: #FCA5A5; border-color: rgba(239, 68, 68, .2); }
.btn-sm { padding: 8px 12px; font-size: 12px; border-radius: 9px; }
.btn-xs { padding: 6px 9px; font-size: 11px; border-radius: 8px; }
.btn-block { width: 100%; }
.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, .05);
    color: var(--text-soft);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.icon-btn:hover { background: rgba(148, 163, 184, .1); color: var(--text); transform: translateY(-1px); }
.icon-btn.danger { color: #F87171; border-color: rgba(239, 68, 68, .18); }
.icon-btn.danger:hover { background: var(--danger-soft); }
.icon-btn .icon { width: 17px; height: 17px; }
.link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent-2); }
.link .icon { width: 14px; height: 14px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.grow { flex: 1; }
.mt-4 { margin-top: 4px; }
.text-success { color: #4ADE80 !important; }
.text-warning { color: #FBBF24 !important; }
.text-danger { color: #F87171 !important; }
.gradient-text { background: linear-gradient(100deg, #A5B4FC, #818CF8 40%, #60A5FA); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card {
    background: linear-gradient(180deg, rgba(20, 27, 45, .96), rgba(18, 24, 40, .94));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-soft);
    min-width: 0;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.card-head h3 { font-size: 1rem; }
.card-head p { margin-top: 3px; font-size: 12px; }
.card-head .badge { flex: 0 0 auto; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-chart { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.full-height { height: 100%; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 4px 2px; }
.page-head-row h2 { margin-top: 4px; }
.page-head-row p { margin-top: 6px; max-width: 780px; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #A5B4FC; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-subtitle { margin: 20px 0 10px; color: var(--text-soft); }

/* Hero */
.hero-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, .23);
    border-radius: 24px;
    padding: 40px 42px;
    background:
        linear-gradient(120deg, rgba(20, 27, 45, .98) 0%, rgba(23, 30, 53, .98) 55%, rgba(30, 30, 66, .95) 100%);
    box-shadow: var(--shadow);
}
.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(129, 140, 248, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(129, 140, 248, .055) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 75% 40%, #000 0%, transparent 65%);
    pointer-events: none;
}
.hero-glow { position: absolute; width: 420px; height: 420px; right: -80px; top: -180px; background: radial-gradient(circle, rgba(99, 102, 241, .34), transparent 65%); filter: blur(10px); pointer-events: none; }
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero-content h2 { margin: 14px 0 12px; font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.04; letter-spacing: -.045em; }
.hero-content > p { color: var(--text-soft); max-width: 620px; font-size: 14px; }
.search-form { margin-top: 24px; }
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(8, 12, 22, .76);
    border: 1px solid rgba(129, 140, 248, .25);
    border-radius: 14px;
    padding: 7px 7px 7px 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
    max-width: 720px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.search-box:focus-within { border-color: rgba(129, 140, 248, .65); box-shadow: 0 0 0 4px rgba(99, 102, 241, .12), 0 12px 40px rgba(0,0,0,.25); }
.search-box > .icon { color: #64748B; width: 20px; height: 20px; }
.search-box input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); padding: 9px 0; font-size: 15px; letter-spacing: .01em; }
.search-box input::placeholder { color: #4B5A73; }
.search-box .btn { padding: 12px 20px; }
.search-box-lg { max-width: 100%; padding: 9px 9px 9px 18px; }
.search-box-lg input { font-size: 16px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: #8390A8; font-size: 11.5px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .icon { width: 14px; height: 14px; color: #6366F1; }
.check-hero { padding: 28px; }
.check-hero .eyebrow { margin-bottom: 4px; }
.check-hero h2 { margin-top: 5px; }
.check-hero .search-form { margin-top: 18px; }
.check-tips { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 11.5px; }
.check-tips span { display: inline-flex; align-items: center; gap: 6px; }
.check-tips .icon { width: 14px; height: 14px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.stat-grid-sm { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat-card { padding: 18px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); opacity: .7; }
.stat-card.tone-success::after { background: var(--success); }
.stat-card.tone-warning::after { background: var(--warning); }
.stat-card.tone-danger::after { background: var(--danger); }
.stat-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stat-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-2); }
.stat-icon .icon { width: 15px; height: 15px; }
.tone-success .stat-icon { background: var(--success-soft); color: #4ADE80; }
.tone-warning .stat-icon { background: var(--warning-soft); color: #FBBF24; }
.tone-danger .stat-icon { background: var(--danger-soft); color: #F87171; }
.stat-label { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.stat-value { font-size: 1.8rem; font-weight: 720; letter-spacing: -.04em; line-height: 1.1; }
.stat-hint { color: #6F7D95; font-size: 10.5px; margin-top: 5px; }

/* Charts */
.chart-wrap { position: relative; width: 100%; min-height: 220px; }
.chart-wrap canvas { width: 100%; height: 220px; display: block; }
.tld-list { display: flex; flex-direction: column; gap: 15px; }
.tld-row-top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-bottom: 6px; }
.tld-name { font-weight: 700; color: #C7D2FE; font-family: var(--mono); }
.progress { height: 6px; background: rgba(148, 163, 184, .09); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4F46E5, #818CF8); }
.tld-row-meta { display: flex; gap: 14px; margin-top: 5px; font-size: 10.5px; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
    text-align: left;
    color: #74829B;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table th a { color: inherit; }
.data-table th a:hover { color: var(--accent-2); }
.data-table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, .075); vertical-align: middle; }
.data-table tbody tr { transition: background .13s ease; }
.data-table tbody tr:hover { background: rgba(99, 102, 241, .045); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table-wide { min-width: 940px; }
.domain-link { font-weight: 600; color: #C7D2FE; }
.domain-link:hover { color: #fff; }
.domain-link-lg { font-size: 15px; }
.error-cell { max-width: 260px; color: #FCA5A5; font-size: 11.5px; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.source-pill { display: inline-flex; align-items: center; border: 1px solid var(--border); background: rgba(148, 163, 184, .05); color: var(--text-soft); border-radius: 7px; padding: 2px 7px; font-family: var(--mono); font-size: 10px; }
.tld-chip { display: inline-flex; align-items: center; border: 1px solid rgba(99, 102, 241, .25); background: var(--accent-soft); color: #C7D2FE; border-radius: 6px; padding: 1px 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; }
.dns-type { display: inline-flex; padding: 2px 7px; border-radius: 6px; background: rgba(56, 189, 248, .1); color: #7DD3FC; font-family: var(--mono); font-size: 10.5px; font-weight: 700; }
.mini-stack { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--border); background: rgba(148, 163, 184, .055); border-radius: 7px; padding: 4px 9px; color: var(--text-soft); font-size: 11px; }
.chip-mono { font-family: var(--mono); font-size: 10.5px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 4px 9px; font-size: 10.5px; font-weight: 600; line-height: 1.2; border: 1px solid transparent; white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-extra { opacity: .75; font-weight: 500; }
.badge-success { background: var(--success-soft); color: #4ADE80; border-color: rgba(34, 197, 94, .2); }
.badge-warning { background: var(--warning-soft); color: #FBBF24; border-color: rgba(245, 158, 11, .2); }
.badge-danger { background: var(--danger-soft); color: #F87171; border-color: rgba(239, 68, 68, .2); }
.badge-primary { background: var(--accent-soft); color: #A5B4FC; border-color: rgba(99, 102, 241, .22); }
.badge-muted { background: rgba(148, 163, 184, .07); color: #94A3B8; border-color: var(--border); }

/* Result / detail */
.result-hero { position: relative; overflow: hidden; }
.result-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.result-hero.tone-success::before { background: var(--success); }
.result-hero.tone-warning::before { background: var(--warning); }
.result-hero.tone-danger::before { background: var(--danger); }
.result-head, .domain-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.result-domain { display: flex; align-items: center; gap: 14px; min-width: 0; }
.domain-avatar {
    width: 48px; height: 48px; flex: 0 0 48px; border-radius: 14px;
    display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #C7D2FE;
    background: linear-gradient(145deg, rgba(99, 102, 241, .25), rgba(99, 102, 241, .07));
    border: 1px solid rgba(99, 102, 241, .25);
}
.domain-avatar.xl { width: 60px; height: 60px; flex-basis: 60px; font-size: 26px; border-radius: 17px; }
.result-domain h2 { font-size: 1.55rem; letter-spacing: -.03em; word-break: break-all; }
.result-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 5px; font-size: 11.5px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.result-actions form { display: inline-flex; }
.result-message { display: flex; gap: 14px; padding: 16px; border-radius: 14px; margin-bottom: 20px; border: 1px solid var(--border); background: rgba(148, 163, 184, .035); }
.result-message h3 { margin-bottom: 3px; }
.result-message p { color: var(--text-soft); font-size: 12.5px; }
.message-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.success-message { border-color: rgba(34, 197, 94, .2); background: var(--success-soft); }
.success-message .message-icon { background: rgba(34, 197, 94, .15); color: #4ADE80; }
.warning-message { border-color: rgba(245, 158, 11, .2); background: var(--warning-soft); }
.warning-message .message-icon { background: rgba(245, 158, 11, .15); color: #FBBF24; }
.danger-message { border-color: rgba(239, 68, 68, .2); background: var(--danger-soft); }
.danger-message .message-icon { background: rgba(239, 68, 68, .15); color: #F87171; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.detail-grid-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.detail-item { background: rgba(13, 18, 31, .8); padding: 13px 15px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-item span { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
.detail-item strong { font-size: 12.5px; font-weight: 600; word-break: break-word; }
.detail-block { margin-top: 20px; }
.detail-block h4 { margin-bottom: 9px; color: var(--text-soft); }
.dns-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.dns-summary-row { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; color: var(--muted); font-size: 11px; }
.source-line { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10.5px; }
.source-line span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.source-line .icon { width: 13px; height: 13px; }
.source-line .mono { font-size: 10px; word-break: break-all; }
.inline-error { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; margin-bottom: 16px; border: 1px solid rgba(239, 68, 68, .22); background: var(--danger-soft); border-radius: 11px; color: #FCA5A5; font-size: 12px; }
.inline-error .icon { width: 16px; height: 16px; margin-top: 1px; }
.ns-list { display: flex; flex-direction: column; gap: 6px; }
.ns-item { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.ns-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(99,102,241,.1); }
.alt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.alt-card { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 13px; padding: 14px; background: rgba(148, 163, 184, .025); transition: border-color .16s ease, transform .16s ease, background .16s ease; }
.alt-card:hover { border-color: rgba(99, 102, 241, .4); background: var(--accent-soft); transform: translateY(-2px); color: inherit; }
.alt-card strong { font-size: 13px; color: var(--text); }
.alt-tld { color: var(--accent-2); font-family: var(--mono); font-size: 10.5px; }
.empty-check { text-align: center; padding: 54px 24px; }
.empty-check .empty-icon { margin: 0 auto 14px; }
.empty-check h3 { margin-bottom: 6px; }
.empty-check p { color: var(--muted); }
.example-domain { background: none; border: 0; color: var(--accent-2); padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.supported-zones { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin-top: 18px; }

/* Empty, notices */
.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state.compact { padding: 22px 10px; }
.empty-state h3 { color: var(--text); margin: 10px 0 5px; }
.empty-state p { margin-bottom: 14px; font-size: 12.5px; }
.empty-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); margin: 0 auto 12px; }
.empty-icon .icon { width: 24px; height: 24px; }
.notice-card { display: flex; gap: 16px; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(100deg, rgba(99, 102, 241, .08), rgba(20, 27, 45, .7)); }
.notice-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-2); }
.notice-card h3 { margin-bottom: 4px; }
.notice-card p { color: var(--muted); font-size: 12.5px; max-width: 1100px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: var(--text-soft); font-size: 11.5px; font-weight: 600; }
.field input, .field select, .field textarea {
    width: 100%;
    background: rgba(8, 12, 22, .55);
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    padding: 9px 11px;
    font-size: 12.5px;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(129, 140, 248, .6); box-shadow: 0 0 0 3px rgba(99, 102, 241, .1); }
.field input::placeholder, .field textarea::placeholder { color: #4B5A73; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #64748B 50%), linear-gradient(135deg, #64748B 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .icon { position: absolute; left: 11px; width: 15px; height: 15px; color: #64748B; pointer-events: none; }
.input-icon input { padding-left: 34px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.inline-form .field { min-width: 220px; }
.check-field { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 12px; cursor: pointer; }
.check-field input { width: 15px; height: 15px; accent-color: var(--accent); }
.check-row { display: flex; flex-wrap: wrap; gap: 20px; }
.range-row { display: flex; gap: 8px; }
.filter-card { padding: 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; align-items: end; }
.filter-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-switch { display: flex; flex-wrap: wrap; gap: 6px; background: rgba(148, 163, 184, .05); border: 1px solid var(--border); padding: 4px; border-radius: 11px; }
.period-chip { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.period-chip:hover { color: var(--text); background: rgba(148, 163, 184, .08); }
.period-chip.is-active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .3); }
.form-actions { display: flex; gap: 8px; }
.hint-box { margin-top: 16px; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--border-strong); background: rgba(148, 163, 184, .03); color: var(--muted); font-size: 11.5px; }
.hint-box strong { color: var(--text-soft); }
.settings-form { display: flex; flex-direction: column; gap: 16px; }
.settings-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.sticky-actions { position: sticky; bottom: 16px; display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 13px; background: rgba(11, 15, 25, .9); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.admin-grid { align-items: start; }

/* Watch / sources */
.watch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.watch-card { position: relative; overflow: hidden; }
.watch-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.watch-card.tone-success::before { background: var(--success); }
.watch-card.tone-warning::before { background: var(--warning); }
.watch-card.tone-danger::before { background: var(--danger); }
.watch-head { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.watch-meta { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; }
.watch-details { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.watch-details div { display: flex; flex-direction: column; gap: 2px; }
.watch-details span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.watch-details strong { font-size: 12px; }
.watch-note { margin-top: 11px; color: var(--text-soft); font-size: 11.5px; font-style: italic; }
.watch-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.source-card { display: flex; flex-direction: column; gap: 12px; }
.source-head { display: flex; gap: 12px; align-items: flex-start; }
.source-icon { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.source-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.source-description { color: var(--muted); font-size: 12px; }
.source-url { color: #7C8AA5; font-size: 10px; word-break: break-all; padding: 6px 9px; background: rgba(8, 12, 22, .4); border-radius: 7px; }
.source-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.source-stats div { display: flex; flex-direction: column; gap: 2px; }
.source-stats span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.source-stats strong { font-size: 11.5px; }
.source-error { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: 8px; background: var(--danger-soft); color: #FCA5A5; font-size: 11px; }
.source-error .icon { width: 14px; height: 14px; margin-top: 1px; }

/* Status lists */
.status-list { display: flex; flex-direction: column; }
.status-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(148, 163, 184, .075); font-size: 12px; }
.status-row:last-child { border-bottom: 0; }
.status-row > span:first-child { color: var(--muted); }
.status-row strong { text-align: right; font-weight: 600; }
.interval-list { display: flex; flex-direction: column; }
.interval-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(148, 163, 184, .075); font-size: 12px; }
.interval-row:last-child { border-bottom: 0; }
.interval-row span { color: var(--muted); }
.interval-row.highlight { margin-top: 6px; padding: 10px 12px; border: 1px solid rgba(245, 158, 11, .2); background: var(--warning-soft); border-radius: 9px; }
.interval-row.highlight span { color: #FCD34D; }
.queue-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.queue-cell { display: flex; flex-direction: column; gap: 3px; padding: 11px; border-radius: 10px; background: rgba(148, 163, 184, .035); border: 1px solid var(--border); }
.queue-cell span { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.queue-cell strong { font-size: 1.3rem; letter-spacing: -.03em; }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.health-card { display: flex; align-items: center; gap: 12px; padding: 15px; }
.health-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: var(--accent-soft); color: var(--accent-2); }
.health-icon.ok { background: var(--success-soft); color: #4ADE80; }
.health-icon.bad { background: var(--danger-soft); color: #F87171; }
.health-icon.warn { background: var(--warning-soft); color: #FBBF24; }
.health-card div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.health-card span { font-size: 10.5px; }
.health-card strong { font-size: 12px; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.quick-links a { display: flex; align-items: center; gap: 7px; padding: 8px 9px; border-radius: 8px; color: var(--text-soft); font-size: 11.5px; background: rgba(148, 163, 184, .03); }
.quick-links a:hover { background: var(--accent-soft); color: #C7D2FE; }
.quick-links .icon { width: 14px; height: 14px; }

/* Timeline / changes */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; display: flex; gap: 14px; padding: 0 0 16px 4px; }
.timeline-item::before { content: ""; position: absolute; left: 9px; top: 14px; bottom: 0; width: 1px; background: var(--border); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 11px; height: 11px; flex: 0 0 11px; margin-top: 4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(99,102,241,.1); }
.timeline-date { color: var(--muted); font-size: 10.5px; margin-bottom: 2px; }
.change-list { display: flex; flex-direction: column; }
.change-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(148, 163, 184, .075); align-items: flex-start; }
.change-row:last-child { border-bottom: 0; }
.change-type { flex: 0 0 auto; padding: 2px 7px; border-radius: 6px; background: rgba(99,102,241,.12); color: #A5B4FC; font-family: var(--mono); font-size: 9.5px; margin-top: 1px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; }
.steps li > span { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: #A5B4FC; font-size: 11px; font-weight: 700; }
.steps p { color: var(--muted); font-size: 11.5px; margin-top: 2px; }

/* Admin */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-tab { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.admin-tab:hover { color: var(--text); background: rgba(148, 163, 184, .06); }
.admin-tab.is-active { color: #C7D2FE; background: var(--accent-soft); }
.admin-logout { flex: 0 0 auto; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 18px; }
.page-btn { min-width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-size: 11.5px; padding: 0 8px; }
.page-btn:hover { color: var(--text); background: rgba(148, 163, 184, .06); }
.page-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.is-disabled { opacity: .35; pointer-events: none; }

/* Alerts / toasts */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--border); font-size: 12.5px; }
.alert .icon { width: 16px; height: 16px; margin-top: 1px; flex: 0 0 16px; }
.alert-success { background: var(--success-soft); border-color: rgba(34,197,94,.22); color: #BBF7D0; }
.alert-error { background: var(--danger-soft); border-color: rgba(239,68,68,.22); color: #FECACA; }
.alert-lg { padding: 16px; }
.alert-lg > div { display: flex; flex-direction: column; gap: 2px; }
.alert-close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; padding: 0; }
.alert-close:hover { opacity: 1; }
.alert-close .icon { width: 15px; height: 15px; }
.toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast { padding: 12px 14px; border-radius: 11px; background: #1B2439; border: 1px solid var(--border-strong); box-shadow: var(--shadow); color: var(--text); font-size: 12px; animation: toastIn .22s ease; }
.toast.success { border-color: rgba(34,197,94,.35); }
.toast.error { border-color: rgba(239,68,68,.4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Error page */
.error-page { text-align: center; padding: 60px 24px; }
.error-code { font-size: clamp(4rem, 12vw, 8rem); line-height: 1; font-weight: 800; letter-spacing: -.08em; background: linear-gradient(120deg, #818CF8, #4F46E5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h2 { margin: 10px 0 8px; }
.error-page p { color: var(--muted); max-width: 620px; margin: 0 auto 22px; }
.error-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

/* Auth */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-wrap { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.auth-brand { padding: 0; }
.auth-card { width: 100%; background: linear-gradient(180deg, rgba(20,27,45,.98), rgba(16,22,37,.98)); border: 1px solid var(--border); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.auth-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 14px; }
.auth-icon .icon { width: 24px; height: 24px; }
.auth-card h1 { font-size: 1.4rem; margin-bottom: 4px; }
.auth-card > p { font-size: 12px; margin-bottom: 20px; }
.auth-card .alert { margin-bottom: 14px; }
.auth-card .form-stack { gap: 13px; }
.auth-links { margin-top: 18px; text-align: center; font-size: 12px; }
.auth-footnote { font-size: 11px; text-align: center; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.content > * { animation: fadeUp .3s ease both; }
.content > *:nth-child(2) { animation-delay: .03s; }
.content > *:nth-child(3) { animation-delay: .06s; }
.content > *:nth-child(4) { animation-delay: .09s; }

/* Responsive */
@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .settings-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
    .grid-2, .grid-chart { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat-grid-sm { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid, .detail-grid-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .source-grid, .watch-grid { grid-template-columns: 1fr; }
    .hero-card { padding: 32px; }
}
@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--shadow); background: #0c111e; }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-overlay.is-open { display: block; position: fixed; inset: 0; background: rgba(3, 6, 13, .68); z-index: 35; backdrop-filter: blur(2px); }
    .menu-toggle { display: inline-grid; margin-top: 4px; }
    .topbar { padding: 14px 18px; }
    .content { padding: 18px 18px 34px; }
    .app-footer { padding: 16px 18px 24px; flex-direction: column; gap: 6px; }
    .page-head-row { flex-direction: column; align-items: flex-start; }
    .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .result-head, .domain-hero-top { flex-direction: column; }
    .result-actions { justify-content: flex-start; }
    .hero-card { padding: 26px 22px; }
    .hero-content h2 { font-size: 2rem; }
    .admin-bar { align-items: flex-start; flex-direction: column; }
    .queue-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .topbar-title p { display: none; }
    .topbar-check span { display: none; }
    .topbar-actions .btn span { display: none; }
    .search-box { flex-wrap: wrap; padding: 10px; }
    .search-box > .icon { display: none; }
    .search-box input { flex-basis: 100%; padding: 8px 4px; }
    .search-box .btn { width: 100%; }
    .stat-grid, .stat-grid-sm { grid-template-columns: 1fr 1fr; }
    .filter-grid, .settings-grid { grid-template-columns: 1fr; }
    .detail-grid, .detail-grid-lg { grid-template-columns: 1fr; }
    .health-grid { grid-template-columns: 1fr; }
    .inline-form { flex-direction: column; align-items: stretch; }
    .inline-form .field { min-width: 0; }
    .result-domain { align-items: flex-start; }
    .result-domain h2 { font-size: 1.2rem; }
    .domain-avatar.xl { width: 48px; height: 48px; flex-basis: 48px; font-size: 20px; }
    .card { padding: 17px; border-radius: 15px; }
    .hero-card { border-radius: 18px; }
    .page-head-row h2 { font-size: 1.45rem; }
    .period-switch { width: 100%; }
    .period-chip { flex: 1; text-align: center; }
    .watch-details { grid-template-columns: 1fr 1fr; }
    .sticky-actions { flex-direction: column; align-items: stretch; }
    .auth-card { padding: 22px; }
}
