:root {
    color-scheme: dark;
    --bg: #050b13;
    --surface: #081423;
    --surface-strong: #0d1e32;
    --border: #17334d;
    --text: #f2f7ff;
    --muted: #8fa6bd;
    --accent: #36a8ff;
    --accent-strong: #167ee8;
    --success: #44e0aa;
    --danger: #ff7a8a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(25, 115, 255, .18), transparent 34rem),
        radial-gradient(circle at 85% 90%, rgba(0, 220, 180, .10), transparent 28rem),
        var(--bg);
}

a { color: #7bc7ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.identity-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.identity-header, .identity-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1.25rem, 4vw, 4rem); border-color: var(--border); background: rgba(5, 11, 19, .88); backdrop-filter: blur(14px); }
.identity-header { border-bottom: 1px solid var(--border); }
.identity-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.identity-nav { display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .85rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 3.1rem; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid #2e83c5; background: radial-gradient(circle, #e7f8ff 0 2%, #24a6ff 4%, #08294b 22%, #020914 70%); box-shadow: 0 0 28px rgba(40, 167, 255, .28); font-weight: 800; }
.brand-copy { display: grid; }
.brand-copy strong { font-size: 1.12rem; }
.brand-copy span { color: var(--muted); font-size: .78rem; }

.identity-main { display: grid; place-items: center; padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem); }
.identity-card { width: min(100%, 31rem); min-width: 0; padding: clamp(1.5rem, 4vw, 2.4rem); border: 1px solid var(--border); border-radius: 1.4rem; background: linear-gradient(145deg, rgba(13, 30, 50, .96), rgba(5, 15, 26, .98)); box-shadow: 0 24px 80px rgba(0, 0, 0, .38); }
.identity-card--wide { width: min(100%, 72rem); }
.identity-card--admin { width: min(100%, 78rem); }
.eyebrow { margin: 0 0 .55rem; color: #83a4c1; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; overflow-wrap: anywhere; }
.intro { margin: .9rem 0 1.8rem; color: #b4c7da; line-height: 1.65; }

.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: .45rem; }
label { font-weight: 700; font-size: .9rem; }
input { width: 100%; border: 1px solid #24435f; border-radius: .75rem; padding: .86rem .95rem; color: var(--text); background: #07111d; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(54, 168, 255, .13); }
.button { display: inline-flex; justify-content: center; align-items: center; border: 1px solid transparent; border-radius: .75rem; padding: .86rem 1.1rem; color: white; background: linear-gradient(180deg, var(--accent), var(--accent-strong)); font-weight: 800; cursor: pointer; }
.button--secondary { border-color: #284760; background: #0b1a2a; }
.button--small { padding: .58rem .75rem; font-size: .78rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .35rem; }
.account-actions { margin-top: 1.75rem; padding-bottom: .25rem; }
.notice, .errors { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: .75rem; background: rgba(68, 224, 170, .1); color: var(--success); border: 1px solid rgba(68, 224, 170, .25); }
.errors { background: rgba(255, 122, 138, .08); color: #ffb4bd; border-color: rgba(255, 122, 138, .25); }
.errors ul { margin: 0; padding-left: 1.2rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.account-item { min-width: 0; padding: 1rem; border: 1px solid var(--border); border-radius: .9rem; background: rgba(4, 13, 23, .55); }
.account-item span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: .3rem; }
.account-item strong { display: block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; line-height: 1.35; }
.status { color: var(--success); }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 58rem; }
.admin-table th, .admin-table td { padding: 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; background: rgba(4, 13, 23, .65); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table td > span { display: block; color: var(--muted); font-size: .82rem; margin-top: .22rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.status-pill { display: inline-flex !important; width: fit-content; padding: .28rem .55rem; border: 1px solid var(--border); border-radius: 999px; }
.status-pill--success { color: var(--success) !important; border-color: rgba(68, 224, 170, .35); background: rgba(68, 224, 170, .08); }
.status-pill--danger { color: #ffb4bd !important; border-color: rgba(255, 122, 138, .35); background: rgba(255, 122, 138, .08); }
.status-pill--muted { color: var(--muted) !important; }
.admin-badge { color: #8ed2ff !important; }
.license-plan-name { margin-top: .45rem !important; }

@media (max-width: 640px) {
    .identity-header { align-items: flex-start; }
    .identity-header > nav { display: none; }
    .identity-footer { align-items: flex-start; flex-direction: column; }
    .identity-main { place-items: start stretch; }
    .identity-card { border-radius: 1rem; padding-bottom: 2rem; }
    .actions { align-items: stretch; flex-direction: column; }
    .actions form, .actions .button { width: 100%; }
    .account-actions { gap: 1.15rem; margin-top: 2rem; padding-bottom: .5rem; }
    .account-actions > span { line-height: 1.55; }
}
