/*
 * Gate Pass Manager - Premium CSS Design System
 * Features Dark & Light theme tokens, glassmorphic structures, custom form elements,
 * responsive grids, custom metrics cards, and animated state badges.
 */

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

/* ==========================================================================
   GLOBAL SCALING (Simulates 80% Zoom via root font-size)
   ========================================================================== */
html {
    font-size: 12.8px !important; 
    background-color: #070913 !important;
}
body {
    background-color: #070913 !important;
}

/* ==========================================================================
   THEME VARIABLES & TOKENS
   ========================================================================== */
:root {
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme colors (Dark mode default) */
    --bg-base: radial-gradient(circle at bottom left, #0a0d1e 0%, #03050d 100%);
    --bg-surface: rgba(15, 23, 42, 0.45);
    --bg-surface-opaque: rgba(15, 23, 42, 0.70);
    --bg-modal: rgba(15, 23, 42, 0.98);
    --border-color: rgba(99, 102, 241, 0.18);
    --border-hover: rgba(99, 102, 241, 0.38);
    
    --color-primary: #6366f1;         /* Indigo */
    --color-primary-glow: rgba(99, 102, 241, 0.15);
    --color-secondary: #06b6d4;       /* Teal */
    --color-secondary-glow: rgba(6, 182, 212, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Status Colors */
    --status-draft: #64748b;
    --status-submitted: #3b82f6;
    --status-pending-store: #6366f1;
    --status-pending-comm: #8b5cf6;
    --status-approved: #10b981;
    --status-hold: #f59e0b;
    --status-rejected: #ef4444;
    --status-gateout: #f97316;
    --status-partial: #eab308;
    --status-closed: #10b981;
    --status-cancelled: #ec4899;

    --sidebar-width: 260px;
    --header-height: 70px;
    --transition-speed: 0.25s;
    --border-radius-lg: 16px;
    --border-radius-md: 10px;
    --border-radius-sm: 6px;
    --box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    --glass-blur: blur(16px);
}

[data-theme="light"] {
    --bg-base: radial-gradient(circle at top right, #f8fafc 0%, #e2e8f0 100%);
    --bg-surface: rgba(255, 255, 255, 0.45);
    --bg-surface-opaque: rgba(255, 255, 255, 0.65);
    --bg-modal: rgba(255, 255, 255, 0.98);
    --border-color: rgba(99, 102, 241, 0.12);
    --border-hover: rgba(99, 102, 241, 0.25);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --color-primary: #4f46e5;
    --color-primary-glow: rgba(79, 70, 229, 0.1);
    --color-secondary: #0891b2;
    --color-secondary-glow: rgba(8, 145, 178, 0.1);

    --box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.08);
}

/* ==========================================================================
   GLOBAL RESET & BASICS
   ========================================================================== */
html {
    background: var(--bg-base);
    min-height: 100vh;
    transition: background var(--transition-speed);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
}

body {
    background: transparent !important;
    color: var(--text-primary);
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    transition: color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
}

input, select, textarea, button {
    outline: none;
    font-family: inherit;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */

/* Main wrapper split into sidebar + content */
.app-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Sidebar navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface-opaque);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    z-index: 100;
    flex-shrink: 0;
}

.sidebar-logo-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
    padding: 0 8px;
    transition: all var(--transition-speed);
}

.sidebar-logo-img-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-speed);
}

.sidebar-logo-img-wrapper img {
    height: 30px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-logo-text {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

.sidebar-logo-text span {
    display: block;
    font-size: 0.68rem;
    color: var(--color-secondary);
    font-weight: 500;
}

.sidebar-system-subtitle {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 2px;
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.nav-item button, .nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-speed) ease;
}

.nav-item button svg, .nav-item a svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}

.nav-item button:hover, .nav-item a:hover {
    color: var(--text-primary);
    background: var(--color-primary-glow);
    padding-left: 20px;
}

.nav-item.active button, .nav-item.active a {
    color: var(--text-primary);
    background: var(--color-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nav-item.active button svg {
    transform: scale(1.1);
}

/* User Profile Widget in Sidebar */
.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Workspace Frame */
.workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Top Navigation Bar */
.top-nav {
    height: var(--header-height);
    background: var(--bg-surface-opaque);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Testing Role Switcher panel */
.dev-profile-switcher {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 30px;
    gap: 4px;
}

.switcher-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 12px;
}

.profile-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.profile-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.profile-btn.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* Right-side quick tools */
.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon-top {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.btn-icon-top:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--status-rejected);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Workspace Content Area */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
}

/* View Container Tabs */
.view-panel {
    display: none;
    animation: fadeIn var(--transition-speed) ease-in-out forwards;
}

.view-panel.active {
    display: block;
}

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

/* ==========================================================================
   UI COMPONENTS & CARDS
   ========================================================================== */

/* Glass Cards */
.glass-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 24px;
    margin-bottom: 24px;
    transition: border-color var(--transition-speed);
}

.glass-card:hover {
    border-color: var(--border-hover);
}

.glass-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Metrics Dashboard Cards Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--box-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.08), 0 8px 16px rgba(0, 0, 0, 0.35);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-primary);
}

.metric-card.primary::before { background: var(--color-primary); }
.metric-card.secondary::before { background: var(--color-secondary); }
.metric-card.warning::before { background: var(--status-hold); }
.metric-card.danger::before { background: var(--status-rejected); }
.metric-card.success::before { background: var(--status-approved); }

.metric-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-icon-bg {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 80px;
    height: 80px;
    color: rgba(99, 102, 241, 0.04);
    pointer-events: none;
}

/* ==========================================================================
   BUTTONS AND CONTROLS
   ========================================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-danger {
    background: var(--status-rejected);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #d82c2c;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--status-approved);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-success:hover {
    background: #0d9668;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--status-hold);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-warning:hover {
    background: #dd8a06;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ==========================================================================
   FORMS & INPUT FIELDS
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    background: rgba(214, 221, 224, 1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 10px 14px;
    color: #0f172a;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.form-control::placeholder {
    color: #4b5563;
    opacity: 0.8;
}

.form-control:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
    background: rgba(235, 240, 243, 1);
    color: #0f172a;
}

select.form-control option {
    background: #ffffff;
    color: #0f172a;
}

/* Dynamic Material Items Table Builder */
.materials-builder-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.materials-builder-table th {
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.materials-builder-table td {
    padding: 8px;
}

/* ==========================================================================
   DATA TABLES (Audit logs, Reports)
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    background: rgba(0,0,0,0.1);
}

.custom-table td {
    padding: 14px 18px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.custom-table tbody tr {
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.custom-table tbody tr:hover {
    background-color: rgba(245, 158, 11, 0.035);
    border-left: 3px solid #f59e0b;
    cursor: pointer;
}

/* ==========================================================================
   WORKFLOW STATE BADGES & TAGS
   ========================================================================== */
.badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    display: inline-block;
}

.badge-draft { background: rgba(100, 116, 139, 0.15); color: var(--status-draft); border: 1px solid var(--status-draft); }
.badge-submitted { background: rgba(59, 130, 246, 0.15); color: var(--status-submitted); border: 1px solid var(--status-submitted); }
.badge-store-approved { background: rgba(99, 102, 241, 0.15); color: var(--status-pending-store); border: 1px solid var(--status-pending-store); }
.badge-store-hold { background: rgba(245, 158, 11, 0.15); color: var(--status-hold); border: 1px solid var(--status-hold); }
.badge-store-rejected { background: rgba(239, 68, 68, 0.15); color: var(--status-rejected); border: 1px solid var(--status-rejected); }
.badge-commercial-approved { background: rgba(16, 185, 129, 0.15); color: var(--status-approved); border: 1px solid var(--status-approved); }
.badge-commercial-hold { background: rgba(245, 158, 11, 0.15); color: var(--status-hold); border: 1px solid var(--status-hold); }
.badge-commercial-rejected { background: rgba(239, 68, 68, 0.15); color: var(--status-rejected); border: 1px solid var(--status-rejected); }
.badge-approved { background: rgba(16, 185, 129, 0.15); color: var(--status-approved); border: 1px solid var(--status-approved); }
.badge-gateout { background: rgba(249, 115, 22, 0.15); color: var(--status-gateout); border: 1px solid var(--status-gateout); }
.badge-partial { background: rgba(234, 179, 8, 0.15); color: var(--status-partial); border: 1px solid var(--status-partial); }
.badge-closed { background: rgba(16, 185, 129, 0.15); color: var(--status-closed); border: 1px solid var(--status-closed); }
.badge-cancelled { background: rgba(236, 72, 153, 0.15); color: var(--status-cancelled); border: 1px solid var(--status-cancelled); }

/* ==========================================================================
   CHARTS & SVG STYLING
   ========================================================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.chart-svg-wrap {
    width: 100%;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.chart-svg-wrap svg {
    width: 100%;
    height: 100%;
}

.chart-bar {
    fill: var(--color-primary);
    rx: 4;
    transition: fill 0.3s;
    cursor: pointer;
}

.chart-bar:hover {
    fill: var(--color-secondary);
}

.chart-axis {
    stroke: var(--text-muted);
    stroke-width: 1px;
}

.chart-gridline {
    stroke: var(--border-color);
    stroke-width: 1px;
    stroke-dasharray: 4 4;
}

.chart-label {
    fill: var(--text-secondary);
    font-size: 10px;
    font-family: var(--font-body);
}

/* ==========================================================================
   INTERACTIVE WORKFLOW STEPPER (Timeline)
   ========================================================================== */
.stepper-row {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 24px 0 32px 0;
    padding: 0 10px;
}

.stepper-row::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface-opaque);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s;
}

.step-node.active .step-dot {
    border-color: var(--color-primary);
    color: var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.step-node.completed .step-dot {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 8px;
    text-align: center;
}

.step-node.active .step-label {
    color: var(--text-primary);
}

/* ==========================================================================
   MODAL DIALOG OVERLAYS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content-box {
    background: var(--bg-modal);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header-box {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body-box {
    padding: 20px;
}

.modal-footer-box {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   EMAIL/NOTIFICATIONS SIDE DRAWER
   ========================================================================== */
.notification-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--bg-surface-opaque);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    z-index: 900;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-log-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 14px;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.2s;
}

.email-log-card:hover {
    border-color: var(--border-hover);
}

.email-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.75rem;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 6px;
}

.email-subject {
    font-weight: 600;
    color: var(--text-primary);
}

.email-body {
    white-space: pre-line;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   QR SCANNER HUD STYLING
   ========================================================================== */
.scanner-container {
    max-width: 450px;
    width: 100%;
    margin: 0 auto 20px auto;
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    aspect-ratio: 1;
    background: #000;
}

#reader {
    width: 100% !important;
    height: 100% !important;
}

#reader video {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

/* QR Code Display Card */
.qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border-radius: var(--border-radius-md);
    color: #000;
    max-width: 200px;
    margin: 0 auto;
}

.qr-placeholder {
    width: 150px;
    height: 150px;
    background: radial-gradient(#fff, #eee);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   TOAST NOTIFICATION MODAL
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-surface-opaque);
    border: 1px solid var(--color-primary);
    box-shadow: 0 10px 30px rgba(99,102,241,0.25);
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #10b981;
    color: #ffffff;
    border-color: #059669;
}
.toast.success svg {
    color: #ffffff;
}

.toast.error {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
}
.toast.error svg {
    color: #ffffff;
}

.toast.warning {
    background: #f59e0b;
    color: #ffffff;
    border-color: #d97706;
}
.toast.warning svg {
    color: #ffffff;
}

.toast.info {
    background: #3b82f6;
    color: #ffffff;
    border-color: #2563eb;
}
.toast.info svg {
    color: #ffffff;
}

.toast svg {
    color: var(--color-primary);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

/* ==========================================================================
   MISC UTILITIES
   ========================================================================== */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.align-right {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.mb-3 { margin-bottom: 16px; }
.mt-3 { margin-top: 16px; }

/* Grid columns for material items returns list */
.material-returns-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 8px;
}

.return-logs-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.return-log-item {
    background: rgba(255,255,255,0.02);
    border-left: 3px solid var(--color-primary);
    padding: 10px 14px;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-size: 0.8rem;
}

.return-log-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 4px;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 900px) {
    .app-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 12px 16px;
    }
    
    .sidebar-logo-container {
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
        width: 100%;
    }
    .sidebar-logo-img-wrapper {
        padding: 4px 8px !important;
    }
    .sidebar-logo-img-wrapper img {
        height: 22px !important;
    }
    .sidebar-logo-text {
        text-align: left !important;
        font-size: 0.72rem !important;
    }
    .sidebar-logo-text span {
        display: inline-block !important;
        margin-left: 4px !important;
        font-size: 0.6rem !important;
    }
    .sidebar-system-subtitle {
        display: none !important;
    }
    
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .sidebar-user {
        display: none; /* Hide in sidebar on mobile */
    }
    
    .top-nav {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 12px;
    }
}

/* ==========================================================================
/* ==========================================================================
   PREMIUM ANIMATED LOGIN SCREEN — DARK GLASSMORPHIC THEME
   ========================================================================== */

/* Keyframe Animations */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes floatY {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-18px); }
}
@keyframes floatX {
    0%, 100% { transform: translateX(0px); }
    50%       { transform: translateX(14px); }
}
@keyframes orb1 {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(40px, -30px) scale(1.1); }
    66%       { transform: translate(-20px, 20px) scale(0.95); }
}
@keyframes orb2 {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(-35px, 25px) scale(1.05); }
    66%       { transform: translate(20px, -15px) scale(1.1); }
}
@keyframes orb3 {
    0%, 100% { transform: translate(0,0) scale(1); }
    50%       { transform: translate(25px, 30px) scale(0.92); }
}
@keyframes scaleUp {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes slideInLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
    from { transform: translateX(40px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
@keyframes pulse-ring {
    0%   { transform: scale(0.9); opacity: 0.7; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes featureEntrance {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── WRAPPER ── */
.login-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #050813;
    display: flex;
    flex-direction: column;
    z-index: 5000;
    overflow-y: auto;
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Animated mesh gradient background */
.login-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(99,102,241,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 85% 75%, rgba(6,182,212,0.14) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(139,92,246,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Animated grid lines */
.login-wrapper::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Floating orbs */
.login-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.login-orb-1 {
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(99,102,241,0.22) 0%, transparent 70%);
    top: -120px; left: -100px;
    animation: orb1 12s ease-in-out infinite;
}
.login-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,0.18) 0%, transparent 70%);
    bottom: -80px; right: -80px;
    animation: orb2 15s ease-in-out infinite;
}
.login-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%);
    top: 40%; left: 40%;
    animation: orb3 10s ease-in-out infinite;
}

/* ── HEADER ── */
.login-brand-header {
    height: 68px;
    padding: 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 8, 19, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99,102,241,0.15);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.login-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-company-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-division-name {
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(148,163,184,0.7);
    padding: 2px 8px;
    background: rgba(99,102,241,0.1);
    border-radius: 20px;
    border: 1px solid rgba(99,102,241,0.2);
}

.brand-header-logo {
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Live indicator in header */
.login-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.login-live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: blink-dot 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(16,185,129,0.6);
}

/* ── MAIN LAYOUT ── */
.login-main-content {
    flex-grow: 1;
    display: flex;
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 56px;
    position: relative;
    z-index: 2;
}

.login-section-left {
    width: 58%;
    display: flex;
    align-items: center;
    padding-right: 60px;
    animation: slideInLeft 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}

.login-section-right {
    width: 42%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    animation: slideInRight 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}

/* ── LEFT DETAILS BOX ── */
.login-details-box {
    max-width: 620px;
}

.software-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99,102,241,0.12);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.25);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 1.2px;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease forwards;
}
.software-tag::before {
    content: '▶';
    font-size: 0.55rem;
    color: #6366f1;
}

.software-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.12;
    letter-spacing: -1px;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s 0.1s ease both;
}

.accent-text {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 50%, #8b5cf6 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite, fadeInUp 0.6s 0.1s ease both;
}

.software-description {
    font-size: 0.92rem;
    color: rgba(148,163,184,0.9);
    line-height: 1.75;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s 0.2s ease both;
}

/* ── STATS ROW ── */
.login-stats-row {
    display: flex;
    gap: 28px;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s 0.3s ease both;
}
.login-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.login-stat-num {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.login-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(148,163,184,0.6);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.login-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(99,102,241,0.25);
    align-self: center;
}

/* ── FEATURE CARDS ── */
.saas-features-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeInUp 0.6s 0.35s ease both;
}

.saas-feature-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 14px 18px;
    border-radius: 12px;
    background: rgba(15,20,45,0.6);
    border: 1px solid rgba(99,102,241,0.12);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
}
.saas-feature-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s;
}
.saas-feature-card:hover {
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.3);
    transform: translateX(6px);
    box-shadow: 0 8px 32px rgba(99,102,241,0.12);
}
.saas-feature-card:hover::before {
    opacity: 1;
}
.saas-feature-card:nth-child(1) { animation: featureEntrance 0.5s 0.4s ease both; }
.saas-feature-card:nth-child(2) { animation: featureEntrance 0.5s 0.5s ease both; }
.saas-feature-card:nth-child(3) { animation: featureEntrance 0.5s 0.6s ease both; }
.saas-feature-card:nth-child(4) { animation: featureEntrance 0.5s 0.7s ease both; }

.saas-feature-icon-wrapper {
    width: 42px; height: 42px;
    border-radius: 11px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.25);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s;
}
.saas-feature-card:hover .saas-feature-icon-wrapper {
    background: rgba(99,102,241,0.25);
    color: #a5b4fc;
    transform: scale(1.08) rotate(-4deg);
    box-shadow: 0 4px 16px rgba(99,102,241,0.2);
}
.saas-feature-icon-wrapper svg {
    width: 20px; height: 20px;
}

.saas-feature-text h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 3px;
}
.saas-feature-text p {
    font-size: 0.78rem;
    color: rgba(148,163,184,0.75);
    line-height: 1.4;
}

/* ── LOGIN CARD ── */
.saas-login-card {
    background: rgba(10,14,35,0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 20px;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 32px 64px rgba(0,0,0,0.5),
        0 0 80px rgba(99,102,241,0.08);
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    animation: scaleUp 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
    position: relative;
    overflow: hidden;
}
/* Card top glow */
.saas-login-card::before {
    content: '';
    position: absolute;
    top: -80px; left: 50%;
    transform: translateX(-50%);
    width: 240px; height: 160px;
    background: radial-gradient(ellipse, rgba(99,102,241,0.25) 0%, transparent 70%);
    pointer-events: none;
}
/* Rotating border glow */
.saas-login-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(99,102,241,0.3), transparent, rgba(6,182,212,0.2), transparent);
    background-size: 300% 300%;
    animation: gradientShift 6s ease infinite;
    z-index: -1;
    pointer-events: none;
}

.saas-login-header h2 {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 5px;
}
.saas-login-header p {
    font-size: 0.83rem;
    color: rgba(148,163,184,0.75);
}

/* Input Groups */
.saas-input-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.saas-input-group label {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(148,163,184,0.8);
}
.saas-input-wrapper {
    position: relative;
    width: 100%;
}
.saas-input-icon {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    color: rgba(148,163,184,0.5);
    pointer-events: none;
}
.saas-input-wrapper input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 10px;
    padding: 11px 14px 11px 40px;
    color: #f1f5f9;
    font-size: 0.88rem;
    transition: all 0.25s;
}
.saas-input-wrapper input::placeholder {
    color: rgba(148,163,184,0.35);
}
.saas-input-wrapper input:focus {
    border-color: #6366f1;
    background: rgba(99,102,241,0.08);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15), 0 0 20px rgba(99,102,241,0.08);
    color: #f8fafc;
}

/* Remember/Forgot */
.saas-remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.76rem;
}
.saas-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(148,163,184,0.7);
    cursor: pointer;
    user-select: none;
}
.saas-checkbox-label input {
    accent-color: #6366f1;
    cursor: pointer;
}
.saas-forgot-link {
    color: #818cf8;
    font-weight: 600;
    transition: color 0.2s;
}
.saas-forgot-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Sign In Button */
.saas-btn-signin {
    width: 100%;
    height: 46px;
    border-radius: 11px;
    border: none;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #06b6d4 100%);
    background-size: 200% auto;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(99,102,241,0.3);
    position: relative;
    overflow: hidden;
}
.saas-btn-signin::after {
    content: '';
    position: absolute;
    top: -50%; left: -75%;
    width: 50%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-25deg);
    transition: left 0.5s;
}
.saas-btn-signin:hover {
    background-position: right center;
    box-shadow: 0 8px 28px rgba(99,102,241,0.45);
    transform: translateY(-1px);
}
.saas-btn-signin:hover::after {
    left: 150%;
}

/* Divider */
.saas-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(148,163,184,0.35);
    font-size: 0.65rem;
    font-weight: 600;
}
.saas-divider::before, .saas-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(99,102,241,0.15);
}
.saas-divider span { padding: 0 10px; }

/* SSO Button */
.saas-btn-sso {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(99,102,241,0.2);
    background: rgba(255,255,255,0.03);
    color: rgba(226,232,240,0.85);
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.saas-btn-sso:hover {
    background: rgba(99,102,241,0.08);
    border-color: rgba(99,102,241,0.35);
    color: #e2e8f0;
}

/* Sandbox / Dev */
.saas-sandbox-area {
    margin-top: 4px;
    border-top: 1px dashed rgba(99,102,241,0.15);
    padding-top: 14px;
    text-align: center;
}
.saas-btn-sandbox {
    background: transparent;
    border: none;
    color: #818cf8;
    cursor: pointer;
    font-size: 0.72rem;
    font-family: monospace;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.saas-btn-sandbox:hover { color: #a5b4fc; }

/* Persona Cards */
.saas-login-card .persona-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.saas-login-card .persona-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.saas-login-card .persona-card:hover {
    background: rgba(99,102,241,0.1);
    border-color: rgba(99,102,241,0.35);
    transform: translateY(-2px);
}
.saas-login-card .persona-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 6px;
}
.saas-login-card .persona-name {
    font-size: 0.73rem;
    font-weight: 700;
    color: #e2e8f0;
}
.saas-login-card .persona-role {
    font-size: 0.62rem;
    color: rgba(148,163,184,0.65);
}
.persona-dept { display: none; }

/* ── SIGN OUT BUTTON ── */
.btn-signout {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(239,68,68,0.1);
    color: var(--status-rejected);
    border: 1px solid rgba(239,68,68,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}
.btn-signout:hover {
    background: var(--status-rejected);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

/* ── FOOTER ── */
.login-footer {
    height: 56px;
    padding: 0 48px;
    border-top: 1px solid rgba(99,102,241,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(148,163,184,0.5);
    background: rgba(5,8,19,0.8);
    backdrop-filter: blur(20px);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
.login-footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
}
.login-footer-links a { color: rgba(148,163,184,0.5); }
.login-footer-links a:hover {
    color: #818cf8;
    text-decoration: underline;
}
.dot-separator { color: rgba(99,102,241,0.3); }


/* Responsive tweaks */
@media (max-width: 992px) {
    .login-brand-header {
        padding: 0 24px;
    }
    .login-main-content {
        flex-direction: column;
        padding: 40px 24px;
        gap: 40px;
        height: auto;
    }
    .login-section-left {
        width: 100%;
        padding-right: 0;
        justify-content: center;
    }
    .login-section-right {
        width: 100%;
        justify-content: center;
    }
    .login-footer {
        padding: 0 24px;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        height: auto;
        padding: 16px 24px;
    }
}

@media (max-width: 576px) {
    .brand-company-name {
        font-size: 0.95rem;
    }
    .brand-division-name {
        display: none;
    }
    .software-title {
        font-size: 2rem;
    }
    .saas-login-card {
        padding: 30px 20px;
    }
}

/* Dynamically Rendered Dashboard Tabs */
.tab-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: rgba(255,255,255,0.02);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed, 0.25s);
}
.tab-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.05);
}
.tab-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.tab-badge {
    background: var(--border-color);
    color: var(--text-primary);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}
.tab-btn.active .tab-badge {
    background: rgba(255,255,255,0.3);
    color: #fff;
}

/* Office 365 Auto-search suggestions dropdown list */
.o365-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color, rgba(99, 102, 241, 0.15));
    transition: background 0.15s ease;
    color: var(--text-primary);
}
.o365-suggestion-item:hover {
    background-color: var(--color-primary-glow, rgba(99, 102, 241, 0.15));
}
.o365-suggestion-item:last-child {
    border-bottom: none;
}

/* ==========================================================================
   LUXURY LOGIN SCREEN — lx-* NAMESPACE
   Apple · Stripe · Linear quality premium design
   ========================================================================== */

/* ── KEYFRAMES ── */
@keyframes lxBlobFloat1 {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(60px,-40px) scale(1.08); }
    66%      { transform: translate(-30px,30px) scale(0.94); }
}
@keyframes lxBlobFloat2 {
    0%,100% { transform: translate(0,0) scale(1); }
    40%      { transform: translate(-50px,35px) scale(1.06); }
    70%      { transform: translate(25px,-20px) scale(1.1); }
}
@keyframes lxBlobFloat3 {
    0%,100% { transform: translate(0,0) scale(1); }
    50%      { transform: translate(40px,45px) scale(0.9); }
}
@keyframes lxBlobFloat4 {
    0%,100% { transform: translate(0,0) scale(1); }
    60%      { transform: translate(-35px,-30px) scale(1.05); }
}
@keyframes lxCardIn {
    from { opacity:0; transform:translateY(32px) scale(0.96); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}
@keyframes lxLeftIn {
    from { opacity:0; transform:translateX(-40px); }
    to   { opacity:1; transform:translateX(0); }
}
@keyframes lxFadeUp {
    from { opacity:0; transform:translateY(18px); }
    to   { opacity:1; transform:translateY(0); }
}
@keyframes lxShimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes lxBlink {
    0%,100% { opacity:1; box-shadow:0 0 6px rgba(16,185,129,0.7); }
    50%      { opacity:0.4; box-shadow:none; }
}
@keyframes lxRipple {
    0%   { transform:translate(-50%,-50%) scale(0); opacity:0.5; }
    100% { transform:translate(-50%,-50%) scale(6); opacity:0; }
}
@keyframes lxGradMove {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes lxFeatIn {
    from { opacity:0; transform:translateX(-20px); }
    to   { opacity:1; transform:translateX(0); }
}

/* ── WRAPPER (override login-wrapper for new design) ── */
.login-wrapper {
    position: fixed !important;
    inset: 0 !important;
    background: #030712 !important;
    flex-direction: column !important;
    z-index: 5000 !important;
    overflow: hidden !important;
    font-family: var(--font-body) !important;
}
/* Remove old pseudo-elements */
.login-wrapper::before,
.login-wrapper::after {
    display: none !important;
}

/* ── AURORA BLOBS ── */
.lx-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}
.lx-blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(79,140,255,0.20) 0%, transparent 70%);
    top: -150px; left: -120px;
    animation: lxBlobFloat1 14s ease-in-out infinite;
}
.lx-blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
    bottom: -100px; right: -80px;
    animation: lxBlobFloat2 18s ease-in-out infinite;
}
.lx-blob-3 {
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(0,212,255,0.13) 0%, transparent 70%);
    top: 45%; left: 30%;
    animation: lxBlobFloat3 11s ease-in-out infinite;
}
.lx-blob-4 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
    top: 15%; right: 25%;
    animation: lxBlobFloat4 9s ease-in-out infinite;
}

/* ── GRID OVERLAY ── */
.lx-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(79,140,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,140,255,0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    pointer-events: none;
    z-index: 0;
}

/* ── CONTENT WRAPPER ── */
.lx-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

/* ── TOPBAR ── */
.lx-topbar {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(3,7,18,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(79,140,255,0.12);
    flex-shrink: 0;
}
.lx-topbar-brand { display:flex; align-items:center; gap:12px; }
.lx-logo-badge {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, #4F8CFF, #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.72rem;
    color: white;
    letter-spacing: 0.5px;
    overflow: hidden;
    position: relative;
}
.lx-logo-badge img {
    width: 100%; height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    position: absolute;
    padding: 5px;
}
.lx-logo-fallback { position: relative; z-index: 1; }
.lx-brand-text { display:flex; flex-direction:column; gap:1px; }
.lx-brand-main { font-size:0.88rem; font-weight:700; color:#f1f5f9; font-family:var(--font-heading); }
.lx-brand-sub  { font-size:0.68rem; color:rgba(148,163,184,0.6); font-weight:500; }
.lx-topbar-center { display:flex; align-items:center; }
.lx-status-pill {
    display: flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2);
    font-size: 0.7rem; font-weight: 600; color: #10b981; letter-spacing: 0.3px;
}
.lx-status-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #10b981;
    animation: lxBlink 2s ease-in-out infinite;
}
.lx-topbar-right { display:flex; align-items:center; gap:14px; }
.lx-version-tag { font-size:0.68rem; font-weight:700; color:rgba(148,163,184,0.45); font-family:monospace; letter-spacing:0.5px; }
.lx-greeting    { font-size:0.78rem; font-weight:600; color:rgba(148,163,184,0.7); }

/* ── MAIN LAYOUT ── */
.lx-main {
    flex: 1;
    display: flex;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    align-items: center;
    gap: 80px;
    min-height: 0;
}

/* ── LEFT PANEL ── */
.lx-left {
    flex: 1.1;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 32px 0;
    animation: lxLeftIn 0.7s cubic-bezier(0.22,1,0.36,1) both;
}

/* Hero */
.lx-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    color: #4F8CFF; padding: 5px 13px; border-radius: 20px;
    background: rgba(79,140,255,0.1); border: 1px solid rgba(79,140,255,0.22);
    width: fit-content;
    animation: lxFadeUp 0.5s 0.05s ease both;
}
.lx-heading {
    font-family: var(--font-heading);
    font-size: 3.4rem; font-weight: 800;
    color: #f8fafc; line-height: 1.1; letter-spacing: -1.5px; margin: 0;
    animation: lxFadeUp 0.6s 0.1s ease both;
}
.lx-heading-grad {
    background: linear-gradient(135deg, #4F8CFF 0%, #00D4FF 45%, #7C3AED 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: lxShimmer 4s linear infinite;
}
.lx-subtext {
    font-size: 0.95rem; color: rgba(148,163,184,0.85);
    line-height: 1.75; max-width: 520px;
    animation: lxFadeUp 0.6s 0.15s ease both;
}

/* Stats Strip */
.lx-stats {
    display: flex; align-items: center; gap: 22px;
    padding: 18px 22px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(79,140,255,0.1);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    width: fit-content;
    animation: lxFadeUp 0.6s 0.2s ease both;
}
.lx-stat-item { display:flex; flex-direction:column; gap:2px; }
.lx-stat-val {
    font-family: var(--font-heading); font-size: 1.55rem; font-weight: 800;
    background: linear-gradient(135deg, #4F8CFF, #7C3AED);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1;
}
.lx-stat-key {
    font-size: 0.68rem; font-weight: 600;
    color: rgba(148,163,184,0.55); text-transform: uppercase; letter-spacing: 0.5px;
}
.lx-stat-sep { width:1px; height:36px; background:rgba(79,140,255,0.18); flex-shrink:0; }

/* Feature Cards */
.lx-features { display:flex; flex-direction:column; gap:10px; }
.lx-feat {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 16px; border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(79,140,255,0.08);
    cursor: default;
    transition: all 0.28s cubic-bezier(0.4,0,0.2,1);
    position: relative; overflow: hidden;
}
.lx-feat::before {
    content: ''; position: absolute; left:0; top:0; bottom:0;
    width: 3px; border-radius: 0 2px 2px 0;
    background: linear-gradient(180deg, #4F8CFF, #7C3AED);
    opacity: 0; transition: opacity 0.25s;
}
.lx-feat:hover { background: rgba(79,140,255,0.07); border-color: rgba(79,140,255,0.2); transform: translateX(5px); }
.lx-feat:hover::before { opacity: 1; }
.lx-feat:nth-child(1) { animation: lxFeatIn 0.5s 0.3s ease both; }
.lx-feat:nth-child(2) { animation: lxFeatIn 0.5s 0.38s ease both; }
.lx-feat:nth-child(3) { animation: lxFeatIn 0.5s 0.46s ease both; }
.lx-feat:nth-child(4) { animation: lxFeatIn 0.5s 0.54s ease both; }
.lx-feat-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: transform 0.25s;
}
.lx-feat:hover .lx-feat-icon { transform: scale(1.1) rotate(-5deg); }
.lx-feat-icon svg { width:18px; height:18px; }
.lx-feat-icon--blue   { background:rgba(79,140,255,0.15); border:1px solid rgba(79,140,255,0.2);  color:#4F8CFF; }
.lx-feat-icon--purple { background:rgba(124,58,237,0.15); border:1px solid rgba(124,58,237,0.2); color:#8B5CF6; }
.lx-feat-icon--cyan   { background:rgba(0,212,255,0.12);  border:1px solid rgba(0,212,255,0.2);  color:#00D4FF; }
.lx-feat-icon--green  { background:rgba(16,185,129,0.12); border:1px solid rgba(16,185,129,0.2); color:#10b981; }
.lx-feat-body { flex:1; }
.lx-feat-body h3 { font-size:0.85rem; font-weight:700; color:#e2e8f0; margin-bottom:2px; }
.lx-feat-body p  { font-size:0.74rem; color:rgba(148,163,184,0.65); line-height:1.4; }
.lx-feat-arrow  { font-size:1rem; color:rgba(79,140,255,0.35); transition: all 0.2s; }
.lx-feat:hover .lx-feat-arrow { color:#4F8CFF; transform:translateX(3px); }

/* Trust Badges */
.lx-trust { display:flex; gap:10px; flex-wrap:wrap; animation: lxFadeUp 0.6s 0.55s ease both; }
.lx-trust-badge {
    display:flex; align-items:center; gap:6px;
    font-size:0.7rem; font-weight:600; color:rgba(148,163,184,0.6);
    padding:5px 11px; border-radius:20px;
    background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.07);
}
.lx-trust-badge svg { color:rgba(148,163,184,0.4); }

/* ── RIGHT PANEL ── */
.lx-right {
    flex: 0 0 460px;
    display: flex; justify-content:center; align-items:center;
    padding: 32px 0;
}

/* ── LOGIN CARD ── */
.lx-card {
    width: 100%; max-width: 460px;
    background: rgba(8,12,30,0.82);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(79,140,255,0.18);
    border-radius: 24px;
    padding: 36px 32px;
    display: flex; flex-direction: column; gap: 20px;
    position: relative; overflow: hidden;
    opacity: 0;
    transform: translateY(32px) scale(0.96);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.04) inset,
        0 40px 80px rgba(0,0,0,0.55),
        0 0 100px rgba(79,140,255,0.07);
}
.lx-card.lx-card--visible {
    animation: lxCardIn 0.65s cubic-bezier(0.22,1,0.36,1) forwards;
}
.lx-card-glow {
    position: absolute; top:-60px; left:50%;
    transform: translateX(-50%);
    width: 280px; height: 150px;
    background: radial-gradient(ellipse, rgba(79,140,255,0.2) 0%, transparent 70%);
    pointer-events: none;
}
.lx-card::after {
    content: ''; position: absolute; inset:-1px; border-radius:24px;
    background: linear-gradient(135deg, rgba(79,140,255,0.3), transparent 40%, rgba(124,58,237,0.2), transparent 70%);
    background-size: 300% 300%;
    animation: lxGradMove 8s ease infinite;
    z-index: -1; pointer-events: none;
}

/* Card Header */
.lx-card-header { display:flex; align-items:center; gap:14px; }
.lx-card-logo { width:44px; height:44px; border-radius:12px; overflow:hidden; flex-shrink:0; box-shadow:0 4px 16px rgba(79,140,255,0.3); }
.lx-card-logo svg { width:44px; height:44px; }
.lx-card-title { font-family:var(--font-heading); font-size:1.45rem; font-weight:700; color:#f8fafc; margin:0 0 3px 0; letter-spacing:-0.3px; }
.lx-card-subtitle { font-size:0.8rem; color:rgba(148,163,184,0.65); margin:0; }

/* Alert */
.lx-alert { display:flex; align-items:center; gap:9px; padding:10px 14px; border-radius:10px; font-size:0.8rem; font-weight:600; }
.lx-alert--error { background:rgba(239,68,68,0.12); border:1px solid rgba(239,68,68,0.25); color:#fca5a5; }

/* Form */
.lx-form { display:flex; flex-direction:column; gap:16px; width:100%; }

/* Field Group */
.lx-field-group { display:flex; flex-direction:column; gap:6px; }
.lx-label { font-size:0.74rem; font-weight:600; color:rgba(148,163,184,0.8); letter-spacing:0.2px; }

/* Input */
.lx-input-wrap { position:relative; width:100%; }
.lx-field-icon {
    position: absolute; left:13px; top:50%; transform:translateY(-50%);
    width:16px; height:16px; color:rgba(148,163,184,0.4);
    pointer-events:none; transition:color 0.2s; z-index:1;
}
.lx-input {
    width: 100%; background:rgba(255,255,255,0.05);
    border: 1px solid rgba(79,140,255,0.15);
    border-radius: 12px; padding:12px 44px 12px 42px;
    color:#f1f5f9; font-size:0.9rem; font-family:var(--font-body);
    transition: all 0.25s; outline:none;
}
.lx-input::placeholder { color:rgba(148,163,184,0.28); }
.lx-input:focus {
    border-color: #4F8CFF;
    background: rgba(79,140,255,0.07);
    box-shadow: 0 0 0 3px rgba(79,140,255,0.15), 0 0 24px rgba(79,140,255,0.06);
    color: #f8fafc;
}
.lx-input-wrap:focus-within .lx-field-icon { color:#4F8CFF; }
select.lx-input { cursor:pointer; }
select.lx-input option { background:#0f172a; color:#f1f5f9; }
.lx-input-status { position:absolute; right:14px; top:50%; transform:translateY(-50%); width:7px; height:7px; border-radius:50%; background:transparent; transition:background 0.2s; }

/* Eye Button */
.lx-eye-btn {
    position: absolute; right:12px; top:50%; transform:translateY(-50%);
    width:30px; height:30px; border:none; background:transparent;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    color:rgba(148,163,184,0.4); border-radius:6px; transition:all 0.2s; z-index:2;
}
.lx-eye-btn:hover { color:#4F8CFF; background:rgba(79,140,255,0.08); }
.lx-eye-btn svg { width:16px; height:16px; }
.lx-eye-btn .lx-eye-close { display:none; }
.lx-eye-btn.active .lx-eye-open  { display:none; }
.lx-eye-btn.active .lx-eye-close { display:block; }

/* Remember Row */
.lx-meta-row { display:flex; justify-content:space-between; align-items:center; font-size:0.78rem; }
.lx-check-label { display:flex; align-items:center; gap:8px; cursor:pointer; color:rgba(148,163,184,0.7); user-select:none; }
.lx-check-input { display:none; }
.lx-check-box {
    width:17px; height:17px; border-radius:5px;
    border:1.5px solid rgba(79,140,255,0.3);
    background:rgba(255,255,255,0.04);
    display:inline-flex; align-items:center; justify-content:center;
    transition:all 0.2s; flex-shrink:0;
}
.lx-check-input:checked + .lx-check-box {
    background:#4F8CFF; border-color:#4F8CFF;
    box-shadow:0 0 10px rgba(79,140,255,0.35);
}
.lx-check-input:checked + .lx-check-box::after {
    content:''; display:block; width:4px; height:7px;
    border:2px solid white; border-top:none; border-left:none;
    transform:rotate(45deg) translate(-1px,-1px);
}
.lx-forgot { color:#4F8CFF; font-weight:600; font-size:0.76rem; transition:color 0.2s; }
.lx-forgot:hover { color:#7C3AED; text-decoration:underline; }

/* Primary Button */
.lx-btn-primary {
    width:100%; height:50px; border:none; border-radius:13px;
    background: linear-gradient(135deg, #4F8CFF 0%, #7C3AED 50%, #00D4FF 100%);
    background-size:200% auto;
    color:#fff; font-size:0.92rem; font-weight:700;
    cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px;
    position:relative; overflow:hidden;
    transition:all 0.3s;
    box-shadow:0 4px 24px rgba(79,140,255,0.35);
    letter-spacing:0.2px; font-family:var(--font-body);
}
.lx-btn-primary:hover { background-position:right center; box-shadow:0 8px 32px rgba(79,140,255,0.5); transform:translateY(-2px); }
.lx-btn-primary:active { transform:translateY(0); }
.lx-btn-arrow { display:flex; align-items:center; transition:transform 0.25s; }
.lx-btn-primary:hover .lx-btn-arrow { transform:translateX(4px); }
.lx-btn-ripple {
    position:absolute; width:30px; height:30px; border-radius:50%;
    background:rgba(255,255,255,0.35); pointer-events:none;
    transform:translate(-50%,-50%) scale(0);
}
.lx-btn-ripple.go { animation:lxRipple 0.55s linear forwards; }

/* Hint */
.lx-hint-box {
    display:flex; align-items:center; justify-content:center; gap:7px;
    padding:9px 14px;
    background:rgba(79,140,255,0.06); border:1px solid rgba(79,140,255,0.12);
    border-radius:10px; font-size:0.75rem; font-weight:600;
    color:rgba(148,163,184,0.65); margin-top:4px;
}
.lx-hint-box code { font-family:monospace; color:#4F8CFF; font-size:0.82rem; }

/* Divider */
.lx-divider {
    display:flex; align-items:center; text-align:center;
    color:rgba(148,163,184,0.3); font-size:0.62rem; font-weight:700; letter-spacing:0.8px;
}
.lx-divider::before, .lx-divider::after {
    content:''; flex:1; height:1px; background:rgba(79,140,255,0.1); margin:0 10px;
}

/* SSO Button */
.lx-btn-sso {
    width:100%; height:46px; border-radius:12px;
    border:1px solid rgba(79,140,255,0.18);
    background:rgba(255,255,255,0.04);
    color:rgba(226,232,240,0.8); font-size:0.86rem; font-weight:600;
    display:flex; align-items:center; justify-content:center; gap:10px;
    cursor:pointer; transition:all 0.25s; font-family:var(--font-body);
}
.lx-btn-sso:hover {
    background:rgba(79,140,255,0.08); border-color:rgba(79,140,255,0.35);
    color:#e2e8f0; transform:translateY(-1px);
    box-shadow:0 4px 16px rgba(79,140,255,0.15);
}

/* Footer */
.lx-footer {
    height:52px; display:flex; align-items:center; justify-content:space-between;
    padding:0 52px;
    border-top:1px solid rgba(79,140,255,0.08);
    background:rgba(3,7,18,0.8); backdrop-filter:blur(20px);
    font-size:0.72rem; color:rgba(148,163,184,0.4); flex-shrink:0;
}
.lx-footer-links { display:flex; align-items:center; gap:12px; }
.lx-footer-links a { color:rgba(148,163,184,0.4); transition:color 0.2s; }
.lx-footer-links a:hover { color:#4F8CFF; }
.lx-footer-links span { color:rgba(79,140,255,0.2); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .lx-main { padding:0 32px; gap:40px; }
    .lx-topbar,.lx-footer { padding:0 32px; }
    .lx-heading { font-size:2.6rem; }
    .lx-right { flex:0 0 380px; }
}
@media (max-width: 820px) {
    .lx-main { flex-direction:column; padding:28px 24px; overflow-y:auto; align-items:stretch; }
    .lx-left { padding:0; }
    .lx-right { flex:none; padding:0 0 24px 0; }
    .lx-heading { font-size:2.2rem; }
    .lx-topbar,.lx-footer { padding:0 24px; }
    .lx-topbar-center,.lx-greeting { display:none; }
    .lx-footer { flex-direction:column; height:auto; padding:12px 24px; gap:6px; }
    .lx-trust,.lx-stats { flex-wrap:wrap; }
}

/* ── LUXURY ROTATING ORBITS ── */
.lx-orbit {
    position: fixed;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px dashed rgba(245, 158, 11, 0.12);
    pointer-events: none;
    z-index: 0;
    transform-origin: center;
}

@keyframes spin-clockwise {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.02); }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
}

@keyframes spin-counter {
    0% { transform: translate(-50%, -50%) rotate(360deg) scale(1); }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(0.98); }
    100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}

.lx-orbit-1 {
    width: 650px;
    height: 650px;
    border-color: rgba(245, 158, 11, 0.07);
    animation: spin-clockwise 28s linear infinite;
}

.lx-orbit-2 {
    width: 1000px;
    height: 1000px;
    border-color: rgba(99, 102, 241, 0.05);
    animation: spin-counter 42s linear infinite;
}

.lx-orbit-3 {
    width: 1400px;
    height: 1400px;
    border-color: rgba(6, 182, 212, 0.03);
    animation: spin-clockwise 60s linear infinite;
}

/* ==========================================================================
   LAPTOP & DESKTOP RESPONSIVE SCALING (1920, 1600, 1366)
   ========================================================================== */

/* Buttons shouldn't wrap and should scale */
.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning, .btn-small {
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 1600x900 Screens */
@media (max-width: 1600px) {
    html {
        font-size: 15px;
    }
    .custom-table th, .custom-table td {
        padding: 12px 14px;
        font-size: 0.8rem;
    }
    .btn-small {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
    .btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    .main-content {
        padding: 20px;
    }
}

/* 1366x768 Screens */
@media (max-width: 1366px) {
    html {
        font-size: 14px;
    }
    :root {
        --sidebar-width: 240px;
        --header-height: 60px;
    }
    html {
        font-size: 14px; /* Dynamically scales down all typography and paddings */
    }
    .main-content {
        padding: 16px;
    }
    .glass-card {
        padding: 16px;
    }
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
    }
    .charts-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 16px;
    }
    .lx-heading {
        font-size: 2.8rem;
    }
    .lx-subtext {
        font-size: 0.88rem;
    }
    .lx-main {
        gap: 30px;
        padding: 0 24px;
    }
    .lx-right {
        flex: 0 0 410px;
    }
    .lx-card {
        max-width: 410px !important;
    }
    .lx-topbar, .lx-footer {
        padding: 0 24px;
    }
}

@media (max-width: 1100px) {
    .lx-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
        padding: 40px 24px;
        overflow-y: auto;
    }
    .lx-left {
        align-items: center;
        text-align: center;
        padding: 0;
        gap: 16px;
    }
    .lx-subtext {
        margin: 0 auto;
    }
    .lx-stats {
        margin: 0 auto;
    }
    .lx-features {
        align-items: stretch;
        width: 100%;
        max-width: 520px;
    }
    .lx-trust {
        justify-content: center;
    }
    .lx-right {
        width: 100%;
        max-width: 420px;
        flex: none;
    }
}

/* Required Fields Validation Styling */
input.form-control:required:invalid,
select.form-control:required:invalid,
textarea.form-control:required:invalid {
    background-color: #ffebeb !important;
    border-color: #ffcccc !important;
}

input.form-control:required:valid,
select.form-control:required:valid,
textarea.form-control:required:valid {
    background-color: #e0f2fe !important;
    border-color: #bae6fd !important;
}
