/* F-Shop auth — split composition */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --shop-ink: #0f1c24;
    --shop-ink-soft: #1a2e38;
    --shop-mist: #eef3f1;
    --shop-paper: #f7faf8;
    --shop-accent: #0d9488;
    --shop-accent-deep: #0f766e;
    --shop-accent-glow: rgba(13, 148, 136, 0.22);
    --shop-line: rgba(15, 28, 36, 0.1);
    --shop-muted: #5b6b73;
    --shop-radius: 14px;
    --shop-font-display: 'Fraunces', Georgia, serif;
    --shop-font-body: 'Outfit', system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    margin: 0;
    font-family: var(--shop-font-body);
    color: var(--shop-ink);
    background: var(--shop-paper);
}

.row-full-height {
    min-height: 100vh;
    min-height: 100dvh;
}

/* —— Hero plane —— */
.login-hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: clamp(2rem, 5vw, 4.5rem);
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(13, 148, 136, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(45, 212, 191, 0.18) 0%, transparent 50%),
        linear-gradient(155deg, var(--shop-ink) 0%, var(--shop-ink-soft) 48%, #0a3d3a 100%);
}

.login-hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to top, transparent 10%, black 70%);
    pointer-events: none;
    animation: shop-grid-drift 28s linear infinite;
}

@keyframes shop-grid-drift {
    from { transform: translateY(0); }
    to { transform: translateY(48px); }
}

.login-hero-overlay {
    display: none;
}

.hero-brand {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 34rem;
    animation: shop-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    padding: 0.65rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.hero-title {
    font-family: var(--shop-font-display);
    font-size: clamp(2.75rem, 5.5vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0;
}

.hero-title span {
    display: block;
    font-weight: 600;
    font-size: 0.42em;
    letter-spacing: 0.04em;
    opacity: 0.78;
    margin-top: 0.55rem;
    font-family: var(--shop-font-body);
    text-transform: uppercase;
}

.hero-subtitle {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.55;
    opacity: 0.88;
    max-width: 28rem;
    animation: shop-rise 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes shop-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Form column —— */
.login-form-section {
    background:
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(13, 148, 136, 0.08) 0%, transparent 55%),
        var(--shop-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
    animation: shop-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.login-brand-mobile {
    display: none;
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-brand-mobile .brand-wordmark {
    font-family: var(--shop-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--shop-ink);
    letter-spacing: -0.02em;
    margin: 0.75rem 0 0;
}

.brand-logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-height: 56px;
    width: auto;
}

.login-header {
    margin-bottom: 1.75rem;
}

.login-header h2 {
    font-family: var(--shop-font-display);
    color: var(--shop-ink);
    font-weight: 700;
    font-size: 1.85rem;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
}

.login-header p {
    color: var(--shop-muted);
    margin: 0;
    font-size: 0.98rem;
    font-weight: 400;
}

.form-label {
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
    color: var(--shop-muted);
}

.form-control {
    background-color: #fff;
    border: 1px solid var(--shop-line);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 0;
    font-family: var(--shop-font-body);
    font-size: 0.98rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--shop-accent);
    box-shadow: 0 0 0 3px var(--shop-accent-glow);
    outline: none;
}

.login-field {
    margin-bottom: 1.15rem;
}

.password-field .input-group {
    display: flex;
}

.password-field .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.password-toggle {
    border: 1px solid var(--shop-line);
    border-left: 0;
    background: #fff;
    color: var(--shop-muted);
    border-radius: 0 10px 10px 0;
    padding: 0 0.9rem;
    transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
    color: var(--shop-accent-deep);
    background: var(--shop-mist);
}

.form-check-input:checked {
    background-color: var(--shop-accent);
    border-color: var(--shop-accent);
}

.form-check-label {
    color: var(--shop-ink-soft);
    font-size: 0.92rem;
}

.captcha-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.captcha-question {
    font-size: 1.15rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 4.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    background: var(--shop-mist);
    color: var(--shop-ink);
}

.btn-primary-rest {
    background: linear-gradient(135deg, var(--shop-accent) 0%, var(--shop-accent-deep) 100%);
    border: none;
    color: #fff;
    width: 100%;
    padding: 0.95rem 1.25rem;
    font-family: var(--shop-font-body);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    margin-top: 0.35rem;
    box-shadow: 0 8px 24px var(--shop-accent-glow);
}

.btn-primary-rest:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.35);
    color: #fff;
}

.btn-primary-rest:active {
    transform: translateY(0);
}

a.btn-primary-rest {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #fff;
}

.auth-links {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--shop-muted);
}

.auth-links a,
.auth-inline-link {
    color: var(--shop-accent-deep);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover,
.auth-inline-link:hover {
    text-decoration: underline;
}

.forgot-link {
    color: var(--shop-muted);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--shop-accent-deep);
}

.alert-soft-rest {
    background: rgba(13, 148, 136, 0.08);
    border: 1px solid rgba(13, 148, 136, 0.2);
    color: var(--shop-ink);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
}

/* Submit loading overlay */
body.auth-loading-active {
    overflow: hidden;
}

.auth-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-loading-overlay.is-visible {
    display: flex;
}

.auth-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 28, 36, 0.55);
}

.auth-loading-panel {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: var(--shop-radius);
    padding: 1.75rem 2rem;
    box-shadow: 0 16px 48px rgba(15, 28, 36, 0.28);
    text-align: center;
    max-width: 320px;
    border: 1px solid rgba(13, 148, 136, 0.18);
}

.auth-loading-spinner {
    width: 2.75rem;
    height: 2.75rem;
    color: var(--shop-accent);
    border-width: 0.22em;
}

.auth-loading-text {
    margin: 1rem 0 0;
    font-size: 0.95rem;
    color: var(--shop-ink);
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 991.98px) {
    .login-hero-section {
        display: none !important;
    }

    .login-brand-mobile {
        display: block;
    }

    .login-form-section {
        min-height: 100vh;
        min-height: 100dvh;
    }
}
