/* auth.css — Shared styles for Login and Register pages
   Used by:
     - Areas/Identity/Pages/Account/Login.cshtml
     - Areas/Identity/Pages/Account/Register.cshtml

   Layout: two-column grid (hero left | form right).
   On mobile ≤ 700px: single column, hero collapses to a header bar. */

/* ── Reset & tokens ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green:    #1DB954;
    --green-dim: #17a349;
    --black:    #080808;
    --card:     #111111;
    --border:   rgba(255,255,255,0.07);
    --text:     #f0f0f0;
    --muted:    #666;
    --input-bg: #1a1a1a;
}

html, body {
    height: 100%;
    background: var(--black);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    /* Allow the right panel to scroll on short viewports (e.g. Register form) */
    overflow: hidden;
}

/* ── Animated background orbs ── */
.bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: drift 12s ease-in-out infinite alternate;
}

/* Large green orb — top-left */
.bg-orb:nth-child(1) {
    width: 600px;
    height: 600px;
    background: #1DB954;
    top: -200px;
    left: -100px;
}

/* Smaller dark-green orb — bottom-right */
.bg-orb:nth-child(2) {
    width: 400px;
    height: 400px;
    background: #0d7a38;
    bottom: -100px;
    right: -50px;
    animation-delay: -4s;
}

/* Faint centre orb for depth */
.bg-orb:nth-child(3) {
    width: 300px;
    height: 300px;
    background: #1DB954;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    animation-delay: -8s;
}

@keyframes drift {
    from { transform: translate(0, 0)   scale(1);    }
    to   { transform: translate(30px, 20px) scale(1.05); }
}

/* Fine grid overlay for texture */
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── Two-column page shell ── */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    /* Equal columns on desktop; hero collapses on mobile (see responsive block) */
    grid-template-columns: 1fr 1fr;
}

/* ── Left column — hero / marketing copy ── */
.left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    border-right: 1px solid var(--border);
}

/* Logo row */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg { width: 20px; height: 20px; fill: #000; }

.logo-text {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Eyebrow label above hero title */
.hero-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 20px;
}

/* Large display headline — DM Sans is more readable than Syne at large sizes */
.hero-title {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(32px, 3.5vw, 54px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero-title span { color: var(--green); }

.hero-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 380px;
}

/* Stats strip at the bottom of the hero */
.stats-row   { display: flex; gap: 40px; }
.stat-num    { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 700; }
.stat-label  { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── Right column — auth form ── */
.right {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Allow scroll for taller forms (e.g. Register with 3 fields) */
    overflow-y: auto;
    padding: 48px;
}

/* Form card */
.card {
    width: 100%;
    max-width: 420px;
    animation: fadeUp 0.5s ease both;
}

/* Sign in / Create account tab switcher */
.tabs {
    display: flex;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    border-radius: 9px;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.tab.active { background: var(--green); color: #000; font-weight: 600; }

/* Stacked form with gap between sections */
.form-inner { display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Text / email / password inputs */
input[type=email],
input[type=password],
input[type=text] {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

input:focus         { border-color: var(--green); }
input::placeholder  { color: #444; }

/* Primary submit button */
.btn-primary {
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    width: 100%;
    margin-top: 4px;
    transition: background 0.2s;
}

.btn-primary:hover { background: var(--green-dim); }

/* "or continue with email" divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    margin: 4px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* OAuth buttons (Google / GitHub) */
.social-btns { display: flex; gap: 10px; }

.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
    width: 100%;
}

.btn-social:hover  { border-color: rgba(255,255,255,0.2); background: #222; }
.btn-social svg    { width: 16px; height: 16px; }

/* Forgot password link — right-aligned under password field */
.forgot {
    text-align: right;
    font-size: 12px;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.forgot:hover { color: var(--green); }

/* Server-side validation summary block */
.validation-summary {
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.3);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #e74c3c;
}

/* Per-field inline error messages */
.field-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 2px;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — auth pages
   ══════════════════════════════════════════════════════════ */

/* ── Tablet ≤ 900px: keep two columns but compress hero ── */
@media (max-width: 900px) {
    .left  { padding: 32px; }
    .right { padding: 32px; }

    .hero-title { font-size: clamp(28px, 4vw, 42px); letter-spacing: -1.5px; }
    .hero-desc  { font-size: 14px; }
    .stats-row  { gap: 24px; }
}

/* ── Mobile ≤ 700px: single column, hero collapses to a top bar ── */
@media (max-width: 700px) {
    html, body { overflow-y: auto; }

    /* Stack hero above form */
    .page {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    /* Hero shrinks to a compact branding bar */
    .left {
        padding: 28px 24px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        /* Hide stats and description on very small screens */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    /* On mobile, only show logo + a compact hero title snippet */
    .left .hero-label,
    .left .hero-desc,
    .left .stats-row { display: none; }

    .left .hero-title {
        font-size: 22px;
        letter-spacing: -1px;
        margin-bottom: 0;
    }

    /* Form panel takes remaining space */
    .right {
        align-items: flex-start;
        padding: 32px 24px 40px;
    }

    .card { max-width: 100%; }

    /* Stack social buttons vertically on very narrow screens */
    .social-btns { flex-direction: column; }
}

/* ══════════════════════════════════════════════════════════
   Forgot password page — centered single-column layout
   ══════════════════════════════════════════════════════════ */

/* Override the two-column grid — this page only shows the right panel */
.fp-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo — slightly less bottom margin than on Login */
.fp-logo {
    margin-bottom: 32px;
}

/* Page title */
.fp-title {
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

/* Subtitle description */
.fp-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* Envelope icon on the confirmation page */
.fp-success-icon {
    width: 56px;
    height: 56px;
    background: rgba(29, 185, 84, 0.12);
    border: 1px solid rgba(29, 185, 84, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    margin-bottom: 20px;
}

/* Back to sign in link with arrow icon */
.fp-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    margin-top: 20px;
    transition: color 0.2s;
}

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

/* ── Forgot/Reset password — full-width right panel ──
   On these standalone pages there is no left hero column,
   so the right panel stretches to fill the whole page. */
.fp-panel {
    width: 100%;
}

/* Sign in button on reset confirmation — block + centered */
.fp-signin-btn {
    display: block;
    text-align: center;
    text-decoration: none;
}

/* Social button — full width variant (used inside flex:1 form on Login/Register) */
.btn-social--full { width: 100%; }

/* OAuth form wrapper — flex:1 so both Google and GitHub buttons share equal width */
.social-form { flex: 1; }
