/* ─────────────────────────────────────────────────────────────────────────────
   LocalNode.app — Main Stylesheet
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── Variables ───────────────────────────────────────────────────────────── */
:root {
    --bg:         #0b0f19;
    --bg2:        #111827;
    --bg3:        #1a2234;
    --bg4:        #1e293b;
    --border:     #1e2d45;
    --border2:    #2a3a52;
    --text:       #e2e8f0;
    --text2:      #94a3b8;
    --text3:      #64748b;
    --primary:    #3b82f6;
    --primary-h:  #2563eb;
    --primary-glow: rgba(59,130,246,0.25);
    --success:    #22c55e;
    --danger:     #ef4444;
    --warning:    #f59e0b;
    --info:       #06b6d4;
    --orange:     #f97316;
    --sidebar-w:  240px;
    --radius:     10px;
    --radius-sm:  6px;
    --radius-lg:  16px;
    --shadow:     0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --font:       'Inter', system-ui, -apple-system, sans-serif;
    --mono:       'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.18s ease;
}

/* ─── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

code, tt {
    font-family: var(--mono);
    font-size: 0.875em;
    background: var(--bg3);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--text);
}

/* ─── Layout Helpers ──────────────────────────────────────────────────────── */
.container-xl { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.text-muted { color: var(--text3); font-size: 0.85em; }
.float-right { float: right; }

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-h);
    border-color: var(--primary-h);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border2);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59,130,246,0.07);
}

.btn-ghost {
    background: transparent;
    color: var(--text2);
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg3); color: var(--text); }

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }

/* ─── Forms ───────────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}
.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text2);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    padding: 0.6rem 0.85rem;
    width: 100%;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
select option { background: var(--bg3); }
textarea { resize: vertical; min-height: 80px; }

.input-password-wrap { position: relative; }
.input-password-wrap input { padding-right: 2.8rem; }
.toggle-password {
    position: absolute; right: 0.6rem; top: 50%;
    transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--text3); padding: 0.25rem; line-height: 1;
    transition: color var(--transition);
}
.toggle-password:hover { color: var(--text); }

.input-suffix-wrap { display: flex; align-items: stretch; }
.input-suffix-wrap input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    border-right: 0;
    flex: 1;
}
.input-suffix {
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text3);
    font-family: var(--mono);
    font-size: 0.82rem;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
    user-select: none;
}

.field-hint { font-size: 0.78rem; color: var(--text3); margin-top: 0.2rem; }

.password-strength {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 20px;
    overflow: hidden;
}
.strength-bar {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
    flex: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text);
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
    user-select: none;
}
.toggle-label input[type="checkbox"] { display: none; }
.toggle-switch {
    width: 40px; height: 22px;
    background: var(--bg4);
    border: 1px solid var(--border2);
    border-radius: 11px;
    position: relative;
    flex-shrink: 0;
    transition: all var(--transition);
}
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    background: var(--text3);
    border-radius: 50%;
    top: 2px; left: 2px;
    transition: all var(--transition);
}
.toggle-label input:checked + .toggle-switch {
    background: var(--primary);
    border-color: var(--primary);
}
.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(18px);
    background: #fff;
}

/* ─── Brand ───────────────────────────────────────────────────────────────── */
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
}
.brand-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}
.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand-tld { color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 0;
    background: rgba(11,15,25,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 700px 500px at 60% 40%, rgba(59,130,246,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 500px 400px at 20% 80%, rgba(124,58,237,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content {
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--primary);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
}
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text2);
    max-width: 540px;
    line-height: 1.7;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.hero-demo {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.demo-label { font-size: 0.8rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; }
.record-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; max-width: 600px; }
.record-badge {
    padding: 0.2rem 0.55rem;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text2);
    font-weight: 500;
}

/* Features */
.features {
    padding: 6rem 0;
    background: var(--bg2);
    border-top: 1px solid var(--border);
}
.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}
.section-subtitle {
    text-align: center;
    color: var(--text2);
    font-size: 1rem;
    margin-bottom: 3rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: border-color var(--transition), transform var(--transition);
}
.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.feature-icon {
    width: 44px; height: 44px;
    background: rgba(59,130,246,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.feature-card p  { font-size: 0.875rem; color: var(--text2); line-height: 1.6; }

/* Footer */
.footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.footer-brand p { font-size: 0.8rem; color: var(--text3); margin-top: 0.25rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: var(--text3); }
.footer-links a:hover { color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: var(--shadow);
    transform: translateY(8px) scale(0.98);
    transition: transform var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-card { transform: translateY(0) scale(1); }
.modal-card.modal-sm { max-width: 420px; }
.modal-card.modal-md { max-width: 560px; }
.modal-card.modal-lg { max-width: 720px; }

.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; cursor: pointer;
    color: var(--text3); font-size: 1.1rem; padding: 0.3rem;
    border-radius: 4px; line-height: 1;
    transition: color var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--bg3); }

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-title.danger { color: var(--danger); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Auth modal specifics */
.auth-tabs {
    display: flex;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 1.5rem;
}
.auth-tab {
    flex: 1;
    padding: 0.45rem;
    background: none;
    border: none;
    border-radius: 5px;
    color: var(--text3);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.auth-tab.active { background: var(--bg2); color: var(--text); box-shadow: var(--shadow-sm); }

.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.auth-alert.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}
.auth-alert.alert-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
}

.form-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 0.25rem; }
.form-subtitle { font-size: 0.85rem; color: var(--text2); margin-bottom: 1.25rem; }
.form-link { color: var(--primary); font-size: 0.825rem; }
.form-footer { font-size: 0.825rem; color: var(--text3); text-align: center; margin-top: 1rem; }

.verify-icon {
    font-size: 3rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 50;
    transition: transform var(--transition);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    height: 64px;
}
.sidebar-toggle { display: none; background: none; border: none; color: var(--text2); font-size: 1rem; cursor: pointer; }
.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text2);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
}
.nav-item:hover, .nav-item.active {
    background: rgba(59,130,246,0.1);
    color: var(--text);
}
.nav-item.active { color: var(--primary); }
.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.user-info { flex: 1; display: flex; align-items: center; gap: 0.6rem; overflow: hidden; }
.user-avatar {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.user-email { font-size: 0.75rem; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all var(--transition);
    flex-shrink: 0;
}
.btn-logout:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* Main */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(11,15,25,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.75rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.sidebar-mobile-toggle { display: none; background: none; border: none; color: var(--text2); font-size: 1.1rem; cursor: pointer; }
.topbar-title h1 { font-size: 1.1rem; font-weight: 600; flex: 1; }
.cf-warning-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.35);
    color: var(--warning);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
    cursor: help;
}
.content-area { flex: 1; padding: 2rem 1.75rem; max-width: 1100px; width: 100%; }

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    overflow: hidden;
}
.stat-item {
    flex: 1;
    background: var(--bg2);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; }

/* Section header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.section-title-sm { font-size: 0.85rem; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.07em; }

/* Subdomain grid */
.subdomain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.subdomain-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.subdomain-card:hover { border-color: var(--border2); box-shadow: var(--shadow-sm); }
.subdomain-card-header { display: flex; align-items: flex-start; gap: 0.75rem; }
.subdomain-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(124,58,237,0.15));
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}
.subdomain-info { flex: 1; overflow: hidden; }
.subdomain-name {
    font-family: var(--mono);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.subdomain-full {
    font-size: 0.75rem;
    color: var(--text3);
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.subdomain-meta { font-size: 0.75rem; color: var(--text3); }
.subdomain-actions { display: flex; gap: 0.5rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.subdomain-actions .btn-outline { flex: 1; justify-content: center; }
.subdomain-actions .btn-ghost { flex: 0; padding: 0.4rem 0.6rem; }

/* DDNS badge on subdomain card */
.ddns-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}
.ddns-badge.ddns-on  { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.ddns-badge.ddns-off { background: var(--bg3); color: var(--text3); border: 1px solid var(--border2); }

/* DDNS modal */
.ddns-status-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.5rem 0 0.25rem; }
.ddns-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}
.ddns-badge-lg.ddns-on  { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.ddns-meta { font-size: 0.78rem; color: var(--text3); }
.ddns-url-wrap {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.ddns-url-input {
    flex: 1;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text2);
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
    cursor: text;
}
.ddns-url-input:focus { outline: none; border-color: var(--primary); }
.ddns-download-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.5rem; }

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text3);
    gap: 0.75rem;
}
.empty-state-icon { font-size: 2.5rem; opacity: 0.4; }
.empty-state h3 { font-size: 1rem; color: var(--text2); }
.empty-state p { font-size: 0.875rem; }

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 3rem;
    color: var(--text3);
    font-size: 0.9rem;
}

/* DNS Panel */
.dns-panel {
    margin-top: 2rem;
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.dns-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
    flex-wrap: wrap;
}
.dns-panel-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
}
.dns-panel-title h2 { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.dns-panel-title h2 code { font-size: 0.9rem; }
.dns-panel-actions { display: flex; gap: 0.5rem; }
.dns-panel-body { padding: 1rem 0; overflow-x: auto; }

/* DNS Table */
.dns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.dns-table th {
    text-align: left;
    padding: 0.5rem 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.dns-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    vertical-align: middle;
}
.dns-table tr:last-child td { border-bottom: none; }
.dns-table tr:hover td { background: rgba(255,255,255,0.02); }

.type-badge {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: var(--text);
}
.type-badge.type-A      { border-color: rgba(59,130,246,0.4);  color: #60a5fa; background: rgba(59,130,246,0.08);  }
.type-badge.type-AAAA   { border-color: rgba(99,102,241,0.4);  color: #818cf8; background: rgba(99,102,241,0.08);  }
.type-badge.type-CNAME  { border-color: rgba(34,197,94,0.4);   color: #4ade80; background: rgba(34,197,94,0.08);   }
.type-badge.type-MX     { border-color: rgba(245,158,11,0.4);  color: #fcd34d; background: rgba(245,158,11,0.08);  }
.type-badge.type-TXT    { border-color: rgba(249,115,22,0.4);  color: #fb923c; background: rgba(249,115,22,0.08);  }
.type-badge.type-NS     { border-color: rgba(20,184,166,0.4);  color: #2dd4bf; background: rgba(20,184,166,0.08);  }
.type-badge.type-SRV    { border-color: rgba(168,85,247,0.4);  color: #c084fc; background: rgba(168,85,247,0.08);  }
.type-badge.type-CAA    { border-color: rgba(239,68,68,0.4);   color: #f87171; background: rgba(239,68,68,0.08);   }

.proxy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}
.proxy-on  { background: rgba(245,158,11,0.12); color: var(--orange); border: 1px solid rgba(245,158,11,0.3); }
.proxy-off { background: var(--bg3); color: var(--text3); border: 1px solid var(--border2); }

.cell-content {
    max-width: 250px;
    font-family: var(--mono);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}
.cell-actions { display: flex; gap: 0.3rem; white-space: nowrap; }
.btn-icon {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text2);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    transition: all var(--transition);
    line-height: 1;
}
.btn-icon:hover { border-color: var(--border2); color: var(--text); background: var(--bg3); }
.btn-icon.del:hover { border-color: rgba(239,68,68,0.4); color: var(--danger); background: rgba(239,68,68,0.07); }

/* DNS form */
.dns-form-row {
    display: grid;
    grid-template-columns: 140px 1fr 130px;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}
.proxy-info-note {
    font-size: 0.78rem;
    color: var(--text3);
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 360px;
    pointer-events: all;
    animation: toastIn 0.25s ease forwards;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger);  }
.toast.info    { border-left: 3px solid var(--primary);  }
.toast i { flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error   i { color: var(--danger);  }
.toast.info    i { color: var(--primary); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(20px); opacity: 0; } }
.toast.out { animation: toastOut 0.2s ease forwards; }

/* ═══════════════════════════════════════════════════════════════════════════
   CENTER PAGE (verify, reset)
   ═══════════════════════════════════════════════════════════════════════════ */
.center-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}
.center-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
}
.center-card h1 { font-size: 1.75rem; font-weight: 700; }
.center-card p  { color: var(--text2); line-height: 1.7; }
.status-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}
.status-icon.success { color: var(--success); }
.status-icon.error   { color: var(--danger);  }
.status-icon.info    { color: var(--primary); }
.alert-msg {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}
.alert-msg.alert-success {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.3);
    color: #86efac;
}
.alert-msg.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fca5a5;
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    }
    .main-content { margin-left: 0; }
    .content-area { padding: 1.25rem 1rem; }
    .sidebar-mobile-toggle { display: block; }
    .sidebar-toggle { display: block; }
    .dns-form-row { grid-template-columns: 1fr; }
    .topbar { padding: 0 1rem; }
    .stats-bar { flex-direction: column; gap: 0; }
    .hero-title { font-size: 2.2rem; }
    .nav-actions .btn-ghost { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .modal-card.modal-lg { max-width: 100%; margin: 0; }
}

@media (max-width: 480px) {
    .subdomain-grid { grid-template-columns: 1fr; }
    .modal-card { padding: 1.5rem; }
    .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 300px; }
    .dns-table th:nth-child(4),
    .dns-table td:nth-child(4) { display: none; }
}

/* ─── Settings Modal ──────────────────────────────────────────────────────── */
.settings-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}
.settings-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--transition), border-color var(--transition);
}
.settings-tab:hover { color: var(--text1); }
.settings-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
