/* ==========================================================================
   RSU An-Nimah — Sistem Antrian Design System
   Emerald green palette | Outfit
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
    /* Primary / Brand — RSU An-Nimah emerald green */
    --c-primary:        #12b76a;
    --c-primary-hover:  #039855;
    --c-primary-active: #027a48;
    --c-primary-light:  #d1fae5;
    --c-primary-50:     #ecfdf5;

    /* Accent — An-Nimah gold (used sparingly on CTAs) */
    --c-accent:         #edc800;
    --c-accent-hover:   #d4b400;
    --c-accent-light:   #fefce8;

    /* Neutrals — slight warm tint toward green */
    --c-text:           #1a2231;
    --c-text-muted:     #64748b;
    --c-text-light:     #94a3b8;
    --c-surface:        #ffffff;
    --c-bg:             #f7faf8;
    --c-border:         #e2e8e4;
    --c-border-light:   #f1f5f2;

    /* Sidebar — An-Nimah dark navy */
    --c-sidebar-bg:     #1a2231;
    --c-sidebar-text:   #cbd5e1;
    --c-sidebar-hover:  #243044;
    --c-sidebar-active: rgba(18, 183, 106, 0.16);
    --c-sidebar-border: #243044;

    /* Semantic */
    --c-danger:         #DC2626;
    --c-danger-light:   #FEF2F2;
    --c-warning:        #F59E0B;
    --c-warning-light:  #FFFBEB;
    --c-success:        #10B981;
    --c-success-light:  #ECFDF5;
    --c-info:           #3B82F6;
    --c-info-light:     #EFF6FF;

    /* Status — queue specific */
    --c-status-menunggu:  #F59E0B;
    --c-status-dipanggil: #3B82F6;
    --c-status-dilayani:  #12b76a;
    --c-status-selesai:   #10B981;
    --c-status-batal:     #DC2626;
    --c-status-lewat:     #64748b;
    --c-status-dilewati:  #F59E0B;

    /* Typography — Outfit (matches RSU An-Nimah website) */
    --font-body:     'Outfit', system-ui, sans-serif;
    --font-heading:  'Outfit', var(--font-body);
    --text-xs:       0.75rem;
    --text-sm:       0.813rem;
    --text-base:     0.875rem;
    --text-md:       1rem;
    --text-lg:       1.125rem;
    --text-xl:       1.375rem;
    --text-2xl:      1.75rem;
    --text-3xl:      2.25rem;
    --text-hero:     2.75rem;
    --leading-tight: 1.25;
    --leading-normal: 1.5;

    /* Spacing */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --radius-sm:   4px;
    --radius:      8px;
    --radius-lg:   12px;
    --radius-xl:   16px;

    /* Shadows */
    --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow:      0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md:   0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg:   0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl:   0 20px 25px rgba(0, 0, 0, 0.1), 0 8px 10px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --duration-fast:   150ms;
    --duration-normal: 250ms;
    --duration-slow:   350ms;
    --ease-default:    cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--c-text);
    background: var(--c-bg);
    margin: 0;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--c-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--c-text-light);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) transparent;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--c-sidebar-bg);
    color: var(--c-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transition: transform var(--duration-normal) var(--ease-default);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: var(--space-5) var(--space-5);
    border-bottom: 1px solid var(--c-sidebar-border);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: var(--c-primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
    color: #F9FAFB;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.sidebar-brand-sub {
    font-size: var(--text-xs);
    color: var(--c-sidebar-text);
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) var(--space-3);
    overflow-y: auto;
}

.sidebar-section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-light);
    padding: var(--space-4) var(--space-3) var(--space-2);
    margin-top: var(--space-2);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--c-sidebar-text);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: background var(--duration-fast) var(--ease-default),
                color var(--duration-fast) var(--ease-default);
    position: relative;
    margin-bottom: 2px;
    white-space: nowrap;
}

.sidebar-link i {
    font-size: var(--text-md);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--c-sidebar-hover);
    color: #F9FAFB;
}

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

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: var(--c-primary);
    border-radius: 0 2px 2px 0;
}

.sidebar-footer {
    padding: var(--space-3) var(--space-3);
    border-top: 1px solid var(--c-sidebar-border);
    flex-shrink: 0;
}

.sidebar-footer .sidebar-link {
    color: var(--c-text-light);
}

.sidebar-footer .sidebar-link:hover {
    color: var(--c-danger);
    background: rgba(220, 38, 38, 0.1);
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    backdrop-filter: blur(2px);
}

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

/* Sidebar toggle (hamburger) */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--c-text);
    font-size: var(--text-xl);
    padding: var(--space-2);
    cursor: pointer;
    line-height: 1;
}

/* ==========================================================================
   Main Layout
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--duration-normal) var(--ease-default);
}

/* ---------- Top Bar ---------- */
.topbar {
    height: var(--topbar-height);
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.topbar-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
}

.topbar-date {
    font-size: var(--text-sm);
    color: var(--c-text-muted);
    white-space: nowrap;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--c-text);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--c-primary-light);
    color: var(--c-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 600;
}

/* ---------- Content Area ---------- */
.app-content {
    flex: 1;
    padding: var(--space-6);
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-normal) var(--ease-default);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: var(--space-4) var(--space-5);
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--c-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
    font-family: var(--font-heading);
}

.card-body {
    padding: var(--space-5);
}

.card-footer {
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: var(--space-4) var(--space-5);
}

/* ==========================================================================
   Stat Cards (Dashboard)
   ========================================================================== */
.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-normal) var(--ease-default),
                transform var(--duration-normal) var(--ease-default);
}

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

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
}

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

.stat-card-icon--warning {
    background: var(--c-warning-light);
    color: var(--c-warning);
}

.stat-card-icon--success {
    background: var(--c-success-light);
    color: var(--c-success);
}

.stat-card-icon--info {
    background: var(--c-info-light);
    color: var(--c-info);
}

.stat-card-icon--danger {
    background: var(--c-danger-light);
    color: var(--c-danger);
}

.stat-card-value {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--c-text);
}

.stat-card-label {
    font-size: var(--text-sm);
    color: var(--c-text-muted);
    margin-top: var(--space-1);
    font-weight: 500;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-top: var(--space-2);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
}

.stat-card-trend--up {
    background: var(--c-success-light);
    color: var(--c-success);
}

.stat-card-trend--down {
    background: var(--c-danger-light);
    color: var(--c-danger);
}

/* Dashboard grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-5);
}

/* ==========================================================================
   Tables
   ========================================================================== */
.table {
    margin: 0;
    font-size: var(--text-base);
}

.table thead th {
    background: var(--c-primary);
    color: #FFFFFF;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
    padding: var(--space-3) var(--space-4);
    white-space: nowrap;
    vertical-align: middle;
}

.table thead th:first-child {
    border-radius: var(--radius) 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 var(--radius) 0 0;
}

.table tbody td {
    padding: var(--space-3) var(--space-4);
    vertical-align: middle;
    border-bottom: 1px solid var(--c-border-light);
    color: var(--c-text);
}

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

.table tbody tr {
    transition: background var(--duration-fast) var(--ease-default);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--c-primary-50);
}

.table-striped tbody tr:nth-of-type(odd):hover {
    background: var(--c-primary-light);
}

.table tbody tr:hover {
    background: var(--c-primary-light);
}

.table .actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.table-empty {
    text-align: center;
    padding: var(--space-10) var(--space-4);
    color: var(--c-text-muted);
    font-size: var(--text-sm);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-sm);
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-4);
    transition: background var(--duration-fast) var(--ease-default),
                color var(--duration-fast) var(--ease-default),
                border-color var(--duration-fast) var(--ease-default),
                box-shadow var(--duration-fast) var(--ease-default),
                transform var(--duration-fast) var(--ease-default);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    border: 1px solid transparent;
    line-height: var(--leading-tight);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: var(--c-primary-hover);
    border-color: var(--c-primary-hover);
    color: #FFFFFF;
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.25);
}

.btn-primary.active {
    background: var(--c-primary-active);
    border-color: var(--c-primary-active);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.btn-outline-primary:hover {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #FFFFFF;
}

.btn-outline-primary:focus {
    box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.25);
}

.btn-danger {
    background: var(--c-danger);
    border-color: var(--c-danger);
    color: #FFFFFF;
}

.btn-danger:hover {
    background: #B91C1C;
    border-color: #B91C1C;
    color: #FFFFFF;
}

.btn-outline-danger {
    background: transparent;
    border-color: var(--c-danger);
    color: var(--c-danger);
}

.btn-outline-danger:hover {
    background: var(--c-danger);
    border-color: var(--c-danger);
    color: #FFFFFF;
}

.btn-success {
    background: var(--c-success);
    border-color: var(--c-success);
    color: #FFFFFF;
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    color: #FFFFFF;
}

.btn-warning {
    background: var(--c-warning);
    border-color: var(--c-warning);
    color: #FFFFFF;
}

.btn-warning:hover {
    background: #D97706;
    border-color: #D97706;
    color: #FFFFFF;
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--c-border);
    color: var(--c-text-muted);
}

.btn-outline-secondary:hover {
    background: var(--c-border-light);
    border-color: var(--c-border);
    color: var(--c-text);
}

.btn-sm {
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

.btn-lg {
    font-size: var(--text-md);
    padding: var(--space-3) var(--space-6);
}

.btn-icon {
    padding: var(--space-2);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
    padding: var(--space-1);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-label {
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--c-text);
    margin-bottom: var(--space-1);
}

.form-control,
.form-select {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--c-text);
    padding: var(--space-2) var(--space-3);
    transition: border-color var(--duration-fast) var(--ease-default),
                box-shadow var(--duration-fast) var(--ease-default);
    background-color: var(--c-surface);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.15);
    outline: none;
}

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

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--c-danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-text {
    font-size: var(--text-xs);
    color: var(--c-text-muted);
}

.invalid-feedback {
    font-size: var(--text-xs);
    color: var(--c-danger);
}

.input-group-text {
    background: var(--c-border-light);
    border-color: var(--c-border);
    color: var(--c-text-muted);
    font-size: var(--text-sm);
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.badge {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 3px var(--space-2);
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.badge-menunggu {
    background: var(--c-warning-light);
    color: #B45309;
}

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

.badge-dilayani {
    background: var(--c-primary-light);
    color: var(--c-primary-active);
}

.badge-dilewati {
    background: var(--c-warning-light);
    color: #B45309;
}

.badge-selesai {
    background: var(--c-success-light);
    color: #047857;
}

.badge-batal {
    background: var(--c-danger-light);
    color: var(--c-danger);
}

.badge-lewat {
    background: #F3F4F6;
    color: #4B5563;
}

/* Dot variant for badges */
.badge-dot {
    position: relative;
    padding-left: var(--space-4);
}

.badge-dot::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-menunggu.badge-dot::before  { background: var(--c-status-menunggu); }
.badge-dipanggil.badge-dot::before { background: var(--c-status-dipanggil); }
.badge-dilayani.badge-dot::before  { background: var(--c-status-dilayani); }
.badge-selesai.badge-dot::before   { background: var(--c-status-selesai); }
.badge-batal.badge-dot::before     { background: var(--c-status-batal); }
.badge-lewat.badge-dot::before     { background: var(--c-status-lewat); }
.badge-dilewati.badge-dot::before  { background: var(--c-status-dilewati); }

/* Override Bootstrap defaults */
.bg-primary   { background-color: var(--c-primary) !important; }
.bg-success   { background-color: var(--c-success) !important; }
.bg-warning   { background-color: var(--c-warning) !important; }
.bg-danger    { background-color: var(--c-danger) !important; }
.bg-info      { background-color: var(--c-info) !important; }
.text-primary { color: var(--c-primary) !important; }
.text-success { color: var(--c-success) !important; }
.text-warning { color: var(--c-warning) !important; }
.text-danger  { color: var(--c-danger) !important; }
.text-muted   { color: var(--c-text-muted) !important; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb {
    font-size: var(--text-sm);
    margin-bottom: var(--space-4);
    padding: 0;
    background: none;
}

.breadcrumb-item a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-default);
}

.breadcrumb-item a:hover {
    color: var(--c-primary-hover);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--c-text-muted);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '\203A';
    color: var(--c-text-light);
    font-weight: 600;
}

/* ==========================================================================
   Alerts / Notifications
   ========================================================================== */
.alert {
    font-size: var(--text-sm);
    border-radius: var(--radius);
    border: 1px solid transparent;
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert i {
    font-size: var(--text-md);
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-success {
    background: var(--c-success-light);
    border-color: #A7F3D0;
    color: #065F46;
}

.alert-danger {
    background: var(--c-danger-light);
    border-color: #FECACA;
    color: #991B1B;
}

.alert-warning {
    background: var(--c-warning-light);
    border-color: #FDE68A;
    color: #92400E;
}

.alert-info {
    background: var(--c-info-light);
    border-color: #BFDBFE;
    color: #1E40AF;
}

.alert-dismissible .btn-close {
    padding: var(--space-3);
}

/* ==========================================================================
   Page Title
   ========================================================================== */
.page-header {
    margin-bottom: var(--space-6);
}

.page-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--c-text);
    margin: 0 0 var(--space-1);
    line-height: var(--leading-tight);
}

.page-subtitle {
    font-size: var(--text-sm);
    color: var(--c-text-muted);
    margin: 0;
}

/* ==========================================================================
   Utility / Transition Classes
   ========================================================================== */
.fade-in {
    animation: fadeIn var(--duration-normal) var(--ease-out);
}

.slide-up {
    animation: slideUp var(--duration-normal) var(--ease-out);
}

.slide-in-left {
    animation: slideInLeft var(--duration-normal) var(--ease-out);
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.6; }
}

/* Queue number glow effect */
.queue-glow {
    animation: queueGlow 1.5s ease-in-out infinite alternate;
}

@keyframes queueGlow {
    from {
        text-shadow: 0 0 8px rgba(18, 183, 106, 0.35);
    }
    to {
        text-shadow: 0 0 20px rgba(18, 183, 106, 0.65), 0 0 40px rgba(18, 183, 106, 0.25);
    }
}

/* Truncate text */
.text-truncate-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Pagination Override
   ========================================================================== */
.pagination .page-link {
    font-size: var(--text-sm);
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    padding: var(--space-2) var(--space-3);
    transition: background var(--duration-fast) var(--ease-default),
                color var(--duration-fast) var(--ease-default),
                border-color var(--duration-fast) var(--ease-default);
}

.pagination .page-link:hover {
    background: var(--c-primary-light);
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.pagination .page-item.active .page-link {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #FFFFFF;
}

.pagination .page-item.disabled .page-link {
    color: var(--c-text-light);
    background: var(--c-surface);
    border-color: var(--c-border);
}

/* ==========================================================================
   Modal Override
   ========================================================================== */
.modal-content {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--c-border);
    padding: var(--space-4) var(--space-5);
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-lg);
}

.modal-body {
    padding: var(--space-5);
}

.modal-footer {
    border-top: 1px solid var(--c-border);
    padding: var(--space-4) var(--space-5);
}

/* ==========================================================================
   Dropdown Override
   ========================================================================== */
.dropdown-menu {
    font-size: var(--text-sm);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: var(--space-2);
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    color: var(--c-text);
    transition: background var(--duration-fast) var(--ease-default);
}

.dropdown-item:hover {
    background: var(--c-primary-light);
    color: var(--c-primary);
}

.dropdown-item.active {
    background: var(--c-primary-light);
    color: var(--c-primary);
}

/* ==========================================================================
   Tooltip Override
   ========================================================================== */
.tooltip-inner {
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: var(--space-1) var(--space-2);
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

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

    .sidebar-toggle {
        display: flex;
    }

    .stat-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .app-content {
        padding: var(--space-4);
    }

    .topbar {
        padding: 0 var(--space-4);
    }
}

@media (max-width: 575.98px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-3);
    }

    .topbar-title {
        font-size: var(--text-lg);
    }

    .topbar-date {
        display: none;
    }

    .table-responsive {
        font-size: var(--text-sm);
    }
}
