/* ============================================================
   SwiftPOS — auth.css
   Login · Register · 2FA · Password Reset
   SaaS Modern — Centered Card Layout (Premium Light Design)
   ============================================================ */

/* ── Page shell ────────────────────────────────────────────── */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.auth-body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f1f5f9; /* Premium light grey background */
    color: var(--sp-color-text-main, #111827);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    body.auth-body {
        padding: 1.5rem 1rem;
        align-items: flex-start;
    }
}

/* ── Centered Card Split Layout ────────────────────────────── */
.auth-split {
    width: 100%;
    max-width: 1000px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(0, 0, 0, 0.02);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    min-height: 640px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@media (max-width: 991.98px) {
    .auth-split {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
    }
}

/* ── LEFT: Form panel ──────────────────────────────────────── */
.auth-form-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 3.2rem;
    position: relative;
}

@media (max-width: 991.98px) {
    .auth-form-panel {
        padding: 2.5rem 1.8rem;
    }
}

.auth-form-inner {
    width: 100%;
    margin: 0 auto;
}

/* Brand row in form */
.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    margin-bottom: 2rem;
}

.auth-brand-logo {
    height: 38px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

.auth-brand-name {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--sp-color-text-main, #111827);
    letter-spacing: -0.03em;
}

.auth-brand-name span {
    color: var(--sp-color-primary, #6d28d9);
}

/* Headings */
.auth-form-title {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--sp-color-text-main, #111827);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.35rem;
}

.auth-form-sub {
    font-size: 0.88rem;
    color: var(--sp-color-text-grey, #4b5563);
    margin-bottom: 1.8rem;
    line-height: 1.5;
}

/* Social Buttons */
.auth-social-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--sp-color-border, #e5e7eb);
    border-radius: 10px;
    padding: 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sp-color-text-main, #111827);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-social-outline:hover {
    background: var(--sp-color-bg-grey, #f9fafb);
    border-color: var(--sp-color-border-dark, #d1d5db);
    transform: translateY(-1px);
}

.btn-social-outline i {
    font-size: 0.95rem;
}

/* Divider with text */
.auth-divider-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
    color: var(--sp-color-text-muted, #9ca3af);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-divider-text::before,
.auth-divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sp-color-border, #e5e7eb);
}

/* Form fields */
.auth-field {
    margin-bottom: 1.15rem;
}

.auth-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sp-color-text-grey, #4b5563);
    margin-bottom: 0.42rem;
}

.auth-label a {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--sp-color-primary, #6d28d9);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-label a:hover {
    color: var(--sp-color-primary-dark, #5b21b6);
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sp-color-text-muted, #9ca3af);
    font-size: 0.82rem;
    pointer-events: none;
    transition: color 0.15s;
}

.auth-input {
    width: 100%;
    background: var(--sp-color-bg-grey, #f9fafb);
    border: 1.5px solid var(--sp-color-border, #e5e7eb);
    border-radius: 10px;
    color: var(--sp-color-text-main, #111827);
    font-size: 0.92rem;
    font-family: inherit;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input::placeholder {
    color: var(--sp-color-text-muted, #9ca3af);
    font-size: 0.88rem;
}

.auth-input:focus {
    background: #ffffff;
    border-color: var(--sp-color-primary, #6d28d9);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--sp-color-primary, #6d28d9);
}

.auth-input.is-error {
    border-color: var(--sp-color-danger, #ef4444);
    background: #fff5f5;
}

.auth-input.is-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Password eye toggle */
.auth-input-eye {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sp-color-text-muted, #9ca3af);
    cursor: pointer;
    font-size: 0.82rem;
    border: none;
    background: none;
    padding: 0;
    transition: color 0.15s;
}

.auth-input-eye:hover {
    color: var(--sp-color-primary, #6d28d9);
}

.auth-field-error {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--sp-color-danger, #ef4444);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Options row */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-check-label {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    font-size: 0.8rem;
    color: var(--sp-color-text-grey, #4b5563);
    cursor: pointer;
    user-select: none;
}

.auth-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--sp-color-border, #e5e7eb);
    cursor: pointer;
    accent-color: var(--sp-color-primary, #6d28d9);
}

/* reCAPTCHA */
.auth-recaptcha {
    transform: scale(0.94);
    transform-origin: 0 0;
    margin-bottom: 1rem;
}

/* Submit button */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.82rem;
    background: var(--sp-color-primary, #6d28d9);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.2);
}

.auth-submit-btn:hover {
    background: var(--sp-color-primary-dark, #5b21b6);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(109, 40, 217, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Footer Link */
.auth-footer-link {
    text-align: center;
    font-size: 0.82rem;
    color: var(--sp-color-text-grey, #4b5563);
    margin-top: 1.5rem;
}

.auth-footer-link a {
    font-weight: 700;
    color: var(--sp-color-primary, #6d28d9);
    text-decoration: none;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border-radius: 10px;
    padding: 0.72rem 0.95rem;
    margin-bottom: 1.15rem;
    font-size: 0.83rem;
    font-weight: 500;
}

.auth-alert i { margin-top: 0.1rem; flex-shrink: 0; }

.auth-alert-error {
    background: #fef2f2;
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.auth-alert-success {
    background: var(--sp-color-bg-teal-tint, #f0fdfa);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #065f46;
}

/* ── RIGHT: Brand / hero panel ──────────────────────────────── */
.auth-hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%); /* Elegant premium Blue palette matching the uploaded image */
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .auth-hero { display: none; }
}

/* Brand header in hero */
.auth-hero-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: #ffffff;
    z-index: 2;
}

.auth-hero-brand-logo {
    height: 38px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
}

.auth-hero-brand-name {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.auth-hero-brand-name span {
    color: rgba(255, 255, 255, 0.7);
}

/* Centered Interactive Graphic matching the image exactly */
.auth-hero-graphic-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    margin: 1.5rem 0;
}

.auth-hero-circle-bg {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Floating circles surrounding center (like Slack, Google, POS, reports) */
.auth-floating-badge {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sp-color-primary, #6d28d9);
    font-size: 1.05rem;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
}

.badge-pos-1 { top: 12%; left: -6%; color: #3b82f6; }
.badge-pos-2 { bottom: 26%; left: -8%; color: #10b981; }
.badge-pos-3 { bottom: 10%; right: 28%; color: #ef4444; }

/* The central mock card inside the orb */
.auth-mock-dashboard-card {
    width: 170px;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.9rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.auth-mock-header {
    height: 6px;
    width: 40px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.auth-mock-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.auth-mock-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dbeafe;
}

.auth-mock-line {
    flex: 1;
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
}

.auth-mock-line-short {
    width: 60%;
    height: 5px;
    background: #f1f5f9;
    border-radius: 3px;
}

/* Connective SVG lines */
.auth-graphic-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

/* Hero text content */
.auth-hero-body {
    text-align: center;
    z-index: 2;
    margin-top: auto;
}

.auth-hero-title {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.auth-hero-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto 1.5rem;
}

/* Slider pagination dots at the bottom of hero */
.auth-slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
}

.auth-slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transition: all 0.2s ease;
}

.auth-slider-dot.active {
    background: #ffffff;
    width: 14px;
    border-radius: 3px;
}

/* Bottom copyright bar */
.auth-page-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--sp-color-text-muted, #9ca3af);
    padding: 1.5rem 0 0.5rem;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* ── Register specific layout overrides ────────────────────── */
.auth-trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f0fdfa;
    color: #065f46;
    padding: 0.38rem 0.95rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.auth-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 0.85rem;
}

@media (max-width: 480px) {
    .auth-form-grid-2 { grid-template-columns: 1fr; }
}

.auth-field-hint {
    font-size: 0.72rem;
    color: var(--sp-color-text-muted, #9ca3af);
    margin-top: 0.3rem;
}

/* ── 2FA Identity Verification specific classes ────────────────── */
.otp-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 1.5rem 0;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'Outfit', monospace;
    border: 2px solid var(--sp-color-border, #e5e7eb);
    border-radius: 12px;
    background: var(--sp-color-bg-grey, #f9fafb);
    color: var(--sp-color-text-main, #111827);
    transition: all 0.2s ease;
    outline: none;
}

.otp-input:focus {
    border-color: var(--sp-color-primary, #6d28d9);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.1);
    background: #fff;
}

.otp-input.filled {
    border-color: var(--sp-color-primary, #6d28d9);
    background: var(--sp-color-bg-tint, #f5f3ff);
}

.email-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--sp-color-bg-tint, #f5f3ff);
    color: var(--sp-color-primary, #6d28d9);
    border: 1px solid var(--sp-color-border-tint, #ede9fe);
    border-radius: 999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.security-pill {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: #e2e8f0;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shield-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #ffffff;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-resend {
    background: none;
    border: 1px solid var(--sp-color-border, #e5e7eb);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.55rem 1.2rem;
    color: var(--sp-color-text-grey, #4b5563);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-resend:hover:not(:disabled) {
    border-color: var(--sp-color-primary, #6d28d9);
    color: var(--sp-color-primary, #6d28d9);
    background: var(--sp-color-bg-tint, #f5f3ff);
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.back-link {
    font-size: 0.85rem;
    color: var(--sp-color-text-muted, #9ca3af);
    text-decoration: none;
}

.back-link:hover {
    color: var(--sp-color-primary, #6d28d9);
}

