/* ================================================
   EDU - SCHOOL MANAGEMENT SYSTEM THEME
   COMPACT VERSION - Smaller text and icons
   ================================================ */

/* Theme Variables - School Colors */
:root {
    --primary: #1a365d;
    --primary-dark: #0f2544;
    --primary-light: rgba(26, 54, 93, 0.1);
    --secondary: #64748b;
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.1);
    --purple: #8b5cf6;
    --purple-light: rgba(139, 92, 246, 0.1);
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --sidebar-bg: #1a365d;
    --sidebar-text: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 25px rgba(26, 54, 93, 0.12);
    --radius-sm: 5px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ================================================
   SIDEBAR - COMPACT
   ================================================ */
.sidebar {
    width: 220px;
    background: linear-gradient(180deg, #1a365d 0%, #0f2544 100%);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 50;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h2 {
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.025em;
    margin: 0;
}

.sidebar-header .school-name {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-top: 0.125rem;
}

.sidebar-nav {
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.nav-section {
    margin-top: 1rem;
}

.nav-section:first-child {
    margin-top: 0;
}

.nav-section-title {
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 0.75rem;
    margin-bottom: 0.375rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 0;
}

.nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
    opacity: 0.8;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.nav-item:hover svg {
    opacity: 1;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.nav-item.active svg {
    opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
    margin-top: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

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

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.75rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: capitalize;
}

.sidebar-logout {
    padding: 0.375rem;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sidebar-logout svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.sidebar-version {
    text-align: center;
    font-size: 0.5625rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

/* ================================================
   MAIN WRAPPER - COMPACT
   ================================================ */
.main-wrapper {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ================================================
   TOPBAR - COMPACT
   ================================================ */
.topbar {
    background: var(--surface);
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-sm);
    gap: 0.75rem;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-date {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ================================================
   GLOBAL SEARCH - COMPACT
   ================================================ */
.global-search {
    position: relative;
    flex: 1;
    max-width: 360px;
    margin: 0 1rem;
}

.global-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.2s;
}

.global-search-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.global-search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 2.25rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-family: inherit;
    color: var(--text);
    background: var(--background);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.global-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow:
        0 0 0 3px var(--primary-light),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.global-search-input:focus + .global-search-icon,
.global-search-input:focus ~ .global-search-icon {
    color: var(--primary);
}

.global-search-input::placeholder {
    color: var(--text-muted);
}

.global-search-shortcut {
    position: absolute;
    right: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    pointer-events: none;
}

.global-search-shortcut kbd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0.0625rem 0.25rem;
    font-size: 0.5625rem;
    font-family: inherit;
    color: var(--text-muted);
    font-weight: 500;
}

.global-search-clear {
    position: absolute;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--border);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-light);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.global-search-clear:hover {
    background: var(--text-muted);
    color: white;
}

.global-search-clear svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.global-search.has-value .global-search-shortcut {
    display: none;
}

.global-search.has-value .global-search-clear {
    display: flex;
}

/* Search Dropdown */
.global-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    max-height: 360px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 100;
    animation: searchDropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.global-search-dropdown.active {
    display: flex;
}

.search-dropdown-header {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--background);
}

.search-dropdown-title {
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.search-dropdown-count {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.search-dropdown-results {
    overflow-y: auto;
    max-height: 300px;
    overscroll-behavior: contain;
}

.search-dropdown-results::-webkit-scrollbar {
    width: 5px;
}

.search-dropdown-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-dropdown-results::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.search-dropdown-results::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Search Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    transition: all 0.1s;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
}

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

.search-result-item:hover,
.search-result-item.active {
    background: var(--primary-light);
}

.search-result-item:active {
    background: rgba(26, 54, 93, 0.15);
}

.search-result-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.6875rem;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-name mark {
    background: var(--warning-light);
    color: var(--text);
    padding: 0 0.125rem;
    border-radius: 2px;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.0625rem;
}

.search-result-id {
    font-size: 0.625rem;
    color: var(--text-light);
    font-family: "SF Mono", "Monaco", "Consolas", monospace;
}

.search-result-class {
    font-size: 0.625rem;
    color: var(--text-muted);
}

.search-result-badge {
    padding: 0.0625rem 0.375rem;
    font-size: 0.5625rem;
    font-weight: 600;
    border-radius: 100px;
    text-transform: capitalize;
    flex-shrink: 0;
}

.search-result-badge.active {
    background: var(--success-light);
    color: #16a34a;
}

.search-result-badge.inactive {
    background: var(--danger-light);
    color: #dc2626;
}

/* Search Loading */
.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.75rem;
}

.search-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Search Empty State */
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    text-align: center;
}

.search-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.4;
}

.search-empty-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.search-empty-text {
    font-size: 0.6875rem;
    color: var(--text-light);
}

/* Search Footer */
.search-dropdown-footer {
    padding: 0.5rem 0.875rem;
    border-top: 1px solid var(--border-light);
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-footer-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    color: var(--text-muted);
}

.search-footer-hint span {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.search-footer-hint kbd {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 0rem 0.25rem;
    font-size: 0.5625rem;
    font-family: inherit;
    font-weight: 500;
}

.search-view-all {
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s;
}

.search-view-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ================================================
   CONTENT - COMPACT
   ================================================ */
.content {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

/* ================================================
   BUTTONS - COMPACT
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    white-space: nowrap;
}

.btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    color: white;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.35);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

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

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

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

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

.btn-sm {
    padding: 0.3125rem 0.625rem;
    font-size: 0.6875rem;
}

.btn-lg {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
}

/* ================================================
   CARDS - COMPACT
   ================================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.card-body {
    padding: 1rem;
}

/* Stats Cards - COMPACT */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

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

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

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

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

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

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

.stat-content .stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-content .stat-label {
    font-size: 0.6875rem;
    color: var(--text-light);
    margin-top: 0.125rem;
}

/* ================================================
   QUICK ACTIONS - COMPACT
   ================================================ */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-card .action-icon {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
}

.action-card .action-label {
    font-size: 0.6875rem;
    font-weight: 600;
}

/* ================================================
   TABLES - COMPACT
   ================================================ */
.table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.625rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--background);
    font-weight: 600;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.table td {
    font-size: 0.8125rem;
}

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

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

/* ================================================
   BADGES - COMPACT
   ================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 100px;
    text-transform: capitalize;
}

.badge-success {
    background: var(--success-light);
    color: #16a34a;
}

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

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

.badge-info {
    background: var(--info-light);
    color: #2563eb;
}

.badge-admin {
    background: var(--purple-light);
    color: #7c3aed;
}

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

.badge-staff {
    background: var(--secondary);
    color: white;
}

/* ================================================
   FORMS - COMPACT
   ================================================ */
.form-group {
    margin-bottom: 0.875rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.6875rem;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: all 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

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

/* ================================================
   ALERTS - COMPACT
   ================================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.875rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-light);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-danger {
    background: var(--danger-light);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Toast */
.alert-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
    font-size: 0.75rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ================================================
   MODAL - COMPACT
   ================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

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

.modal-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border);
    color: var(--text);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

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

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

/* ================================================
   EMPTY STATE - COMPACT
   ================================================ */
.empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.empty-state .empty-text {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ================================================
   LOADING - COMPACT
   ================================================ */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================
   UTILITIES
   ================================================ */
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.text-muted {
    color: var(--text-light);
}
.text-success {
    color: var(--success);
}
.text-danger {
    color: var(--danger);
}
.text-warning {
    color: var(--warning);
}

.mt-1 {
    margin-top: 0.375rem;
}
.mt-2 {
    margin-top: 0.75rem;
}
.mt-3 {
    margin-top: 1.125rem;
}
.mb-1 {
    margin-bottom: 0.375rem;
}
.mb-2 {
    margin-bottom: 0.75rem;
}
.mb-3 {
    margin-bottom: 1.125rem;
}

.hidden {
    display: none;
}

/* ================================================
   RESPONSIVE - COMPACT
   ================================================ */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0.375rem;
        gap: 0.375rem;
    }

    .nav-section {
        display: flex;
        gap: 0.375rem;
        margin-top: 0;
    }

    .nav-section-title {
        display: none;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.375rem 0.5rem;
        font-size: 0.625rem;
        gap: 0.125rem;
        white-space: nowrap;
    }

    .nav-item svg {
        width: 14px;
        height: 14px;
    }

    .sidebar-footer {
        display: none;
    }

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

    .app-container {
        flex-direction: column;
    }

    .content {
        padding: 0.875rem;
    }

    .topbar {
        padding: 0.5rem 0.875rem;
        flex-wrap: wrap;
    }

    .topbar-title {
        order: 1;
        font-size: 0.875rem;
    }

    .topbar-actions {
        order: 2;
    }

    .global-search {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin: 0.5rem 0 0 0;
    }

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

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

    .global-search-shortcut {
        display: none;
    }
}
