:root {
    --navy: #1a2744;
    --navy-light: #243352;
    --navy-dark: #111c33;
    --accent: #4a90d9;
    --accent-light: #6ba3e0;
    --accent-soft: #e8f0fb;
    --white: #ffffff;
    --gray-50: #f8f9fc;
    --gray-100: #eef1f6;
    --gray-200: #dde2eb;
    --gray-400: #9aa5b4;
    --gray-600: #5a6577;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --base-font-size: 0.8125rem; /* 13px - comfortable compact size */
}

* { box-sizing: border-box; }

body {
    font-family: var(--font);
    font-size: var(--base-font-size);
    background: var(--gray-50);
    color: var(--navy);
    margin: 0;
    line-height: 1.5;
}

/* Sidebar */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--navy);
    color: var(--white);
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}
.sidebar-brand img { height: 24px; margin-right: 8px; }
.sidebar-user {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user .name { font-size: 0.8125rem; font-weight: 500; }
.sidebar-user .badge-role {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 600;
    background: var(--accent);
    color: var(--white);
    margin-top: 3px;
}
.sidebar .nav { padding: 0.5rem 0; flex: 1; }
.sidebar .nav-link {
    color: rgba(255,255,255,0.6);
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    transition: all 0.15s;
}
.sidebar .nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.sidebar .nav-link.active {
    color: var(--white);
    background: var(--accent);
    font-weight: 500;
}
.sidebar .nav-link i { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer a { color: rgba(255,255,255,0.5); font-size: 0.75rem; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.sidebar-footer a:hover { color: var(--danger); }

/* Main content */
.main-content { flex: 1; min-width: 0; padding: 1.5rem; }

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(26,39,68,0.06);
    background: var(--white);
}
.card-body { padding: 1.25rem; }

/* Stat cards */
.stat-card { border-left: 3px solid var(--accent); }
.stat-card .stat-icon { font-size: 1.5rem; color: var(--accent); opacity: 0.7; }
.stat-card .stat-value { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.stat-card .stat-label { font-size: 0.6875rem; color: var(--gray-400); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

/* Tables */
.table { font-size: 0.8125rem; margin-bottom: 0; }
.table thead th {
    background: var(--navy);
    color: var(--white);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: none;
    padding: 0.625rem 0.75rem;
}
.table tbody td { 
    padding: 0.625rem 0.75rem; 
    vertical-align: middle; 
    border-color: var(--gray-100); 
}
.table-hover tbody tr:hover { background: var(--gray-50); }
.table .btn-sm { 
    padding: 0.25rem 0.5rem; 
    font-size: 0.75rem; 
}

/* Buttons */
.btn { font-size: 0.8125rem; padding: 0.4rem 0.875rem; }
.btn-sm { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
.btn-lg { font-size: 0.875rem; padding: 0.5rem 1rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); border-radius: 6px; font-weight: 500; }
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-outline-primary { color: var(--accent); border-color: var(--accent); border-radius: 6px; }
.btn-outline-primary:hover { background: var(--accent); color: var(--white); }
.btn-outline-secondary { border-radius: 6px; }
.btn-success { background: var(--success); border-color: var(--success); border-radius: 6px; }
.btn-danger { background: var(--danger); border-color: var(--danger); border-radius: 6px; }
.btn-outline-danger { border-radius: 6px; }
.btn-warning { background: var(--warning); border-color: var(--warning); border-radius: 6px; color: var(--white); }
.btn-warning:hover { color: var(--white); }

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border-color: var(--gray-200);
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(74,144,217,0.12);
}
.form-label { font-weight: 500; font-size: 0.75rem; color: var(--navy); margin-bottom: 0.25rem; }
.form-text { font-size: 0.6875rem; }
.form-check-label { font-size: 0.8125rem; }
.form-check-input { margin-top: 0.2rem; }

/* Badges */
.badge { border-radius: 20px; font-weight: 500; font-size: 0.6875rem; padding: 3px 10px; }

/* Alerts */
.alert { border-radius: 8px; border: none; font-size: 0.8125rem; padding: 0.75rem 1rem; }
.alert-success { background: #e8f8f0; color: #1a7a4c; }
.alert-danger { background: #fdecea; color: #a93226; }
.alert-warning { background: #fef5e7; color: #9a6700; }
.alert-info { background: var(--accent-soft); color: var(--navy); }

/* Page header */
.page-header { margin-bottom: 1rem; }
.page-header h2 { font-weight: 700; font-size: 1.25rem; color: var(--navy); margin: 0; }
.page-header h4 { font-weight: 700; font-size: 1.125rem; color: var(--navy); margin: 0; }

/* Modals */
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-body { font-size: 0.8125rem; }
.modal-header { padding: 0.875rem 1rem; }
.modal-body { padding: 1rem; }
.modal-footer { padding: 0.75rem 1rem; }

/* Public pages */
.public-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--accent-soft) 100%);
    padding: 1rem;
}
.public-card {
    max-width: 480px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(26,39,68,0.08);
    background: var(--white);
}
.public-card .card-body { padding: 1.5rem; }
.public-card .brand-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.public-card .brand-header img { height: 48px; }
.public-card .brand-header h4 {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--navy);
    margin: 0.5rem 0 0;
}
.public-card .brand-header p {
    color: var(--gray-400);
    font-size: 0.75rem;
    margin: 0.25rem 0 0;
}

/* Queue display */
.queue-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

/* Small text utilities */
.small, small { font-size: 0.75rem; }
.text-muted { color: var(--gray-600) !important; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; min-height: auto; }
    .d-flex.admin-layout { flex-direction: column; }
    .main-content { padding: 1rem; }
}

/* DataTables styling */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    font-size: 0.75rem;
    margin-bottom: 0.625rem;
}
.dataTables_wrapper .dataTables_length select {
    padding: 0.25rem 1.5rem 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}
.dataTables_wrapper .dataTables_filter input {
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--gray-200);
    font-size: 0.75rem;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(74,144,217,0.12);
}
.dataTables_wrapper .dataTables_info {
    font-size: 0.6875rem;
    color: var(--gray-600);
    padding-top: 0.5rem;
}
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.5rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 4px !important;
    margin: 0 1px;
    padding: 0.2rem 0.5rem !important;
    font-size: 0.6875rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: white !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--accent-soft) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}
