/* =========================================================
   RESET / BASE
========================================================= */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.10), transparent 35%),
        linear-gradient(135deg, #0b1220, #111827 55%, #0f172a);
    color: #e5e7eb;
    min-height: 100vh;
}

/* =========================================================
   SERVER TIME BAR
========================================================= */
.time-bar-card {
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-align: center;
}

.time-bar-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.time-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.time-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: #f8fafc;
    letter-spacing: 0.04em;
    font-family: inherit;
}

/* =========================================================
   LOGIN PAGE
========================================================= */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: rgba(17, 24, 39, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    text-align: center;
}

.logo-wrap {
    text-align: center;
    margin-bottom: 18px;
}

.logo {
    max-width: min(100%, 400px);
    height: auto;
    display: inline-block;
}

.login-card h1 {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.2;
    color: #f9fafb;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.subtitle {
    margin: 0 0 22px;
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.5;
}

.error-box {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: #fecaca;
    font-size: 14px;
    text-align: center;
}

.login-form {
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
    color: #e5e7eb;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #374151;
    border-radius: 10px;
    background: #0f172a;
    color: #f9fafb;
    margin-bottom: 16px;
    font-size: 20px;
    text-align: center;
    letter-spacing: 0.18em;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-form input[type="password"] {
    text-align: left;
    letter-spacing: normal;
    font-size: 16px;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.20);
}

.login-form button {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.login-form button:active {
    transform: translateY(0);
}

/* =========================================================
   PAGE LAYOUT
========================================================= */
.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 20px 40px;
}

/* =========================================================
   HEADER
   Always centered on desktop and mobile
========================================================= */
.landing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 28px 20px 24px;
    text-align: center;

    background: rgba(17, 24, 39, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.logo-sm {
    display: block;
    width: auto;
    max-width: min(90vw, 420px);
    height: auto;
    max-height: 82px;
}

.landing-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #f9fafb;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.logout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.logout-btn:active {
    transform: translateY(0);
}

/* =========================================================
   HERO / INTRO
========================================================= */
.hero-card {
    background: rgba(17, 24, 39, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-card h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #f9fafb;
}

.hero-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.98rem;
}

/* =========================================================
   SECTION TITLES
========================================================= */
.section-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f3f4f6;
    letter-spacing: 0.02em;
}

/* =========================================================
   GRID / PANELS
========================================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px;
}

.grid-span-12 { grid-column: span 12; }
.grid-span-8  { grid-column: span 8; }
.grid-span-6  { grid-column: span 6; }
.grid-span-4  { grid-column: span 4; }
.grid-span-3  { grid-column: span 3; }

/* =========================================================
   CARDS
========================================================= */
.card {
    background: rgba(17, 24, 39, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.card h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #f9fafb;
}

.card p {
    margin: 6px 0;
    color: #cbd5e1;
    line-height: 1.55;
    font-size: 0.95rem;
}

.card-subtle {
    color: #94a3b8;
    font-size: 0.88rem;
}

/* =========================================================
   STAT CARDS
========================================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(17, 24, 39, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.26);
}

.stat-label {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: #f8fafc;
    line-height: 1.1;
    word-break: break-word;
}

.stat-meta {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* =========================================================
   HOST TILE ROW
========================================================= */
.host-tile-row {
    display: flex;
    gap: 18px;
    width: 100%;
}

.host-tile {
    background: rgba(17, 24, 39, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    min-height: 220px;
    display: flex;
    flex-direction: column;
}

.host-tile-noc {
    flex: 0 0 20%;
    max-width: 20%;
}

.host-tile-web2 {
    flex: 0 0 40%;
    max-width: 40%;
}

.host-tile-web3 {
    flex: 0 0 40%;
    max-width: 40%;
}

.host-tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.host-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f9fafb;
    letter-spacing: 0.04em;
}

.host-tile-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.host-tile-placeholder {
    margin: 0;
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================================
   RESPONSIVE HOST TILES
========================================================= */
@media (max-width: 1100px) {
    .host-tile-row {
        flex-direction: column;
    }

    .host-tile-noc,
    .host-tile-web2,
    .host-tile-web3 {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* =========================================================
   STATUS / BADGES
========================================================= */
.status-ok,
.status-warn,
.status-bad,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.80rem;
    font-weight: 700;
    line-height: 1;
}

.status-ok {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.status-warn {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.status-bad {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.badge {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.26);
}

/* =========================================================
   TABLES
========================================================= */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.table th,
.table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #93a4ba;
    background: rgba(255, 255, 255, 0.02);
}

.table td {
    font-size: 0.93rem;
    color: #e5e7eb;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.025);
}

/* =========================================================
   LISTS
========================================================= */
.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clean-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #dbe3ee;
}

.clean-list li:last-child {
    border-bottom: 0;
}

/* =========================================================
   BUTTONS / LINKS
========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.btn.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #e5e7eb;
    box-shadow: none;
}

.btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.10);
}

/* =========================================================
   FOOTER
========================================================= */
.page-footer {
    margin-top: 28px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 18px 12px 6px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1100px) {
    .grid-span-8,
    .grid-span-6,
    .grid-span-4,
    .grid-span-3 {
        grid-column: span 12;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .login-body {
        padding: 16px;
    }

    .login-card {
        padding: 24px 18px;
        border-radius: 16px;
    }

    .logo {
        max-width: min(100%, 300px);
    }

    .login-card h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 14px;
    }

    .login-form input[type="text"],
    .login-form input[type="password"] {
        font-size: 18px;
    }

    .page-wrap {
        padding: 18px 14px 30px;
    }

    .landing-header {
        padding: 22px 14px 20px;
        gap: 10px;
    }

    .logo-sm {
        max-width: min(88vw, 320px);
        max-height: 72px;
    }

    .landing-header h1 {
        font-size: 1.25rem;
    }

    .logout-btn {
        width: 100%;
        max-width: 220px;
    }

    .hero-card,
    .card,
    .stat-card {
        padding: 16px;
        border-radius: 16px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 560px;
    }
}
