/* Custom Styles for Bus Booking System */

:root {
    --primary-color: #F39C12;      /* برتقالي مشرق */
    --secondary-color: #E67E22;    /* برتقالي داكن */
    --button-color: #2ECC71;       /* أخضر زمردي */
    --background-color: #F8F9F9;   /* أبيض فاتح */
    --text-color: #2C3E50;         /* رمادي غامق */
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #16a085;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    direction: rtl;
    text-align: right;
    color: var(--text-color);
    position: relative;
    overflow-x: hidden;
}

/* Modern Navbar Styles */
.navbar-custom {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(243, 156, 18, 0.15);
    border-bottom: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.navbar-custom .navbar-toggler {
    border-color: var(--primary-color);
    padding: 0.5rem 0.75rem;
}

.navbar-custom .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.25);
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23F39C12' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--secondary-color) !important;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background: rgba(243, 156, 18, 0.1);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(243, 156, 18, 0.15);
    font-weight: 600;
}

/* Button Styles */
.btn-outline-primary {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--button-color) 0%, #27AE60 100%) !important;
    border: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #27AE60 0%, var(--button-color) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.hero-section {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.92) 0%, rgba(230, 126, 34, 0.92) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.search-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(243, 156, 18, 0.2);
    padding: 40px;
    border: 2px solid rgba(243, 156, 18, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.search-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(243, 156, 18, 0.3);
}

.office-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.15);
    padding: 25px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(243, 156, 18, 0.1);
}

.office-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.25);
    border-color: var(--primary-color);
}

.office-card h4 {
    color: var(--text-color);
    font-weight: bold;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.office-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.office-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.office-info-item i {
    color: var(--primary-color);
    width: 20px;
}

.price-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(243, 156, 18, 0.3);
}

.btn-book {
    background: linear-gradient(135deg, var(--button-color) 0%, #27AE60 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-book:hover {
    background: linear-gradient(135deg, #27AE60 0%, var(--button-color) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.invoice-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.15);
    padding: 40px;
    margin: 30px auto;
    max-width: 800px;
    border: 2px solid rgba(243, 156, 18, 0.1);
}

.invoice-header {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.invoice-header h2 {
    color: var(--text-color);
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.booking-code {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.invoice-details {
    margin: 30px 0;
}

.invoice-details table {
    width: 100%;
}

.invoice-details th {
    background: rgba(243, 156, 18, 0.1);
    padding: 12px;
    font-weight: bold;
    color: var(--text-color);
}

.invoice-details td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-canceled {
    background: #f8d7da;
    color: #721c24;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: white;
    transform: scale(1.05);
}

.admin-sidebar {
    background: linear-gradient(180deg, var(--text-color) 0%, #34495e 100%);
    min-height: 100vh;
    padding: 0;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,.85);
    padding: 14px 20px;
    margin: 3px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.admin-sidebar .nav-link:hover {
    background: rgba(243, 156, 18, 0.2);
    color: white;
    transform: translateX(-3px);
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.4);
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.12);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(243, 156, 18, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.25);
    border-color: var(--primary-color);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.primary {
    border-right: 5px solid var(--primary-color);
}

.stat-card.success {
    border-right: 5px solid var(--button-color);
}

.stat-card.warning {
    border-right: 5px solid var(--secondary-color);
}

.stat-card.danger {
    border-right: 5px solid var(--danger-color);
}

.stat-card.info {
    border-right: 5px solid var(--info-color);
}

/* Modern responsive improvements */
@media (max-width: 768px) {
    .stat-card {
        padding: 20px;
    }

    .stat-card h3 {
        font-size: 2rem;
    }
}

.table-actions {
    display: flex;
    gap: 5px;
}

/* Modern Footer Styles */
.footer {
    background: linear-gradient(135deg, var(--text-color) 0%, #34495E 100%);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer a {
    color: var(--primary-color) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer a:hover {
    color: #FFA500 !important;
    transform: translateX(-3px);
}

.footer .list-unstyled li {
    margin-bottom: 10px;
}

.footer hr {
    border-color: rgba(255,255,255,.2);
    margin: 30px 0 20px;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    .invoice-container {
        box-shadow: none;
        padding: 20px;
    }
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.25);
}

.form-label {
    color: var(--text-color);
    font-weight: 500;
}

/* RTL Adjustments */
.form-control,
.form-select {
    text-align: right;
}

.table {
    text-align: right;
}

.pagination {
    direction: ltr;
}

/* Responsive Improvements */
@media (max-width: 991px) {
    .navbar-custom {
        padding: 1rem;
    }

    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
}

@media (max-width: 768px) {
    .invoice-container {
        padding: 20px;
    }

    .search-card {
        padding: 25px;
    }

    .office-card {
        padding: 20px;
    }

    .footer {
        text-align: center;
    }

    .footer .col-md-6 {
        margin-bottom: 20px;
    }
}

/* Accessibility & Security */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Prevent XSS attacks - sanitize user input display */
.user-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Loading States */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

