/* =========================================================
   PROFIT ERP - ENTERPRISE CLOUD AUTHENTICATION PORTAL
   Theme: Midnight Aurora Dark Gradient (Brand Palette: Deep Navy #173054 & Teal #3A868F)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Brand Primary Colors */
    --primary-blue: #173054;
    --primary-teal: #3A868F;
    --primary-blue-rgb: 23, 48, 84;
    --primary-teal-rgb: 58, 134, 143;

    /* Dark Gradient Spectrum */
    --bg-dark-900: #050a12;
    --bg-dark-800: #091322;
    --bg-dark-700: #0e1e36;
    --bg-dark-600: #142846;

    /* Vibrant Accents */
    --accent-cyan: #2dd4bf;
    --accent-cyan-glow: rgba(45, 212, 191, 0.28);
    --accent-teal-glow: rgba(58, 134, 143, 0.35);
    --accent-blue-glow: rgba(23, 48, 84, 0.55);
    --accent-sky: #38bdf8;

    /* Glass Surfaces */
    --card-glass-bg: linear-gradient(165deg, rgba(16, 32, 58, 0.78) 0%, rgba(8, 18, 34, 0.88) 100%);
    --card-border: rgba(58, 134, 143, 0.28);
    --card-border-hover: rgba(45, 212, 191, 0.45);
    --card-highlight: rgba(255, 255, 255, 0.12);

    /* Inputs */
    --input-glass-bg: rgba(7, 16, 30, 0.72);
    --input-border: rgba(58, 134, 143, 0.24);
    --input-border-hover: rgba(58, 134, 143, 0.48);
    --input-border-focus: #2dd4bf;
    --input-text: #f8fafc;
    --input-placeholder: #64748b;

    /* Typography Colors */
    --text-white: #ffffff;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* System Status */
    --status-success: #10b981;
    --status-error: #f43f5e;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-ui: 'Poppins', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    /* Animations */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 220ms ease;
    --transition-smooth: 380ms var(--ease-out-expo);
}

/* =========================================================
   BASE RESETS & BODY
   ========================================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body.auth-dark-portal {
    font-family: var(--font-ui);
    background-color: var(--bg-dark-900);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 12px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   DARK AMBIENT BACKGROUND & AURORA EFFECTS
   ========================================================= */
.dark-ambient-scene {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    background: radial-gradient(circle at 50% 0%, #0c1a2f 0%, #07101e 50%, #040811 100%);
}

/* Cyber Blueprint Grid */
.dark-ambient-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(58, 134, 143, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(58, 134, 143, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0.9) 20%, rgba(0, 0, 0, 0) 80%);
}

/* Fine Dot Matrix Overlay */
.dark-ambient-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(58, 134, 143, 0.16) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    opacity: 0.65;
    mask-image: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 1) 15%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 1) 15%, transparent 75%);
}

/* Floating Radial Glow Orbs */
.glow-orb-primary {
    position: absolute;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    top: -160px;
    left: -120px;
    background: radial-gradient(circle, rgba(58, 134, 143, 0.32) 0%, rgba(23, 48, 84, 0.18) 45%, transparent 70%);
    filter: blur(80px);
    animation: floatGlowPrimary 24s ease-in-out infinite alternate;
}

.glow-orb-secondary {
    position: absolute;
    width: 750px;
    height: 750px;
    border-radius: 50%;
    bottom: -180px;
    right: -140px;
    background: radial-gradient(circle, rgba(23, 48, 84, 0.55) 0%, rgba(58, 134, 143, 0.22) 50%, transparent 72%);
    filter: blur(95px);
    animation: floatGlowSecondary 28s ease-in-out infinite alternate;
}

.glow-orb-center {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(45, 212, 191, 0.12) 0%, rgba(58, 134, 143, 0.06) 50%, transparent 75%);
    filter: blur(75px);
    animation: pulseCenterGlow 14s ease-in-out infinite alternate;
}

/* Light Cones & Beams */
.dark-ambient-beams {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 480px;
    background: radial-gradient(ellipse at 50% 0%, rgba(58, 134, 143, 0.18) 0%, rgba(23, 48, 84, 0.08) 50%, transparent 75%);
    pointer-events: none;
}

@keyframes floatGlowPrimary {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, 50px) scale(1.1); }
    100% { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes floatGlowSecondary {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, -60px) scale(1.08); }
    100% { transform: translate(40px, -40px) scale(0.96); }
}

@keyframes pulseCenterGlow {
    0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

/* =========================================================
   AUTHENTICATION WRAPPER & COMPACT LANDSCAPE GLASS CARD
   ========================================================= */
.auth-portal-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 820px;
    margin: auto;
}

.auth-glass-card {
    background: var(--card-glass-bg);
    backdrop-filter: blur(28px) saturate(190%);
    -webkit-backdrop-filter: blur(28px) saturate(190%);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 0;
    display: grid;
    grid-template-columns: 38% 62%;
    box-shadow: 
        0 24px 60px -12px rgba(0, 0, 0, 0.75),
        0 0 40px -8px rgba(58, 134, 143, 0.16),
        inset 0 1px 0 var(--card-highlight);
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.auth-glass-card:hover {
    border-color: var(--card-border-hover);
    box-shadow: 
        0 28px 70px -12px rgba(0, 0, 0, 0.85),
        0 0 50px -6px rgba(45, 212, 191, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Top Accent Spectrum Bar */
.auth-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, #173054 20%, #3A868F 50%, #2dd4bf 70%, transparent 100%);
    opacity: 0.85;
    z-index: 3;
}

/* Subtle Corner Ambient Reflection */
.auth-glass-card::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* =========================================================
   LANDSCAPE LEFT COLUMN: BRAND & ENTERPRISE SHOWCASE PANE
   ========================================================= */
.landscape-brand-pane {
    background: linear-gradient(165deg, rgba(23, 48, 84, 0.55) 0%, rgba(9, 19, 34, 0.82) 100%);
    border-right: 1px solid rgba(58, 134, 143, 0.22);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.landscape-brand-pane::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(58, 134, 143, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.brand-showcase-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Light / White Background Logo Badge (High contrast for dark branding) */
.portal-logo-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    background: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
    margin-bottom: 10px;
    max-width: fit-content;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.portal-logo-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}

.portal-logo-img {
    height: 38px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    display: block;
}

.brand-edition-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(58, 134, 143, 0.16);
    color: #5eead4;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(45, 212, 191, 0.28);
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.08);
    max-width: fit-content;
    margin-bottom: 8px;
}

.status-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #2dd4bf;
    box-shadow: 0 0 6px #2dd4bf;
    position: relative;
}

.status-pulse-dot::after {
    content: '';
    position: absolute;
    inset: -2.5px;
    border-radius: 50%;
    border: 1.2px solid #2dd4bf;
    animation: statusPing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes statusPing {
    0% { transform: scale(0.9); opacity: 0.9; }
    80%, 100% { transform: scale(2.2); opacity: 0; }
}

.brand-company-title {
    font-family: var(--font-heading);
    font-size: 21px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.brand-tagline {
    font-size: 12px;
    font-weight: 600;
    color: #2dd4bf;
    letter-spacing: 0.3px;
    margin-bottom: 12px;
    display: inline-block;
}

/* Feature Highlights */
.brand-features-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: rgba(14, 30, 54, 0.45);
    border: 1px solid rgba(58, 134, 143, 0.18);
    border-radius: 10px;
    transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.feature-pill:hover {
    transform: translateX(3px);
    border-color: rgba(45, 212, 191, 0.35);
    background: rgba(14, 30, 54, 0.65);
}

.feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(58, 134, 143, 0.2);
    border: 1px solid rgba(45, 212, 191, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2dd4bf;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 14px;
    height: 14px;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.feature-text strong {
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 600;
}

.feature-text small {
    color: var(--text-muted);
    font-size: 10px;
}

.brand-system-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    color: #94a3b8;
    padding-top: 8px;
    border-top: 1px solid rgba(58, 134, 143, 0.18);
}

.system-status-indicator {
    width: 6.5px;
    height: 6.5px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px #10b981;
}

/* =========================================================
   LANDSCAPE RIGHT COLUMN: INTERACTIVE AUTHENTICATION FORM PANE
   ========================================================= */
.landscape-form-pane {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.form-pane-header {
    margin-bottom: 12px;
}

.portal-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.portal-subtitle {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* =========================================================
   ROLE SWITCHER (Compact Dark Segmented Pill)
   ========================================================= */
.role-switcher-container {
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.role-switcher {
    position: relative;
    display: flex;
    background: rgba(6, 14, 26, 0.85);
    border: 1px solid rgba(58, 134, 143, 0.25);
    border-radius: 999px;
    padding: 3px;
    gap: 3px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
}

.role-glider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: linear-gradient(135deg, rgba(58, 134, 143, 0.38) 0%, rgba(23, 48, 84, 0.75) 100%);
    border: 1px solid rgba(45, 212, 191, 0.45);
    border-radius: 999px;
    box-shadow: 
        0 4px 14px rgba(45, 212, 191, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform var(--transition-smooth);
    z-index: 1;
}

.role-btn {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: none;
    background: transparent;
    border-radius: 999px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
    outline: none;
    user-select: none;
}

.role-btn:hover {
    color: var(--text-white);
}

.role-btn.active {
    color: var(--text-white);
    font-weight: 600;
}

.role-btn svg {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast), stroke var(--transition-fast);
}

.role-btn.active svg {
    stroke: #2dd4bf;
    transform: scale(1.08);
}

/* Glider active state for Admin */
.role-switcher[data-active="admin"] .role-glider {
    transform: translateX(100%);
}

.role-switcher[data-active="admin"] .role-btn[data-role="user"] {
    color: var(--text-secondary);
    font-weight: 500;
}

.role-switcher[data-active="admin"] .role-btn[data-role="admin"] {
    color: var(--text-white);
    font-weight: 600;
}

/* =========================================================
   ROLE BANNER (Compact Dynamic Context Strip)
   ========================================================= */
.role-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(58, 134, 143, 0.10);
    border: 1px solid rgba(58, 134, 143, 0.22);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
    font-size: 11.5px;
}

.role-banner.admin-mode {
    background: rgba(23, 48, 84, 0.35);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: inset 0 0 14px rgba(23, 48, 84, 0.3);
}

.role-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2dd4bf;
    flex-shrink: 0;
}

.role-banner.admin-mode .role-banner-icon {
    color: #38bdf8;
}

.role-banner-text {
    font-family: var(--font-ui);
    color: var(--text-secondary);
    line-height: 1.35;
}

.role-banner-text strong {
    color: var(--text-white);
    font-weight: 600;
}

/* =========================================================
   INPUT CONTROLS & COMPACT DARK GLASS FORM
   ========================================================= */
.auth-form-card {
    position: relative;
    z-index: 2;
}

.input-group {
    margin-bottom: 10px;
    position: relative;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-ui);
    font-size: 11.5px;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 3px;
}

.input-label small {
    color: #2dd4bf;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.input-icon svg {
    width: 15px;
    height: 15px;
}

.form-control {
    width: 100%;
    padding: 8px 12px 8px 36px;
    font-family: var(--font-ui);
    font-size: 12.5px;
    color: var(--input-text);
    background: var(--input-glass-bg);
    border: 1.2px solid var(--input-border);
    border-radius: 9px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-control::placeholder {
    color: var(--input-placeholder);
    font-weight: 400;
}

.form-control:hover {
    border-color: var(--input-border-hover);
    background: rgba(10, 22, 40, 0.82);
}

.form-control:focus {
    border-color: var(--input-border-focus);
    background: rgba(12, 26, 48, 0.95);
    box-shadow: 
        0 0 0 3px var(--accent-cyan-glow),
        0 0 16px rgba(45, 212, 191, 0.12);
}

.input-wrapper:focus-within .input-icon {
    color: #2dd4bf;
    transform: scale(1.05);
}

/* Password Toggle Icon Button */
.toggle-password {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.toggle-password svg {
    width: 15px;
    height: 15px;
}

.toggle-password:hover {
    color: #2dd4bf;
    background-color: rgba(58, 134, 143, 0.15);
}

/* Admin Security Extra Field (Collapsible) */
.role-extra-field {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: max-height var(--transition-smooth), opacity var(--transition-smooth), transform var(--transition-smooth), margin-bottom var(--transition-smooth);
    margin-bottom: 0;
}

.role-extra-field.visible {
    max-height: 80px;
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 10px;
}

/* Form Options Row (Remember Me & Forgot Password) */
.form-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 11.5px;
    font-family: var(--font-ui);
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.custom-checkbox:hover {
    color: var(--text-white);
}

.custom-checkbox input[type="checkbox"] {
    accent-color: #2dd4bf;
    width: 14px;
    height: 14px;
    cursor: pointer;
    border-radius: 3px;
}

.forgot-link {
    color: #2dd4bf;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.forgot-link:hover {
    color: #5eead4;
    text-shadow: 0 0 8px rgba(45, 212, 191, 0.4);
    text-decoration: underline;
}

/* =========================================================
   PRIMARY SUBMIT BUTTON
   ========================================================= */
.btn-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #173054 0%, #1f4273 45%, #3A868F 100%);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 
        0 8px 20px -3px rgba(23, 48, 84, 0.55),
        0 3px 10px rgba(58, 134, 143, 0.28);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    transform: translateX(-100%);
    transition: transform 650ms ease;
}

.btn-submit:hover {
    transform: translateY(-1.5px);
    box-shadow: 
        0 12px 28px -3px rgba(23, 48, 84, 0.7),
        0 0 20px rgba(45, 212, 191, 0.35);
    background: linear-gradient(135deg, #1c3b68 0%, #22518c 40%, #2dd4bf 100%);
}

.btn-submit:hover::after {
    transform: translateX(100%);
}

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

.btn-submit svg {
    width: 15px;
    height: 15px;
    transition: transform var(--transition-fast);
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

/* =========================================================
   STATUS MESSAGE / TOAST NOTIFICATION
   ========================================================= */
.status-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-family: var(--font-ui);
    display: none;
    align-items: center;
    gap: 8px;
    animation: fadeInToast 300ms var(--ease-out-expo);
}

.status-msg.error {
    display: flex;
    background: rgba(88, 20, 28, 0.55);
    backdrop-filter: blur(8px);
    color: #fecdd3;
    border: 1px solid rgba(244, 63, 94, 0.4);
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.15);
}

.status-msg.success {
    display: flex;
    background: rgba(6, 78, 59, 0.55);
    backdrop-filter: blur(8px);
    color: #a7f3d0;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

@keyframes fadeInToast {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   PORTAL FOOTER & TRUST BADGES
   ========================================================= */
.portal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    padding-top: 8px;
    margin-top: 10px;
    border-top: 1px solid rgba(58, 134, 143, 0.18);
}

.portal-footer a {
    color: #2dd4bf;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.portal-footer a:hover {
    color: #5eead4;
    text-decoration: underline;
}

.portal-footer .copyright-text {
    color: var(--text-muted);
}

/* Trust Strip Below Card */
.portal-trust-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    font-size: 10.5px;
    color: var(--text-muted);
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.trust-item svg {
    color: #2dd4bf;
    width: 13px;
    height: 13px;
}

/* =========================================================
   RESPONSIVE DESIGN (Flawless Mobile & Tablet Experience)
   ========================================================= */
@media (max-width: 768px) {
    body.auth-dark-portal {
        padding: 10px 8px;
        justify-content: center;
    }

    .auth-portal-wrapper {
        max-width: 440px;
        width: 100%;
        margin: auto;
    }

    .auth-glass-card {
        grid-template-columns: 1fr;
        border-radius: 18px;
        box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7);
    }

    /* Transform brand pane into unified compact top header */
    .landscape-brand-pane {
        border-right: none;
        border-bottom: 1px solid rgba(58, 134, 143, 0.16);
        padding: 16px 16px 10px 16px;
        background: transparent;
        text-align: center;
        align-items: center;
    }

    .brand-showcase-content {
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .portal-logo-container {
        padding: 6px 14px;
        margin-bottom: 6px;
        border-radius: 10px;
    }

    .portal-logo-img {
        height: 32px;
        max-width: 150px;
    }

    .brand-company-title {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .brand-tagline {
        font-size: 11px;
        margin-bottom: 2px;
    }

    /* Hide heavy desktop-only items on mobile for clean fast login */
    .brand-edition-pill,
    .brand-features-list,
    .brand-system-status {
        display: none !important;
    }

    /* Compact Mobile Form Pane */
    .landscape-form-pane {
        padding: 10px 16px 16px 16px;
    }

    /* Hide duplicate header in mobile view */
    .form-pane-header {
        display: none;
    }

    .role-switcher-container {
        margin-bottom: 8px;
    }

    .role-banner {
        padding: 5px 8px;
        font-size: 11px;
        margin-bottom: 9px;
    }

    .input-group {
        margin-bottom: 8px;
    }

    .input-label {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .form-control {
        padding: 8px 10px 8px 34px;
        font-size: 13px;
    }

    .form-options-row {
        margin-bottom: 10px;
        font-size: 11px;
    }

    .btn-submit {
        padding: 9px 14px;
        font-size: 13px;
    }

    .portal-footer {
        margin-top: 8px;
        padding-top: 6px;
        font-size: 10px;
        flex-direction: column;
        gap: 3px;
        text-align: center;
    }

    .portal-trust-strip {
        margin-top: 8px;
        font-size: 9.5px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .auth-portal-wrapper {
        padding: 0 4px;
    }

    .landscape-form-pane {
        padding: 8px 12px 14px 12px;
    }

    .brand-company-title {
        font-size: 17px;
    }

    .role-btn {
        padding: 5px 6px;
        font-size: 11px;
    }
}

/* =========================================================
   INITIAL PAGE PRELOADER (White Aesthetic - "Simplify. Save. Sustain.")
   ========================================================= */
.page-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.38s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.38s ease;
}

.page-preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    max-width: 520px;
}

.preloader-logo-wrap {
    margin-bottom: 22px;
    padding: 8px 18px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
    opacity: 0;
    transform: translateY(-8px);
    animation: preloaderLogoFadeIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
}

.preloader-logo-img {
    height: 44px;
    width: auto;
    max-width: 190px;
    object-fit: contain;
    display: block;
}

@keyframes preloaderLogoFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slogan Sequence: "Simplify. Save. Sustain." */
.preloader-slogan-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin-bottom: 18px;
}

.slogan-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(8px);
    transition: color 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}

/* Sequential animation:
   Word 1 appears active at 0.25s.
   Word 2 appears active at 0.85s (Word 1 lightens).
   Word 3 appears active at 1.45s (Word 2 lightens, Word 1 stays light).
   At 2.05s all harmoniously settle before preloader fades out at 2.6s.
*/
.slogan-word.word-1 {
    animation: animWord1 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slogan-word.word-2 {
    animation: animWord2 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slogan-word.word-3 {
    animation: animWord3 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes animWord1 {
    0% {
        opacity: 0;
        transform: translateY(8px);
        color: #cbd5e1;
    }
    14% {
        opacity: 1;
        transform: translateY(0);
        color: #173054; /* Deep Navy active */
    }
    38% {
        opacity: 1;
        transform: translateY(0);
        color: #173054;
    }
    42% {
        opacity: 0.45;
        color: #94a3b8; /* Word 1 lightens as Save arrives */
    }
    68% {
        opacity: 0.45;
        color: #94a3b8;
    }
    72% {
        opacity: 0.32;
        color: #cbd5e1; /* Word 1 lightens further as Sustain arrives */
    }
    100% {
        opacity: 0.32;
        color: #cbd5e1;
    }
}

@keyframes animWord2 {
    0%, 38% {
        opacity: 0;
        transform: translateY(8px);
        color: #cbd5e1;
    }
    42% {
        opacity: 1;
        transform: translateY(0);
        color: #173054; /* Deep Navy active */
    }
    68% {
        opacity: 1;
        transform: translateY(0);
        color: #173054;
    }
    72% {
        opacity: 0.48;
        color: #94a3b8; /* Word 2 lightens as Sustain arrives */
    }
    100% {
        opacity: 0.48;
        color: #94a3b8;
    }
}

@keyframes animWord3 {
    0%, 68% {
        opacity: 0;
        transform: translateY(8px);
        color: #cbd5e1;
    }
    72% {
        opacity: 1;
        transform: translateY(0);
        color: #3A868F; /* Vibrant Teal active */
    }
    100% {
        opacity: 1;
        color: #3A868F;
    }
}

/* Subtle Shimmer Line */
.preloader-accent-line {
    width: 140px;
    height: 2.5px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.preloader-line-shimmer {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #173054, #3A868F, #2dd4bf);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    animation: lineShimmerAnim 2.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes lineShimmerAnim {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.7); }
    100% { transform: scaleX(1); }
}

@media (max-width: 520px) {
    .preloader-slogan-wrap {
        font-size: 20px;
        gap: 8px;
    }
    .preloader-logo-img {
        height: 36px;
    }
}

/* =========================================================
   FORM SUBMISSION LOADER (White High-Contrast Modal)
   ========================================================= */
.submit-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.submit-loader-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.submit-loader-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 32px;
    text-align: center;
    max-width: 350px;
    width: 90%;
    box-shadow: 
        0 24px 60px rgba(15, 23, 42, 0.12),
        0 4px 16px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: submitCardPop 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes submitCardPop {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.submit-spinner-wrap {
    position: relative;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.submit-spinner-outer {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(23, 48, 84, 0.12);
    border-top-color: #173054;
    border-radius: 50%;
    animation: spinRing 0.95s linear infinite;
}

.submit-spinner-inner {
    position: absolute;
    inset: 7px;
    border: 2.5px solid rgba(58, 134, 143, 0.15);
    border-bottom-color: #3A868F;
    border-radius: 50%;
    animation: spinRingReverse 0.75s linear infinite;
}

.submit-spinner-core {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #173054;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

@keyframes spinRingReverse {
    to { transform: rotate(-360deg); }
}

.submit-loader-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: #173054;
    margin-bottom: 4px;
}

.submit-loader-subtitle {
    font-family: var(--font-ui);
    font-size: 12px;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.4;
}

.submit-loader-progress {
    width: 100%;
    height: 4.5px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.submit-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #173054 0%, #3A868F 60%, #2dd4bf 100%);
    border-radius: 999px;
    animation: progressFill 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes progressFill {
    0% { width: 0%; }
    40% { width: 45%; }
    75% { width: 85%; }
    100% { width: 100%; }
}

.submit-loader-status {
    font-family: var(--font-ui);
    font-size: 11px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.submit-loader-status svg {
    color: #10b981;
}

/* =========================================================
   HIGHLIGHTED DEMO CREDENTIALS BOX & ADMIN CONTACT NOTICE
   ========================================================= */
.demo-credentials-box {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(23, 48, 84, 0.65) 0%, rgba(45, 212, 191, 0.12) 100%);
    border: 1.5px solid rgba(45, 212, 191, 0.45);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    animation: demoBoxGlow 3.5s ease-in-out infinite alternate;
}

@keyframes demoBoxGlow {
    0% {
        box-shadow: 0 4px 18px rgba(45, 212, 191, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.15);
        border-color: rgba(45, 212, 191, 0.35);
    }
    100% {
        box-shadow: 0 6px 26px rgba(45, 212, 191, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.25);
        border-color: rgba(45, 212, 191, 0.70);
    }
}

.demo-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.demo-title-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #2dd4bf;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.demo-badge-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDemo 1.8s infinite;
}

@keyframes pulseDemo {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.demo-autofill-btn {
    background: rgba(45, 212, 191, 0.18);
    border: 1px solid rgba(45, 212, 191, 0.45);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
    outline: none;
}

.demo-autofill-btn:hover {
    background: rgba(45, 212, 191, 0.38);
    border-color: #2dd4bf;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(45, 212, 191, 0.3);
}

.demo-grid-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.demo-chip {
    background: rgba(10, 18, 32, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    padding: 5px 9px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.demo-chip:hover {
    border-color: rgba(45, 212, 191, 0.4);
    background: rgba(15, 28, 48, 0.85);
}

.demo-chip-label {
    font-size: 9.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.demo-chip-val {
    font-family: var(--font-code);
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    user-select: all;
    letter-spacing: 0.3px;
}

/* Admin Contact Callout Box */
.admin-contact-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(23, 48, 84, 0.7) 0%, rgba(245, 158, 11, 0.12) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.admin-contact-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    color: #fbbf24;
    font-weight: 700;
    font-size: 12.5px;
}

.admin-contact-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.admin-contact-desc strong {
    color: #ffffff;
}

