:root {
    --bg: #f4f7fb;
    --text: #172033;
    --muted: #6f7a8f;
    --primary: #316bff;
    --primary-dark: #1f4fd8;
    --card: #ffffff;
    --line: #e6ebf3;
    --shadow: 0 22px 70px rgba(31, 47, 78, 0.14);
    --radius: 26px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--text);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 20%, rgba(49, 107, 255, 0.24), transparent 28%),
        radial-gradient(circle at 80% 12%, rgba(35, 189, 255, 0.20), transparent 26%),
        linear-gradient(135deg, #f7fbff 0%, #edf3fb 45%, #f7f9fd 100%);
}

.login-shell {
    width: min(1040px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    padding: 34px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.login-brand {
    position: relative;
    min-height: 100%;
    padding: 52px;
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.26), transparent 24%),
        radial-gradient(circle at 18% 82%, rgba(184, 224, 255, 0.22), transparent 28%),
        linear-gradient(145deg, #2f6ff2 0%, #4b9dff 58%, #8ad6ff 100%);
    isolation: isolate;
}

.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.login-brand::before {
    width: 420px;
    height: 420px;
    top: -170px;
    right: -160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(8px);
}

.login-brand::after {
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255,255,255,0.16), transparent 32%, rgba(255,255,255,0.10) 68%, transparent 100%);
    opacity: 0.65;
}

.brand-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.login-brand h1 {
    font-size: clamp(50px, 7vw, 86px);
    line-height: 0.92;
    letter-spacing: -0.07em;
    max-width: 560px;
    text-shadow: 0 22px 46px rgba(20, 71, 145, 0.24);
}

.version-pill {
    width: fit-content;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        0 14px 28px rgba(20, 71, 145, 0.14);
    font-weight: 850;
    letter-spacing: 0.04em;
    backdrop-filter: blur(12px);
}

.login-card {
    align-self: center;
    padding: 42px;
    border-radius: 30px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 18px 52px rgba(31, 47, 78, 0.10);
}

.login-card-header {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f2f6ff;
    color: #244ea9;
    font-size: 14px;
    font-weight: 700;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #35c36b;
    box-shadow: 0 0 0 6px rgba(53, 195, 107, 0.13);
}

.login-card h2 {
    font-size: 38px;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.alert {
    margin: 24px 0 0;
    padding: 13px 15px;
    border-radius: 16px;
    background: #fff1f1;
    color: #b62626;
    border: 1px solid #ffd4d4;
    font-weight: 700;
}

form {
    margin-top: 28px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    color: #27324a;
}

.password-field {
    position: relative;
}

input {
    width: 100%;
    height: 58px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #f8fafc;
    outline: none;
    padding: 0 18px;
    color: var(--text);
    font-size: 18px;
    transition: 0.2s ease;
}

input:focus {
    border-color: rgba(49, 107, 255, 0.55);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(49, 107, 255, 0.10);
}

button {
    width: 100%;
    height: 58px;
    margin-top: 18px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    font-size: 16px;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 32px rgba(49, 107, 255, 0.25);
    transition: 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(49, 107, 255, 0.32);
}

.ip-box {
    margin-top: 26px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ip-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ip-box strong {
    font-size: 14px;
    word-break: break-all;
}

.dashboard-page {
    min-height: 100vh;
    background: var(--bg);
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    min-height: 100vh;
    padding: 28px 22px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
}

.sidebar-title {
    padding: 18px 16px 28px;
    border-bottom: 1px solid var(--line);
}

.sidebar-title strong {
    display: block;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.sidebar-title span {
    display: inline-block;
    margin-top: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.side-nav {
    display: grid;
    gap: 8px;
    padding-top: 24px;
}

.side-nav a,
.logout-link {
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 800;
    transition: 0.2s ease;
}

.side-nav a:hover,
.side-nav a.active {
    color: var(--primary);
    background: #eef4ff;
}

.logout-link {
    margin-top: auto;
    color: #d03434;
    background: #fff3f3;
}

.dashboard-main {
    padding: 30px;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.eyebrow {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    font-weight: 900;
}

.topbar h1 {
    font-size: 42px;
    letter-spacing: -0.05em;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px 10px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
    box-shadow: 0 12px 32px rgba(31, 47, 78, 0.06);
}

.avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #25a8ff);
    font-size: 13px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.metric-card,
.panel-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 15px 38px rgba(31, 47, 78, 0.06);
}

.metric-card {
    padding: 24px;
}

.metric-card p {
    color: var(--muted);
    font-weight: 800;
}

.metric-card h2 {
    margin-top: 12px;
    font-size: 36px;
    letter-spacing: -0.05em;
}

.metric-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}

.metric-card.highlighted {
    color: #fff;
    background: linear-gradient(135deg, #1d2b5f, #316bff);
    border: 0;
}

.metric-card.highlighted p,
.metric-card.highlighted span {
    color: rgba(255, 255, 255, 0.76);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.8fr;
    gap: 18px;
}

.panel-card {
    padding: 26px;
}

.large-card {
    grid-row: span 2;
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.panel-heading h2,
.panel-card h2 {
    margin-top: 8px;
    letter-spacing: -0.04em;
}

.badge {
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--primary);
    background: #eef4ff;
    font-size: 13px;
    font-weight: 900;
}

.chart-placeholder {
    height: 310px;
    margin-top: 32px;
    padding: 24px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    border-radius: 24px;
    background:
        linear-gradient(#eef3fb 1px, transparent 1px),
        linear-gradient(90deg, #eef3fb 1px, transparent 1px),
        #fbfdff;
    background-size: 48px 48px;
}

.bar {
    flex: 1;
    border-radius: 16px 16px 8px 8px;
    background: linear-gradient(180deg, #68b4ff, #316bff);
    box-shadow: 0 12px 28px rgba(49, 107, 255, 0.20);
}

.bar-1 { height: 42%; }
.bar-2 { height: 62%; }
.bar-3 { height: 38%; }
.bar-4 { height: 82%; }
.bar-5 { height: 58%; }
.bar-6 { height: 70%; }

.todo-list {
    margin-top: 16px;
    display: grid;
    gap: 12px;
    list-style: none;
}

.todo-list li {
    padding: 13px 14px;
    border-radius: 15px;
    background: #f8fafc;
    color: #4b5670;
    font-weight: 800;
}

@media (max-width: 940px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: 260px;
    }

    .dashboard-page {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: auto;
    }

    .cards-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .login-page {
        padding: 14px;
    }

    .login-shell {
        padding: 14px;
        border-radius: 26px;
    }

    .login-brand,
    .login-card {
        padding: 28px;
    }

    .login-brand h1 {
        font-size: 44px;
    }

    .login-card h2,
    .topbar h1 {
        font-size: 32px;
    }

    .ip-box,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-main {
        padding: 18px;
    }
}
