:root {
    --bg: #06101d;
    --bg-soft: #0b1627;
    --panel: rgba(10, 18, 32, 0.82);
    --panel-strong: rgba(13, 22, 39, 0.94);
    --panel-light: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);

    --text: #eaf2ff;
    --text-soft: #c8d4e8;
    --muted: #8fa2bf;

    --primary: #3b82f6;
    --primary-2: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.32);

    --success: #22c55e;
    --success-2: #16a34a;
    --success-glow: rgba(34, 197, 94, 0.24);

    --danger: #ef4444;
    --danger-2: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.24);

    --warning: #f59e0b;
    --warning-2: #d97706;
    --warning-glow: rgba(245, 158, 11, 0.24);

    --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.42);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.28);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;

    --transition: all 0.22s ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
}

body {
    min-height: 100vh;
    position: relative;
    line-height: 1.5;
    overflow-x: hidden;
}

a,
button,
input {
    font-family: inherit;
}

.page-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 8% 10%, rgba(59, 130, 246, 0.22), transparent 24%),
        radial-gradient(circle at 88% 14%, rgba(34, 197, 94, 0.14), transparent 22%),
        radial-gradient(circle at 50% 100%, rgba(245, 158, 11, 0.09), transparent 26%),
        linear-gradient(180deg, #07101d 0%, #071424 35%, #06101b 100%);
    z-index: -3;
}

.page-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), rgba(0,0,0,.1));
    z-index: -2;
}

.topbar,
.hero-panel,
.panel-card,
.stat-card,
.login-card,
.footer-modern {
    border: 1px solid var(--border);
    background: var(--panel);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-lg);
}

.topbar {
    width: min(1240px, calc(100% - 32px));
    margin: 22px auto 0;
    padding: 18px 22px;
    border-radius: var(--radius-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.topbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(59,130,246,.06), transparent 35%, rgba(34,197,94,.04) 100%);
    pointer-events: none;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
    background: #0f172a;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-text {
    min-width: 0;
}

.brand-text h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #f3f7ff;
}

.brand-text p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, var(--danger), var(--danger-2));
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.26);
    transition: var(--transition);
}

.logout-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.main-container {
    width: min(1240px, calc(100% - 32px));
    margin: 22px auto 28px;
}

.hero-panel {
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 22px;
    overflow: hidden;
    position: relative;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(59,130,246,0.12), transparent 26%),
        linear-gradient(135deg, rgba(255,255,255,0.02), transparent 55%);
    pointer-events: none;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 760px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

.hero-badge i {
    font-size: 10px;
}

.hero-text h2 {
    margin: 16px 0 10px;
    font-size: 34px;
    line-height: 1.08;
    letter-spacing: -0.4px;
}

.hero-text p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.hero-side {
    flex-shrink: 0;
}

.timer-box {
    min-width: 220px;
    text-align: center;
    padding: 18px 22px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(37,99,235,0.28));
    color: #dbeafe;
    font-size: 19px;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 30px rgba(37, 99, 235, 0.18);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px var(--primary-glow);
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--success), var(--success-2));
    box-shadow: 0 10px 22px var(--success-glow);
}

.stat-icon.red {
    background: linear-gradient(135deg, var(--danger), var(--danger-2));
    box-shadow: 0 10px 22px var(--danger-glow);
}

.stat-info {
    min-width: 0;
}

.stat-info span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-info strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
    align-items: start;
}

.panel-card,
.login-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.panel-card::before,
.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 35%);
    pointer-events: none;
}

.panel-head {
    position: relative;
    z-index: 2;
    margin-bottom: 18px;
}

.panel-head h3 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.panel-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.panel-badge {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: #dbeafe;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: #fff;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.input-group input::placeholder {
    color: #7186a7;
}

.input-group input:focus {
    border-color: rgba(59, 130, 246, 0.7);
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}

.primary-btn,
.warning-btn {
    height: 54px;
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.warning-btn {
    background: linear-gradient(135deg, var(--warning), var(--warning-2));
    box-shadow: 0 12px 26px rgba(217, 119, 6, 0.22);
}

.primary-btn:hover,
.warning-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.list-panel {
    margin-bottom: 22px;
}

.domain-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.domain-item {
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
}

.domain-item:hover {
    transform: translateY(-2px);
    border-color: rgba(59,130,246,0.2);
    background: rgba(255,255,255,0.045);
}

.domain-main {
    min-width: 0;
    flex: 1;
}

.domain-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.domain-title-row h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #f6f9ff;
    word-break: break-word;
}

.domain-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.status-pill.up {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.status-pill.down {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.status-pill.unknown {
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.status-pill-icon {
    font-size: 14px;
    line-height: 1;
}

.status-pill-text {
    line-height: 1;
}

.domain-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.action-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    text-decoration: none;
    color: #fff;
    transition: var(--transition);
}

.action-btn.edit {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.action-btn.delete {
    background: linear-gradient(135deg, var(--danger), var(--danger-2));
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2);
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.03);
}

.login-wrap {
    min-height: calc(100vh - 220px);
    display: grid;
    place-items: center;
}

.login-card {
    width: 100%;
    max-width: 470px;
}

.login-header {
    text-align: center;
    margin-bottom: 22px;
    position: relative;
    z-index: 2;
}

.login-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 14px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    font-size: 25px;
    color: #fff;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.login-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.login-header p {
    margin: 0;
    color: var(--muted);
}

.alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fecaca;
    position: relative;
    z-index: 2;
}

.empty-state {
    text-align: center;
    padding: 42px 16px;
    color: var(--muted);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 14px;
    color: #64748b;
}

.empty-state p {
    margin: 0;
    font-size: 15px;
}

.footer-modern {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 28px;
    padding: 18px 22px;
    border-radius: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.footer-modern p {
    margin: 0;
}

/* Responsive */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-content,
    .panel-head-row,
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-side {
        width: 100%;
    }

    .timer-box {
        width: 100%;
        min-width: 0;
    }

    .topbar-right {
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .topbar,
    .main-container,
    .footer-modern {
        width: min(100% - 20px, 100%);
    }

    .topbar,
    .hero-panel,
    .panel-card,
    .login-card,
    .footer-modern {
        border-radius: 18px;
    }

    .brand-text h1 {
        font-size: 18px;
    }

    .brand-text p {
        font-size: 12px;
    }

    .hero-text h2 {
        font-size: 28px;
    }

    .hero-text p {
        font-size: 15px;
    }

    .domain-item {
        flex-direction: column;
        align-items: stretch;
    }

    .domain-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .domain-actions {
        justify-content: flex-end;
    }

    .stat-info strong {
        font-size: 26px;
    }

    .panel-head h3 {
        font-size: 18px;
    }

    .timer-box {
        font-size: 17px;
        padding: 16px;
    }
}