/* Susyymails auth.css - Login page (2026-07 redesign)
   ----------------------------------------------------------------
   Premium split-screen layout with hero on left, auth card centered/right.
   All class names preserved. 100% GPU-friendly animations.
   ---------------------------------------------------------------- */

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

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.shambhala-access.auth-page {
    color: var(--text);
    background: var(--canvas);
    font-family: var(--font-sans);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, input { font: inherit; color: inherit; }

/* ===== Layout shell ===== */
.page-bg {
    /* Background handled by shambhala-bg.css */
}

.login-shell {
    position: relative;
    z-index: 2;
    max-width: 1320px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 56px);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-stage {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 80px);
    align-items: center;
}

/* ===== Hero (left side) ===== */
.auth-story {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    padding: clamp(8px, 2vw, 16px) 0;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.auth-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4a5cf2, #6f8bff);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 14px 40px rgba(74, 92, 242, 0.45);
    flex-shrink: 0;
}
.auth-brand-mark svg { width: 22px; height: 22px; }
.auth-brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.auth-brand-copy strong {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.auth-brand-copy span {
    color: var(--text-faint);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-hero {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 580px;
}

.auth-kicker {
    display: inline-block;
    width: fit-content;
    padding: 6px 12px;
    background: rgba(45, 212, 164, 0.10);
    color: var(--success-500);
    border: 1px solid rgba(45, 212, 164, 0.25);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
}
.auth-kicker::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success-500);
    box-shadow: 0 0 0 4px rgba(45, 212, 164, 0.20);
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.auth-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(40px, 5.5vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    color: var(--text-strong);
    font-weight: 700;
}
.auth-title span {
    background: linear-gradient(135deg, #6f8bff, #2dd4a4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-summary {
    margin: 0;
    color: var(--text-muted);
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.6;
    max-width: 540px;
}

.auth-signal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 540px;
    margin-top: 8px;
}
.signal-item {
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all var(--dur-base) var(--ease-out);
}
.signal-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line-strong);
    transform: translateY(-2px);
}
.signal-item strong {
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.signal-item span {
    color: var(--text-faint);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-orbit {
    position: absolute;
    bottom: 5%;
    right: -10%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(106, 130, 255, 0.2) 25%, transparent 50%, rgba(45, 212, 164, 0.18) 75%, transparent 100%);
    filter: blur(40px);
    opacity: 0.6;
    z-index: -1;
    animation: orbitSpin 20s linear infinite;
}
@keyframes orbitSpin {
    to { transform: rotate(360deg); }
}

/* ===== Auth card (centered/right) ===== */
.login-panel {
    position: relative;
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    padding: 36px 32px 32px;
    border-radius: var(--r-2xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
        rgba(10, 13, 22, 0.78);
    border: 1px solid var(--line);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: panelFloat 6s ease-in-out infinite;
}
.login-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.18), transparent 40%, rgba(106, 130, 255, 0.30));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
@keyframes panelFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
    .login-panel { animation: none; }
}

.login-head {
    text-align: center;
    margin-bottom: 28px;
}
.login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-600), var(--accent-500));
    color: #fff;
    box-shadow: var(--shadow-glow);
}
.login-icon svg { width: 26px; height: 26px; }

.login-kicker {
    margin: 0 0 8px;
    color: var(--accent-500);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}
.login-head h2 {
    margin: 0 0 8px;
    color: var(--text-strong);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.login-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.field-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.01em;
    margin-bottom: 8px;
    display: block;
}
.code-field {
    position: relative;
}
.code-field input {
    width: 100%;
    background: var(--surface-1);
    color: var(--text-strong);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 56px 16px 18px;
    font-size: 17px;
    font-family: "JetBrains Mono", "Space Grotesk", ui-monospace, monospace;
    letter-spacing: 0.18em;
    min-height: 56px;
    outline: none;
    transition: all var(--dur-base) var(--ease-out);
}
.code-field input::placeholder {
    color: var(--text-faint);
    letter-spacing: 0.02em;
    text-transform: none;
    font-size: 14px;
}
.code-field input:hover { border-color: var(--line-strong); }
.code-field input:focus {
    border-color: var(--accent-500);
    background: var(--surface-2);
    box-shadow: 0 0 0 4px rgba(106, 130, 255, 0.18);
}

.toggle-code {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease-out);
}
.toggle-code:hover { background: var(--surface-2); color: var(--text); }
.toggle-code svg { width: 20px; height: 20px; }
.toggle-code #eyeClosed { display: none; }
.toggle-code.is-visible #eyeOpen { display: none; }
.toggle-code.is-visible #eyeClosed { display: block; }

.submit-btn {
    background: linear-gradient(135deg, var(--accent-600), var(--accent-500));
    color: #fff;
    border-color: rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 16px 24px;
    min-height: 52px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--dur-base) var(--ease-out);
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow-strong); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled {
    background: var(--surface-2);
    color: var(--text-disabled);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}
.submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-500), var(--brand-300));
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease-out);
}
.submit-btn > * { position: relative; z-index: 1; }
.submit-btn:hover::before { opacity: 1; }
.submit-btn .btn-spinner {
    display: inline-block;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.feedback {
    min-height: 18px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    transition: color var(--dur-base) var(--ease-out);
}
.feedback.error { color: var(--danger-500); }
.feedback.success { color: var(--success-500); }

.security-note {
    margin: 22px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-faint);
    line-height: 1.5;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .auth-stage {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .auth-story {
        text-align: center;
        align-items: center;
    }
    .auth-signal {
        grid-template-columns: 1fr;
        max-width: 360px;
        width: 100%;
    }
    .auth-orbit { display: none; }
    .login-panel {
        margin-left: auto;
        margin-right: auto;
    }
}
@media (max-width: 480px) {
    .login-shell { padding: 20px 16px; }
    .login-panel { padding: 28px 22px; }
    .auth-title { font-size: 38px; }
}
