:root {
    --bg-dark: #0c0c14;
    --bg-card: rgba(30, 35, 50, 0.6);
    --bg-card-hover: rgba(40, 45, 65, 0.7);
    --primary: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --text-main: #f1f5f9;
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --glass-highlight: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 100%);
    --backdrop-blur: 20px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition-speed: 0.2s;
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
}

/* Classic Theme - Solid Navy Design */
.theme-classic {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --primary: #14b8a6;
    --primary-hover: #0d9488;
    --primary-glow: rgba(20, 184, 166, 0.3);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glass-border: #475569;
    --glass-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    --backdrop-blur: 0px;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
}

.theme-classic .app-container {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

.theme-classic .sidebar {
    background: #1e293b;
    border-right: 1px solid #334155;
}

.theme-classic .sidebar::before,
.theme-classic .card::before {
    display: none;
}

.theme-classic .card {
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.theme-classic .card:hover {
    background: #334155;
    border-color: #475569;
}

.theme-classic .nav-links li.active button,
.theme-classic .nav-links button:hover,
.theme-classic .nav-links a.active,
.theme-classic .nav-links a:hover {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.theme-classic .btn-primary {
    background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
}

.theme-classic .progress-bar {
    background: linear-gradient(90deg, #14b8a6, #22d3ee) !important;
}

/* Cockpit Theme - Avionics Inspired */
.theme-cockpit {
    --bg-dark: #0a0a0a;
    --bg-card: rgba(20, 25, 20, 0.9);
    --bg-card-hover: rgba(30, 35, 30, 0.95);
    --primary: #f59e0b;
    --primary-hover: #fbbf24;
    --primary-glow: rgba(245, 158, 11, 0.4);
    --text-main: #e5e5e5;
    --text-muted: rgba(180, 180, 170, 0.7);
    --border-color: rgba(245, 158, 11, 0.2);
    --glass-border: rgba(245, 158, 11, 0.3);
    --glass-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    --backdrop-blur: 8px;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #dc2626;
}

.theme-cockpit .app-container {
    background:
        linear-gradient(180deg, #0a0a0a 0%, #0d0d0d 100%);
}

.theme-cockpit .sidebar {
    background: rgba(15, 18, 15, 0.95);
    border-right: 1px solid rgba(245, 158, 11, 0.15);
}

.theme-cockpit .card {
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow:
        0 0 1px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(245, 158, 11, 0.05);
}

.theme-cockpit .card::before {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1), transparent);
}

.theme-cockpit .stat-card .value {
    color: #22c55e;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.theme-cockpit .btn-primary {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.theme-cockpit .progress-bar {
    background: linear-gradient(90deg, #22c55e, #16a34a) !important;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* Light/Day Theme - Clean and Bright */
.theme-light {
    --bg-dark: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-glow: rgba(2, 132, 199, 0.2);
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --glass-border: #cbd5e1;
    --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    --backdrop-blur: 0px;
    --success: #16a34a;
    --warning: #ca8a04;
    --error: #dc2626;
}

.theme-light .app-container {
    background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 40%, #f1f5f9 100%);
}

.theme-light .sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.theme-light .sidebar::before,
.theme-light .card::before {
    display: none;
}

.theme-light .card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.theme-light .card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.theme-light .top-bar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid #e2e8f0;
}

.theme-light .nav-links button,
.theme-light .nav-links a {
    color: #475569;
}

.theme-light .nav-links li.active button,
.theme-light .nav-links button:hover,
.theme-light .nav-links a.active,
.theme-light .nav-links a:hover {
    background: rgba(2, 132, 199, 0.1);
    color: #0284c7;
}

.theme-light .btn-primary {
    color: #ffffff;
}

.theme-light .form-control {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

.theme-light .form-control:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.theme-light th {
    background: #f8fafc;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.theme-light td {
    border-bottom: 1px solid #f1f5f9;
}

.theme-light .user-profile .avatar {
    color: #ffffff;
}

.theme-light .logo {
    color: #0284c7;
}

/* Light theme modal overrides */
.theme-light .modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.theme-light .modal-content {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.theme-light .modal-content h2,
.theme-light .modal-content h3 {
    color: #0f172a !important;
}

.theme-light .modal-content p,
.theme-light .modal-content label {
    color: #475569 !important;
}

.theme-light .widget-setting-item {
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
}

.theme-light .widget-name {
    color: #0f172a !important;
}

.theme-light .reorder-buttons button {
    color: #64748b;
}

.theme-light .reorder-buttons button:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

.theme-light .toggle-switch .slider {
    background-color: #cbd5e1 !important;
}

.theme-light .btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.theme-light .btn-secondary:hover {
    background: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Enable scrolling when landing page is active */
body.landing-active {
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

body.landing-active .login-body {
    display: block;
    height: auto;
}

/* Scrollbar - subtle liquid glass */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Layout - Liquid Glass Background */
.app-container {
    display: flex;
    height: 100vh;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(96, 165, 250, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 184, 166, 0.04) 0%, transparent 70%),
        linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
    position: relative;
}

/* Sidebar - Apple Liquid Glass */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--backdrop-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--backdrop-blur)) saturate(180%);
    border-right: 1px solid var(--glass-border);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
}

/* Subtle top highlight */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-links button,
.nav-links a {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
    border-radius: 0.5rem;
    transition: all var(--transition-speed);
    font-family: inherit;
    text-decoration: none;
    display: block;
}

.nav-links li.active button,
.nav-links button:hover,
.nav-links a.active,
.nav-links a:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

/* Main Content */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    height: 60px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.top-bar h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.view-container {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Components - Apple Liquid Glass Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-speed);
    position: relative;
}

/* Subtle top highlight only */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem 1.5rem;
    text-align: left;
}

th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
}

td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

tfoot {
    font-weight: 700;
    background: rgba(15, 23, 42, 0.8);
}

tfoot td {
    border-top: 2px solid var(--border-color);
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all var(--transition-speed);
}

.btn-icon:hover {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
}

/* Autocomplete */
.autocomplete-wrapper {
    position: relative;
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    list-style: none;
    box-shadow: var(--glass-shadow);
    display: none;
}

.suggestions-list.show {
    display: block;
}

.suggestions-list li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-main);
    transition: background var(--transition-speed);
}

.suggestions-list li:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

/* User Profile & Menu */
.user-profile {
    position: relative;
    cursor: pointer;
}

.user-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 200px;
    background: var(--bg-card);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--glass-shadow);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.user-menu.show {
    display: flex;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all var(--transition-speed);
    text-align: left;
    width: 100%;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.text-danger {
    color: #ef4444;
}

.menu-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* User Menu Overlay - allows closing menu by clicking outside */
.user-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: none;
}

.user-menu-overlay.show {
    display: block;
}

/* Responsive Design */


/* Hide toggle on desktop */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }

    .sidebar-overlay {
        display: none;
    }
}

/* Date & Time Inputs */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-speed);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Custom Date Picker (Consolidated) */
.date-picker-wrapper {
    position: relative;
    width: 100%;
}

.calendar-popup {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    z-index: 1001;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    width: 320px;
    animation: fadeIn 0.2s ease-out;
}

.calendar-popup.show {
    display: block;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all var(--transition-speed);
}

.calendar-header button:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.current-month {
    font-weight: 700;
    color: var(--text-main);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
}

.day-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0;
}

.calendar-day {
    padding: 0.5rem 0;
    cursor: pointer;
    border-radius: 0.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.calendar-day:hover:not(.other-month) {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.calendar-day.other-month {
    color: rgba(148, 163, 184, 0.3);
}

.calendar-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

.calendar-btn {
    background: none;
    border: none;
    color: var(--primary);
}

.calendar-btn:hover {
    background: rgba(56, 189, 248, 0.1);
}

.calendar-btn.danger {
    color: #ef4444;
}

.calendar-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Time Picker Popup */
.time-picker-popup {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    z-index: 1001;
    display: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    width: 280px;
    animation: fadeIn 0.2s ease-out;
}

.time-picker-popup.show {
    display: flex;
    flex-direction: column;
}

.time-column {
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.time-column::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.time-column-header {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    padding: 0.25rem 0;
}

.time-option {
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 0.25rem;
    color: var(--text-main);
    transition: background 0.2s;
    font-variant-numeric: tabular-nums;
}

.time-option:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

.time-option.selected {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

/* Mobile Overrides (Moved for Precedence) */
@media (max-width: 768px) {

    /* Layout */
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        z-index: 1000;
        transition: left var(--transition-speed) ease-in-out;
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.open {
        left: 0;
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed);
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* Top Bar */
    .top-bar {
        padding: 0 1rem;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        cursor: pointer;
        color: var(--text-main);
    }

    /* Forms */
    .form-group {
        grid-template-columns: 1fr !important;
    }

    /* Specific adjustment for the duration/takeoffs/landings row */
    .form-group[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth iOS scrolling */
    }

    table {
        min-width: 600px;
        /* Ensure table doesn't squish too much */
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    /* ===== TOUCH-FRIENDLY IMPROVEMENTS ===== */

    /* Minimum 44px touch targets for buttons */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }

    /* Navigation items - larger touch targets */
    .nav-links button,
    .nav-links a {
        min-height: 48px;
        padding: 0.875rem 1rem;
        display: flex;
        align-items: center;
    }

    /* Suggestion list items - larger for easier tapping */
    .suggestions-list li {
        min-height: 48px;
        padding: 0.875rem 1rem;
        display: flex;
        align-items: center;
    }

    /* Calendar day cells - larger touch targets */
    .calendar-day {
        min-height: 40px;
        min-width: 40px;
        padding: 0.625rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Time picker options - larger touch targets */
    .time-option {
        min-height: 44px;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Chips (tags) - ensure delete button is tappable */
    .chip {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
    }

    .chip .remove-chip {
        min-width: 24px;
        min-height: 24px;
        padding: 0.25rem;
        margin-left: 0.5rem;
    }

    /* Menu items - larger for easier tapping */
    .menu-item {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    /* Form controls - larger touch targets */
    .form-control {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 16px;
        background: rgba(15, 23, 42, 0.9);
    }

    /* Role selector buttons */
    .role-btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    /* Calendar popup - better mobile appearance */
    .calendar-popup {
        position: fixed;
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        max-width: none;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        max-height: 80vh;
        overflow-y: auto;
        background: #1e293b !important;
        /* Solid fallback */
        background: rgba(30, 41, 59, 1) !important;
        /* Fully opaque for mobile */
        border: 1px solid var(--border-color);
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
        z-index: 10001;
    }

    /* Time picker popup - better mobile appearance */
    .time-picker-popup {
        position: fixed;
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        max-width: none;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        max-height: 60vh;
        background: #1e293b !important;
        /* Solid fallback */
        background: rgba(30, 41, 59, 1) !important;
        /* Fully opaque for mobile */
        border: 1px solid var(--border-color);
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
        z-index: 10001;
    }

    /* User menu - larger items on mobile */
    .user-menu {
        min-width: 200px;
    }

    /* View container - slightly less padding on mobile */
    .view-container {
        padding: 1rem;
    }

    /* Cards - slightly less padding on mobile */
    .card {
        padding: 1.25rem;
    }
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
    overflow-y: auto;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.6s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-large {
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.3));
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.875rem;
    font-size: 1rem;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.text-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.text-link:hover {
    color: var(--primary);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider span {
    padding: 0 0.75rem;
}

.btn-outline {
    background: var(--primary);
    color: var(--bg-dark);
    font-weight: 600;
}

/* Passkey Management */
.credential-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.credential-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    transition: all var(--transition-speed);
}

.credential-item:hover {
    background: rgba(15, 23, 42, 0.7);
    border-color: var(--primary);
}

.credential-info {
    flex: 1;
}

.credential-name {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.credential-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* People Multi-Select */
.people-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selected-people {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.chip-remove {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity var(--transition-speed);
}

.chip-remove:hover {
    opacity: 1;
}

/* Compact Table */
.table-compact th,
.table-compact td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Logbook Header & Responsive */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .page-title {
        text-align: center;
    }

    .pagination-controls {
        justify-content: center;
        width: 100%;
        order: 2;
    }

    .actions {
        display: grid;
        grid-template-columns: auto 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
        order: 3;
    }

    .actions .btn {
        width: 100%;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: #1e2332;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content h3 {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Viewport Fixes */
@supports (height: 100dvh) {

    body,
    .app-container {
        height: 100dvh;
    }

    .sidebar {
        height: 100dvh;
    }
}

.user-menu {
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
}

.view-container {
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .view-container {
        padding: 1rem;
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Collapsible Sidebar Styles */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.logo-text {
    transition: opacity 0.3s, width 0.3s;
    white-space: nowrap;
    overflow: hidden;
}

.collapse-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.collapse-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    position: relative;
    top: 1px;
}

.nav-text {
    transition: opacity 0.3s;
    white-space: nowrap;
    overflow: hidden;
}

@media (min-width: 769px) {
    .collapse-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar {
        transition: width 0.3s ease;
    }

    .sidebar.collapsed,
    html.sidebar-collapsed .sidebar {
        width: 80px;
        padding: 1.5rem 1rem;
    }

    .sidebar.collapsed .sidebar-header,
    html.sidebar-collapsed .sidebar .sidebar-header {
        flex-direction: column;
        gap: 1rem;
    }

    .sidebar.collapsed .logo,
    html.sidebar-collapsed .sidebar .logo {
        justify-content: center;
    }

    .sidebar.collapsed .logo-text,
    html.sidebar-collapsed .sidebar .logo-text {
        display: none;
    }

    .sidebar.collapsed .nav-text,
    html.sidebar-collapsed .sidebar .nav-text {
        display: none;
    }

    .sidebar.collapsed .nav-link,
    html.sidebar-collapsed .sidebar .nav-link {
        justify-content: center;
        padding: 0.75rem;
    }

    .sidebar.collapsed .nav-links,
    html.sidebar-collapsed .sidebar .nav-links {
        align-items: center;
    }
}

/* Login Page - Additional Styles */
.btn-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: var(--text-muted);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.btn-text:hover {
    color: var(--primary);
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.otp-input {
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    text-align: center;
    font-weight: 600;
}

/* Disable transitions on load */
.no-transitions * {
    transition: none !important;
}

/* Offline Badge for Offline Add navigation */
.offline-badge {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    margin-left: auto;
    flex-shrink: 0;
}

.offline-add-link {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
}

/* Hide offline badge text when sidebar is collapsed */
.sidebar.collapsed .offline-badge {
    display: none;
}

/* Disabled nav items when offline */
.nav-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar.offline-mode .nav-link.disabled {
    color: var(--text-muted);
}

.sidebar.offline-mode .nav-link.disabled:hover {
    background: transparent;
    color: var(--text-muted);
}

/* PWA Install prompt styling */
.pwa-install-prompt {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    box-shadow: var(--glass-shadow);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 90%;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================
   TOUCH-FRIENDLY OPTIMIZATIONS
   For phones and tablets
   ========================================== */

/* Safe area insets for notched devices (iPhone X+, etc.) */
@supports (padding: max(0px)) {
    .app-container {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .sidebar {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .content-area {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Minimum touch target size (44x44px per Apple/Google guidelines) */
@media (pointer: coarse) {

    /* Buttons and interactive elements */
    .btn,
    button,
    .btn-icon,
    .btn-secondary,
    .btn-primary {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.25rem;
    }

    .btn-icon {
        padding: 0.75rem;
    }

    .btn-sm {
        min-height: 40px;
        padding: 0.5rem 1rem;
    }

    /* Form inputs */
    input,
    select,
    textarea,
    .form-control {
        min-height: 48px;
        padding: 0.875rem 1rem;
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    /* Checkboxes and radio buttons */
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
        margin: 0.25rem;
    }

    /* Navigation links */
    .nav-link {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    /* Table rows */
    table tbody tr {
        min-height: 48px;
    }

    table td,
    table th {
        padding: 0.875rem 0.75rem;
    }

    /* Menu items */
    .menu-item,
    .context-menu-item {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }

    /* User profile avatar */
    .user-profile .avatar {
        min-width: 44px;
        min-height: 44px;
    }

    /* Select dropdowns */
    select {
        background-size: 12px;
        padding-right: 2.5rem;
    }

    /* Pagination */
    .pagination-controls button,
    .pagination-controls select {
        min-height: 44px;
    }

    .pagination-controls input[type="number"] {
        min-height: 44px;
        width: 60px;
    }
}

/* Improve tap feedback */
@media (pointer: coarse) {

    .btn,
    button,
    .nav-link,
    .menu-item,
    .card,
    tr {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
        touch-action: manipulation;
    }

    /* Active states for touch feedback */
    .btn:active,
    button:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .nav-link:active {
        transform: scale(0.98);
    }
}

/* Mobile-specific layout improvements */
@media (max-width: 768px) {

    /* Increase spacing for touch */
    .form-group {
        margin-bottom: 1.25rem;
    }

    /* Stack form groups on mobile */
    .form-group[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Larger close/action buttons */
    .close-btn,
    .toggle-btn {
        min-width: 44px;
        min-height: 44px;
    }

    /* Card padding */
    .card {
        padding: 1.25rem;
    }

    /* Table scroll hint */
    .table-container {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }

    /* Larger badges for touch */
    .badge,
    .role-badge,
    .person-badge {
        min-width: 32px;
        min-height: 32px;
    }

    /* Top bar improvements */
    .top-bar {
        min-height: 60px;
        padding: 0.5rem 1rem;
    }

    .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Page header stacking */
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .page-header .actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-header .actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) and (pointer: coarse) {
    .nav-link {
        padding: 1rem 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    table td,
    table th {
        padding: 1rem;
    }
}

/* Disable hover effects on touch devices (prevents sticky hover) */
@media (hover: none) {

    .btn:hover,
    .btn-primary:hover,
    .btn-secondary:hover,
    .nav-link:hover,
    .card:hover,
    .menu-item:hover {
        /* Keep base style, don't show hover state */
        transform: none;
    }

    /* Use active state instead */
    .btn:active,
    .btn-primary:active,
    .btn-secondary:active {
        background: var(--primary-hover);
        transform: scale(0.98);
    }
}

/* Smooth scrolling for all scrollable containers */
* {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Prevent text selection during drag/scroll */
.nav-links,
.sidebar,
table {
    -webkit-user-select: none;
    user-select: none;
}

/* Allow text selection in content areas */
.card,
.content-area,
input,
textarea {
    -webkit-user-select: auto;
    user-select: auto;
}

/* ========================================
   LANDING PAGE STYLES
   ======================================== */

/* Override login-body when containing landing page */
.login-body:has(.landing-page) {
    display: block;
    align-items: initial;
    justify-content: initial;
}

.landing-page {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(180deg, #0a0f1a 0%, #0f172a 100%);
    overflow-x: hidden;
    overflow-y: auto;
}

/* Navigation */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 100;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all var(--transition-speed);
}

.nav-link:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-nav {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    padding: 0 2rem 4rem;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    bottom: 10%;
    left: -100px;
    animation: float 25s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, transparent 70%);
    top: 40%;
    right: 20%;
    animation: float 18s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin-top: 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 560px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    width: fit-content;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Visual - Floating Cards */
.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    display: none;
}

@media (min-width: 1200px) {
    .hero-visual {
        display: block;
    }
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.card-1 {
    top: 0;
    left: 0;
    animation: floatCard 6s ease-in-out infinite;
}

.card-2 {
    top: 40%;
    right: 0;
    animation: floatCard 5s ease-in-out infinite 0.5s;
}

.card-3 {
    bottom: 0;
    left: 10%;
    animation: floatCard 7s ease-in-out infinite 1s;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.card-icon.primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.card-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.metric-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    position: relative;
    padding: 6rem 2rem;
    text-align: center;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-gradient {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* Footer */
.landing-footer {
    padding: 3rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Landing Page Responsive */
@media (max-width: 768px) {
    .landing-nav {
        padding: 1rem;
    }

    .nav-logo span {
        display: none;
    }

    .hero {
        padding: 0 1rem 3rem;
    }

    .hero-content {
        margin-top: 2rem;
    }

    .hero-badge {
        font-size: 0.65rem;
        padding: 0.375rem 0.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
        padding: 1.25rem;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .stat-item {
        align-items: center;
        text-align: center;
    }

    .features {
        padding: 4rem 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-section {
        padding: 4rem 1rem;
    }
}