/* ============================================================
   Vehicle Showroom Management System — Global Styles
   Theme: Medical Teal | Font: Plus Jakarta Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ─────────── Design Tokens ─────────── */
:root {
    /* Brand Colors */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-hover: #115e59;
    --primary-light: #ccfbf1;
    --primary-50: #f0fdfa;

    --secondary: #2563eb;
    --accent: #10b981;

    /* Grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic */
    --bg-main: #f0fdf9;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-sub: #475569;
    --text-muted: #94a3b8;

    /* Status */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;

    /* Layout */
    --sidebar-w: 260px;
    --header-h: 68px;

    /* Radii */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.10);

    /* Font */
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─────────── Reset ─────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
}

/* ─────────── App Shell ─────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════
   SIDEBAR
═══════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    background: #ffffff;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
    transition: transform .3s ease;
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 4px;
}

/* Brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(13, 148, 136, .28);
    flex-shrink: 0;
}

.brand-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    overflow: hidden;
}

.brand-text small {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-top: 2px;
}

/* Nav */
.sidebar-nav {
    padding: 16px 12px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 16px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--r-md);
    transition: background .15s, color .15s;
    text-decoration: none !important;
    cursor: pointer;
    line-height: 1.2;
}

.nav-link:hover {
    background: var(--primary-50);
    color: var(--primary-dark);
}

.nav-link:hover .nav-icon {
    color: var(--primary-dark);
}

.nav-link.active {
    background: linear-gradient(100deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, .25);
    font-weight: 600;
}

.nav-link.active .nav-icon {
    color: #ffffff !important;
}

.nav-link.active .nav-arrow {
    color: rgba(255, 255, 255, .65);
}

/* Icon — same color as text, no separate lighter shade */
.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #374151;
    transition: color .15s;
}

/* Nav Label */
.nav-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chevron */
.nav-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform .22s ease;
    display: block;
}

.nav-arrow.open {
    transform: rotate(90deg);
}

.nav-link:hover .nav-arrow {
    color: var(--primary);
}

/* Submenu */
.nav-submenu {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 3px 0 6px 18px;
    margin-left: 26px;
    border-left: 2px solid #e5e7eb;
}

.nav-submenu.open {
    display: flex;
}

.nav-link.sub {
    padding: 9px 14px;
    font-size: 13.5px;
    font-weight: 500;
    gap: 11px;
    color: #4b5563;
}

.nav-link.sub .nav-icon {
    width: 17px;
    height: 17px;
    color: #6b7280;
}

.nav-link.sub:hover {
    background: var(--primary-50);
    color: var(--primary-dark);
}

.nav-link.sub:hover .nav-icon {
    color: var(--primary-dark);
}

.nav-link.sub.active {
    background: var(--primary-light);
    color: var(--primary-dark) !important;
    font-weight: 700;
    box-shadow: none;
}

.nav-link.sub.active .nav-icon {
    color: var(--primary-dark) !important;
}

/* Badge */
.nav-badge {
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 20px;
    line-height: 1.4;
}

/* Divider */
.nav-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 8px 4px;
}

/* ═══════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════ */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─────────── Header ─────────── */
.header {
    height: var(--header-h);
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
    gap: 16px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
}

.header-breadcrumb a {
    color: var(--text-sub);
}

.header-breadcrumb .separator {
    color: var(--gray-300);
}

.header-breadcrumb .current-page {
    color: var(--primary-dark);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-time-pill {
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-sub);
    white-space: nowrap;
}

/* Notification Bell */
.header-notification {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-sub);
    transition: background .18s;
    flex-shrink: 0;
}

.header-notification:hover {
    background: var(--gray-100);
}

.notif-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Notif Dropdown */
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
}

.notif-dropdown.show {
    display: block;
}

.notif-dropdown-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.notif-dropdown-header h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.notif-item {
    padding: 12px 18px;
    border-bottom: 1px solid #f8fafc;
    transition: background .15s;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--gray-50);
}

.notif-item.unread {
    background: #f0fdf9;
    border-left: 3px solid var(--primary);
}

.notif-title {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--text-main);
}

.notif-text {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 2px;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* User Profile */
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-light);
    flex-shrink: 0;
}

.user-info {
    line-height: 1.25;
}

.user-name {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Mobile menu toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-sub);
    padding: 4px 8px;
    border-radius: var(--r-sm);
}

.mobile-menu-btn:hover {
    background: var(--gray-100);
}

/* ─────────── Page Content ─────────── */
.page-content {
    padding: 28px 36px;
    flex: 1;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    letter-spacing: -.3px;
}

.page-header h1 small {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 8px;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─────────── Alerts ─────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--r-md);
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.alert-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #78350f;
    border-color: #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #1e3a8a;
    border-color: #bfdbfe;
}

/* ─────────── Stat Cards ─────────── */
.stats-grid,
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card.teal .stat-icon {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.stat-card.blue .stat-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.stat-card.green .stat-icon {
    background: var(--success-light);
    color: #065f46;
}

.stat-card.amber .stat-icon {
    background: var(--warning-light);
    color: #92400e;
}

.stat-card.red .stat-icon {
    background: var(--danger-light);
    color: #991b1b;
}

.stat-card.purple .stat-icon {
    background: var(--purple-light);
    color: #6d28d9;
}

/* fallback for old class names */
.stat-card.blue .stat-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info h4,
.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-sub);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-change {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}

/* ─────────── Cards ─────────── */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 22px;
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
}

.card-header h3,
.card-header h4 {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.card-body {
    padding: 22px 24px;
}

/* ─────────── Toolbar ─────────── */
.toolbar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─────────── Tables ─────────── */
.table-wrapper {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    margin-bottom: 18px;
}

.table-responsive {
    overflow-x: auto;
}

.table,
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table thead th,
table thead th {
    background: var(--gray-50);
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 14px 18px;
    border-bottom: 1.5px solid var(--border);
    white-space: nowrap;
}

.table tbody td,
table tbody td {
    padding: 14px 18px;
    font-size: 13.5px;
    color: var(--text-main);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.table tbody tr:last-child td,
table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover,
table tbody tr:hover {
    background: var(--primary-50);
}

/* Table utilities */
.text-bold {
    font-weight: 800 !important;
    color: var(--text-main) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: #065f46 !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

/* ─────────── Badges ─────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-info {
    background: var(--info-light);
    color: #1e40af;
}

.badge-purple {
    background: var(--purple-light);
    color: #5b21b6;
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--text-sub);
    border: 1px solid var(--border);
}

.badge-gray {
    background: var(--gray-100);
    color: var(--text-sub);
}

/* ─────────── Buttons ─────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    min-height: 42px;
    border-radius: var(--r-md);
    font-size: 13.5px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    border: 1.5px solid transparent;
    text-decoration: none !important;
    transition: all .18s ease;
    outline: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff !important;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 5px 14px rgba(13, 148, 136, .35);
    transform: translateY(-1px);
    color: #fff !important;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff !important;
}

.btn-success:hover {
    background: #059669;
    box-shadow: 0 5px 14px rgba(16, 185, 129, .35);
    transform: translateY(-1px);
    color: #fff !important;
}

.btn-outline {
    background: #fff;
    border-color: var(--border);
    color: var(--text-sub);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--text-main);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-sub);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text-main);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff !important;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 5px 14px rgba(239, 68, 68, .35);
    transform: translateY(-1px);
}

/* Sizes */
.btn-sm {
    padding: 7px 14px;
    min-height: 34px;
    font-size: 12px;
    border-radius: var(--r-sm);
}

.btn-lg {
    padding: 13px 28px;
    min-height: 50px;
    font-size: 15px;
}

.btn-icon {
    padding: 8px;
    min-height: unset;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
}

/* Btn Group */
.btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Action buttons row in tables */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* ─────────── Forms ─────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-group {
    margin-bottom: 18px;
}

.form-label,
label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-sub);
    margin-bottom: 6px;
    letter-spacing: .2px;
}

.form-control,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 10px 14px;
    min-height: 42px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--r-md);
    font-size: 13.5px;
    font-family: var(--font);
    color: var(--text-main);
    background: #fff;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    appearance: auto;
}

.form-control:focus,
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}

.form-control.form-control-sm {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12.5px;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-text {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 4px;
}

.required-star {
    color: var(--danger);
    margin-left: 2px;
}

/* ─────────── Section Headers ─────────── */
.section-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─────────── Pagination ─────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 7px 13px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid var(--border);
    color: var(--text-sub);
    background: #fff;
    text-decoration: none;
    transition: all .15s;
}

.pagination a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}

.pagination .active,
.pagination span.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination .disabled {
    opacity: .4;
    pointer-events: none;
}

/* ─────────── Select2 Override ─────────── */
.select2-container--default .select2-selection--single {
    height: 42px !important;
    padding: 6px 12px;
    border: 1.5px solid var(--gray-200) !important;
    border-radius: var(--r-md) !important;
    background: #fff !important;
    display: flex;
    align-items: center;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    color: var(--text-main) !important;
    font-size: 13.5px;
    font-family: var(--font);
    font-weight: 500;
    padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    top: 0 !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .12) !important;
    outline: none !important;
}

.select2-dropdown {
    border-color: var(--primary) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: var(--font);
}

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--r-sm) !important;
    font-family: var(--font);
}

.select2-results__option--highlighted {
    background: var(--primary) !important;
}

/* ─────────── Login Page ─────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-50) 0%, #e0f2fe 100%);
    padding: 24px;
}

.login-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 42px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    border-radius: var(--r-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(13, 148, 136, .28);
}

.login-card h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13.5px;
    color: var(--text-sub);
    margin-bottom: 28px;
}

.login-card .form-group {
    text-align: left;
}

.login-card .btn {
    width: 100%;
    margin-top: 6px;
}

/* ─────────── Print Styles ─────────── */
@media print {

    .no-print,
    .sidebar,
    .header,
    .toolbar,
    .page-actions,
    .action-buttons {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .page-content {
        padding: 0 !important;
    }
}

/* ─────────── Utilities ─────────── */
.d-flex {
    display: flex !important;
}

.align-center {
    align-items: center !important;
}

.justify-between {
    justify-content: space-between !important;
}

.gap-2 {
    gap: 8px !important;
}

.gap-3 {
    gap: 12px !important;
}

.mt-1 {
    margin-top: 6px !important;
}

.mt-2 {
    margin-top: 12px !important;
}

.mt-3 {
    margin-top: 18px !important;
}

.mb-2 {
    margin-bottom: 12px !important;
}

.mb-3 {
    margin-bottom: 18px !important;
}

.w-100 {
    width: 100% !important;
}

/* Overlay when mobile sidebar is open */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 150;
}

.sidebar-overlay.show {
    display: block;
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */

/* Tablet */
@media (max-width: 1100px) {
    .page-content {
        padding: 22px 24px;
    }

    .header {
        padding: 0 22px;
    }

    .header-time-pill {
        display: none;
    }

    .user-info {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 250;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header {
        padding: 0 16px;
        gap: 10px;
    }

    .page-content {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid,
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 20px;
    }

    .table thead th,
    table thead th {
        padding: 10px 12px;
    }

    .table tbody td,
    table tbody td {
        padding: 10px 12px;
    }

    .form-grid,
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-group,
    .action-buttons {
        flex-wrap: wrap;
    }

    .header-time-pill {
        display: none;
    }

    .user-info {
        display: none;
    }

    .header-breadcrumb .current-page {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Small phones */
@media (max-width: 480px) {

    .stats-grid,
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px 22px;
    }
}

/* ─────────── Hide Number Input Spinners (Arrows) Globally ─────────── */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

nput[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}