/**
 * Modern Theme CSS - Based on Login Page Design
 * تطبيق على جميع الصفحات
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html body {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.85)), 
                url('../images/14.jpg') center top / cover fixed no-repeat !important;
    min-height: 100vh;
    background-color: #0f172a !important;
    background-attachment: fixed !important;
}

/* Global Fix for Dropdown Visibility - Force Black Text on White Background */
select option,
option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

select {
    color-scheme: light !important;
}

select:focus,
select:active {
    background-color: #ffffff !important;
    color: #000000 !important;
}

:root {
    /* Base Colors */
    --primary-color: #ffffff;
    --primary-hover: #00b8e6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #ffc107;

    /* Dark Theme (Default) */
    --bg-color: #1a1a2e;
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.986);
    --card-bg: rgba(197, 235, 135, 0.15);
    --card-border: #003366;
    --card-shadow: rgba(0, 0, 0, 0.5);
    --nav-bg: rgba(26, 26, 46, 0.9);
    --table-bg: rgba(26, 26, 46, 0.6);
    --table-th: rgba(0, 0, 0, 0.2);
    --input-color: #ffffff;
    --input-border: #003366;
    --label-color: rgb(255, 255, 255);
    --accent-color: #ffffff;

    /* Glass Utilities (Dark) */
    --glass-bg: rgba(67, 88, 211, 0.938);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-icon-bg: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --white: #ffffff;
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --text-muted: #334155;
    --card-bg: #ffffff;
    --card-border: #cbd5e1;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --nav-bg: #ffffff;
    --table-bg: #ffffff;
    --table-th: #f1f5f9;
    --input-color: #0f172a;
    --input-border: #94a3b8;
    --label-color: #1e293b;
    --glass: rgba(255, 255, 255, 0.9);

    /* Overrides for visibility */
    --primary-color: #2563eb;
    /* Blue for buttons instead of white */
    --accent-color: #1d4ed8;
    --warning-color: #d97706;
    /* Darker amber instead of bright yellow */

    /* Glass Utilities (Light) */
    --glass-bg: rgba(0, 0, 0, 0.03);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-icon-bg: #f1f5f9;
}

/* Universal Soft Charcoal Text Override for Light Mode */
/* Specific Navbar Overrides for Light Mode */
[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .navbar-brand,
[data-theme="light"] .nav-link {
    color: #2e3440 !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: var(--primary-color) !important;
}

[data-theme="light"] .btn-outline-light {
    color: #2e3440 !important;
    border-color: #2e3440 !important;
}

[data-theme="light"] .btn-outline-light:hover {
    background-color: #2e3440 !important;
    color: #ffffff !important;
}

/* Force White Text on Hero Section for ALL themes */
.hero-section h1,
.hero-section p,
.hero-section .text-white-50 {
    color: #ffffff !important;
}

/* Fix Card Text in Light Mode */
[data-theme="light"] .feature-card h3 {
    color: #2e3440;
}

[data-theme="light"] .feature-card p {
    color: #4c566a;
}


[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-success,
[data-theme="light"] .btn-danger {
    color: #ffffff !important;
    /* Keep button text white for contrast */
}

body {
    background-color: #0f172a !important;
    color: var(--text-color);
    min-height: 100vh;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Global Overlays for Internal Portals (Customer/Company) */
body.sidebar-layout,
body.customer-portal {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.85)), 
                url('../images/14.jpg') center top / cover fixed no-repeat !important;

    /* Extreme Visibility Force: Always use light text on dark overlay */
    --text-color: #ffffff !important;
    --text-muted: rgba(255, 255, 255, 0.8) !important;
    --label-color: #ffffff !important;
    --input-color: #ffffff !important;
    --bg-color: #0f172a !important;
    background-attachment: fixed !important;
}

/* Force Table Text and Icon Visibility */
body.sidebar-layout .modern-table td,
body.customer-portal .modern-table td {
    color: #ffffff !important;
}

body.sidebar-layout .text-muted,
body.customer-portal .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}


/* Container Styles */
.modern-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    background: transparent !important;
}

/* Company Main Content - Fluid Layout for Sidebar */
.company-main-content {
    margin-right: 260px;
    /* Space for sidebar RTL */
    padding: 30px;
    min-height: 100vh;
    transition: margin 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

[dir="ltr"] .company-main-content {
    margin-right: 0;
    margin-left: 260px;
}

/* Collapsed State for Company Content */
body.sidebar-collapsed .company-main-content {
    margin-right: 80px;
}

[dir="ltr"] body.sidebar-collapsed .company-main-content {
    margin-left: 80px;
    margin-right: 0;
}

/* Responsive adjustment for Mobile */
@media (max-width: 991px) {
    .company-main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
        padding: 20px;
    }
}

.modern-card {
    background: var(--card-bg);
    border: 2px solid #003366 !important;
    /* User Request: Dark Black Border */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modern-card:hover {
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
    border-color: #003366 !important;
}

/* Floating UI Utilities */
.floating-ui-page {
    background: url('../images/14.jpg') center/cover fixed no-repeat !important;
}

.floating-glass-card {
    background: rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 2px solid #003366 !important;
    /* User Request: Dark Black Border */
    color: #ffffff !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

.floating-glass-card h1,
.floating-glass-card h2,
.floating-glass-card h3,
.floating-glass-card h4,
.floating-glass-card h5,
.floating-glass-card p,
.floating-glass-card label,
.floating-glass-card .text-muted {
    color: #ffffff !important;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9), 0 2px 4px rgba(0, 0, 0, 0.7) !important;
}

.floating-glass-card .modern-table {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.floating-glass-card .modern-table th {
    background: rgba(0, 0, 0, 0.2) !important;
    color: var(--warning-color) !important;
}

.floating-glass-card .modern-table td {
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color);
    margin-bottom: 20px;
}

h1 {
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 25px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

[data-theme="light"] h2 {
    color: var(--text-color);
}

h3 {
    font-size: 18px;
    font-weight: 500;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Refined Buttons - Calm yet Prominent */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    /* Pill shape for calmness */
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    /* Changed from black to be more flexible */
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn {
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #0f172a;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: #ffffff !important;
    border: none;
}

[data-theme="light"] .btn-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: #fff !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: #fff !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #4b5563, #374151);
    color: #fff !important;
}

[data-theme="light"] .btn-secondary {
    background: #e2e8f0;
    color: #334155 !important;
    border-color: #cbd5e1;
}

.btn-primary {
    border-color: #000fff;
}

.btn-success {
    border-color: #10b981;
}

.btn-success::before {
    background: linear-gradient(var(--bg-color), var(--success-color), var(--bg-color), var(--success-color));
}

.btn-danger {
    border-color: #ef4444;
}

.btn-danger::before {
    background: linear-gradient(var(--bg-color), var(--danger-color), var(--bg-color), var(--danger-color));
}

.btn-secondary {
    border-color: #6b7280;
}

.btn-secondary::before {
    background: linear-gradient(var(--bg-color), #6b7280, var(--bg-color), #6b7280);
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.field-wrapper {
    position: relative;
    width: 100%;
    height: 50px;
    margin-top: 25px;
}

/* Enforced Search Box Styling */
.field-wrapper input,
.field-wrapper textarea,
.field-wrapper select,
.search-form .field-wrapper input,
.search-form .field-wrapper select {
    width: 100% !important;
    height: 100% !important;
    background: #1a1a1a !important;
    /* Softened Black */
    border: none !important;
    outline: none !important;
    font-size: 15px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-bottom: 3px solid #ffffff !important;
    /* Thicker white line */
    padding-right: 25px !important;
    transition: 0.5s !important;
    border-radius: 12px 12px 0 0 !important;
    appearance: none;
    -webkit-appearance: none;
}

[data-theme="light"] .field-wrapper input,
[data-theme="light"] .field-wrapper textarea,
[data-theme="light"] .field-wrapper select {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-bottom-color: #ffffff !important;
}

select:focus,
select:active,
.field-wrapper select:focus {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

select option,
.field-wrapper select option,
.form-group select option {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.field-wrapper textarea {
    min-height: 100px;
    padding-top: 10px;
    resize: vertical;
}

.field-wrapper input:focus,
.field-wrapper input:valid,
.field-wrapper textarea:focus,
.field-wrapper textarea:valid,
.field-wrapper select:focus {
    border-bottom: 2px solid var(--primary-color);
}

.field-wrapper label {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--label-color);
    transition: 0.5s;
    pointer-events: none;
}

.field-wrapper textarea~label {
    top: 15px;
    transform: none;
}

.field-wrapper input:focus~label,
.field-wrapper input:valid~label,
.field-wrapper textarea:focus~label,
.field-wrapper textarea:valid~label,
.field-wrapper select:focus~label,
.field-wrapper select:valid~label {
    top: -10px;
    color: #ffffff !important;
    font-size: 14px;
    transform: translateY(0);
}

.field-wrapper i {
    position: absolute;
    top: 50%;
    right: 0;
    font-size: 18px;
    transform: translateY(-50%);
    color: var(--label-color);
}

.field-wrapper input:focus~i,
.field-wrapper input:valid~i {
    color: #ffffff !important;
}

/* Tables */
.modern-table {
    width: 100%;
    background: var(--table-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--card-border);
    margin-bottom: 20px;
}

.modern-table table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: var(--table-th);
    color: var(--primary-color);
    padding: 10px 12px;
    text-align: right;
    font-weight: 600;
    border-bottom: 2px solid var(--card-border);
}

.modern-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--input-border);
    color: var(--text-color);
}

.modern-table tr:hover {
    background: rgba(0, 212, 255, 0.1);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.stat-card i {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 10px;
}

.stat-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 5px 0;
}

.stat-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 0;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border: 2px solid transparent;
}

.alert-error {
    background-color: rgba(255, 77, 79, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.alert-info {
    background-color: rgba(0, 212, 255, 0.15);
    color: #ffffff;
    border-color: rgba(0, 212, 255, 0.3);
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.3);
}

/* Language Switcher */
.lang-switcher {
    position: fixed;
    top: 10px;
    z-index: 1000;
}

.lang-switcher select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #ffffff;
    background: rgba(26, 26, 46, 0.9);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-switcher select:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Navigation - High End "Aero" Look */
.modern-nav {
    background: var(--nav-bg);
    border-bottom: 3px solid #000000;
    /* Prominent separation */
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.modern-nav .nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
    /* Aligns to Right in RTL */
    align-items: center;
    padding: 0 40px;
    /* Breathe room */
}

.modern-nav .nav-links a {
    color: var(--text-color) !important;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.modern-nav .nav-links a:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #003366;
    transform: translateY(-1px);
}

[data-theme="dark"] .modern-nav .nav-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
}

.theme-toggle {
    width: 45px;
    height: 45px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    border: 2px solid #003366 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-container {
        padding: 20px 10px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modern-card {
        padding: 20px;
    }

    .modern-nav .nav-links {
        flex-direction: column;
    }
}

/* RTL Support */
[dir="rtl"] .field-wrapper label {
    left: auto;
    right: 0;
}

[dir="rtl"] .field-wrapper i {
    right: auto;
    left: 0;
}

[dir="rtl"] .field-wrapper input,
[dir="rtl"] .field-wrapper textarea {
    padding-right: 0;
    padding-left: 23px;
}

[dir="rtl"] .modern-table th,
[dir="rtl"] .modern-table td {
    text-align: right;
}

[dir="ltr"] .modern-table th,
[dir="ltr"] .modern-table td {
    text-align: left;
}

/* Print Styles */
@media print {

    .modern-nav,
    .modern-footer,
    .btn,
    .alert,
    .quick-links,
    .print-hide {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .modern-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .modern-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        margin: 0 !important;
        background: white !important;
        color: black !important;
        padding: 30px !important;
    }

    .modern-card h2,
    .modern-card h3,
    .modern-card h4 {
        color: #000 !important;
    }

    .stat-card {
        border: 1px solid #eee !important;
        background: #fdfdfd !important;
        color: black !important;
    }

    .stat-card h3 {
        color: #000 !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Specific Trip Card Overrides for Light Mode */
[data-theme="light"] .modern-card h3,
[data-theme="light"] .modern-card .trip-price,
[data-theme="light"] .modern-card .trip-details i {
    color: #000000 !important;
}

[data-theme="light"] .modern-card p,
[data-theme="light"] .modern-card span {
    color: #1a1a1a !important;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--nav-bg);
    min-width: 220px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    z-index: 2000;
    top: 100%;
    right: 0;
    /* Default logic, will be adjusted by dir */
    border: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    overflow-y: auto;
    max-height: 60vh;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

/* Custom Scrollbar for Dropdown */
.dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* --- Public Sidebar Layout --- */

.public-main-content {
    margin-right: 280px;
    padding: 20px;
    min-height: 100vh;
    transition: margin 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    background: transparent !important;
}

[dir="ltr"] .public-main-content {
    margin-right: 0;
    margin-left: 280px;
}

/* Collapsed State */
body.sidebar-collapsed .public-main-content {
    margin-right: 80px;
}

[dir="ltr"] body.sidebar-collapsed .public-main-content {
    margin-left: 80px;
    margin-right: 0;
}

/* Mobile */
@media (max-width: 991px) {
    .public-main-content {
        margin: 0 !important;
        padding: 10px;
    }
}

/* Glass Sidebar Override */
.glass-sidebar {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ensure modern-container inside fits well */
.public-main-content .modern-container {
    padding: 20px 0;
    width: 100%;
    margin: 0;
}

/* Sidebar Layout for Guest/Public using Modern Container */
.modern-container.has-sidebar {
    margin: 0;
    margin-right: 280px;
    max-width: 100%;
    padding: 20px;
    transition: margin 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent !important;
}

body.sidebar-collapsed .modern-container.has-sidebar {
    margin-right: 80px;
}

[dir="ltr"] body.sidebar-collapsed .modern-container.has-sidebar {
    margin-left: 80px;
    margin-right: 0;
}

[dir="ltr"] .modern-container.has-sidebar {
    margin-left: 280px;
    margin-right: 0;
}

@media (max-width: 991px) {
    .modern-container.has-sidebar {
        margin: 0 !important;
        padding: 10px;
    }
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

[dir="ltr"] .dropdown-content {
    right: auto;
    left: 0;
}

[dir="rtl"] .dropdown-content {
    left: auto;
    right: 0;
}

.dropdown-content a {
    color: var(--text-color) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: right;
    /* Adjust for RTL */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    font-size: 0.95em;
    border-radius: 0 !important;
    /* Override pill shape */
    margin: 0 !important;
    /* Override button margin */
}

[dir="ltr"] .dropdown-content a {
    text-align: left;
}

.dropdown-content a:hover {
    background-color: rgba(0, 212, 255, 0.1) !important;
    padding-right: 20px;
    /* Slide effect RTL */
    color: var(--primary-color) !important;
    transform: none !important;
    /* Disable button hover transform */
    border-color: transparent !important;
}

[dir="ltr"] .dropdown-content a:hover {
    padding-right: 16px;
    padding-left: 20px;
    /* Slide effect LTR */
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content.show {
    display: block;
}

/* Remove hover effect
.dropdown:hover .dropdown-content {
    display: block;
} 
*/

/* Add drop icon to button */
.dropdown-btn::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
}

/* --- Sidebar Styling (Shared with Admin) --- */
.admin-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    /* RTL default */
    width: 260px;
    height: 100vh;
    background-color: var(--nav-bg);
    /* Use nav-bg for company to match theme */
    border-left: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: 20px 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    text-align: center;
    padding: 0 20px 30px;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.sidebar-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 5px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 15px;
}

/* Custom Scrollbar for Sidebar */
.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-size: 15px;
    position: relative;
    font-weight: 500;
    /* Added weight for better readability */
}

[data-theme="light"] .menu-item:not(.active) {
    color: #1e293b !important;
    /* Force darker color in light mode */
}

.menu-item i {
    width: 25px;
    margin-left: 10px;
    /* RTL spacing */
    font-size: 18px;
    transition: color 0.3s ease;
}

/* Sidebar Badges */
.badge-counter {
    background-color: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    margin-right: auto;
    /* Pushes to left in RTL */
    margin-left: 0;
    transition: all 0.3s;
}

[dir="ltr"] .badge-counter {
    margin-left: auto;
    /* Pushes to right in LTR */
    margin-right: 0;
}

.menu-item:hover i,
.menu-item.active i {
    color: #fff !important;
}

.menu-item:hover,
.menu-item.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.menu-item.active {
    background-color: rgba(0, 212, 255, 0.2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    border-left: 3px solid #00d4ff;
}

[dir="rtl"] .menu-item.active {
    border-left: none;
    border-right: 3px solid #00d4ff;
}

.menu-section-label {
    padding: 15px 15px 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.7;
}

/* Logout Button Special Styling */
.menu-item.logout {
    color: var(--danger-color);
    margin-top: auto;
}

.menu-item.logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

[dir="ltr"] .sidebar-toggle-btn {
    left: auto;
    right: 20px;
}

.sidebar-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Collapsed State */
body.sidebar-collapsed .admin-sidebar {
    width: 80px;
}

body.sidebar-collapsed .sidebar-title,
body.sidebar-collapsed .sidebar-subtitle,
body.sidebar-collapsed .menu-section-label,
body.sidebar-collapsed .menu-item span {
    display: none !important;
    opacity: 0;
}

body.sidebar-collapsed .menu-item {
    justify-content: center;
    padding: 15px 0;
}

body.sidebar-collapsed .menu-item i {
    margin: 0;
    font-size: 24px;
}

body.sidebar-collapsed .sidebar-toggle-btn {
    left: 50%;
    transform: translateX(-50%);
    top: 15px;
}

[dir="ltr"] body.sidebar-collapsed .sidebar-toggle-btn {
    right: 50%;
    transform: translateX(50%);
}

/* LTR Support for Sidebar */
[dir="ltr"] .admin-sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--card-border);
}

[dir="ltr"] .menu-item i {
    margin-left: 0;
    margin-right: 10px;
}


/* Mobile Responsiveness for Sidebar */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }
}

/* Icon Specific Colors - Company Sidebar */
.icon-dashboard {
    color: #ffffff;
}

/* Cyan */
.icon-trips {
    color: #54a0ff;
}

/* Blue */
.icon-bookings {
    color: #feca57;
}

/* Yellow */
.icon-fleet {
    color: #ff9f43;
}

/* Orange */
.icon-drivers {
    color: #5f27cd;
}

/* Purple */
.icon-reports {
    color: #ff9ff3;
}

/* Pink */
.icon-branches {
    color: #2ed573;
}

/* Green */
.icon-reviews {
    color: #e1b12c;
}

/* Gold */
.icon-support {
    color: #48dbfb;
}

/* Light Blue */
.icon-profile {
    color: #2e86de;
}

/* Dark Blue */
.icon-security {
    color: #0abde3;
}

/* Teal */
.icon-terms {
    color: #c8d6e5;
}

/* Silver */
.icon-logout {
    color: #ff6b6b;
}

/* Red */

/* Customer Sidebar Icons */
.icon-c-dashboard {
    color: #ffffff;
}

.icon-c-search {
    color: #feca57;
}

.icon-c-bookings {
    color: #ff9f43;
}

.icon-c-favorites {
    color: #ff6b6b;
}

.icon-c-notifications {
    color: #54a0ff;
}

.icon-c-support {
    color: #48dbfb;
}

.icon-c-complaints {
    color: #ff9ff3;
}

.icon-c-profile {
    color: #2e86de;
}

.icon-c-security {
    color: #5f27cd;
}

.icon-c-terms {
    color: #c8d6e5;
}

/* Hover Enhancement for Icons */
.menu-item:hover i {
    text-shadow: 0 0 10px currentColor;
    /* Glow effect on hover */
    transform: scale(1.1);
}

/* Customer Portal Green Theme Overrides */
.customer-portal {
    --primary-color: #10b981;
    --admin-primary: #10b981;
}

.customer-portal .sidebar-title {
    color: #fff !important;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.customer-portal .sidebar-subtitle {
    color: #10b981 !important;
}

.customer-portal .sidebar-toggle-btn {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.customer-portal .sidebar-toggle-btn:hover {
    background: #10b981 !important;
    color: #fff !important;
}

.customer-portal .menu-item.active {
    background-color: rgba(16, 185, 129, 0.2) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2) !important;
    border-left: 3px solid #10b981 !important;
}

[dir="rtl"] .customer-portal .menu-item.active {
    border-left: none !important;
    border-right: 3px solid #10b981 !important;
}

/* Specific Customer Icon Colors */
.icon-c-dashboard {
    color: #10b981;
}

/* Green */
.icon-c-search {
    color: #facc15;
}

/* Yellow */
.icon-c-bookings {
    color: #fb923c;
}

/* Orange */
.icon-c-favorites {
    color: #f87171;
}

/* Red */
.icon-c-notifications {
    color: #60a5fa;
}

/* Blue */
.icon-c-support {
    color: #34d399;
}

/* Emerald */
.icon-c-complaints {
    color: #f43f5e;
}

/* Rose */
.icon-c-profile {
    color: #8b5cf6;
}

/* Violet */
.icon-c-security {
    color: #2dd4bf;
}

/* Teal */
.icon-c-terms {
    color: #94a3b8;
}

/* Slate */

.customer-portal .menu-item:hover i,
.customer-portal .menu-item.active i {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.customer-portal .menu-item:hover {
    background-color: rgba(16, 185, 129, 0.1) !important;
}

/* =========================================
   Customer Portal Redesign (Dark/Orange/Glass)
   ========================================= */

.customer-portal {
    --bg-color: #0f172a;
    /* Dark Blue/Slate Background */
    --card-bg: rgba(30, 41, 59, 0.7);
    /* Dark Glass */
    --text-color: #0f172a;
    /* Dark Text for Light Background */
    --text-muted: #334155;
    --primary-color: #f59e0b;
    /* Orange */
    --primary-hover: #d97706;
    --input-bg: transparent;
    --input-border: #94a3b8;
}

.customer-portal body {
    /* Yemen Hero Background as requested */
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)),
        url('../images/hero-yemen.png') center/cover fixed no-repeat !important;
}

.customer-portal .modern-card,
.customer-portal .stat-card,
.customer-portal .floating-glass-card,
.feature-card,
.glass-card,
.policy-container {
    background: transparent !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 2px solid #003366 !important;
    /* User Request: Dark Black Border */
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.customer-portal .modern-card:hover,
.customer-portal .stat-card:hover,
.customer-portal .floating-glass-card:hover,
.feature-card:hover,
.glass-card:hover,
.policy-container:hover {
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transform: translateY(-8px);
}

.customer-portal .stat-card .icon-wrapper {
    background: #f59e0b !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

/* Search Form Redesign (Underlined Inputs) */
.customer-portal .field-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.customer-portal .field-wrapper label {
    position: absolute;
    top: -20px;
    right: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.customer-portal .field-wrapper select,
.customer-portal .field-wrapper input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--input-border) !important;
    border-radius: 0 !important;
    padding: 10px 0;
    color: #fff !important;
    font-size: 1rem;
    transition: all 0.3s;
}

.customer-portal .field-wrapper select:focus,
.customer-portal .field-wrapper input:focus {
    border-bottom-color: var(--primary-color) !important;
    box-shadow: none !important;
}

.customer-portal .field-wrapper i {
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--text-muted);
}

/* Trip Card Redesign */
.customer-portal .trip-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.customer-portal .trip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(245, 158, 11, 0.3);
}

.customer-portal .trip-info-section {
    flex: 1;
    padding: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.customer-portal .trip-price-section {
    width: 200px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

[dir="rtl"] .customer-portal .trip-price-section {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.customer-portal .trip-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
}

.customer-portal .btn-book {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}

.customer-portal .btn-book:hover {
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
    transform: translateY(-2px);
}

.customer-portal .trip-route {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.customer-portal .city-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.customer-portal .trip-time {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
    margin-top: 4px;
}

/* Global Button Overrides for Customer Portal */
.customer-portal .btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
}

.customer-portal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5) !important;
}

.customer-portal .btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.customer-portal .btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3) !important;
}

.customer-portal .badge-primary {
    background: #f59e0b;
    color: #fff;
}

.customer-portal .badge-success {
    background: #10b981;
    color: #fff;
}

.customer-portal .badge-warning {
    background: #f59e0b;
    color: #fff;
}

/* Terms & Conditions Overrides */
.customer-portal {
    --policy-bg: rgba(30, 41, 59, 0.7);
    --policy-text: #e2e8f0;
    --policy-secondary: #94a3b8;
    --policy-primary: #f59e0b;
}

.customer-portal .policy-container {
    background: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.customer-portal .policy-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.customer-portal .policy-card h3 {
    color: #f59e0b !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.customer-portal .policy-header h1 {
    background: linear-gradient(135deg, #f59e0b, #fff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.menu-item::after {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #00d4ff;
    /* Use cyan/blue as default */
    color: #000;
    /* Black text for better contrast on cyan */
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
}

.menu-item::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 6px solid transparent;
    border-top-color: #00d4ff;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 9999;
}

/* Override for RTL/LTR handled by centerting now, 
   but we reset the horizontal offsets from the previous version */
[dir="rtl"] .menu-item::after,
[dir="rtl"] .menu-item::before,
[dir="ltr"] .menu-item::after,
[dir="ltr"] .menu-item::before {
    left: 50%;
    right: auto;
}

.menu-item:hover::after,
.menu-item:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Portal Specific Tooltip Colors */
.customer-portal .menu-item::after {
    background: #10b981;
    color: #fff;
    /* White text for green background */
}

.customer-portal .menu-item::before {
    border-top-color: #10b981;
}

.customer-portal .badge-counter {
    background-color: #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Stat Card Styles */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.stat-card .icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .stat-content h3 {
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
}

.stat-card .stat-content p {
    margin: 5px 0 0;
    opacity: 0.7;
    font-size: 0.9em;
}

/* =========================================
   FORCE SIDEBAR VISIBILITY (User Request)
   ========================================= */
/* Sidebar Toggle Button - Always Dark White/Clear */
.sidebar-toggle-btn,
.customer-portal .sidebar-toggle-btn,
body.sidebar-collapsed .sidebar-toggle-btn,
.admin-sidebar .sidebar-toggle-btn {
    color: #f1f5f9 !important;
    /* Off-White / Dark White */
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    opacity: 1 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle-btn:hover,
.customer-portal .sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Sidebar Menu Items (Text Only) - Always Clear/Dark White */
.menu-item,
.menu-item span,
.customer-portal .menu-item,
.customer-portal .menu-item span,
.admin-sidebar .menu-item,
.admin-sidebar .menu-item span {
    color: #e2e8f0 !important;
    /* Slate 200 - Dark White */
    opacity: 1 !important;
    text-shadow: none !important;
    font-weight: 600 !important;
}

/* Sidebar Icons - Force Opacity, allow colors */
.menu-item i,
.customer-portal .menu-item i,
.admin-sidebar .menu-item i {
    opacity: 1 !important;
    /* font-weight removed to fix FA icons */
    transition: transform 0.3s ease;
}

/* Active State */
.menu-item.active,
.menu-item.active span,
.customer-portal .menu-item.active,
.customer-portal .menu-item.active span,
.admin-sidebar .menu-item.active,
.admin-sidebar .menu-item.active span {
    color: #ffffff !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

.menu-item.active i,
.customer-portal .menu-item.active i,
.admin-sidebar .menu-item.active i {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Hover State */
.menu-item:hover,
.menu-item:hover span {
    color: #ffffff !important;
    opacity: 1 !important;
}

.menu-item:hover i {
    color: #ffffff !important;
    transform: scale(1.1);
}

/* =========================================
   VIVID SIDEBAR ICONS (User Request)
   ========================================= */
/* Admin & Company Icons */
.icon-dashboard {
    color: #00d4ff !important;
}

/* Cyan */
.icon-companies {
    color: #feca57 !important;
}

/* Yellow */
.icon-users {
    color: #ff9f43 !important;
}

/* Orange */
.icon-bookings {
    color: #10b981 !important;
}

/* Green */
.icon-trips {
    color: #54a0ff !important;
}

/* Blue */
.icon-fleet {
    color: #ff9ff3 !important;
}

/* Pink */
.icon-drivers {
    color: #a29bfe !important;
}

/* Lavender */
.icon-reports {
    color: #5f27cd !important;
}

/* Purple */
.icon-branches {
    color: #2ed573 !important;
}

/* Emerald */
.icon-reviews {
    color: #e1b12c !important;
}

/* Gold */
.icon-support {
    color: #48dbfb !important;
}

/* Light Blue */
.icon-complaints {
    color: #ff6b6b !important;
}

/* Red */
.icon-backups {
    color: #eb4d4b !important;
}

/* Crimson */
.icon-settings {
    color: #0abde3 !important;
}

/* Deep Cyan */
.icon-terms {
    color: #8395a7 !important;
}

/* Grey Blue */
.icon-logout {
    color: #ff4757 !important;
}

/* Bright Red */

/* Customer Icons */
.icon-c-dashboard {
    color: #00d4ff !important;
}

.icon-c-search {
    color: #f1c40f !important;
}

/* Gold */
.icon-c-bookings {
    color: #fb923c !important;
}

/* Orange */
.icon-c-favorites {
    color: #ef4444 !important;
}

/* Red */
.icon-c-notifications {
    color: #3b82f6 !important;
}

/* Blue */
.icon-c-support {
    color: #14b8a6 !important;
}

/* Teal */
.icon-c-complaints {
    color: #f43f5e !important;
}

/* Rose */
.icon-c-profile {
    color: #8b5cf6 !important;
}

/* Violet */
.icon-c-security {
    color: #6366f1 !important;
}

/* Indigo */
.icon-c-terms {
    color: #94a3b8 !important;
}

/* Slate */

/* Missing Company Icons */
.icon-profile {
    color: #2e86de !important;
}

/* Blue */
.icon-security {
    color: #0abde3 !important;
}

/* Cyan */