/* ============================================
   INSPIRE AMS — COMPLETE DESIGN SYSTEM
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --sidebar-bg: #0f0c29;
    --sidebar-hover: rgba(99, 102, 241, 0.15);
    --sidebar-active-border: #6366f1;
    --content-bg: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --info: #2563eb;
    --info-bg: #dbeafe;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow: 0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
    --radius: 16px;
    --radius-sm: 10px;
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--content-bg);
    color: var(--text-main);
    overflow: hidden;
    font-size: 14px;
}

.hidden { display: none !important; }
.muted   { color: var(--text-muted); }

/* ── Colour utilities ── */
.text-success { color: var(--success) !important; font-weight: 600; }
.text-danger  { color: var(--danger)  !important; font-weight: 600; }
.text-warning { color: var(--warning) !important; font-weight: 600; }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.font-600     { font-weight: 600; }
.font-700     { font-weight: 700; }

/* ── Spacing helpers ── */
.mt-2  { margin-top:  8px;  }
.mt-3  { margin-top:  12px; }
.mt-4  { margin-top:  20px; }
.mb-4  { margin-bottom: 20px; }
.sm    { font-size: 12px; }
.xs    { font-size: 11px; }

/* ── Icon-only button ── */
.icon-btn {
    width: 38px; height: 38px;
    border: 1.5px solid var(--border);
    background: white; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}
.icon-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.icon-btn i, .icon-btn svg { width: 16px; height: 16px; }

/* ── Small variant for buttons ── */
.btn-sm { padding: 7px 14px !important; font-size: 13px !important; gap: 6px !important; }
.btn-sm i { width: 14px; height: 14px; }

/* ── Card & grid helpers (used in details pages) ── */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.grid { display: grid; gap: 24px; }
.col-2 { grid-column: span 2; }
.col-3 { grid-template-columns: repeat(3, 1fr); }

/* ── Timeline (used in enquiry/admission details) ── */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { display: flex; gap: 16px; }
.timeline-date { min-width: 90px; text-align: right; padding-top: 2px; }
.timeline-date strong { font-size: 13px; font-weight: 700; color: var(--text-main); }
.timeline-content {
    flex: 1; background: #f8fafc; border-radius: 12px;
    padding: 12px 16px; border-left: 3px solid var(--primary); font-size: 13px;
}
.timeline-content p { color: var(--text-muted); margin-top: 4px; font-size: 13px; }
.next-date { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--primary); margin-top: 6px; font-weight: 500; }
.next-date i { width: 12px; height: 12px; }

/* ── Back link ── */
.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--primary); text-decoration: none;
    font-size: 13px; font-weight: 600;
}
.back-link:hover { text-decoration: underline; }

/* ── Animate in ── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeSlideUp 0.35s ease-out both; }

/* ── Info list (detail pages) ── */
.info-list  { display: flex; flex-direction: column; }
.info-item  { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-item:last-child { border-bottom: none; }
.info-item label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }


/* ============================================
   AUTH PAGES
   ============================================ */

body.auth-body {
    overflow: auto;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    display: flex;
    width: min(940px, 94vw);
    min-height: 560px;
    background: white;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-left {
    width: 42%;
    background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #6366f1 100%);
    padding: 52px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
}

.auth-brand { display: flex; flex-direction: column; gap: 12px; }
.brand-logo-img {
    height: 64px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}
.brand-logo {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}
.brand-logo i { width: 28px; height: 28px; }
.auth-brand h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.auth-brand p { color: rgba(255,255,255,0.7); font-size: 14px; }

.auth-features { display: flex; flex-direction: column; gap: 16px; }
.feature-item { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.85); font-size: 14px; }
.feature-item i { color: #a5b4fc; width: 18px; flex-shrink: 0; }

.auth-right {
    flex: 1;
    padding: 52px 48px;
    display: flex;
    align-items: center;
}

.auth-form-container { width: 100%; }
.auth-form-header { margin-bottom: 32px; }
.auth-form-header h2 { font-size: 28px; font-weight: 700; color: var(--text-main); }
.auth-form-header p { color: var(--text-muted); margin-top: 6px; }

.alert-box {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
}
.alert-error { background: var(--danger-bg); color: var(--danger); }

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-main); }

.input-wrapper {
    display: flex; align-items: center; gap: 10px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}
.input-wrapper .input-icon { color: var(--text-light); width: 16px; flex-shrink: 0; }
.input-wrapper input {
    border: none; outline: none; background: transparent;
    flex: 1; font-size: 14px; color: var(--text-main);
}
.toggle-pass { background: none; border: none; cursor: pointer; color: var(--text-light); }

.submit-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; border: none; padding: 14px;
    border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600;
    cursor: pointer; position: relative;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99,102,241,0.4); }
.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.auth-footer { margin-top: 24px; font-size: 12px; color: var(--text-muted); text-align: center; }


/* ============================================
   APP LAYOUT
   ============================================ */

.app-container { display: flex; height: 100vh; width: 100%; max-width: 100vw; overflow: hidden; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex; flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.sidebar nav::-webkit-scrollbar { width: 4px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.logo {
    display: flex; align-items: center; gap: 12px;
    padding: 24px 20px;
    font-weight: 800; font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.logo img {
    height: 44px;
    width: auto;
    object-fit: contain;
}
.logo-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}

.sidebar nav .nav-section {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255,255,255,0.25);
    padding: 10px 6px 4px;
    letter-spacing: 1px;
}
.sidebar nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; color: rgba(255,255,255,0.55);
    text-decoration: none; font-size: 13px; font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.sidebar nav a i { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar nav a:hover { color: white; background: var(--sidebar-hover); }
.sidebar nav a.active {
    color: white;
    background: rgba(99, 102, 241, 0.2);
    border-left: 3px solid var(--sidebar-active-border);
}

/* Report Cards */
.report-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.report-card {
    background: white;
    padding: 32px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.report-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.report-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
/* Nav Group Sub-menus */
.nav-group {
    margin-bottom: 4px;
}
.nav-group-header {
    display: flex;
    align-items: center;
    padding: 9px 10px;
    color: rgba(255,255,255,0.55);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    gap: 12px;
}
.nav-group-header:hover {
    color: white;
    background: var(--sidebar-hover);
}
.nav-group-header i:first-child { width: 18px; height: 18px; flex-shrink: 0; }
.nav-group-header span { flex: 1; }
.nav-group-header .arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.25s;
    flex-shrink: 0;
}
.nav-group.expanded .nav-group-header { color: white; }
.nav-group.expanded .arrow { transform: rotate(180deg); }

.nav-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 30px;
}
.nav-group.expanded .nav-group-items { max-height: 200px; }
.nav-group-items a {
    display: flex;
    padding: 7px 10px 7px 12px !important;
    font-size: 12.5px !important;
    border-radius: 8px;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 2px !important;
}
.nav-group-items a:hover { color: white; background: var(--sidebar-hover); }
.nav-group-items a.active {
    color: #a5b4fc !important;
    background: rgba(99,102,241,0.15) !important;
    border-left: 2px solid var(--primary);
}
.report-icon i { width: 32px; height: 32px; }
.report-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.report-card p { font-size: 13.5px; color: var(--text-muted); }


.user-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.user-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: white;
    flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-info .name { display: block; font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .role { display: block; font-size: 11px; color: rgba(255,255,255,0.4); }
.logout-btn {
    background: none; border: none; color: rgba(255,255,255,0.4);
    cursor: pointer; padding: 6px; border-radius: 8px;
    display: flex; align-items: center;
    transition: all 0.2s;
}
.logout-btn:hover { color: white; background: rgba(255,255,255,0.1); }

/* CONTENT AREA */
.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
    max-width: calc(100vw - var(--sidebar-width));
    padding: 28px 32px;
    display: flex; flex-direction: column; gap: 24px;
}

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; }
.page-title { font-size: 24px; font-weight: 700; color: var(--text-main); }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* Buttons */
.primary-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; border: none; padding: 10px 20px;
    border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all 0.2s;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.35); }
.primary-btn i { width: 16px; height: 16px; }

.secondary-btn {
    background: white; color: var(--text-main); border: 1.5px solid var(--border);
    padding: 10px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background 0.2s;
}
.secondary-btn:hover { background: #f8fafc; }

/* ============================================
   STAT CARDS
   ============================================ */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: default;
}
.stat-card.skeleton-card { min-height: 88px; }

.stat-card .icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-card .icon i { width: 24px; height: 24px; }
.icon.blue { background: var(--info-bg); color: var(--info); }
.icon.purple { background: #f3e8ff; color: #9333ea; }
.icon.green { background: var(--success-bg); color: var(--success); }
.icon.orange { background: #ffedd5; color: #ea580c; }

.stat-card h3 { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-card p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ============================================
   TABLES & CARDS
   ============================================ */

.table-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.section-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}
.section-header h2 { font-size: 16px; font-weight: 600; }
.section-header a { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; }

.data-table { width: 100%; border-collapse: collapse; min-width: 1000px; }
.data-table th {
    text-align: left; padding: 14px 16px;
    color: var(--text-muted); font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    position: sticky; top: 0; z-index: 5;
}
.data-table td {
    padding: 14px 16px; font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
    white-space: nowrap;
}
.data-table td:last-child { min-width: 140px; } /* Ensure space for 3 buttons */

.data-table tbody tr {
    animation: slideInRow 0.3s ease-out backwards;
}
.data-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.data-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.data-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.data-table tbody tr:nth-child(n+6) { animation-delay: 0.3s; }

@keyframes slideInRow {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }
.data-table tr.selected td { background: var(--primary-light); }

/* Enquiry table column helper */
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Staff tag base (enquiry-module overrides add .assigned/.unassigned) */
.staff-tag {
    display: inline-flex; align-items: center;
    padding: 4px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
    background: #f1f5f9; color: var(--primary);
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    vertical-align: middle;
}
input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
input[type="checkbox"]:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.overdue-row td {
    background-color: #fff1f2 !important;
}
.overdue-row:hover td {
    background-color: #ffe4e6 !important;
}

/* ============================================
   TOOLBAR & SEARCH
   ============================================ */
   
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filters-bar {
    padding: 24px;
    background: white;
    border-radius: var(--radius);
}

.form-grid {
    display: grid;
    gap: 20px;
}

.flex-end {
    display: flex;
    align-items: flex-end;
}



.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    padding: 10px 16px;
    border-radius: 12px;
    width: 320px;
    transition: all 0.2s;
}
.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
    background: white;
}
.search-bar i { color: var(--text-light); width: 18px; }
.search-bar input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; }

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-group select, .filter-group input {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-size: 13.5px;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s;
}
.filter-group select:hover, .filter-group input:hover { border-color: var(--text-light); }
.filter-group select:focus, .filter-group input:focus { border-color: var(--primary); background: white; }

/* Status Badge in select */
.inline-status-select {
    border: none !important;
    background: #f1f5f9 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
    border-radius: 20px !important;
    width: auto !important;
    cursor: pointer;
}

.total-count { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Status tabs */
.status-tabs { display: flex; gap: 8px; background: white; padding: 6px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); width: fit-content; }
.tab-btn { padding: 7px 16px; border: none; background: none; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-muted); transition: all 0.2s; }
.tab-btn:hover { background: var(--primary-light); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: white; }

/* ============================================
   LOADING / EMPTY STATES
   ============================================ */

.loading-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 48px; color: var(--text-muted);
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.empty-state {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 56px 24px; color: var(--text-muted);
}
.empty-state i { width: 40px; height: 40px; opacity: 0.4; }
.empty-state p { font-size: 16px; font-weight: 600; color: var(--text-main); }
.empty-state span { font-size: 13px; }

/* Skeleton */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ============================================
   STUDENT / ADMISSION TABLE ITEMS
   ============================================ */

.student-info { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}

.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.status-badge.success { background: var(--success-bg); color: var(--success); }
.status-badge.warning { background: var(--warning-bg); color: var(--warning); }
.status-badge.danger { background: var(--danger-bg); color: var(--danger); }
.status-badge.info { background: var(--info-bg); color: var(--info); }

.adm-no { font-family: monospace; font-size: 12px; color: var(--primary); background: var(--primary-light); padding: 4px 10px; border-radius: 6px; font-weight: 600; }
.fee-total { font-weight: 700; color: var(--text-main); }
.fee-discount { color: var(--success); font-size: 11px; font-weight: 600; }

/* Action buttons */
.action-group { display: flex; gap: 8px; align-items: center; }
.icon-action-btn {
    width: 36px; height: 36px;
    border-radius: 12px; border: 1.5px solid var(--border);
    background: white; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    flex-shrink: 0;
}
.icon-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.icon-action-btn i { width: 16px; height: 16px; }
.icon-action-btn.edit:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.icon-action-btn.delete:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.icon-action-btn.approve:hover { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.icon-action-btn.reject:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.icon-action-btn.info:hover { background: var(--info-bg); border-color: var(--info); color: var(--info); }

/* Pagination */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: flex-end; padding: 16px; }
.page-btn {
    min-width: 32px; height: 32px; padding: 0 8px;
    border: 1.5px solid var(--border); background: white;
    border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
    transition: all 0.2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ============================================
   MODAL & FORMS (PREMIUM REDESIGN)
   ============================================ */

.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-container {
    background: white;
    border-radius: 28px;
    width: min(820px, 94vw);
    max-height: 90vh;
    display: flex;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sideheader {
    width: 240px;
    background: linear-gradient(160deg, #1e1b4b 0%, #312e81 60%, #6366f1 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
    color: white;
    position: relative;
}

.modal-sideheader h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; margin-top: 20px; }
.modal-sideheader p { color: rgba(255,255,255,0.7); font-size: 14px; margin-top: 12px; }
.modal-sideheader .header-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}
.modal-sideheader .header-icon i { width: 28px; height: 28px; }

.modal-main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close-abs {
    position: absolute;
    top: 24px; right: 24px;
    background: #f1f5f9;
    border: none; border-radius: 12px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted);
    transition: all 0.2s;
    z-index: 10;
}
.modal-close-abs:hover { background: var(--danger-bg); color: var(--danger); transform: rotate(90deg); }

.modal-body { flex: 1; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 20px;
}
.form-full { grid-column: span 2; }

.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label {
    font-size: 11px;
    font-weight: 750;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.modal-footer {
    padding-top: 32px;
    display: flex; justify-content: flex-end; gap: 12px;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   DASHBOARD GRID & QUICK ACTIONS
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
}

.quick-action-list { display: flex; flex-direction: column; }
.quick-action-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 20px; text-decoration: none; color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}
.quick-action-item:last-child { border-bottom: none; }
.quick-action-item:hover { background: #f8fafc; }
.qa-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.quick-action-item.blue .qa-icon { background: var(--info-bg); color: var(--info); }
.quick-action-item.purple .qa-icon { background: #f3e8ff; color: #9333ea; }
.quick-action-item.green .qa-icon { background: var(--success-bg); color: var(--success); }
.quick-action-item.orange .qa-icon { background: #ffedd5; color: #ea580c; }
.qa-icon i { width: 20px; height: 20px; }
.quick-action-item > div { flex: 1; }
.quick-action-item strong { display: block; font-size: 13.5px; font-weight: 600; }
.quick-action-item p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.qa-arrow { width: 16px; color: var(--text-light); }

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast {
    position: fixed; bottom: 28px; right: 28px;
    display: flex; align-items: center; gap: 10px;
    background: var(--text-main); color: white;
    padding: 14px 20px; border-radius: 14px;
    font-size: 14px; font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999; transform: translateY(20px);
    opacity: 0; transition: all 0.3s;
    max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #166534; }
.toast-error { background: #991b1b; }
.toast i { width: 18px; flex-shrink: 0; }

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes animate-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: animate-in 0.4s ease both; }

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-stats { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { width: 70px; }
    .sidebar .logo span, .sidebar nav a span, .user-info, .logo-icon { display: none; }
    .content { padding: 20px 16px; }
    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    .auth-left { display: none; }
    .auth-container { max-width: 460px; }
    .auth-right { padding: 36px 28px; }
}
/* ============================================
   TABS & UTILITIES
   ============================================ */

.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--border); padding-bottom: 2px; }
.tabs .tab-btn { border-radius: 0; border-bottom: 2px solid transparent; padding: 10px 20px; font-weight: 600; color: var(--text-muted); }
.tabs .tab-btn:hover { background: transparent; color: var(--primary); }
.tabs .tab-btn.active { border-bottom-color: var(--primary); color: var(--primary); background: transparent; }

.mt-4 { margin-top: 24px; }
.mt-2 { margin-top: 8px; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.icon-sm { width: 14px; height: 14px; }
.sm-font { font-size: 12px; }
.font-600 { font-weight: 600; }

.grid { display: grid; gap: 20px; }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.col-2 { grid-column: span 2; }

/* Timeline */
.timeline { position: relative; padding-left: 32px; border-left: 2px solid var(--border); margin-left: 8px; }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item::before {
    content: ''; position: absolute; left: -39px; top: 0;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--primary); border: 2px solid white; box-shadow: 0 0 0 4px var(--primary-light);
}
.timeline-date { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin-bottom: 6px; }
.timeline-content { background: #f8fafc; padding: 14px; border-radius: 12px; border: 1.5px solid var(--border); }
.timeline-content p { font-size: 13px; color: var(--text-main); margin-top: 4px; }
.next-date { font-size: 11px; font-weight: 600; color: var(--primary); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }

/* Info List */
.info-list { display: flex; flex-direction: column; gap: 14px; }
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-item label { font-size: 11px; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.info-item span { font-size: 14px; font-weight: 500; color: var(--text-main); }

.back-link { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--text-muted); font-size: 13px; font-weight: 500; transition: color 0.2s; }
.back-link:hover { color: var(--primary); }
.back-link i { width: 14px; }

.primary-btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.primary-btn.sm i { width: 14px; }

.contact-info { display: flex; flex-direction: column; gap: 2px; }
.contact-info span { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.contact-info i { opacity: 0.5; }
.muted.sm { font-size: 12px; }

/* Card (generic) */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

/* Filter row */
.filter-group { display: flex; gap: 10px; align-items: center; }
.filter-group select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    background: white;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.filter-group select:focus { border-color: var(--primary); }

/* icon-action-btn info */
.icon-action-btn.info:hover { background: var(--info-bg); border-color: var(--info); color: var(--info); }

/* ============================================
   MISSING UTILITIES & COMPONENTS
   ============================================ */

/* Form Utilities */
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-family: inherit;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    color: var(--text-main);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: white;
}
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px !important;
    flex-wrap: wrap;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    flex: 1;
    min-width: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: white;
}
.search-box i { color: var(--text-light); width: 16px; flex-shrink: 0; }
.search-box input {
    border: none; outline: none;
    flex: 1; font-size: 13.5px;
    background: transparent; color: var(--text-main);
}

/* Icon Buttons */
.icon-btn {
    width: 32px; height: 32px;
    border-radius: 8px; border: 1.5px solid var(--border);
    background: white; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    color: var(--text-muted);
    text-decoration: none;
}
.icon-btn i { width: 14px; height: 14px; }
.icon-btn.blue:hover { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.icon-btn.red:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.icon-btn.purple:hover { background: #f3e8ff; border-color: #9333ea; color: #9333ea; }
.icon-btn.green:hover { background: var(--success-bg); border-color: var(--success); color: var(--success); }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; }
.badge-outline { background: var(--primary-light); color: var(--primary); border: 1px solid rgba(99,102,241,0.2); }

/* Button Sizes */
.btn-sm { padding: 5px 12px !important; font-size: 12px !important; }

/* Spacing */
.mb-4 { margin-bottom: 24px; }
.mb-2 { margin-bottom: 8px; }
.fw-600 { font-weight: 600; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* Header Actions */
.header-actions { display: flex; gap: 10px; align-items: center; }

/* ============================================
   TABBED MODAL & PRODUCT COMPONENTS
   ============================================ */

.modal-tabs-nav {
    margin-top: 32px;
    display: flex; flex-direction: column; gap: 8px;
}

.nav-tab {
    background: transparent; border: none;
    padding: 12px 16px; border-radius: 14px;
    display: flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,0.65);
    font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.2s;
    width: 100%; text-align: left;
}
.nav-tab i { width: 18px; height: 18px; opacity: 0.7; }
.nav-tab:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-tab.active { background: white; color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.nav-tab.active i { opacity: 1; }

.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease; }

/* Specification Cards */
.spec-cards-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; margin-top: 10px;
}
.spec-card {
    background: #f8fafc; border: 1.5px solid #e2e8f0;
    border-radius: 16px; padding: 20px;
    position: relative; transition: all 0.2s;
}
.spec-card:hover { border-color: var(--primary); background: white; transform: translateY(-2px); box-shadow: var(--shadow); }
.spec-card h5 { font-size: 15px; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.spec-card .spec-meta { font-size: 12px; color: var(--text-light); }
.spec-card .spec-actions {
    position: absolute; top: 16px; right: 16px;
    display: flex; gap: 6px;
}

.section-header h4 { display: flex; align-items: center; gap: 8px; }

/* Clear redundant modal definitions at the end */
.modal.hidden { display: none !important; }
.modal-overlay.hidden { display: none !important; }

/* Fee Card Adjustments */
.fee-summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.fee-summary-row:last-child { border-bottom: none; font-weight: 600; font-size: 15px; }

/* ============================================
   USER MANAGEMENT
   ============================================ */

/* Inactive table row */
.row-inactive td { opacity: 0.55; }
.row-inactive:hover td { opacity: 0.75; }

/* Role badges */
.role-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.role-SUPER_ADMIN { background: #fdf2f8; color: #a21caf; }
.role-ADMIN       { background: #eff6ff; color: #1d4ed8; }
.role-SALES_MANAGEMENT    { background: #f0fdf4; color: #15803d; }
.role-ORDER_MANAGEMENT    { background: #fff7ed; color: #c2410c; }
.role-ENQUIRY_MANAGEMENT  { background: #f0f9ff; color: #0369a1; }
.role-CLERK       { background: #f8fafc; color: #475569; }

/* Status dot */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.status-dot.active   { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.status-dot.inactive { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }

/* Warning action button */
.icon-action-btn.warning { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.icon-action-btn.warning:hover { background: #c2410c; color: white; }

/* Stat cards row  */
.stats-grid { display: grid; gap: 16px; }
.stat-card {
    background: white; border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 16px;
    border: 1px solid var(--border);
}
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon i { width: 20px; height: 20px; }
.stat-value { font-size: 24px; font-weight: 800; line-height: 1; color: var(--text-main); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* Filter row search bar */
.filter-row .search-bar { flex: 1; min-width: 200px; }

/* Temp password reveal box */
.temp-pw-box {
    background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px;
    padding: 14px 18px; margin-top: 16px;
}
.temp-pw-box .pw-label { font-size: 12px; color: #15803d; font-weight: 600; margin-bottom: 4px; }
.temp-pw-box .pw-value { font-family: monospace; font-size: 20px; font-weight: 700; color: #166534; letter-spacing: 2px; }

/* Permission matrix role tabs */
.role-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.role-tab {
    padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600;
    border: 2px solid var(--border); background: white; cursor: pointer; transition: all 0.2s;
    color: var(--text-muted);
}
.role-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.role-tab:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* Permission matrix table */
.matrix-wrapper { overflow-x: auto; }
.matrix-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.matrix-table th, .matrix-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: center; }
.matrix-table th { background: #f8fafc; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.matrix-table td:first-child { text-align: left; font-weight: 600; }
.matrix-table tr:hover td { background: #f8fafc; }
.matrix-table thead tr:nth-child(2) td { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-light) !important; }
.perm-check { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.module-icon {
    width: 26px; height: 26px; background: var(--primary-light); color: var(--primary);
    border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
    margin-right: 8px; vertical-align: middle;
}
.module-icon i { width: 13px; height: 13px; }
.matrix-actions { display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 16px 20px; }
.role-desc { padding: 10px 16px; background: #f8fafc; border-radius: 10px; margin-bottom: 16px; font-size: 13px; color: var(--text-muted); border: 1px solid var(--border); }
.role-desc strong { color: var(--text-main); }
.legend { display: flex; gap: 18px; align-items: center; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; flex-wrap: wrap; }


/* ============================================
   ENQUIRY MODULE STYLES
   ============================================ */

/* Overdue row highlight */
.overdue-row td { background: #fff7f7 !important; }
.overdue-row:hover td { background: #fee2e2 !important; }

/* Inline status select in table */
.inline-status-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 12px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    color: var(--text-main);
    max-width: 160px;
    outline: none;
    transition: border-color 0.2s;
}
.inline-status-select:focus { border-color: var(--primary); }

/* Staff tag in table */
.staff-tag {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.staff-tag.assigned   { background: var(--primary-light); color: var(--primary); }
.staff-tag.unassigned { background: #f1f5f9; color: var(--text-muted); font-style: italic; }

/* Date filter inputs in filter bar */
.filter-group input[type='date'] {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    background: white;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.filter-group input[type='date']:focus { border-color: var(--primary); }

/* --- Table column cell helpers --- */
.date-cell   { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.name-cell   { font-size: 13.5px; font-weight: 600; color: var(--text-main); }
.mobile-cell { font-variant-numeric: tabular-nums; font-size: 13px; }
.email-cell  { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 12.5px; }
.city-cell   { font-size: 13px; }

/* Course cell */
.course-cell   { display: flex; flex-direction: column; gap: 3px; }
.course-name   { font-size: 13px; font-weight: 600; color: var(--text-main); }
.mode-badge    {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 5px;
    background: #f1f5f9; color: #64748b;
    text-transform: uppercase; letter-spacing: 0.3px;
    width: fit-content;
}

/* Follow-up cell */
.follow-up-cell  { display: flex; flex-direction: column; gap: 4px; }
.follow-up-date  { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.overdue-badge   {
    display: inline-block;
    background: var(--danger-bg); color: var(--danger);
    font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 5px;
    text-transform: uppercase; letter-spacing: 0.3px;
}

/* --- ACTION BUTTONS (inline-SVG icons) --- */
.action-group {
    display: flex;
    gap: 6px;
    align-items: center;
}
.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    flex-shrink: 0;
    padding: 0;
}
.action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}
.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
/* Follow-up button: blue */
.followup-btn:hover { background: #eff6ff; border-color: #3b82f6; color: #2563eb; }
/* Convert button: green */
.convert-btn:hover  { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.convert-btn.disabled-btn { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
/* View button: purple */
.view-btn:hover     { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* --- Bulk Assign Button --- */
#bulk-assign-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
#bulk-assign-btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(40%); }
#bulk-assign-btn.btn-active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
#selection-count {
    background: var(--primary);
    color: white;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
}
#bulk-assign-btn.btn-active #selection-count { background: white; color: var(--primary); }

/* --- Custom Multi-Select Course Dropdown --- */
.custom-dropdown { position: relative; width: 100%; }

.dropdown-selected {
    min-height: 44px;
    padding: 6px 32px 6px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    cursor: pointer;
    align-items: center;
    transition: all 0.2s;
    position: relative;
}
.dropdown-selected::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
}
.dropdown-selected:hover { border-color: var(--text-light); }
.dropdown-selected.active {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.dropdown-selected .placeholder { color: var(--text-light); font-size: 13.5px; flex: 1; }

.selected-tag {
    background: var(--primary);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    animation: fadeIn 0.15s ease;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.remove-tag {
    cursor: pointer;
    opacity: 0.75;
    font-size: 11px;
    flex-shrink: 0;
    line-height: 1;
    padding: 1px 2px;
    border-radius: 3px;
    transition: all 0.15s;
}
.remove-tag:hover { opacity: 1; background: rgba(255,255,255,0.25); }

.dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
}
.dropdown-list::-webkit-scrollbar { width: 4px; }
.dropdown-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.dropdown-option {
    padding: 10px 14px;
    font-size: 13.5px;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-option:hover   { background: var(--primary-light); color: var(--primary); }
.dropdown-option.selected { background: var(--primary); color: white; font-weight: 600; }
.dropdown-option-check    { font-size: 11px; flex-shrink: 0; min-width: 14px; }
/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar, .page-header button, .filters-bar, .section-header .icon-btn, .header-actions {
        display: none !important;
    }
    .content {
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
    .app-container { height: auto !important; overflow: visible !important; }
    .table-card { box-shadow: none !important; border: 1px solid #eee !important; border-radius: 0 !important; }
    .data-table th { background: #f8fafc !important; color: black !important; }
    .report-selection-grid, #report-result-section.hidden { display: none !important; }
    #report-result-section { display: block !important; }
    body { background: white; }
}
