/**
 * Arewa Web - Modern Enterprise Auth Styling
 * Seamless integration with theme.css, multi-color presets, and dark mode.
 */

:root {
    --auth-bg-light: #f8fafc;
    --auth-card-bg-light: #ffffff;
    --auth-card-border-light: rgba(226, 232, 240, 0.8);
    --auth-text-main-light: #0f172a;
    --auth-text-muted-light: #64748b;
    --auth-input-bg-light: #ffffff;
    --auth-input-border-light: #cbd5e1;
    --auth-input-focus-border: var(--theme-primary, #002fba);
}

.auth-split-wrapper {
    min-height: 100vh;
    display: flex;
    width: 100%;
    background-color: var(--auth-bg-light);
    color: var(--auth-text-main-light);
    font-family: 'Figtree', 'Archivo', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* -------------------------------------------------------------
   LEFT BRANDING SHOWCASE PANEL (Desktop)
------------------------------------------------------------- */
.auth-brand-side {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem 3.5rem;
    color: #ffffff;
    overflow: hidden;
    background: linear-gradient(135deg, var(--theme-gradient-start, #002696) 0%, var(--theme-gradient-end, #002fba) 100%);
    box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .auth-brand-side {
        display: flex;
        width: 46%;
        flex-shrink: 0;
    }
    .auth-form-side {
        width: 54%;
        flex-grow: 1;
    }
}

@media (min-width: 1280px) {
    .auth-brand-side {
        width: 44%;
    }
    .auth-form-side {
        width: 56%;
    }
}

/* Ambient glow orbs in background */
.auth-brand-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.45;
    z-index: 1;
}
.auth-brand-orb-1 {
    width: 380px;
    height: 380px;
    top: -100px;
    left: -100px;
    background: rgba(255, 255, 255, 0.2);
}
.auth-brand-orb-2 {
    width: 440px;
    height: 440px;
    bottom: -120px;
    right: -120px;
    background: var(--theme-primary-soft, rgba(255, 255, 255, 0.15));
}

/* Background grid overlay */
.auth-brand-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
}

/* Logo Badge */
.auth-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: #ffffff;
}
.auth-brand-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.auth-brand-logo-icon img,
.auth-brand-logo-icon svg {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

/* Feature Cards inside Showcase */
.auth-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1rem;
    transition: transform 0.25s ease, background 0.25s ease;
}
.auth-feature-card:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.12);
}
.auth-feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    color: #ffffff;
}

/* Trust Quote Box */
.auth-trust-box {
    padding: 0.9rem 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.auth-trust-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

.auth-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    line-height: 1.2;
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.9);
    display: inline-block;
    flex-shrink: 0;
}

.auth-copyright-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.auth-brand-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

/* -------------------------------------------------------------
   RIGHT FORM PANEL
------------------------------------------------------------- */
.auth-form-side {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 1.5rem 1.25rem;
    position: relative;
}

@media (min-width: 640px) {
    .auth-form-side {
        padding: 2.5rem 2rem;
    }
}

/* Top bar with back button & theme toggle */
.auth-top-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 460px;
    margin: 0 auto 1.5rem auto;
}

.auth-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.auth-nav-link:hover {
    color: var(--theme-primary, #002fba);
    background-color: rgba(0, 47, 186, 0.05);
}

.auth-theme-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.auth-theme-btn:hover {
    color: var(--theme-primary, #002fba);
    border-color: var(--theme-primary, #002fba);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Form Container Card */
.auth-card-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    padding: 2.25rem 2rem;
    position: relative;
    overflow: hidden;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }
}

/* Card Header */
.auth-header {
    margin-bottom: 1.75rem;
    text-align: left;
}
.auth-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: var(--theme-primary-soft, #eaf0ff);
    color: var(--theme-primary, #002fba);
    margin-bottom: 0.65rem;
}
.auth-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.35rem;
}
.auth-subtitle {
    font-size: 0.925rem;
    color: #64748b;
    line-height: 1.5;
}

/* Input Styles */
.auth-form-group {
    margin-bottom: 1.25rem;
}
.auth-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}
.auth-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s ease;
}
.auth-input {
    width: 100%;
    padding: 0.72rem 1rem 0.72rem 2.65rem;
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}
.auth-input:focus {
    background-color: #ffffff;
    border-color: var(--theme-primary, #002fba);
    box-shadow: 0 0 0 4px var(--theme-shadow, rgba(0, 47, 186, 0.15));
}
.auth-input:focus + .auth-input-icon,
.auth-input-group:focus-within .auth-input-icon {
    color: var(--theme-primary, #002fba);
}

.auth-input-has-toggle {
    padding-right: 2.85rem;
}

.auth-toggle-pwd {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.4rem 0.55rem;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
}
.auth-toggle-pwd:hover {
    color: #475569;
    background-color: #f1f5f9;
}

/* Error message */
.auth-error-msg {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Primary Button */
.auth-btn-primary {
    width: 100%;
    padding: 0.82rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-primary, #002fba) 0%, var(--theme-primary-hover, #002696) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--theme-shadow, rgba(0, 47, 186, 0.3));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--theme-shadow, rgba(0, 47, 186, 0.4));
    filter: brightness(1.06);
}
.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Secondary Button */
.auth-btn-secondary {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.925rem;
    font-weight: 600;
    color: #475569;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.auth-btn-secondary:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* Checkbox & Switch */
.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}
.auth-checkbox {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    color: var(--theme-primary, #002fba);
    accent-color: var(--theme-primary, #002fba);
    cursor: pointer;
}

/* Alert Boxes */
.auth-alert-warning {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.auth-alert-success {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #166534;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.auth-alert-danger {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #991b1b;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.auth-alert-info {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background-color: var(--theme-primary-soft, #eaf0ff);
    border: 1px solid rgba(0, 47, 186, 0.15);
    color: var(--theme-primary, #002fba);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

/* Notice box for locked/disabled states */
.auth-locked-card {
    text-align: center;
    padding: 1rem 0.5rem;
}
.auth-locked-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #fef3c7;
    color: #d97706;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.15);
}

/* Footer note & link styles */
.auth-footer-text {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
}

/* Prevent underline on all links in auth views (normal, hover, active, focus) */
.auth-split-wrapper a,
.auth-nav-link,
.auth-footer-link {
    text-decoration: none !important;
}

.auth-split-wrapper a:hover,
.auth-split-wrapper a:focus,
.auth-split-wrapper a:active,
.auth-nav-link:hover,
.auth-nav-link:focus,
.auth-nav-link:active {
    text-decoration: none !important;
    outline: none !important;
}

.auth-footer-link {
    color: var(--theme-primary, #002fba);
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s ease, color 0.2s ease;
    display: inline-block;
}

.auth-footer-link:hover,
.auth-footer-link:focus,
.auth-footer-link:active {
    text-decoration: none !important;
    outline: none !important;
    opacity: 0.85;
    color: var(--theme-primary-hover, #002696);
}

/* -------------------------------------------------------------
   DARK MODE OVERRIDES
------------------------------------------------------------- */
[data-theme-mode="dark"] .auth-split-wrapper,
.dark-mode .auth-split-wrapper {
    background-color: #0b0f19;
    color: #f1f5f9;
}

[data-theme-mode="dark"] .auth-card,
.dark-mode .auth-card {
    background: #131b2e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

[data-theme-mode="dark"] .auth-title,
.dark-mode .auth-title {
    color: #f8fafc;
}

[data-theme-mode="dark"] .auth-subtitle,
.dark-mode .auth-subtitle {
    color: #94a3b8;
}

[data-theme-mode="dark"] .auth-label,
.dark-mode .auth-label {
    color: #e2e8f0;
}

[data-theme-mode="dark"] .auth-input,
.dark-mode .auth-input {
    background-color: #0b0f19;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}
[data-theme-mode="dark"] .auth-input:focus,
.dark-mode .auth-input:focus {
    background-color: #0f172a;
}

[data-theme-mode="dark"] .auth-theme-btn,
.dark-mode .auth-theme-btn {
    background: #131b2e;
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

[data-theme-mode="dark"] .auth-btn-secondary,
.dark-mode .auth-btn-secondary {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}
[data-theme-mode="dark"] .auth-btn-secondary:hover,
.dark-mode .auth-btn-secondary:hover {
    background: #27354f;
    color: #ffffff;
}

[data-theme-mode="dark"] .auth-checkbox-label,
.dark-mode .auth-checkbox-label {
    color: #94a3b8;
}

[data-theme-mode="dark"] .auth-alert-warning,
.dark-mode .auth-alert-warning {
    background-color: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.25);
    color: #fcd34d;
}

[data-theme-mode="dark"] .auth-alert-success,
.dark-mode .auth-alert-success {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

[data-theme-mode="dark"] .auth-alert-info,
.dark-mode .auth-alert-info {
    background-color: rgba(0, 47, 186, 0.2);
    border-color: rgba(0, 47, 186, 0.35);
    color: #93c5fd;
}

[data-theme-mode="dark"] .auth-nav-link,
.dark-mode .auth-nav-link {
    color: #94a3b8;
}
[data-theme-mode="dark"] .auth-nav-link:hover,
.dark-mode .auth-nav-link:hover {
    color: #60a5fa;
    background-color: rgba(255, 255, 255, 0.05);
}

[data-theme-mode="dark"] .auth-toggle-pwd:hover,
.dark-mode .auth-toggle-pwd:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

[data-theme-mode="dark"] .auth-brand-side,
.dark-mode .auth-brand-side {
    background: linear-gradient(135deg, #090d16 0%, #0f172a 60%, var(--theme-gradient-start, #002696) 100%);
    box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme-mode="dark"] .auth-trust-box,
.dark-mode .auth-trust-box {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme-mode="dark"] .auth-trust-title,
.dark-mode .auth-trust-title {
    color: #f1f5f9;
}

[data-theme-mode="dark"] .auth-trust-badge,
.dark-mode .auth-trust-badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.16);
    color: #e2e8f0 !important;
}

[data-theme-mode="dark"] .auth-copyright-text,
.dark-mode .auth-copyright-text {
    color: #64748b;
}

[data-theme-mode="dark"] .auth-brand-name,
.dark-mode .auth-brand-name {
    color: #f8fafc;
}

[data-theme-mode="dark"] .auth-footer-link,
.dark-mode .auth-footer-link {
    color: #60a5fa;
    text-decoration: none !important;
}

[data-theme-mode="dark"] .auth-footer-link:hover,
.dark-mode .auth-footer-link:hover,
[data-theme-mode="dark"] .auth-footer-link:focus,
.dark-mode .auth-footer-link:focus,
[data-theme-mode="dark"] .auth-footer-link:active,
.dark-mode .auth-footer-link:active {
    color: #93c5fd;
    text-decoration: none !important;
    outline: none !important;
}
