/* login.css — standalone styles for /login and /access pages */

:root {
    --bg-1:          #030d22;
    --bg-2:          #0c1734;
    --panel:         rgba(255, 255, 255, 0.07);
    --panel-border:  rgba(255, 255, 255, 0.11);
    --text:          #f3f7ff;
    --muted:         #a8b5d6;
    --primary:       #8ea7ff;
    --primary-hover: #7897ff;
    --accent:        #b794ff;
    --success:       #8ef0d4;
    --input-bg:      rgba(8, 14, 28, 0.58);
    --shadow:        0 16px 42px rgba(0, 0, 0, 0.28);
    --radius-xl:     20px;
    --radius-lg:     14px;
    --radius-md:     11px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left,    rgba(139, 92, 246, 0.15), transparent 28%),
        radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.13), transparent 26%),
        linear-gradient(135deg, #030d22 0%, #0c1734 100%);
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    min-height: 100vh;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.shell {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.30fr 0.70fr;
    gap: 10px;
    align-items: stretch;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

/* ── Hero panel ──────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    padding: 14px 16px 12px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    left: -90px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 68%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -90px;
    bottom: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.10), transparent 68%);
    pointer-events: none;
}

/* Topbar */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(142, 167, 255, 0.12);
    border: 1px solid rgba(142, 167, 255, 0.18);
    color: #dde6ff;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}

.brand {
    margin: 0;
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    color: #eef3ff;
    letter-spacing: 0.02em;
    text-align: right;
    flex-shrink: 0;
}

.hero h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.03;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 2;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero-lead {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    position: relative;
    z-index: 2;
}

/* ── Sphere visual ───────────────────────────────────────────────────────── */

.visual-wrap {
    position: relative;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin: -8px 0 -8px;
}

.sphere-scene {
    position: relative;
    width: min(100%, 504px);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
}

.sphere-scene.dragging {
    cursor: grabbing;
}

#sphere-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 12px rgba(110, 130, 255, 0.16));
}

.logo-glow {
    position: absolute;
    width: 124px;
    height: 124px;
    border-radius: 26px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18), rgba(96, 165, 250, 0.08) 45%, transparent 72%);
    filter: blur(18px);
    animation: pulse-soft 4.8s ease-in-out infinite;
}

.logo-core {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(7, 13, 28, 0.47);
    box-shadow:
        0 0 30px -8px rgba(139, 92, 246, 0.30),
        0 12px 24px rgba(0, 0, 0, 0.20);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    z-index: 6;
}

.kronixa-logo {
    width: 54px;
    height: 54px;
    display: block;
    overflow: visible;
}

.badge-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 7;
}

.orbit-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    margin-left: -21px;
    margin-top: -21px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(5, 10, 22, 0.76);
    box-shadow:
        0 0 14px -4px rgba(96, 165, 250, 0.22),
        0 4px 12px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.03em;
    transform: translate(var(--x), var(--y)) scale(var(--scale, 1));
    opacity: var(--opacity, 1);
    backdrop-filter: blur(8px);
}

.orbit-badge[data-tone="violet"] { color: #c4b5fd; }
.orbit-badge[data-tone="blue"]   { color: #7dd3fc; }
.orbit-badge[data-tone="teal"]   { color: #99f6e4; }
.orbit-badge[data-tone="orange"] { color: #fdba74; }

/* ── Chips ───────────────────────────────────────────────────────────────── */

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.chip {
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #dfe7ff;
    font-size: 9px;
    font-weight: 600;
}

/* ── Security list (system variant) ─────────────────────────────────────── */

.hero-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
    position: relative;
    z-index: 2;
}

.hero-list li {
    padding-left: 20px;
    position: relative;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.hero-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #99f6e4;
    font-weight: 700;
}

.security-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(142, 167, 255, 0.08);
    border: 1px solid rgba(142, 167, 255, 0.16);
    color: #dde6ff;
    font-size: 11px;
    line-height: 1.55;
    position: relative;
    z-index: 2;
}

.security-box strong {
    color: #ffffff;
}

/* ── Auth panel ──────────────────────────────────────────────────────────── */

.auth {
    padding: 35px;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.auth-top {
    margin-bottom: 15px;
}

.auth-top h2 {
    margin: 0 0 15px;
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text);
}

.auth-top p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.3;
}

.auth-top p strong {
    color: var(--text);
    font-weight: 600;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */

.notice {
    padding: 8px 10px;
    border-radius: var(--radius-md);
    font-size: 11px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.notice.error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

.notice.success {
    background: rgba(45, 212, 191, 0.12);
    border: 1px solid rgba(45, 212, 191, 0.24);
    color: var(--success);
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.auth form {
    display: grid;
    gap: 0;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #dde7ff;
}

.field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    background: var(--input-bg);
    color: var(--text);
    padding: 9px 11px;
    font-size: 11px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    font-family: inherit;
}

.field input::placeholder {
    color: #8b97b8;
}

.field input:focus {
    border-color: rgba(142, 167, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(142, 167, 255, 0.14);
    background: rgba(8, 14, 28, 0.72);
}

.field input[readonly] {
    opacity: 0.65;
    cursor: default;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 15px;
    font-size: 10px;
    color: var(--muted);
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.remember input[type="checkbox"] {
    width: 13px;
    height: 13px;
    padding: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s, background 0.2s, opacity 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #adc0ff);
    color: #08111f;
    box-shadow: 0 8px 18px rgba(142, 167, 255, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #9fb5ff);
    transform: translateY(-1px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text);
    margin-top: 15px;
    font-size: 10px;
    padding: 7px 12px;
    border-radius: 10px;
    font-weight: 600;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    text-decoration: none;
}

/* ── Trust box ───────────────────────────────────────────────────────────── */

.trust {
    margin-top: 15px;
    padding: 8px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 9px;
    line-height: 1.35;
}

.trust strong {
    color: #ffffff;
}

/* ── Consent hint ────────────────────────────────────────────────────────── */

.consent-hint {
    margin: 15px 0 0;
    font-size: 9px;
    color: #6b7a9e;
    text-align: center;
    line-height: 1.55;
}

.consent-hint a {
    color: #8ea7ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Meta footer ─────────────────────────────────────────────────────────── */

.meta-footer {
    margin-top: 15px;
    text-align: center;
    color: #95a3c5;
    font-size: 8px;
    line-height: 1.35;
    display: grid;
    gap: 4px;
}

.meta-footer .status {
    color: var(--success);
    font-weight: 700;
}

.legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.legal-links a {
    color: #6b7a9e;
    text-decoration: none;
}

.legal-links a:hover {
    color: var(--muted);
}

.locale-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.locale-switch select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    color: var(--muted);
    font-size: 8px;
    padding: 2px 5px;
    outline: none;
}

.locale-switch select option {
    background: #0c1734;
}

/* Back link */
.back-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 10px;
    color: var(--muted);
    text-decoration: none;
}

.back-link:hover {
    color: var(--text);
}

/* OTP code display */
.otp-code-box {
    margin: 12px 0;
    text-align: center;
}

.otp-code {
    display: inline-block;
    background: rgba(142, 167, 255, 0.08);
    border: 2px solid rgba(142, 167, 255, 0.22);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "Fira Code", "Cascadia Code", monospace;
    color: var(--text);
}

.otp-close-hint {
    margin-top: 8px;
    font-size: 10px;
    color: var(--muted);
}

/* ── Animations ──────────────────────────────────────────────────────────── */

@keyframes pulse-soft {
    0%,
    100% {
        transform: scale(0.96);
        opacity: 0.50;
    }

    50% {
        transform: scale(1.04);
        opacity: 0.82;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

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

    .hero,
    .auth {
        min-height: auto;
    }

    .hero {
        padding: 14px;
    }

    .auth {
        padding: 12px;
    }

    .hero h1 {
        font-size: 23px;
    }

    .brand {
        font-size: 20px;
    }

    .visual-wrap {
        min-height: 140px;
        margin: -4px 0 -4px;
    }

    .sphere-scene {
        width: min(100%, 460px);
    }
}

@media (max-width: 640px) {
    body {
        padding: 4px;
        align-items: flex-start;
    }

    .hero,
    .auth {
        padding: 10px;
    }

    .topbar {
        gap: 8px;
    }

    .brand {
        font-size: 18px;
    }

    .hero h1 {
        font-size: 19px;
    }

    .hero-lead {
        font-size: 10px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .visual-wrap {
        min-height: 135px;
    }

    .sphere-scene {
        width: min(100%, 320px);
    }

    .logo-core {
        width: 84px;
        height: 84px;
    }

    .kronixa-logo {
        width: 42px;
        height: 42px;
    }

    .orbit-badge {
        width: 36px;
        height: 36px;
        margin-left: -18px;
        margin-top: -18px;
        font-size: 8px;
    }
}
