:root {
    --bg: #0b1020;
    --card: #121933;
    --card-2: #182041;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f3f5fb;
    --muted: #a8b0c8;
    --primary: #39a655;
    --primary-hover: #49b665;
    --shadow: 0 30px 80px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(57, 166, 85, 0.18), transparent 25%),
        linear-gradient(135deg, #0a1021 0%, #11172d 100%);
    color: var(--text);
}

a { text-decoration: none; }

.shell {
    min-height: 100vh;
}

.auth-page,
.profile-page,
.state-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card,
.profile-card,
.state-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%), var(--card);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    padding: 36px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #d9e1f3;
    margin-bottom: 24px;
}

.brand-mark {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(57,166,85,.14);
}

h1 {
    margin: 0 0 24px 0;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.context-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 24px;
    border-radius: 999px;
    background: rgba(57,166,85,.12);
    color: #dff6e6;
    border: 1px solid rgba(57,166,85,.26);
    font-size: 14px;
    font-weight: 600;
}

.auth-form {
    margin-top: 8px;
}

.microsoft-button,
.secondary-button,
.link-button {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #0d1428;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    cursor: pointer;
    transition: .2s ease;
}

.microsoft-button:hover,
.secondary-button:hover,
.link-button:hover {
    transform: translateY(-1px);
    border-color: rgba(57,166,85,.4);
}

.secondary-button,
.link-button {
    background: var(--primary);
    color: #08110a;
    border-color: transparent;
    margin-top: 28px;
}

.secondary-button:hover,
.link-button:hover {
    background: var(--primary-hover);
}

.microsoft-logo {
    width: 20px;
    height: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.microsoft-logo span:nth-child(1) { background: #f25022; }
.microsoft-logo span:nth-child(2) { background: #7fba00; }
.microsoft-logo span:nth-child(3) { background: #00a4ef; }
.microsoft-logo span:nth-child(4) { background: #ffb900; }

.profile-grid {
    display: grid;
    gap: 14px;
}

.profile-row {
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    display: grid;
    gap: 6px;
}

.profile-row span {
    font-size: 13px;
    color: var(--muted);
}

.profile-row strong {
    font-size: 15px;
    word-break: break-word;
}

@media (max-width: 640px) {
    .auth-card,
    .profile-card,
    .state-card {
        padding: 28px 22px;
        border-radius: 24px;
    }

    h1 {
        font-size: 28px;
    }
}