/* ================================
   LABEX - AUTH PAGES (Login / Signup / Access Denied)
   Navy hero panel + amber accents, matching the public landing.
   ================================ */

body.auth-portal {
    --auth-text: #0f172a;
    --auth-text-secondary: #475569;
    --auth-text-muted: #94a3b8;

    --auth-border: #e2e8f0;
    --auth-border-soft: #f1f5f9;
    --auth-bg: #fafafa;
    --auth-bg-card: #ffffff;

    --auth-navy-900: #0c4a6e;
    --auth-navy-800: #1e3a8a;
    --auth-indigo-900: #312e81;
    --auth-hero-gradient: linear-gradient(135deg, #0c4a6e 0%, #1e3a8a 50%, #312e81 100%);

    --auth-amber: #fbbf24;
    --auth-amber-dark: #f59e0b;
    --auth-amber-darker: #d97706;
    --auth-amber-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --auth-amber-gradient-hover: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-danger-soft: #fef2f2;

    --auth-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --auth-shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    --auth-shadow-lg: 0 20px 50px -12px rgba(15, 23, 42, 0.18);
    --auth-shadow-glow: 0 12px 40px -12px rgba(251, 191, 36, 0.50);

    --auth-radius: 0.5rem;
    --auth-radius-lg: 0.75rem;
    --auth-radius-xl: 1rem;
    --auth-radius-2xl: 1.5rem;

    --auth-transition: 200ms ease-in-out;

    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
}

/* ================================
   SPLIT-SCREEN SHELL
   ================================ */
.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    min-height: 100vh;
}

/* ================================
   LEFT — branded panel
   ================================ */
.auth-brand-panel {
    background: var(--auth-hero-gradient);
    color: #fff;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -25%;
    width: 80%;
    height: 160%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -25%;
    width: 80%;
    height: 160%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.20) 0%, transparent 60%);
    pointer-events: none;
}

.auth-brand-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
    position: relative;
    z-index: 1;
}

.auth-brand-top:hover {
    color: var(--auth-amber);
}

.auth-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--auth-radius);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--auth-amber);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    backdrop-filter: blur(10px);
}

.auth-brand-body {
    position: relative;
    z-index: 1;
    max-width: 28rem;
}

.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(251, 191, 36, 0.12);
    color: var(--auth-amber);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(251, 191, 36, 0.25);
}

.auth-brand-body h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
    margin: 0 0 0.875rem;
}

.auth-brand-body h2 .auth-brand-highlight {
    background: var(--auth-amber-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-brand-body p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 2rem;
}

.auth-brand-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-brand-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.925rem;
    line-height: 1.5;
}

.auth-brand-list li i {
    color: var(--auth-amber);
    font-size: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* ================================
   RIGHT — form panel
   ================================ */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--auth-bg);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--auth-bg-card);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--auth-shadow-md);
    animation: authSlideUp 0.4s ease-out;
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card-wide {
    max-width: 560px;
}

.auth-card-header {
    margin-bottom: 1.75rem;
}

.auth-card-header h1 {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--auth-text);
    margin: 0 0 0.5rem;
}

.auth-card-header p {
    color: var(--auth-text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.auth-mobile-brand {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
    color: var(--auth-text);
    font-weight: 700;
    font-size: 1.1rem;
}

.auth-mobile-brand .auth-mobile-mark {
    width: 36px;
    height: 36px;
    border-radius: var(--auth-radius);
    background: var(--auth-hero-gradient);
    color: var(--auth-amber);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ================================
   FORM ELEMENTS
   ================================ */
.auth-portal .auth-form-group {
    margin-bottom: 1.1rem;
}

.auth-portal .auth-form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--auth-text);
    margin-bottom: 0.4rem;
}

.auth-portal .auth-form-label i {
    color: var(--auth-amber-darker);
    margin-right: 0.35rem;
    font-size: 0.875rem;
}

.auth-portal .auth-input-group {
    position: relative;
}

.auth-portal .auth-input-group .auth-input-icon {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-portal .auth-form-control {
    width: 100%;
    height: 46px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    padding: 0 0.95rem 0 2.6rem;
    font-size: 0.95rem;
    color: var(--auth-text);
    background: var(--auth-bg-card);
    transition: all var(--auth-transition);
}

.auth-portal .auth-form-control::placeholder {
    color: var(--auth-text-muted);
}

.auth-portal .auth-form-control:focus {
    outline: none;
    border-color: var(--auth-navy-800);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.auth-portal .auth-form-control:focus + .auth-input-icon,
.auth-portal .auth-input-group:focus-within .auth-input-icon {
    color: var(--auth-navy-800);
}

.auth-portal .auth-validation {
    display: block;
    color: var(--auth-danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    min-height: 1em;
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-row-loose {
    margin-top: 1.1rem;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--auth-text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--auth-navy-800);
    cursor: pointer;
}

.auth-link {
    color: var(--auth-navy-800);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--auth-transition);
}

.auth-link:hover {
    color: var(--auth-indigo-900);
    text-decoration: underline;
}

/* ================================
   BUTTON
   ================================ */
.auth-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--auth-radius);
    background: var(--auth-amber-gradient);
    color: #1f2937;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--auth-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--auth-shadow-glow);
}

.auth-submit:hover {
    background: var(--auth-amber-gradient-hover);
    transform: translateY(-1px);
    box-shadow: 0 16px 50px -12px rgba(251, 191, 36, 0.65);
}

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

/* ================================
   ALERT
   ================================ */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--auth-danger-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--auth-danger);
    border-radius: var(--auth-radius);
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.auth-alert i {
    color: var(--auth-danger);
    margin-top: 0.15rem;
}

/* ================================
   FOOTNOTE
   ================================ */
.auth-footer-note {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--auth-text-secondary);
    font-size: 0.875rem;
}

.auth-footer-note a {
    color: var(--auth-navy-800);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-note a:hover {
    color: var(--auth-indigo-900);
    text-decoration: underline;
}

/* ================================
   ACCESS DENIED
   ================================ */
.auth-denied-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: var(--auth-hero-gradient);
    position: relative;
    overflow: hidden;
}

.auth-denied-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(251, 191, 36, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(239, 68, 68, 0.18) 0%, transparent 50%);
    pointer-events: none;
}

.auth-denied-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: var(--auth-bg-card);
    border-radius: var(--auth-radius-2xl);
    padding: 3rem 2.25rem;
    text-align: center;
    box-shadow: var(--auth-shadow-lg);
    animation: authSlideUp 0.4s ease-out;
}

.auth-denied-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: var(--auth-danger);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.25rem;
}

.auth-denied-card h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--auth-text);
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.auth-denied-card .auth-denied-lead {
    color: var(--auth-text-secondary);
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.auth-denied-card .auth-denied-hint {
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    margin: 0 0 2rem;
}

.auth-denied-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.auth-btn-primary {
    background: var(--auth-amber-gradient);
    color: #1f2937 !important;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--auth-radius);
    font-weight: 700;
    text-decoration: none;
    transition: all var(--auth-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--auth-shadow-sm);
}

.auth-btn-primary:hover {
    background: var(--auth-amber-gradient-hover);
    transform: translateY(-1px);
    box-shadow: var(--auth-shadow-md);
    color: #1f2937 !important;
}

.auth-btn-ghost {
    background: transparent;
    color: var(--auth-text) !important;
    border: 1px solid var(--auth-border);
    padding: 0.8rem 1.5rem;
    border-radius: var(--auth-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--auth-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn-ghost:hover {
    background: var(--auth-bg);
    border-color: var(--auth-navy-800);
    color: var(--auth-navy-800) !important;
}

.auth-denied-code {
    margin-top: 1.5rem;
    color: var(--auth-text-muted);
    font-size: 0.8rem;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 991.98px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-mobile-brand {
        display: inline-flex;
    }

    .auth-form-panel {
        padding: 2rem 1.25rem;
        min-height: 100vh;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.75rem;
        border-radius: var(--auth-radius-xl);
    }

    .auth-card-header h1 {
        font-size: 1.4rem;
    }

    .auth-denied-card {
        padding: 2.25rem 1.5rem;
    }
}
