/* ============================================================
   Sistema de Gestión Educativa - Instituto CEC - v2.0
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #64748b;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --warning: #d97706;
  --warning-light: #fffbeb;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --info: #0891b2;
  --info-light: #ecfeff;
  --teal: #0d9488;
  --teal-light: #f0fdfa;
  --orange: #ea580c;
  --orange-light: #fff7ed;
  --bg: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* ===== LOGIN ===== */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #2563eb 100%);
  padding: 20px;
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-logo { font-size: 26px; font-weight: 800; color: var(--primary); text-align: center; margin-bottom: 4px; }
.login-logo i { margin-right: 8px; }
.login-subtitle { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 28px; }

/* ===== APP LAYOUT ===== */
#app-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
#sidebar {
  width: var(--sidebar-w);
  background: #0f172a;
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-logo { padding: 20px 18px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.sidebar-logo-title { font-size: 15px; font-weight: 700; color: white; display: flex; align-items: center; gap: 10px; }
.sidebar-logo-title i { background: var(--primary); padding: 8px; border-radius: 8px; font-size: 13px; }
.sidebar-logo-sub { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 3px; margin-left: 36px; }
.sidebar-nav { flex: 1; padding: 8px 8px; }
.sidebar-section { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.3); letter-spacing: 1px; text-transform: uppercase; padding: 14px 10px 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: rgba(255,255,255,0.6); font-size: 13px; font-weight: 500; transition: all 0.15s; margin-bottom: 2px; user-select: none; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: white; }
.nav-item.active { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(37,99,235,0.4); }
.nav-item i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }
.sidebar-footer { padding: 14px; border-top: 1px solid rgba(255,255,255,0.07); }
.btn-logout { width: 100%; padding: 8px; background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.1); border-radius: 7px; cursor: pointer; font-size: 12px; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.btn-logout:hover { background: rgba(220,38,38,0.3); color: #fca5a5; border-color: rgba(220,38,38,0.4); }

/* ===== MAIN CONTENT ===== */
#main-content { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

/* ===== TOPBAR ===== */
#topbar { height: var(--topbar-h); background: white; 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); flex-shrink: 0; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.btn-icon { position: relative; width: 36px; height: 36px; border-radius: 8px; background: transparent; border: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-light); transition: all 0.15s; }
.btn-icon:hover { background: var(--bg); color: var(--text); }
.notif-badge { position: absolute; top: -4px; right: -4px; background: var(--danger); color: white; border-radius: 10px; font-size: 10px; min-width: 18px; height: 18px; padding: 0 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid white; }

/* ===== PAGE CONTENT ===== */
#page-content { flex: 1; padding: 24px; overflow-y: auto; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.page-header-left h2 { font-size: 20px; font-weight: 700; color: var(--text); }
.page-header-left p { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* ===== CARDS ===== */
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }

/* ===== STAT CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: box-shadow 0.2s, transform 0.1s; cursor: default; }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-icon.orange { background: var(--warning-light); color: var(--warning); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }
.stat-icon.teal { background: var(--teal-light); color: var(--teal); }
.stat-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--text-light); font-weight: 500; }
.stat-change { font-size: 11px; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ===== DASHBOARD GRID ===== */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead { background: #f8fafc; }
th { padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
tr.row-danger td { background: #fff5f5; }
tr.row-danger:hover td { background: #fef2f2; }
tr.row-success td { background: #f0fdf4; }
tr.row-success:hover td { background: #dcfce7; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ===== PAGINATION ===== */
.pagination { padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 12px; border-top: 1px solid var(--border); background: #fafafa; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-teal { background: #ccfbf1; color: #0f766e; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 600; transition: all 0.15s; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(37,99,235,0.35); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #15803d; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover:not(:disabled) { background: #b45309; }
.btn-purple { background: var(--purple); color: white; }
.btn-purple:hover:not(:disabled) { background: #6d28d9; }
.btn-info { background: var(--info); color: white; }
.btn-info:hover:not(:disabled) { background: #0e7490; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }

/* ===== ACTION BUTTONS ===== */
.action-btns { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.btn-sm.btn-info, .btn-sm.btn-warning, .btn-sm.btn-success, .btn-sm.btn-danger, .btn-sm.btn-purple { padding: 5px 8px; }

/* ===== FORMS ===== */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-control { padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); background: white; transition: border-color 0.15s, box-shadow 0.15s; outline: none; width: 100%; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11px; color: var(--text-muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.req { color: var(--danger); }

/* ===== SEARCH BAR ===== */
.search-bar { position: relative; }
.search-bar .form-control { padding-left: 36px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ===== ALERTS ===== */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 13px; display: flex; align-items: flex-start; gap: 8px; }
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--danger-light); color: #b91c1c; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--primary-light); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: var(--success-light); color: #15803d; border: 1px solid #bbf7d0; }

/* ===== MODALS ===== */
#modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
#modal-overlay.open { display: flex; }
.modal-box { background: white; border-radius: 14px; max-width: 560px; width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.2); animation: modalIn 0.2s ease-out; overflow: hidden; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; background: #fafafa; }
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.modal-close { width: 30px; height: 30px; border-radius: 6px; border: none; background: transparent; cursor: pointer; color: var(--text-light); font-size: 14px; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }

/* ===== NOTIFICATIONS ===== */
.notif-panel { position: absolute; top: calc(var(--topbar-h) + 4px); right: 20px; width: 360px; background: white; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 150; max-height: 480px; overflow-y: auto; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13px; position: sticky; top: 0; background: white; z-index: 1; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: 13px; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; display: flex; gap: 10px; transition: background 0.1s; cursor: default; }
.notif-item:hover { background: #fafafa; }
.notif-item.unread { background: #f0f7ff; }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.notif-icon.blue { background: var(--primary-light); color: var(--primary); }
.notif-icon.green { background: var(--success-light); color: var(--success); }
.notif-icon.red { background: var(--danger-light); color: var(--danger); }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 700; color: var(--text); }
.notif-msg { font-size: 12px; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ===== TOAST ===== */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; max-width: 340px; box-shadow: var(--shadow-lg); pointer-events: auto; animation: toastIn 0.3s ease-out; transition: opacity 0.3s; }
.toast.hide { opacity: 0; }
.toast.success { background: #15803d; color: white; }
.toast.error { background: #b91c1c; color: white; }
.toast.warning { background: #d97706; color: white; }
.toast.info { background: var(--primary); color: white; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ===== SPINNER ===== */
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; flex-shrink: 0; }
.spinner-lg { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px; gap: 14px; color: var(--text-light); font-size: 14px; }

/* ===== EMPTY STATE ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.empty-state-icon { width: 72px; height: 72px; border-radius: 20px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; color: var(--text-light); margin-bottom: 20px; max-width: 320px; }

/* ===== AVATAR ===== */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }

/* ===== DETAIL GRID ===== */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.detail-item { background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.detail-item label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.detail-item span { font-size: 13px; font-weight: 600; color: var(--text); }
.section-subtitle { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }

/* ===== GRID CARDS ===== */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ===== CURSO CARDS ===== */
.curso-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; box-shadow: var(--shadow); transition: all 0.2s; }
.curso-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.curso-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.curso-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.curso-nombre { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.curso-desc { font-size: 12px; color: var(--text-light); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.curso-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.curso-info-grid > div { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 5px; }
.curso-info-grid i { color: var(--primary); width: 12px; }
.curso-actions { display: flex; gap: 8px; }

/* ===== SEDE CARDS ===== */
.sede-card { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 18px; box-shadow: var(--shadow); transition: all 0.2s; }
.sede-card:hover { box-shadow: var(--shadow-md); }
.sede-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sede-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--purple-light); color: var(--purple); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.sede-nombre { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.sede-info { font-size: 12px; color: var(--text-light); display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.sede-info i { color: var(--purple); width: 12px; }

/* ===== FILTER BAR (inline) ===== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-bar { position: relative; flex: 1; min-width: 180px; }
.search-bar .form-control { padding-left: 34px; }
.search-bar .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }

/* ===== ACTION BUTTONS (compact table) ===== */
.action-btns { display: flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }

/* ===== INLINE BTN-SM (for table action buttons without .btn class) ===== */
.btn-sm.btn-success, a.btn-sm.btn-success { background: var(--success); color: white; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }
.btn-sm.btn-success:hover { background: #15803d; }
.btn-sm.btn-warning, a.btn-sm.btn-warning { background: var(--warning); color: white; }
.btn-sm.btn-warning:hover { background: #b45309; }
.btn-sm.btn-danger, a.btn-sm.btn-danger { background: var(--danger); color: white; }
.btn-sm.btn-danger:hover { background: #b91c1c; }
.btn-sm.btn-info, a.btn-sm.btn-info { background: var(--info); color: white; }
.btn-sm.btn-info:hover { background: #0e7490; }
.btn-sm.btn-purple, a.btn-sm.btn-purple { background: var(--purple); color: white; }
.btn-sm.btn-purple:hover { background: #6d28d9; }

/* Bare .btn-sm.btn-* without .btn parent - table use case */
button.btn-success:not(.btn) { background: var(--success); color: white; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }
button.btn-warning:not(.btn) { background: var(--warning); color: white; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }
button.btn-danger:not(.btn) { background: var(--danger); color: white; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }
button.btn-info:not(.btn) { background: var(--info); color: white; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }
button.btn-purple:not(.btn) { background: var(--purple); color: white; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.15s; }

/* ===== TABLE ROW STATES ===== */
tr.row-danger td { background: #fff5f5 !important; }
tr.row-success td { background: #f0fdf4 !important; }

/* ===== SPINNER LARGE ===== */
.spinner-lg { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #main-content { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .grid-cards { grid-template-columns: 1fr; }
}
