/**
 * Meta Tours AIK - Admin Panel Styles
 * Powered by Meta Tours (IATA Certified)
 */
:root {
    --primary: #1a5276;
    --primary-dark: #154360;
    --primary-light: #2471a3;
    --secondary: #f39c12;
    --success: #27ae60;
    --danger: #e74c3c;
    --info: #3498db;
    --warning: #f39c12;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 60px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9; color: #333; overflow-x: hidden;
}

/* LOGIN PAGE */
.admin-login-body {
    background: linear-gradient(135deg, #1a5276 0%, #2980b9 50%, #1a5276 100%);
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
    background: var(--white); border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); padding: 40px;
    width: 100%; max-width: 420px; animation: slideIn 0.5s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo h1 { color: var(--primary); font-size: 1.8rem; font-weight: 700; margin-bottom: 5px; }
.login-logo p { color: #7f8c8d; font-size: 0.9rem; }
.login-logo .iata-badge {
    display: inline-block; background: var(--secondary); color: var(--white);
    padding: 2px 10px; border-radius: 12px; font-size: 0.7rem; margin-top: 5px;
}
.login-form .form-floating { margin-bottom: 15px; }
.login-form .form-control {
    border-radius: 8px; border: 2px solid #e0e0e0; padding: 12px 15px;
    font-size: 0.95rem; transition: all 0.3s;
}
.login-form .form-control:focus {
    border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(26, 82, 118, 0.25);
}
.btn-login {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white); border: none; border-radius: 8px; padding: 12px;
    font-weight: 600; width: 100%; transition: all 0.3s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(26, 82, 118, 0.4); }
.login-footer { text-align: center; margin-top: 20px; color: #95a5a6; font-size: 0.8rem; }

/* SIDEBAR */
.admin-sidebar {
    position: fixed; top: 0; left: 0; width: var(--sidebar-width); height: 100vh;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    z-index: 1000; transition: all 0.3s ease; overflow-y: auto; overflow-x: hidden;
}
.admin-sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-brand {
    display: flex; align-items: center; justify-content: center;
    height: var(--topbar-height); padding: 0 15px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand h4 { color: var(--white); font-size: 1.1rem; font-weight: 700; margin: 0; white-space: nowrap; }
.sidebar-brand i { color: var(--secondary); margin-right: 10px; font-size: 1.2rem; }
.admin-sidebar.collapsed .sidebar-brand h4 { display: none; }
.sidebar-menu { list-style: none; padding: 10px 0; }
.sidebar-menu li { position: relative; }
.sidebar-menu li a {
    display: flex; align-items: center; padding: 12px 20px;
    color: rgba(255,255,255,0.85); text-decoration: none;
    transition: all 0.3s; border-left: 3px solid transparent; font-size: 0.9rem;
}
.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background: rgba(255,255,255,0.1); color: var(--white); border-left-color: var(--secondary);
}
.sidebar-menu li a i { width: 25px; text-align: center; margin-right: 12px; font-size: 1rem; }
.admin-sidebar.collapsed .sidebar-menu li a { justify-content: center; padding: 12px; }
.admin-sidebar.collapsed .sidebar-menu li a i { margin-right: 0; font-size: 1.2rem; }
.sidebar-menu .submenu { list-style: none; padding: 0; background: rgba(0,0,0,0.15); display: none; }
.sidebar-menu .submenu.open { display: block; }
.sidebar-menu .submenu li a { padding-left: 50px; font-size: 0.85rem; }
.sidebar-menu li a .arrow { margin-left: auto; font-size: 0.75rem; transition: transform 0.3s; }
.sidebar-menu li.open > a .arrow { transform: rotate(90deg); }

/* TOP NAVBAR */
.admin-topbar {
    position: fixed; top: 0; right: 0; left: var(--sidebar-width); height: var(--topbar-height);
    background: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.08); z-index: 999;
    display: flex; align-items: center; justify-content: space-between; padding: 0 25px;
    transition: left 0.3s ease;
}
.admin-sidebar.collapsed ~ .admin-wrapper .admin-topbar { left: var(--sidebar-collapsed); }
.topbar-left { display: flex; align-items: center; gap: 15px; }
.sidebar-toggle {
    background: none; border: none; color: var(--primary); font-size: 1.2rem;
    cursor: pointer; padding: 8px; border-radius: 6px; transition: all 0.3s;
}
.sidebar-toggle:hover { background: #f0f4f8; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.topbar-icon-btn {
    position: relative; background: none; border: none; color: #666; font-size: 1.1rem;
    cursor: pointer; padding: 8px; border-radius: 50%; transition: all 0.3s;
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
}
.topbar-icon-btn:hover { background: #f0f4f8; color: var(--primary); }
.notification-badge {
    position: absolute; top: 2px; right: 2px; background: var(--danger); color: var(--white);
    font-size: 0.65rem; padding: 1px 5px; border-radius: 10px; font-weight: 600;
}
.admin-dropdown .dropdown-toggle {
    display: flex; align-items: center; gap: 10px; background: none; border: none;
    padding: 5px 10px; border-radius: 8px; cursor: pointer; transition: all 0.3s;
}
.admin-dropdown .dropdown-toggle:hover { background: #f0f4f8; }
.admin-avatar {
    width: 35px; height: 35px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white); display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.85rem;
}
.admin-name { font-size: 0.9rem; font-weight: 600; color: var(--dark); }

/* MAIN CONTENT */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-main {
    flex: 1; margin-left: var(--sidebar-width); margin-top: var(--topbar-height);
    padding: 25px; transition: margin-left 0.3s ease;
    min-height: calc(100vh - var(--topbar-height));
}
.admin-sidebar.collapsed ~ .admin-main { margin-left: var(--sidebar-collapsed); }
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid #e8e8e8;
}
.page-header h2 { font-size: 1.5rem; font-weight: 700; color: var(--dark); margin: 0; }
.page-header h2 i { color: var(--primary); margin-right: 10px; }

/* STAT CARDS */
.stat-card {
    background: var(--white); border-radius: 12px; padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: all 0.3s; position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.stat-card.primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: var(--white); }
.stat-card.success { background: linear-gradient(135deg, var(--success) 0%, #2ecc71 100%); color: var(--white); }
.stat-card.warning { background: linear-gradient(135deg, var(--warning) 0%, #f1c40f 100%); color: var(--white); }
.stat-card.info { background: linear-gradient(135deg, var(--info) 0%, #5dade2 100%); color: var(--white); }
.stat-card.danger { background: linear-gradient(135deg, var(--danger) 0%, #ec7063 100%); color: var(--white); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: rgba(255,255,255,0.2); margin-bottom: 15px; }
.stat-value { font-size: 2rem; font-weight: 700; margin-bottom: 5px; }
.stat-label { font-size: 0.9rem; opacity: 0.9; }

/* CONTENT CARDS */
.content-card { background: var(--white); border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.06); margin-bottom: 25px; overflow: hidden; }
.content-card-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid #eee; }
.content-card-header h5 { font-weight: 700; color: var(--dark); margin: 0; }
.content-card-header h5 i { color: var(--primary); margin-right: 8px; }
.content-card-body { padding: 25px; }

/* BADGES */
.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-completed { background: #d1ecf1; color: #0c5460; }
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #e2e3e5; color: #383d41; }
.badge-featured { background: #fff3cd; color: #856404; }

/* DATA TABLES */
.dataTables_wrapper .dataTables_length select { padding: 5px 10px; border-radius: 6px; border: 1px solid #ddd; }
.dataTables_wrapper .dataTables_filter input { padding: 6px 12px; border-radius: 6px; border: 1px solid #ddd; margin-left: 8px; }
.dataTables_wrapper .dataTables_paginate .paginate_button { padding: 6px 12px; border-radius: 6px; margin: 0 2px; border: 1px solid #ddd !important; background: var(--white) !important; color: var(--primary) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button:hover { background: var(--primary) !important; color: var(--white) !important; border-color: var(--primary) !important; }
.table-admin { width: 100% !important; border-collapse: separate; border-spacing: 0; }
.table-admin thead th { background: #f8f9fa; color: var(--dark); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 14px 15px; border-bottom: 2px solid #e0e0e0; white-space: nowrap; }
.table-admin tbody td { padding: 14px 15px; vertical-align: middle; font-size: 0.9rem; border-bottom: 1px solid #f0f0f0; }
.table-admin tbody tr:hover { background: #f8fbff; }

/* BUTTONS */
.btn-admin { padding: 8px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; transition: all 0.3s; border: none; cursor: pointer; }
.btn-admin-primary { background: var(--primary); color: var(--white); }
.btn-admin-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3); }
.btn-admin-success { background: var(--success); color: var(--white); }
.btn-admin-danger { background: var(--danger); color: var(--white); }
.btn-admin-warning { background: var(--warning); color: var(--white); }
.btn-admin-info { background: var(--info); color: var(--white); }
.btn-action { padding: 5px 10px; border-radius: 6px; font-size: 0.8rem; border: none; cursor: pointer; transition: all 0.2s; margin: 0 2px; }
.btn-action:hover { transform: scale(1.05); }

/* FORMS */
.form-admin .form-label { font-weight: 600; font-size: 0.85rem; color: var(--dark); margin-bottom: 6px; }
.form-admin .form-control, .form-admin .form-select { border-radius: 8px; border: 2px solid #e0e0e0; padding: 10px 14px; font-size: 0.9rem; transition: all 0.3s; }
.form-admin .form-control:focus, .form-admin .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(26, 82, 118, 0.2); }

/* MODALS */
.modal-admin .modal-content { border-radius: 12px; border: none; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.modal-admin .modal-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); color: var(--white); border-radius: 12px 12px 0 0; padding: 18px 25px; }
.modal-admin .modal-header .modal-title { font-weight: 700; }
.modal-admin .modal-header .btn-close { filter: invert(1); }
.modal-admin .modal-body { padding: 25px; }
.modal-admin .modal-footer { padding: 15px 25px; border-top: 1px solid #eee; }

/* CHART CONTAINERS */
.chart-container { position: relative; height: 320px; width: 100%; }
.chart-container-sm { position: relative; height: 250px; width: 100%; }

/* TOAST NOTIFICATIONS */
.toast-container-admin { position: fixed; top: 80px; right: 25px; z-index: 9999; }
.toast-admin { background: var(--white); border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); padding: 15px 20px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; min-width: 300px; animation: toastIn 0.4s ease-out; border-left: 4px solid var(--primary); }
.toast-admin.success { border-left-color: var(--success); }
.toast-admin.error { border-left-color: var(--danger); }
.toast-admin.warning { border-left-color: var(--warning); }
.toast-admin.info { border-left-color: var(--info); }
@keyframes toastIn { from { opacity: 0; transform: translateX(100px); } to { opacity: 1; transform: translateX(0); } }
.toast-admin .toast-icon { width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.toast-admin.success .toast-icon { background: #d4edda; color: var(--success); }
.toast-admin.error .toast-icon { background: #f8d7da; color: var(--danger); }
.toast-admin.warning .toast-icon { background: #fff3cd; color: var(--warning); }
.toast-admin.info .toast-icon { background: #d1ecf1; color: var(--info); }
.toast-admin .toast-content { flex: 1; }
.toast-admin .toast-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.toast-admin .toast-message { font-size: 0.8rem; color: #666; }

/* QUICK ACTIONS */
.quick-action-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border-radius: 12px; background: var(--white); box-shadow: 0 2px 12px rgba(0,0,0,0.06); text-decoration: none; color: var(--dark); transition: all 0.3s; height: 100%; }
.quick-action-btn:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); color: var(--primary); }
.quick-action-btn i { font-size: 2rem; margin-bottom: 10px; color: var(--primary); }
.quick-action-btn span { font-size: 0.85rem; font-weight: 600; text-align: center; }

/* ACTIVITY LOG */
.activity-item { display: flex; align-items: flex-start; gap: 15px; padding: 15px 0; border-bottom: 1px solid #f0f0f0; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.activity-content { flex: 1; }
.activity-content p { margin: 0; font-size: 0.9rem; color: #444; }
.activity-time { font-size: 0.75rem; color: #999; margin-top: 3px; }

/* SETTINGS TABS */
.settings-tabs .nav-link { padding: 14px 20px; color: #666; font-weight: 600; font-size: 0.9rem; border: none; border-bottom: 3px solid transparent; border-radius: 0; }
.settings-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: none; }
.settings-tabs .nav-link i { margin-right: 8px; }
.settings-section { padding: 25px; }
.settings-section h6 { font-weight: 700; color: var(--dark); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; }

/* FILTER BAR */
.filter-bar { background: #f8f9fa; padding: 15px 20px; border-radius: 10px; margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 15px; align-items: end; }

/* DETAIL VIEW */
.detail-section { margin-bottom: 25px; }
.detail-section h6 { font-weight: 700; color: var(--primary); margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #eee; }
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.detail-label { width: 180px; font-weight: 600; color: #666; font-size: 0.9rem; }
.detail-value { flex: 1; font-size: 0.9rem; color: #333; }

/* STATUS DOTS */
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-dot.pending { background: var(--warning); }
.status-dot.confirmed { background: var(--success); }
.status-dot.cancelled { background: var(--danger); }
.status-dot.completed { background: var(--info); }

/* SPINNER */
.spinner-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.8); z-index: 99999; display: flex; align-items: center; justify-content: center; }
.spinner-admin { width: 50px; height: 50px; border: 4px solid #e0e0e0; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FOOTER */
.admin-footer { text-align: center; padding: 20px; color: #999; font-size: 0.8rem; border-top: 1px solid #eee; margin-top: 30px; }

/* RESPONSIVE */
@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.mobile-open { transform: translateX(0); }
    .admin-main, .admin-topbar { margin-left: 0 !important; left: 0 !important; }
}
@media print {
    .admin-sidebar, .admin-topbar, .btn-no-print, .dataTables_length, .dataTables_filter, .dataTables_paginate, .dataTables_info { display: none !important; }
    .admin-main { margin-left: 0 !important; margin-top: 0 !important; }
}
