/* ===========================
   ADMIN PANEL CSS
   =========================== */
:root {
  --primary: #1a4b8c;
  --primary-dark: #0f2f5a;
  --accent: #e8a020;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --text: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --bg: #f1f5f9;
  --border: #e2e8f0;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --sidebar-width: 250px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-width); background: var(--primary-dark); color: white; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; flex-shrink: 0; }
.sidebar-brand { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-brand h2 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.sidebar-brand small { font-size: 11px; opacity: .6; }
.sidebar-menu { padding: 16px 0; }
.menu-group { margin-bottom: 24px; }
.menu-label { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.4); padding: 0 20px 8px; }
.menu-item a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; font-size: 14px; color: rgba(255,255,255,.75); transition: all .2s; border-left: 3px solid transparent; }
.menu-item a:hover, .menu-item a.active { background: rgba(255,255,255,.08); color: white; border-left-color: var(--accent); }
.menu-item a i { width: 18px; text-align: center; font-size: 15px; }

/* MAIN CONTENT */
.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; }
.topbar { background: var(--white); padding: 14px 28px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.topbar h1 { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--text-light); }
.topbar-right a { color: var(--danger); font-weight: 500; }

.page-content { padding: 28px; flex: 1; }

/* CARDS */
.card { background: var(--white); border-radius: 12px; box-shadow: var(--shadow); }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-header h2 { font-size: 17px; font-weight: 700; }
.card-body { padding: 24px; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card { background: var(--white); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; border-left: 4px solid; }
.stat-card.blue { border-color: var(--primary); }
.stat-card.orange { border-color: var(--accent); }
.stat-card.green { border-color: var(--success); }
.stat-card.purple { border-color: #7c3aed; }
.stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-card.blue .stat-icon { background: rgba(26,75,140,.1); color: var(--primary); }
.stat-card.orange .stat-icon { background: rgba(232,160,32,.1); color: var(--accent); }
.stat-card.green .stat-icon { background: rgba(22,163,74,.1); color: var(--success); }
.stat-card.purple .stat-icon { background: rgba(124,58,237,.1); color: #7c3aed; }
.stat-info h3 { font-size: 26px; font-weight: 800; line-height: 1; }
.stat-info p { font-size: 13px; color: var(--text-light); margin-top: 3px; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--bg); padding: 12px 16px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); border-bottom: 2px solid var(--border); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg); }
.badge { padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; }
.badge-success { background: rgba(22,163,74,.1); color: var(--success); }
.badge-danger { background: rgba(220,38,38,.1); color: var(--danger); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-light); }
.btn-outline:hover { background: var(--bg); }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* FORMS */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
label .required { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=number], select, textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--text); background: var(--white); transition: border-color .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,75,140,.08); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ALERTS */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: rgba(22,163,74,.1); color: var(--success); border: 1px solid rgba(22,163,74,.2); }
.alert-danger { background: rgba(220,38,38,.1); color: var(--danger); border: 1px solid rgba(220,38,38,.2); }

/* PREVIEW */
.img-preview { width: 100px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); margin-top: 8px; display: block; }
.staff-photo-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); margin-top: 8px; display: block; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.login-card { background: white; border-radius: 20px; padding: 40px; width: 400px; max-width: 95vw; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.login-card h1 { font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.login-card p { font-size: 14px; color: var(--text-light); margin-bottom: 28px; }

/* DRAG HANDLE */
.drag-handle { cursor: grab; color: var(--text-light); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
