/* assets/css/style.css */
:root {
  --primary: #1a4d8f;
  --primary-dark: #123866;
  --accent: #f59e0b;
  --bg: #f5f7fb;
  --white: #fff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(0,0,0,0.06);
  --sidebar-w: 260px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== ADMIN LAYOUT ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f2c52, #1a4d8f);
  color: #fff;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  transition: transform .25s ease;
  z-index: 1000;
}
.sidebar-brand {
  padding: 20px 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar-brand a { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 26px; }
.brand-text { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.brand-text span { color: var(--accent); }
.sidebar-close { display: none; background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
.sidebar-nav { padding: 12px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 8px;
  color: #dbe6f4; font-size: 14.5px;
  transition: .2s; margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: var(--accent); color: #111; font-weight: 600; }
.nav-icon { width: 22px; text-align: center; font-size: 16px; }
.sidebar-footer { padding: 12px 10px 24px; border-top: 1px solid rgba(255,255,255,0.12); margin-top: 10px; }

.sidebar-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 999;
}
.sidebar-backdrop.show { display: block; }

.admin-main {
  flex: 1; margin-left: var(--sidebar-w);
  min-height: 100vh; display: flex; flex-direction: column;
}
.topbar {
  background: var(--white); padding: 14px 24px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  position: sticky; top: 0; z-index: 900;
}
.hamburger {
  display: none; background: none; border: 0;
  font-size: 22px; cursor: pointer; color: var(--primary);
}
.topbar-title { font-size: 17px; font-weight: 600; flex: 1; }
.topbar-user { font-size: 13px; color: var(--muted); }
.content { padding: 24px; flex: 1; }

/* Cards */
.card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px;
}
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; color: var(--primary); }

/* Stats grid */
.stats-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.stat-card {
  background: var(--white); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: #e8f0fb; color: var(--primary);
}
.stat-info h3 { font-size: 24px; margin-bottom: 2px; }
.stat-info p { font-size: 13px; color: var(--muted); }

/* Forms */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fafbfc;
}
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; }
textarea.form-control { min-height: 110px; resize: vertical; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; border: 0;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: .2s; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-warning { background: var(--accent); color: #111; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; justify-content: center; }

/* Table */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
table.tbl th, table.tbl td { padding: 11px 12px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--border); }
table.tbl th { background: #f0f4fa; color: var(--primary); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; }
table.tbl tr:hover td { background: #fafbfc; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* Alert */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* Responsive */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .admin-main { margin-left: 0; }
  .hamburger { display: block; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .topbar-user span { display: none; }
}
@media (max-width: 480px) {
  .stat-card { flex-direction: row; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-title { font-size: 15px; }
}