/* ============================================================
   SRIOMS Admin Panel — Professional Design System v2.0
   Clean, Compact, Responsive, Light/Dark Mode
   ============================================================ */

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

/* ============================================================
   DESIGN TOKENS — DARK MODE (DEFAULT)
   ============================================================ */
:root {
    /* Brand */
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-light:  #a5b4fc;
    --primary-glow:   rgba(99,102,241,0.12);

    /* Backgrounds */
    --bg-base:        #0d1117;
    --bg-surface:     #161b22;
    --bg-elevated:    #1c2128;
    --bg-overlay:     #21262d;
    --bg-hover:       rgba(255,255,255,0.04);

    /* Text */
    --text-primary:   #e6edf3;
    --text-secondary: #7d8590;
    --text-muted:     #484f58;
    --text-inverse:   #0d1117;

    /* Borders */
    --border:         #30363d;
    --border-muted:   #21262d;
    --border-focus:   rgba(99,102,241,0.5);

    /* Status Colors */
    --success:        #3fb950;
    --success-bg:     rgba(63,185,80,0.1);
    --success-border: rgba(63,185,80,0.2);
    --danger:         #f85149;
    --danger-bg:      rgba(248,81,73,0.1);
    --danger-border:  rgba(248,81,73,0.2);
    --warning:        #d29922;
    --warning-bg:     rgba(210,153,34,0.1);
    --warning-border: rgba(210,153,34,0.2);
    --info:           #58a6ff;
    --info-bg:        rgba(88,166,255,0.1);
    --info-border:    rgba(88,166,255,0.2);

    /* Shadows */
    --shadow-xs:  0 1px 2px rgba(0,0,0,0.4);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.4);
    --shadow-xl:  0 16px 48px rgba(0,0,0,0.5);

    /* Layout */
    --sidebar-w:     240px;
    --sidebar-coll:  60px;
    --header-h:      56px;
    --radius-xs:     4px;
    --radius-sm:     6px;
    --radius-md:     8px;
    --radius-lg:     12px;
    --radius-xl:     16px;
    --radius-full:   9999px;

    /* Transition */
    --transition: 0.18s ease;
}

/* ============================================================
   LIGHT MODE OVERRIDES
   ============================================================ */
body.light-theme {
    --bg-base:        #f6f8fa;
    --bg-surface:     #ffffff;
    --bg-elevated:    #f6f8fa;
    --bg-overlay:     #eaeef2;
    --bg-hover:       rgba(0,0,0,0.04);

    --text-primary:   #1f2328;
    --text-secondary: #57606a;
    --text-muted:     #8c959f;
    --text-inverse:   #ffffff;

    --border:         #d0d7de;
    --border-muted:   #eaeef2;
    --border-focus:   rgba(99,102,241,0.4);

    --shadow-xs:  0 1px 2px rgba(31,35,40,0.08);
    --shadow-sm:  0 2px 8px rgba(31,35,40,0.08);
    --shadow-md:  0 4px 16px rgba(31,35,40,0.1);
    --shadow-lg:  0 8px 32px rgba(31,35,40,0.12);
    --shadow-xl:  0 16px 48px rgba(31,35,40,0.14);
}

/* ============================================================
   GLOBAL RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   APP CONTAINER & LAYOUT
   ============================================================ */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
    max-width: 100%;
}

.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-coll);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-coll); }

/* Brand */
.sidebar-brand {
    height: var(--header-h);
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    white-space: nowrap;
}

.brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.brand-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.2;
}

.brand-text span {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 12px 10px 4px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition);
}

.sidebar.collapsed .nav-section-label { opacity: 0; pointer-events: none; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all var(--transition);
    position: relative;
}

.nav-link .nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.nav-link .nav-label {
    overflow: hidden;
    transition: opacity var(--transition), max-width var(--transition);
}

.sidebar.collapsed .nav-link .nav-label,
.sidebar.collapsed .nav-link .nav-badge { opacity: 0; max-width: 0; }

.nav-link:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background-color: var(--primary-glow);
    color: var(--primary-light);
    font-weight: 600;
}

body.light-theme .nav-link.active {
    background-color: rgba(99,102,241,0.08);
    color: var(--primary-dark);
}

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

.nav-divider {
    height: 1px;
    background-color: var(--border-muted);
    margin: 6px 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 8px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .nav-link {
    color: var(--danger);
}

.sidebar-footer .nav-link:hover {
    background-color: var(--danger-bg);
    color: var(--danger);
}

/* ============================================================
   HEADER / TOPBAR
   ============================================================ */
.header {
    height: var(--header-h);
    min-height: var(--header-h);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}

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

.page-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

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

/* Icon Buttons */
.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--transition);
}

.icon-btn:hover {
    background-color: var(--bg-hover);
    border-color: var(--border);
    color: var(--text-primary);
}

/* User Avatar Chip */
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-full);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.user-chip:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--primary);
    flex-shrink: 0;
}

.user-chip-info { line-height: 1.3; }
.user-chip-name { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); }
.user-chip-role { font-size: 10px; color: var(--text-secondary); }

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.content-wrapper {
    padding: 20px;
    flex: 1;
    min-width: 0;
}

/* ============================================================
   METRIC CARDS
   ============================================================ */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.metric-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: box-shadow var(--transition), border-color var(--transition);
}

.metric-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-sm);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.metric-icon.primary { background: var(--primary-glow); color: var(--primary); }
.metric-icon.success { background: var(--success-bg); color: var(--success); }
.metric-icon.danger  { background: var(--danger-bg);  color: var(--danger); }
.metric-icon.warning { background: var(--warning-bg); color: var(--warning); }
.metric-icon.info    { background: var(--info-bg);    color: var(--info); }

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

.metric-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.metric-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    min-height: 52px;
}

.card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary);
    font-size: 15px;
}

.card-body { padding: 18px; }
.card-body-flush { padding: 0; }

/* ============================================================
   DASHBOARD GRID
   ============================================================ */
.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.table thead tr {
    background-color: var(--bg-elevated);
}

.table th {
    padding: 10px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 11px 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-muted);
    vertical-align: middle;
}

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

.table tbody tr {
    transition: background-color var(--transition);
}

.table tbody tr:hover { background-color: var(--bg-hover); }

.table .td-meta {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }
.badge-primary { background: var(--primary-glow); color: var(--primary-light); border-color: rgba(99,102,241,0.2); }
.badge-secondary { background: var(--bg-overlay); color: var(--text-secondary); border-color: var(--border); }

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-primary:hover { background-color: var(--primary-dark); color: white; border-color: var(--primary-dark); }

.btn-secondary {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover { background-color: var(--bg-overlay); border-color: var(--text-muted); }

.btn-success { background-color: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { opacity: 0.88; color: white; }

.btn-danger  { background-color: var(--danger);  color: white; border-color: var(--danger); }
.btn-danger:hover  { opacity: 0.88; color: white; }

.btn-warning { background-color: var(--warning); color: white; border-color: var(--warning); }
.btn-warning:hover { opacity: 0.88; color: white; }

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover { background-color: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 11px; border-radius: var(--radius-sm); gap: 5px; }
.btn-lg { padding: 10px 20px; font-size: 0.9rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 7px; width: 34px; height: 34px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    line-height: 1.4;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: var(--bg-surface);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%237d8590' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 32px;
    cursor: pointer;
}

.form-control[type="file"] {
    padding: 6px 10px;
    cursor: pointer;
}

.input-group {
    display: flex;
    position: relative;
}

.input-group .input-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.input-group .form-control { padding-left: 34px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.8rem;
    border: 1px solid transparent;
    animation: slideDown 0.3s ease;
}

.alert i { margin-top: 1px; flex-shrink: 0; font-size: 14px; }

.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: flex-end;
}

.filter-actions { display: flex; gap: 8px; }

/* ============================================================
   DETAIL GRID (Booking Details Page)
   ============================================================ */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.detail-item {}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.detail-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.modal-backdrop.show .modal { transform: scale(1) translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.modal-body { padding: 20px; }
.modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background-color: var(--bg-elevated);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    padding: 16px;
    position: relative;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: slideDown 0.4s ease;
}

.login-header-block {
    padding: 28px 28px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.login-logo-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.login-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.login-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
}

.login-body { padding: 24px 28px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.empty-state p { font-size: 0.8rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
    padding: 12px 20px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   SIDEBAR MOBILE OVERLAY
   ============================================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
}

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

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.fade-in { animation: fadeIn 0.3s ease; }

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-info      { color: var(--info) !important; }
.text-primary-brand { color: var(--primary) !important; }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-11  { font-size: 11px !important; }
.fs-12  { font-size: 12px !important; }

.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Large Tablet */
@media (max-width: 1280px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-row { grid-template-columns: 1fr; }
}

/* Tablet */
@media (max-width: 900px) {
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        left: calc(-1 * var(--sidebar-w));
        transition: left var(--transition), width var(--transition);
    }
    .sidebar.show-mobile { left: 0; }
    .main-content { margin-left: 0 !important; }

    .header { padding: 0 14px; }
    .content-wrapper { padding: 14px; }
    .metrics-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    .page-title { font-size: 0.875rem; }
    .user-chip-info { display: none; }

    .table { font-size: 0.75rem; }
    .table th, .table td { padding: 9px 12px; }

    .filter-grid { grid-template-columns: 1fr; }
    .filter-actions { flex-wrap: wrap; }

    .card-header { padding: 12px 14px; flex-wrap: wrap; }
    .card-body { padding: 14px; }

    .detail-grid { grid-template-columns: 1fr; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .metrics-grid { grid-template-columns: 1fr; gap: 8px; }
    .login-header-block { padding: 22px 20px 16px; }
    .login-body { padding: 20px; }
    .metric-card { padding: 12px; }
}

/* ============================================================
   SIDEBAR COLLAPSED — TOOLTIP LABELS
   ============================================================ */
.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 10px;
    position: relative;
}

.sidebar.collapsed .nav-link::after {
    content: attr(data-label);
    position: absolute;
    left: calc(var(--sidebar-coll) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-overlay);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 300;
}

.sidebar.collapsed .nav-link:hover::after { opacity: 1; }

/* ============================================================
   PAGINATION COMPONENT
   ============================================================ */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background-color: var(--bg-elevated);
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

.pg-btn:hover:not(.disabled):not(.active) {
    background-color: var(--bg-hover);
    border-color: var(--border);
    color: var(--text-primary);
}

.pg-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.pg-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pg-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 30px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Per-page selector */
.per-page-select {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.per-page-select select {
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 11px;
    padding: 2px 6px;
    outline: none;
    cursor: pointer;
}

@media (max-width: 480px) {
    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .pg-btn { min-width: 28px; height: 28px; font-size: 11px; }
}
