/* Replaced by centralized theme (HRMS-style)
   Legacy styles removed. See evalynxapp/static/css/theme.css for definitions. */
@import 'theme.css';

/* Per-page overrides can go here if necessary. */
/* ================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ================================================================ */
:root {
    /* Color Palette - Login Page Theme */
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Spacing & Dimensions */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 50px;

    /* Shadows */
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --line-height-base: 1.6;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-Index Scale */
    --z-background: 0;
    --z-base: 1;
    --z-footer: 10;
    --z-modal: 100;
    --z-notification: 1000;

    /* Dashboard Gradients (for backwards compatibility) */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg: #0f1419;
    --sidebar-bg: linear-gradient(180deg, #1a1f2e 0%, #0f1419 100%);
    --card-bg: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================================================================
   BASE LAYOUT STYLES
   ================================================================ */
body {
    font-family: var(--font-family-base);
    /* Use tenant-manager app background for consistency */
    background: var(--app-bg);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: var(--line-height-base);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bg-overlay {
    position: fixed;
    inset: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="smallGrid" width="8" height="8" patternUnits="userSpaceOnUse"><path d="M 8 0 L 0 0 0 8" fill="none" stroke="%23334155" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23smallGrid)"/></svg>') repeat;
    pointer-events: none;
    z-index: var(--z-background);
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    z-index: var(--z-base);
    padding: clamp(1rem, 2vh, 1.5rem);
    gap: clamp(1.5rem, 2vw, 2rem);
}

/* ================================================================
   HOME PAGE STYLES (dashboard sidebar etc.)
   ================================================================ */

html {
    height: 100%;
    margin: 0;
}

.home-bg {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    /* transparent so body background shows through */
    background: transparent;
    position: relative;
    overflow-x: hidden;
}

.home-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Logo styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin: 0;
}

.logo-image {
    height: 40px;
    width: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.logo-image:hover {
    transform: translateY(-1px);
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.2px;
}

/* Make navbar items more visible by increasing default contrast */
.main-menu li {
    color: rgba(255,255,255,0.92);
}

.main-menu li i {
    color: rgba(255,255,255,0.88);
}

/* Keep existing hover/active transitions — only change defaults */
.main-menu li:hover,
.main-menu li.active {
    color: var(--white);
}

/* Navbar styling - transformed from sidebar */
.navbar {
    width: 100%;
    height: 64px;
    background: rgba(255,255,255,0.02);
    color: var(--white);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    box-shadow: none;
    z-index: 100;
    border-radius: 0;
    padding: 0 1rem;
    position: fixed;
    top: 0;
    left: 0;
    /*overflow: visible;*/
    transition: var(--transition-base);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Hide navbar when user scrolls down to maximize content area */
.navbar.navbar-hidden {
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


.navbar::-webkit-scrollbar {
    width: 5px;
}


.navbar::-webkit-scrollbar-track {
    background: transparent;
}


.navbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}


.navbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


.nav-menu-wrapper {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    align-items: center;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) var(--gray-200);
    position: relative;
}

.nav-menu-wrapper::-webkit-scrollbar {
    height: 8px;
    background: var(--gray-200);
}

.nav-menu-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 8px;
}

/* Gradient fade at right edge to indicate overflow */
.nav-menu-wrapper::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to left, rgba(30,64,175,0.12) 60%, rgba(30,64,175,0));
    z-index: 2;
    display: block;
}

.main-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-base);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fee2e2;
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.logout-btn i {
    font-size: 1rem;
}

.main-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
}


.main-menu li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    margin: 0;
    transition: var(--transition-base);
    position: relative;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    letter-spacing: 0.3px;
}

.main-menu li::before {
    content: '';
    display: none;
}


.nav-menu-wrapper {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    overflow: visible;
}

/* More dropdown styles */
.main-menu .more-dropdown {
    position: relative;
    z-index: 1001;
}
.main-menu .more-dropdown:hover .dropdown-menu,
.main-menu .more-dropdown:focus-within .dropdown-menu {
    display: block;
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    color: #222;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(30,64,175,0.10);
    z-index: 9999;
    padding: 0.5rem 0;
    font-size: 0.97em;
    pointer-events: auto;
    margin-top: 0.3rem;
}
.dropdown-menu li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.1rem;
    color: #222;
    background: none;
    border-radius: 0;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s;
}
.dropdown-menu li:hover {
    background: #f1f5f9;
    color: var(--primary);
}
.dropdown-menu li i {
    color: var(--primary-light);
    font-size: 1.1em;
}
}

.main-menu li.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.05) 100%);
    border-left-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.main-menu li.active::before {
    width: 4px;
    opacity: 1;
}

.main-menu li.active i {
    color: #667eea;
}

.main-menu li.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--primary);
    border-radius: 4px 0 0 4px;
    box-shadow: -1px 0 3px rgba(79, 140, 255, 0.3);
}

/* Main content area */
.main-content {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 7.5rem 3.5rem 2.5rem 3.5rem; /* 4rem navbar + 3.5rem margin = 7.5rem top padding */
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
    min-height: 100vh;
    animation: contentFadeIn 0.4s ease-out;
}

.dashboard-container {
    width: 100%;
    padding-top: 3.5rem;
    display: flow-root;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    width: 100%;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    body {
        font-family: var(--font-family-base);
        /* Use tenant-manager app background for consistency */
        background: var(--app-bg);
        min-height: 100vh;
        color: var(--gray-800);
        line-height: var(--line-height-base);
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        margin-top: 3.5rem;
    }
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.8rem 0;
    z-index: 1000;
    border: 1px solid rgba(79, 140, 255, 0.15);
    margin-left: 10px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.submenu-card.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: submenuFadeIn 0.3s ease forwards;
}

.submenu-card.hide {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.submenu-card::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 18px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    border-left: 1px solid rgba(79, 140, 255, 0.15);
    border-bottom: 1px solid rgba(79, 140, 255, 0.15);
    z-index: -1;
}

@keyframes submenuFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.submenu-title {
    font-size: 0.95em;
    font-weight: 600;
    margin-bottom: 0.6em;
    color: #1d2b46;
    letter-spacing: 0.01em;
    padding: 0.5em 1.3em 0.8em 1.3em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.submenu-list {
    list-style: none;
    padding: 0.4em 0;
    margin: 0;
}

.submenu-list li {
    margin: 0;
}

/* Updated submenu item styling with icons */
.submenu-list li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #3a4a66;
    text-decoration: none;
    font-size: 0.92em;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.62em 1.3em;
    white-space: nowrap;
    border-left: 2px solid transparent;
    font-family: 'SF Pro Text', 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: 0.1px;
}

.submenu-list li a i {
    font-size: 0.95em;
    min-width: 20px;
    text-align: center;
    color: var(--primary);
    opacity: 0.85;
    transition: all 0.2s ease;
}

.submenu-list li a:hover {
    color: var(--primary);
    background-color: rgba(79, 140, 255, 0.08);
    border-left: 2px solid var(--primary);
}

.submenu-list li a:hover i {
    color: #4f8cff;
    opacity: 1;
    transform: translateX(2px);
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-xl);
    transition: var(--transition-base);
}

.glass-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-4px);
}

/* --- Tenant Manager card styles (copied to match UI) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.dashboard-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  padding: 2rem;
  border: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    /* Content area */
}

.btn-icon {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--gray-500);
    transition: all var(--transition-base);
}

/* end tenant manager card styles */

/* Responsive adaptations */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }

    .logo {
        padding: 1.5rem 0.7rem;
        justify-content: center;
    }

    .logo-text {
        display: none;
    }

    .logo-image {
        margin-right: 0;
    }

    .main-menu {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        list-style: none;
        padding: 0;
        margin: 0 auto;
        white-space: nowrap;
        justify-content: center;
    }

    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 2rem;
    }

    .submenu-card {
        margin-left: 8px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .main-menu li i {
        font-size: 1.05em;
    }

    .main-content {
        margin-left: 60px;
        width: calc(100% - 60px);
        padding: 1.5rem;
    }

    .submenu-card {
        margin-left: 5px;
    }
    
    .logo {
        padding: 1.2rem 0.5rem;
    }
    
    .main-menu li {
        margin: 0.3rem 0.3rem;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }

    .sidebar.show {
        width: 240px;
        transform: translateX(0);
    }
}

/* ================================================================
   LOGIN PAGE STYLES (HRMS Theme)
   ================================================================ */

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero-section {
    flex: 1;
    padding: clamp(1.5rem, 2.5vh, 2rem);
    padding-top: clamp(0.5rem, 1vh, 1rem);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: var(--white);
    position: relative;
    max-width: calc(100% - 400px);
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

.hero-section::-webkit-scrollbar {
    display: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #93c5fd;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    margin-top: 0;
    border: 1.5px solid rgba(96, 165, 250, 0.3);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.05) inset;
    transition: all var(--transition-base);
    letter-spacing: 0.3px;
    width: fit-content;
    max-width: max-content;
    opacity: 0;
    animation: fadeInLeft 0.8s ease 0.2s forwards;
}

.hero-badge:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.15) 100%);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.1) inset;
    transform: translateY(-1px);
}

.hero-badge i {
    font-size: 1rem;
}

.hero-title {
    font-size: clamp(1.5rem, 3vw + 0.5rem, 3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: clamp(0.5rem, 1vh, 1rem);
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: fadeInLeft 0.8s ease 0.4s forwards;
}

.hero-subtitle {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1.15rem);
    color: #e2e8f0;
    margin-bottom: clamp(0.5rem, 1vh, 1rem);
    line-height: var(--line-height-base);
    font-weight: 400;
    opacity: 0;
    animation: fadeInLeft 0.8s ease 0.6s forwards;
}

/* ================================================================
   FEATURES SECTION
   ================================================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.625rem, 1.5vh, 1.5rem);
    margin-top: clamp(0.5rem, 1vh, 1rem);
}

.feature-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: clamp(0.875rem, 2vh, 2rem);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.2s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }
.feature-card:nth-child(4) { animation-delay: 0.8s; }

.feature-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(59, 130, 246, 0.2) inset;
}

.feature-icon {
    width: clamp(44px, 7vh, 72px);
    height: clamp(44px, 7vh, 72px);
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: clamp(0.5rem, 1.5vh, 1.25rem);
    font-size: clamp(1.1rem, 2.5vh, 1.75rem);
    color: var(--white);
    flex-shrink: 0;
    transition: all var(--transition-base);
}

.feature-title {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 600;
    margin-bottom: clamp(0.25rem, 0.5vh, 0.5rem);
    color: var(--white);
}

.feature-description {
    font-size: 0.875rem;
    color: #cbd5e1;
    line-height: 1.6;
}

/* ================================================================
   LOGIN SECTION
   ================================================================ */
.login-section {
    position: relative;
    flex-shrink: 0;
    background: var(--white);
    padding: 0.875rem;
    padding-top: 1.5rem;
    padding-bottom: 1.25rem;
    padding-right: 1rem;
    border-radius: var(--radius);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.35), 0 18px 36px -18px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: clamp(375px, 32vw, 520px);
    z-index: var(--z-modal);
    animation: fadeInRight 0.8s ease forwards;
    margin: 1rem;
    margin-top: 6vh;
    align-self: flex-start;
}

.login-container {
    width: 100%;
}

.host-badge {
    position: absolute;
    top: -20px;
    right: 16px;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow);
    z-index: 10;
}

/* Custom scrollbar for login section */
.login-section::-webkit-scrollbar {
    width: 6px;
}

.login-section::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.login-section::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.login-section::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Firefox */
.login-section {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* ================================================================
   LOGIN BRANDING
   ================================================================ */
.login-brand {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-brand-logo {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--white);
    margin: 0 auto 0.5rem;
    box-shadow: var(--shadow);
}

.login-brand-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.login-brand-tagline {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
}

.login-header {
    text-align: center;
    margin-bottom: 0.625rem;
    display: none;
}

.login-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.85rem;
}

/* ================================================================
   FORM COMPONENTS
   ================================================================ */
.form-group {
    margin-bottom: 0.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
    font-size: 0.8rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all var(--transition-base);
    background: var(--white);
    font-family: inherit;
    line-height: 1.2;
    min-height: 44px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    background: var(--white);
}

.form-input::placeholder {
    color: var(--gray-400);
    opacity: 1;
}

/* ================================================================
   BUTTON COMPONENTS
   ================================================================ */
.btn-primary {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
    font-family: inherit;
    min-height: 44px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    background: transparent;
    color: var(--gray-600);
    padding: 0.5rem;
    font-weight: 500;
    transition: all var(--transition-base);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-top: 0.75rem;
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--gray-100);
    color: var(--primary);
}

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

/* ================================================================
   ALERT COMPONENTS
   ================================================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    color: var(--gray-400);
    font-size: 0.875rem;
    z-index: var(--z-footer);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--white);
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 1200px) {
    .login-section {
        width: clamp(320px, 28vw, 400px);
        margin: 1.5rem;
    }
    
    .container {
        padding: clamp(1rem, 2vh, 1.5rem);
    }
}

@media (max-width: 1024px) {
    .container {
        flex-direction: column;
        max-height: none;
        min-height: 100vh;
        align-items: stretch;
        padding: 1rem;
        overflow-y: auto;
    }

    .login-section {
        width: 100%;
        max-width: min(500px, calc(100vw - 2rem));
        margin: 1.5rem auto 0;
        max-height: none;
        align-self: center;
    }
    
    .hero-section {
        padding: 2rem 1.5rem;
        padding-top: 2rem;
        text-align: center;
        min-height: auto;
        max-height: none;
        max-width: 100%;
        overflow-y: visible;
    }
    
    .hero-badge {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 4vw, 2.5rem);
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    
    .hero-subtitle {
        font-size: clamp(0.875rem, 3.5vw, 1rem);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
    }
    
    .login-section {
        padding: 1.25rem;
        margin: 1rem auto 0;
        width: calc(100% - 2rem);
        max-width: 100%;
    }
    
    .footer {
        position: relative;
        margin-top: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .hero-section {
        padding: 1.25rem 0.875rem;
    }

    .hero-title {
        font-size: clamp(1.35rem, 6vw, 1.75rem);
    }
    
    .hero-subtitle {
        font-size: clamp(0.8rem, 4vw, 0.95rem);
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
    }
    
    .login-section {
        margin: 0.875rem auto 0;
        width: calc(100% - 1.5rem);
        padding: 1rem;
        max-width: none;
    }
    
    .login-brand-name {
        font-size: 1.2rem;
    }
    
    .login-header h2 {
        font-size: 1rem;
    }

    .features-grid {
        gap: 0.875rem;
        grid-template-columns: 1fr;
    }

    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .feature-title {
        font-size: 0.95rem;
    }
    
    .feature-description {
        font-size: 0.8rem;
    }
    
    .form-input {
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }
    
    .btn-primary {
        font-size: 0.875rem;
        padding: 0.625rem;
    }
}

/* ================================================================
   REDUCED MOTION PREFERENCES
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 100;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 4px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}