/**
 * Babussalam Travel & Tours LTD - Custom Styles
 */

/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --sidebar-width: 250px;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #000;
}

/* Make all text black, but preserve colors on navbar, stat cards, badges, buttons */
body,
h1, h2, h3, h4, h5, h6,
p, span, a, li, td, th, label,
.form-label,
.text-muted,
.card-header,
.page-header h1,
.breadcrumb-item,
.breadcrumb-item a,
.stat-label,
.quick-action-btn {
    color: #000;
}

/* Preserve navbar colors */
.navbar *,
.navbar-brand,
.navbar-brand i,
.nav-link,
.nav-link.active,
.navbar .dropdown-item-text {
    color: inherit !important;
}

.navbar-dark .navbar-brand,
.navbar-dark .nav-link {
    color: #fff !important;
}

.navbar-dark .navbar-brand i {
    color: #ffc107 !important;
}

.navbar-dark .nav-link.active {
    color: #fff !important;
}

/* Preserve stat card colors */
.stat-card,
.stat-card *,
.stat-card .stat-value,
.stat-card .stat-label {
    color: #fff !important;
}

/* Preserve badge colors */
.badge,
.badge-pending,
.badge-submitted,
.badge-processing,
.badge-approved,
.badge-rejected,
.badge-cancelled,
.badge-confirmed,
.badge-checked_in,
.badge-checked_out {
    color: inherit !important;
}

.badge-pending {
    color: #000 !important;
}

/* Preserve profile header colors */
.profile-header,
.profile-header * {
    color: #fff !important;
}

/* Preserve login card heading color */
.login-card .card-header h3 {
    color: var(--primary-color) !important;
}

/* Main Content Area */
.main-content {
    margin-top: 70px;
    padding: 20px;
    min-height: calc(100vh - 130px);
}

/* Navbar Styles */
.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
}

.navbar-brand i {
    color: #ffc107;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Dashboard Cards */
.stat-card {
    border-radius: 0.75rem;
    transition: transform 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Stat Card Colors */
.stat-card.customers {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card.visas {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-card.tickets {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stat-card.revenue {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.stat-card .stat-icon {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Tables */
.table {
    vertical-align: middle;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 0.375rem;
}

.badge-pending {
    background-color: #ffc107;
    color: #000;
}

.badge-submitted {
    background-color: #0dcaf0;
}

.badge-processing {
    background-color: #0d6efd;
}

.badge-approved {
    background-color: #198754;
}

.badge-rejected {
    background-color: #dc3545;
}

.badge-cancelled {
    background-color: #6c757d;
}

.badge-confirmed {
    background-color: #198754;
}

.badge-checked_in {
    background-color: #0dcaf0;
}

.badge-checked_out {
    background-color: #6c757d;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #495057;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #000 !important;
}

.btn:hover,
.btn:focus,
.btn:active {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #000 !important;
}

.btn-primary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-secondary,
.btn-dark,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-secondary,
.btn-outline-dark {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #000 !important;
}

.btn-primary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-info:hover,
.btn-secondary:hover,
.btn-dark:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover,
.btn-outline-info:hover,
.btn-outline-secondary:hover,
.btn-outline-dark:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #000 !important;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.page-header .breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.login-card .card-header {
    background: transparent;
    border-bottom: none;
    padding: 2rem 2rem 1rem;
    text-align: center;
}

.login-card .card-header h3 {
    color: var(--primary-color);
    font-weight: 700;
}

.login-card .card-body {
    padding: 1rem 2rem 2rem;
}

.login-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Quick Actions */
.quick-action-btn {
    padding: 1rem;
    text-align: center;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
    color: #212529;
}

.quick-action-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    color: var(--primary-color);
}

.quick-action-btn i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* DataTable Customization */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

/* Footer */
.footer {
    border-top: 1px solid #dee2e6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-content {
        padding: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Customer Profile */
.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
