/* =====================================================
   ThreatGrid DNS — v3.0
   Dark cyber aesthetic · Neon accents · Premium security
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg:           #0a0e17;
    --bg-2:         #0f1420;
    --bg-3:         #141a2a;
    --bg-4:         #1a2236;
    --border:       rgba(0, 240, 255, 0.08);
    --border-2:     rgba(0, 240, 255, 0.12);
    --border-bright: rgba(0, 240, 255, 0.25);

    --cyan:         #00f0ff;
    --cyan-dim:     #00b8c5;
    --cyan-glow:    rgba(0, 240, 255, 0.15);
    --cyan-subtle:  rgba(0, 240, 255, 0.06);

    --green:        #00ff88;
    --green-dim:    #00cc6a;
    --red:          #ff3366;
    --red-dim:      #cc2952;
    --yellow:       #ffcc00;
    --purple:       #a855f7;
    --blue:         #3b82f6;
    --orange:       #ff8800;

    --success:      #00ff88;
    --warning:      #ffcc00;
    --danger:       #ff3366;
    --info:         #3b82f6;

    --text:         #e8edf5;
    --text-2:       #8892a8;
    --text-3:       #4a5568;

    --mono:         'JetBrains Mono', 'Courier New', monospace;
    --sans:         'Inter', -apple-system, sans-serif;
    --display:      'Space Grotesk', sans-serif;

    --radius:       6px;
    --radius-lg:    10px;
    --radius-xl:    16px;

    --glow-sm:      0 0 10px rgba(0, 240, 255, 0.15);
    --glow-md:      0 0 20px rgba(0, 240, 255, 0.2);
    --glow-lg:      0 0 40px rgba(0, 240, 255, 0.15), 0 0 80px rgba(0, 240, 255, 0.05);
    --shadow-card:  0 4px 24px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text); }

::selection { background: rgba(0, 240, 255, 0.2); color: #fff; }

/* =====================
   ANIMATED GRID BG
   ===================== */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* =====================
   LAYOUT
   ===================== */
.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
    width: 240px;
    background: var(--bg-2);
    border-right: 1px solid var(--border-2);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    backdrop-filter: blur(20px);
}

.main {
    margin-left: 240px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar-logo {
    padding: 0;
    border-bottom: 1px solid var(--border-2);
    overflow: hidden;
}

.sidebar-logo-inner {
    padding: 24px 22px 20px;
    background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
    position: relative;
    border-bottom: 1px solid var(--border-bright);
}

.sidebar-logo-inner::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0.6;
}

.sidebar-logo-inner::after {
    content: '';
    position: absolute;
    bottom: -12px; left: 0; right: 0;
    height: 12px;
    background: linear-gradient(to bottom, rgba(0, 240, 255, 0.08), transparent);
}

.logo-brand {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-brand .logo-icon {
    width: 28px;
    height: 28px;
    background: var(--cyan);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-sm);
}

.logo-brand .logo-icon svg { width: 16px; height: 16px; }

.logo-sub {
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 6px;
    margin-left: 36px;
    font-weight: 600;
    font-family: var(--mono);
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-group { margin-bottom: 6px; }

.nav-group-label {
    font-size: 9px;
    letter-spacing: 0.25em;
    color: var(--text-3);
    text-transform: uppercase;
    padding: 10px 22px 6px;
    font-weight: 600;
    font-family: var(--mono);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    position: relative;
    margin: 1px 8px;
    border-radius: var(--radius);
    border-left: none;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(0, 240, 255, 0.05);
}

.nav-item.active {
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(0, 240, 255, 0.12);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--cyan);
    border-radius: 0 4px 4px 0;
    box-shadow: var(--glow-sm);
}

.nav-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.nav-item:hover .nav-icon { opacity: 0.8; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
    border-top: 1px solid var(--border-2);
    padding: 18px 22px;
    background: var(--bg-3);
}

.footer-user {
    font-size: 11px;
    color: var(--text-2);
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--mono);
}

.footer-role {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    background: var(--cyan-subtle);
    border: 1px solid rgba(0, 240, 255, 0.2);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: var(--mono);
}

/* =====================
   TOPBAR
   ===================== */
.topbar {
    height: 56px;
    background: rgba(15, 20, 32, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

.topbar-sep { color: var(--text-3); font-size: 18px; }

.topbar-sub {
    font-size: 12px;
    color: var(--text-2);
    font-family: var(--mono);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--mono);
    background: rgba(0, 255, 136, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 136, 0.15);
}

.status-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
    animation: pulse-glow 2.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(0, 255, 136, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 4px rgba(0, 255, 136, 0.3); }
}

/* =====================
   CONTENT
   ===================== */
.content { padding: 32px; flex: 1; }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.page-header-left h2 {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

.page-header-left p {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

/* =====================
   STAT CARDS
   ===================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--glow-sm);
    transform: translateY(-1px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    opacity: 0.6;
}

.stat-card-label,
.stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 10px;
    font-family: var(--mono);
}

.stat-card-value,
.stat-value {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.stat-card-sub,
.stat-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 8px;
    font-family: var(--mono);
}

/* =====================
   CARDS
   ===================== */
.card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.card:hover { border-color: var(--border-2); }

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 26, 42, 0.6);
}

.card-title {
    font-family: var(--display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}

.card-body { padding: 24px; }

/* =====================
   TABLES
   ===================== */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead th {
    padding: 12px 20px;
    text-align: left;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: var(--text-3);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-2);
    font-weight: 600;
    background: rgba(20, 26, 42, 0.4);
    font-family: var(--mono);
}

tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
    transition: background 0.15s;
}

tbody tr:hover td { background: rgba(0, 240, 255, 0.02); }

.td-primary { color: var(--text); font-weight: 500; }

.td-mono {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
}

.td-link {
    color: var(--cyan);
    text-decoration: none;
    font-family: var(--mono);
    font-size: 12px;
    transition: all 0.2s;
}
.td-link:hover { color: #fff; text-shadow: 0 0 8px rgba(0, 240, 255, 0.4); }

/* =====================
   BADGES
   ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: var(--mono);
}

.badge-success { background: rgba(0, 255, 136, 0.1);  color: var(--green);  border: 1px solid rgba(0, 255, 136, 0.2); }
.badge-danger  { background: rgba(255, 51, 102, 0.1); color: var(--red);    border: 1px solid rgba(255, 51, 102, 0.2); }
.badge-warning { background: rgba(255, 204, 0, 0.1);  color: var(--yellow); border: 1px solid rgba(255, 204, 0, 0.2); }
.badge-info    { background: rgba(59, 130, 246, 0.1); color: var(--blue);   border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-muted   { background: var(--bg-4); color: var(--text-3); border: 1px solid var(--border-2); }
.badge-red     { background: var(--red); color: #fff; border: 1px solid var(--red); }
.badge-cyan    { background: rgba(0, 240, 255, 0.1); color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.2); }

/* =====================
   BUTTONS
   ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--cyan);
    color: var(--bg);
    border-color: var(--cyan);
    font-weight: 700;
}
.btn-primary:hover {
    background: #33f5ff;
    box-shadow: var(--glow-md);
    transform: translateY(-1px);
    color: var(--bg);
}

.btn-danger {
    background: transparent;
    color: var(--red);
    border-color: rgba(255, 51, 102, 0.3);
}
.btn-danger:hover {
    background: rgba(255, 51, 102, 0.1);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: var(--border-2);
}
.btn-ghost:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--border-bright);
    color: var(--text);
}

.btn-outline-cyan {
    background: transparent;
    color: var(--cyan);
    border: 1px solid rgba(0, 240, 255, 0.3);
}
.btn-outline-cyan:hover {
    background: rgba(0, 240, 255, 0.08);
    border-color: var(--cyan);
    box-shadow: var(--glow-sm);
    color: var(--cyan);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 10px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }

/* =====================
   FORMS
   ===================== */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--text-3);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-family: var(--mono);
}

.form-control {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--sans);
    font-size: 13px;
    padding: 10px 14px;
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
}

.form-control:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}
.form-control::placeholder { color: var(--text-3); }
select.form-control { cursor: pointer; }

/* =====================
   ALERTS
   ===================== */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    margin-bottom: 18px;
    border-left: 3px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
}

.alert-success { background: rgba(0, 255, 136, 0.06);  border-color: var(--success); color: var(--success); }
.alert-danger  { background: rgba(255, 51, 102, 0.06); border-color: var(--danger);  color: var(--danger); }
.alert-warning { background: rgba(255, 204, 0, 0.06);  border-color: var(--warning); color: var(--warning); }
.alert-info    { background: rgba(59, 130, 246, 0.06); border-color: var(--info);    color: var(--info); }

/* =====================
   MODALS
   ===================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xl);
    width: 500px;
    max-width: 90vw;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), var(--glow-lg);
    position: relative;
    overflow: hidden;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-family: var(--display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    transition: all 0.2s;
    border-radius: 4px;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.05); }

.modal-body { padding: 28px; }
.modal-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(20, 26, 42, 0.4);
}

/* =====================
   RECORD TYPE TAGS
   ===================== */
.rtype {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: var(--mono);
}
.rtype-A     { background: rgba(59, 130, 246, 0.12);  color: #60a5fa; }
.rtype-AAAA  { background: rgba(59, 130, 246, 0.12);  color: #60a5fa; }
.rtype-CNAME { background: rgba(0, 255, 136, 0.12);   color: #4ade80; }
.rtype-MX    { background: rgba(255, 204, 0, 0.12);   color: #fbbf24; }
.rtype-TXT   { background: rgba(160, 160, 160, 0.12); color: #9ca3af; }
.rtype-NS    { background: rgba(0, 240, 255, 0.12);   color: var(--cyan); }
.rtype-SOA   { background: rgba(168, 85, 247, 0.12);  color: #c084fc; }
.rtype-SRV   { background: rgba(168, 85, 247, 0.12);  color: #c084fc; }
.rtype-CAA   { background: rgba(20, 184, 166, 0.12);  color: #2dd4bf; }
.rtype-PTR   { background: rgba(255, 136, 0, 0.12);   color: #fb923c; }

/* =====================
   LOGIN PAGE
   ===================== */
.login-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.login-left {
    background: linear-gradient(160deg, #0a1628 0%, #0c1a30 40%, #091420 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.login-left::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-hero {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-hero-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-lg);
}

.login-hero-icon svg {
    width: 40px;
    height: 40px;
    color: var(--cyan);
}

.login-left-brand {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.login-left-brand span {
    color: var(--cyan);
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.3);
}

.login-left-sub {
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    margin-top: 12px;
    font-family: var(--mono);
    font-weight: 600;
}

.login-left-tagline {
    margin-top: 28px;
    font-size: 14px;
    color: var(--text-2);
    max-width: 320px;
    line-height: 1.7;
}

.login-left-footer {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--mono);
    z-index: 1;
    white-space: nowrap;
}

.login-right {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px;
    position: relative;
}

.login-form-wrap {
    width: 100%;
    max-width: 380px;
}

.login-form-title {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-form-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-bottom: 36px;
}

/* =====================
   CODE BLOCK
   ===================== */
.code-block {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 2;
    color: var(--text-2);
    overflow-x: auto;
}

.code-comment { color: var(--text-3); }
.code-cmd { color: var(--cyan); }

/* =====================
   EMPTY STATE
   ===================== */
.empty-state {
    text-align: center;
    padding: 56px 24px;
    color: var(--text-3);
}

.empty-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-3);
}

.empty-state p { font-size: 13px; }

/* =====================
   GRID HELPERS
   ===================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.text-muted   { color: var(--text-3); font-size: 12px; }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-cyan    { color: var(--cyan); }
.text-mono    { font-family: var(--mono); font-size: 12px; }

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* =====================
   LANDING PAGE
   ===================== */
.landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s;
}

.landing-nav.scrolled {
    background: rgba(10, 14, 23, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.landing-nav-brand {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.landing-nav-brand span { color: var(--cyan); }

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.landing-nav-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.landing-nav-links a:hover { color: var(--text); }

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 32px 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 65%);
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.15);
    margin-bottom: 32px;
    font-family: var(--mono);
    position: relative;
    z-index: 1;
    letter-spacing: 0.05em;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.hero h1 {
    font-family: var(--display);
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    max-width: 800px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.hero h1 span { color: var(--cyan); text-shadow: 0 0 40px rgba(0, 240, 255, 0.3); }

.hero-sub {
    font-size: 18px;
    color: var(--text-2);
    max-width: 560px;
    margin: 24px auto 40px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.hero-cta {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 80px;
    position: relative;
    z-index: 1;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--display);
    font-size: 32px;
    font-weight: 700;
    color: var(--cyan);
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
    font-family: var(--mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Features Section */
.section {
    padding: 100px 48px;
    position: relative;
    z-index: 1;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 12px;
    font-family: var(--mono);
}

.section-title {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.section-desc {
    font-size: 16px;
    color: var(--text-2);
    max-width: 520px;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--glow-sm);
    transform: translateY(-4px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 22px;
}

.feature-icon-cyan    { background: rgba(0, 240, 255, 0.1); border: 1px solid rgba(0, 240, 255, 0.15); color: var(--cyan); }
.feature-icon-green   { background: rgba(0, 255, 136, 0.1); border: 1px solid rgba(0, 255, 136, 0.15); color: var(--green); }
.feature-icon-purple  { background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.15); color: var(--purple); }
.feature-icon-yellow  { background: rgba(255, 204, 0, 0.1); border: 1px solid rgba(255, 204, 0, 0.15); color: var(--yellow); }
.feature-icon-blue    { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.15); color: var(--blue); }
.feature-icon-orange  { background: rgba(255, 136, 0, 0.1); border: 1px solid rgba(255, 136, 0, 0.15); color: var(--orange); }

.feature-card h3 {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.65;
}

/* Infrastructure Section */
.infra-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 56px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.infra-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.infra-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.infra-card-title {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    color: var(--cyan);
}

.infra-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.infra-row:last-child { border-bottom: none; }
.infra-row-label { color: var(--text-3); }
.infra-row-value { color: var(--text); font-family: var(--mono); font-size: 12px; }

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 100px 48px;
    position: relative;
    z-index: 1;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 65%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cta-section h2 {
    font-family: var(--display);
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    position: relative;
    z-index: 1;
}

.cta-section h2 span { color: var(--cyan); }

.cta-section p {
    font-size: 16px;
    color: var(--text-2);
    margin: 16px auto 36px;
    max-width: 500px;
    position: relative;
    z-index: 1;
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-3);
    position: relative;
    z-index: 1;
}

.landing-footer a {
    color: var(--text-3);
    text-decoration: none;
}
.landing-footer a:hover { color: var(--text-2); }

.landing-footer-links {
    display: flex;
    gap: 24px;
}

/* =====================
   TOAST NOTIFICATIONS
   ===================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    min-width: 300px;
    max-width: 440px;
    pointer-events: all;
    backdrop-filter: blur(16px);
    border: 1px solid;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.3s ease;
}

.toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-success { background: rgba(0, 255, 136, 0.08); border-color: rgba(0, 255, 136, 0.2); color: var(--green); }
.toast-danger  { background: rgba(255, 51, 102, 0.08); border-color: rgba(255, 51, 102, 0.2); color: var(--red); }
.toast-warning { background: rgba(255, 204, 0, 0.08); border-color: rgba(255, 204, 0, 0.2); color: var(--yellow); }
.toast-info    { background: rgba(0, 240, 255, 0.08); border-color: rgba(0, 240, 255, 0.2); color: var(--cyan); }

.toast-icon { flex-shrink: 0; display: flex; }
.toast-msg  { flex: 1; color: var(--text); }
.toast-close {
    background: none; border: none; color: var(--text-3);
    cursor: pointer; font-size: 18px; padding: 0 0 0 8px;
    line-height: 1; transition: color 0.2s;
}
.toast-close:hover { color: var(--text); }

/* =====================
   SEARCH BAR
   ===================== */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.search-bar-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
    display: flex;
}

.search-bar input,
.table-search-input {
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--sans);
    font-size: 13px;
    padding: 9px 14px 9px 38px;
    transition: all 0.2s ease;
    outline: none;
}

.search-bar input:focus,
.table-search-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.08);
}

.search-bar input::placeholder,
.table-search-input::placeholder { color: var(--text-3); }

.search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-family: var(--mono);
    color: var(--text-3);
    background: var(--bg-4);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid var(--border);
    pointer-events: none;
}

/* =====================
   PROGRESS BAR
   ===================== */
.progress-bar {
    height: 6px;
    background: var(--bg-4);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
}

.progress-bar-fill.cyan   { background: var(--cyan); box-shadow: 0 0 8px rgba(0, 240, 255, 0.3); }
.progress-bar-fill.green  { background: var(--green); box-shadow: 0 0 8px rgba(0, 255, 136, 0.3); }
.progress-bar-fill.red    { background: var(--red); box-shadow: 0 0 8px rgba(255, 51, 102, 0.3); }
.progress-bar-fill.yellow { background: var(--yellow); box-shadow: 0 0 8px rgba(255, 204, 0, 0.3); }

/* =====================
   TABS
   ===================== */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-3);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--sans);
    position: relative;
}

.tab-btn:hover { color: var(--text-2); }
.tab-btn.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* =====================
   HEALTH CARDS
   ===================== */
.health-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.health-card:hover {
    border-color: var(--border-bright);
}

.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-dot.online {
    background: var(--green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    animation: pulse-glow 2.5s infinite;
}

.health-dot.offline {
    background: var(--red);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

.health-info { flex: 1; }
.health-name {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.health-meta {
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--mono);
    margin-top: 2px;
}

/* =====================
   QUICK ACTIONS
   ===================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.quick-action:hover {
    border-color: var(--border-bright);
    background: var(--bg-3);
    box-shadow: var(--glow-sm);
    transform: translateY(-1px);
    color: var(--text);
}

.quick-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =====================
   RECORD TEMPLATES
   ===================== */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.template-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: var(--text-2);
}

.template-card:hover {
    border-color: var(--border-bright);
    color: var(--text);
    background: var(--bg-4);
}

.template-card-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.template-card-name {
    font-weight: 600;
    color: var(--text);
    font-size: 12px;
}

.template-card-desc {
    font-size: 11px;
    color: var(--text-3);
}

/* =====================
   PROPAGATION CHECKER
   ===================== */
.prop-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.prop-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 12px;
}

.prop-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.prop-dot.ok     { background: var(--green); box-shadow: 0 0 6px rgba(0,255,136,0.3); }
.prop-dot.fail   { background: var(--red); box-shadow: 0 0 6px rgba(255,51,102,0.3); }
.prop-dot.wait   { background: var(--yellow); animation: pulse-glow 1s infinite; }

.prop-name  { color: var(--text-2); flex: 1; }
.prop-value { color: var(--text); text-align: right; font-size: 11px; }

/* =====================
   COPY BUTTON
   ===================== */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 10px;
    font-family: var(--mono);
    color: var(--text-3);
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.copy-btn:hover {
    color: var(--cyan);
    border-color: rgba(0,240,255,0.2);
    background: rgba(0,240,255,0.05);
}

/* =====================
   SIDEBAR OVERLAY (mobile)
   ===================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

/* =====================
   MOBILE TOGGLE
   ===================== */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

/* =====================
   TABLE TOOLBAR
   ===================== */
.table-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.table-toolbar .search-bar {
    max-width: 280px;
}

.filter-select {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--sans);
    font-size: 12px;
    padding: 8px 12px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--cyan); }

.table-count {
    font-size: 12px;
    color: var(--text-3);
    font-family: var(--mono);
    margin-left: auto;
}

/* =====================
   ZONE USAGE METER
   ===================== */
.usage-meter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.usage-meter .progress-bar {
    flex: 1;
    height: 8px;
}

.usage-meter-text {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-2);
    white-space: nowrap;
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { gap: 32px; }
}

@media (max-width: 768px) {
    .login-left { display: none; }
    .login-wrap { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .content { padding: 20px; }
    .features-grid { grid-template-columns: 1fr; }
    .infra-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .hero-stats { flex-direction: column; gap: 20px; }
    .landing-nav { padding: 16px 24px; }
    .section { padding: 60px 24px; }
    .landing-nav-links { display: none; }
    .grid-2 { grid-template-columns: 1fr; }
    .sidebar-toggle { display: flex; }
    .topbar { padding: 0 16px; }
    .toast-container { left: 20px; right: 20px; }
    .toast { min-width: 0; }
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-toolbar .search-bar { max-width: 100%; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .template-grid { grid-template-columns: 1fr; }
    .prop-results { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}
