/* ========================================
   SMS - School Management System
   Modern Admin Dashboard CSS
   ======================================== */

/* --- Google Fonts Import --- */
:root {
    /* Light theme colors */
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --secondary: #06b6d4;
    --secondary-light: #67e8f9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Layout */
    --sidebar-width: 265px;
    --sidebar-collapsed-width: 70px;
    --navbar-height: 65px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Colors */
    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --border: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

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

    /* Sidebar */
    --sidebar-bg: #1e1b4b;
    --sidebar-text: rgba(255,255,255,0.85);
    --sidebar-active-bg: rgba(255,255,255,0.12);
    --sidebar-hover-bg: rgba(255,255,255,0.08);
    --sidebar-section-text: rgba(255,255,255,0.4);

    /* Transitions */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-bs-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px rgba(0,0,0,0.4);
}

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

body {
    font-family: 'Inter', 'Noto Sans Arabic', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 14px;
    transition: background-color var(--transition), color var(--transition);
}

body.rtl {
    font-family: 'Noto Sans Arabic', 'Inter', sans-serif;
    direction: rtl;
    text-align: right;
}

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

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    background-image: linear-gradient(160deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width var(--transition), transform var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.rtl .sidebar {
    left: auto;
    right: 0;
}

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

.sidebar.collapsed .sidebar-nav .nav-link span,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .logo-container { justify-content: center; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 12px 10px; }

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}

.logo-text { overflow: hidden; }
.logo-main {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    white-space: nowrap;
}
.logo-sub {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

.sidebar-toggle-btn {
    background: rgba(255,255,255,0.08);
    border: none;
    color: rgba(255,255,255,0.7);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: rgba(255,255,255,0.15); color: white; }

/* Sidebar User */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: all var(--transition);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info { overflow: hidden; }
.user-name { display: block; font-size: 13px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { display: block; font-size: 11px; color: rgba(255,255,255,0.5); }

/* Sidebar Nav */
.sidebar-nav {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.nav-section {
    padding: 12px 16px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sidebar-section-text);
}

.nav-item { margin: 1px 8px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 10px;
    transition: all var(--transition);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.nav-link i {
    width: 18px;
    font-size: 15px;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.nav-link:hover {
    background: var(--sidebar-hover-bg);
    color: white;
    transform: translateX(2px);
}

.rtl .nav-link:hover { transform: translateX(-2px); }

.nav-link.active {
    background: linear-gradient(135deg, rgba(129,140,248,0.25), rgba(79,70,229,0.3));
    color: white;
    border: 1px solid rgba(129,140,248,0.2);
    box-shadow: 0 2px 8px rgba(79,70,229,0.2);
}

.nav-link.active i { transform: scale(1.1); }

/* ---- Main Wrapper ---- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--transition);
    flex: 1;
}

.rtl .main-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

.sidebar.collapsed ~ .main-wrapper,
.sidebar.collapsed ~ * .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

/* ---- Top Navbar ---- */
.top-navbar {
    height: var(--navbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    gap: 16px;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    display: none;
}

@media (max-width: 768px) {
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
}

.sidebar-toggle:hover { background: var(--bg); color: var(--primary); }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.rtl .navbar-right { margin-left: 0; margin-right: auto; }

/* Language Switcher */
.lang-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.lang-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-light);
    color: var(--primary);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    background: var(--primary-50);
    color: var(--primary);
    border-color: var(--primary-light);
    transform: rotate(20deg);
}

/* Notifications */
.notification-btn {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.notification-btn:hover { background: var(--primary-50); color: var(--primary); border-color: var(--primary-light); }

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    transition: transform var(--transition);
}

.notif-badge.pulse { animation: pulse 2s infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.notif-panel {
    width: 380px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    background: var(--surface);
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 13px;
}

.mark-read-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.notif-list { max-height: 320px; overflow-y: auto; }
.notif-empty { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}

.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: var(--primary-50); }

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.notif-icon.info { background: #dbeafe; color: var(--info); }
.notif-icon.success { background: #d1fae5; color: var(--success); }
.notif-icon.warning { background: #fef3c7; color: var(--warning); }
.notif-icon.error { background: #fee2e2; color: var(--danger); }

.notif-body { flex: 1; overflow: hidden; }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.notif-message { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* User Menu */
.user-avatar-btn {
    background: none;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 24px;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
}

.user-avatar-btn:hover { background: var(--bg); border-color: var(--primary-light); }

.avatar-circle {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
}

.user-name-display { font-size: 13px; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Page Content ---- */
.page-content {
    flex: 1;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

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

/* ---- Cards ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
}

.card-body { padding: 20px; }

/* ---- Stat Cards ---- */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.stat-card.primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.success::before { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.danger::before { background: linear-gradient(90deg, var(--danger), #f87171); }
.stat-card.info::before { background: linear-gradient(90deg, var(--info), #60a5fa); }
.stat-card.secondary::before { background: linear-gradient(90deg, var(--secondary), var(--secondary-light)); }

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-50); color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.danger { background: #fee2e2; color: var(--danger); }
.stat-icon.info { background: #dbeafe; color: var(--info); }
.stat-icon.secondary { background: #cffafe; color: var(--secondary); }

.stat-info { flex: 1; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; font-weight: 500; }
.stat-change { font-size: 11px; font-weight: 600; margin-top: 6px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---- Page Header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* ---- Buttons ---- */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: all var(--transition);
    font-size: 13.5px;
    padding: 8px 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79,70,229,0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #34d399);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #f87171);
    border-color: transparent;
}

/* ---- DataTables ---- */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    font-size: 13px;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

table.dataTable thead th {
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border) !important;
    padding: 12px 16px;
}

table.dataTable tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-primary);
    font-size: 13.5px;
}

table.dataTable tbody tr:hover td { background: var(--surface-hover); }

/* ---- Forms ---- */
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 9px 14px;
    font-size: 13.5px;
    background: var(--surface);
    color: var(--text-primary);
    transition: all var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
    background: var(--surface);
    color: var(--text-primary);
}

.form-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

/* ---- Badges ---- */
.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

/* ---- Alerts ---- */
.alert { border-radius: var(--border-radius); border: none; font-size: 13.5px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1e40af; }
.alert-warning { background: #fef3c7; color: #92400e; }

/* ---- Footer ---- */
.page-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---- Auth Pages ---- */
.auth-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
}

.auth-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4f46e5, #818cf8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    margin: 0 auto 24px;
    box-shadow: 0 8px 24px rgba(79,70,229,0.4);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    color: #1e1b4b;
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin-bottom: 28px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    .rtl .sidebar { transform: translateX(100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-wrapper { margin-left: 0 !important; margin-right: 0 !important; }
}

@media (max-width: 576px) {
    .page-content { padding: 16px; }
    .top-navbar { padding: 0 16px; }
    .notif-panel { width: calc(100vw - 32px); }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 20px; }
}

/* ---- Dashboard Charts ---- */
.chart-container {
    position: relative;
    height: 280px;
}

/* ---- Timeline ---- */
.timeline { position: relative; padding: 0; }
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.rtl .timeline::before { left: auto; right: 20px; }

.timeline-item {
    display: flex;
    gap: 16px;
    padding-bottom: 20px;
    position: relative;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--surface);
    position: absolute;
    left: 15px;
    top: 4px;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.2);
}

.rtl .timeline-dot { left: auto; right: 15px; }
.timeline-content { margin-left: 44px; flex: 1; }
.rtl .timeline-content { margin-left: 0; margin-right: 44px; }

/* ---- Loading Spinner ---- */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.spinner-overlay.show { display: flex; }

/* ---- Avatar colors ---- */
.avatar-primary { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.avatar-success { background: linear-gradient(135deg, var(--success), #34d399); }
.avatar-warning { background: linear-gradient(135deg, var(--warning), #fbbf24); }
.avatar-danger { background: linear-gradient(135deg, var(--danger), #f87171); }

/* ---- Dropdown improvements ---- */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 6px;
    background: var(--surface);
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    padding: 8px 12px;
    color: var(--text-primary);
    transition: background var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover { background: var(--bg); color: var(--text-primary); }
.dropdown-item i { width: 16px; text-align: center; }

/* ---- Table action buttons ---- */
.btn-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-action.view { background: #dbeafe; color: var(--info); }
.btn-action.edit { background: #fef3c7; color: var(--warning); }
.btn-action.delete { background: #fee2e2; color: var(--danger); }
.btn-action:hover { opacity: 0.8; transform: scale(1.1); }

/* ---- Status Badge ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-badge.active { background: #d1fae5; color: #065f46; }
.status-badge.active::before { background: var(--success); }
.status-badge.inactive { background: #fee2e2; color: #991b1b; }
.status-badge.inactive::before { background: var(--danger); }
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.pending::before { background: var(--warning); }

/* ---- Print Styles ---- */
@media print {
    .sidebar, .top-navbar, .page-footer { display: none !important; }
    .main-wrapper { margin: 0 !important; }
    .page-content { padding: 0; }
}