* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background:
        radial-gradient(circle at 20% 10%, #18223d 0, transparent 32%),
        radial-gradient(circle at 90% 90%, #102d32 0, transparent 32%),
        #07090e;
    color: #f8fafc;
}

.shell,
.dashboard-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding:
        max(22px, env(safe-area-inset-top))
        18px
        max(22px, env(safe-area-inset-bottom));
    overflow: hidden;
}

.ambient {
    position: fixed;
    border-radius: 999px;
    filter: blur(90px);
    opacity: .28;
    pointer-events: none;
}

.ambient-one {
    width: 260px;
    height: 260px;
    top: -90px;
    left: -80px;
    background: #496cff;
}

.ambient-two {
    width: 280px;
    height: 280px;
    right: -110px;
    bottom: -100px;
    background: #13c4a3;
}

.login-card,
.dashboard-card {
    position: relative;
    width: min(100%, 430px);
    padding: 32px 26px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 28px;
    background:
        linear-gradient(
            180deg,
            rgba(24,27,37,.96),
            rgba(10,12,18,.98)
        );
    box-shadow:
        0 35px 90px rgba(0,0,0,.48),
        inset 0 1px rgba(255,255,255,.06);
    backdrop-filter: blur(24px);
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 16px;
    font-size: 25px;
    font-weight: 900;
    background:
        linear-gradient(135deg, #ffffff, #a8bcff);
    color: #080a0f;
    box-shadow: 0 12px 35px rgba(112,137,255,.25);
}

.brand-name {
    letter-spacing: .22em;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
}

.eyebrow {
    margin-top: 8px;
    color: #7f91b4;
    letter-spacing: .16em;
    font-size: 10px;
    font-weight: 800;
}

h1 {
    margin: 25px 0 7px;
    font-size: clamp(30px, 8vw, 42px);
    line-height: 1;
    letter-spacing: -.04em;
}

.subtitle {
    margin: 0 0 28px;
    color: #9299aa;
    line-height: 1.55;
    font-size: 14px;
}

label {
    display: block;
    margin: 17px 0 8px;
    color: #cbd2df;
    font-size: 12px;
    font-weight: 650;
}

input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 15px;
    outline: 0;
    background: rgba(255,255,255,.045);
    color: #fff;
    font-size: 16px;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

input:focus {
    border-color: #728cff;
    background: rgba(255,255,255,.07);
    box-shadow: 0 0 0 4px rgba(114,140,255,.12);
}

button {
    width: 100%;
    min-height: 54px;
    margin-top: 24px;
    border: 0;
    border-radius: 15px;
    background:
        linear-gradient(135deg, #f8fafc, #c9d5ff);
    color: #090b10;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform .15s ease,
        filter .15s ease;
}

button:active {
    transform: scale(.985);
}

button:hover {
    filter: brightness(1.04);
}

.alert {
    margin: 18px 0;
    padding: 13px 14px;
    border: 1px solid rgba(255,99,99,.22);
    border-radius: 13px;
    background: rgba(255,70,70,.09);
    color: #ffb5b5;
    font-size: 13px;
}

.security-note {
    margin-top: 22px;
    text-align: center;
    color: #686f7d;
    font-size: 10px;
    letter-spacing: .04em;
}

.status-pill {
    display: inline-flex;
    margin-top: 18px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(51,209,157,.10);
    border: 1px solid rgba(51,209,157,.16);
    color: #6ae1b9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.dashboard-card {
    width: min(100%, 760px);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.mini-card {
    padding: 18px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

.mini-card span {
    display: block;
    color: #727b8d;
    font-size: 11px;
}

.mini-card strong {
    display: block;
    margin-top: 8px;
    font-size: 14px;
}

.logout {
    max-width: 190px;
    background: rgba(255,255,255,.07);
    color: #fff;
    border: 1px solid rgba(255,255,255,.08);
}

@media (max-width: 600px) {
    .login-card,
    .dashboard-card {
        border-radius: 24px;
        padding: 27px 20px;
    }

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

    input,
    button {
        min-height: 56px;
    }
}
