/* Admin panel stil */
:root {
  --admin-bg: #F6F8FB;
  --admin-sidebar: #0A1A3F;
  --admin-sidebar-hover: #102554;
  --admin-accent: #FFDE00;
  --admin-primary: #003894;
  --admin-border: #E5E7EB;
  --admin-text: #111827;
  --admin-muted: #6B7280;
}
* { box-sizing: border-box; }
body.admin {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--admin-primary); text-decoration: none; }

.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  background: var(--admin-sidebar);
  color: #fff;
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  padding: 0 20px 20px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}
.sidebar .brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--admin-accent);
  color: var(--admin-sidebar);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem;
}
.sidebar .brand-text { line-height: 1.1; }
.sidebar .brand-text strong { color: #fff; font-size: 0.95rem; }
.sidebar .brand-text small { display:block; color: rgba(255,255,255,0.5); font-size: 0.72rem; }

.nav { list-style: none; margin: 0; padding: 0 10px; }
.nav-section { color: rgba(255,255,255,0.45); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; padding: 16px 14px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.8);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.93rem;
  margin-bottom: 2px;
  transition: background .15s;
}
.nav a:hover { background: var(--admin-sidebar-hover); color: #fff; }
.nav a.active { background: var(--admin-primary); color: #fff; }
.nav .ic { width: 18px; text-align: center; opacity: 0.85; }

.content { flex: 1; min-width: 0; }
.topbar-admin {
  background: #fff;
  border-bottom: 1px solid var(--admin-border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar-admin h1 { margin: 0; font-size: 1.3rem; color: var(--admin-sidebar); }
.topbar-admin .user { color: var(--admin-muted); font-size: 0.9rem; }
.topbar-admin .user a { margin-left: 14px; color: var(--admin-primary); font-weight: 500; }

.page-content { padding: 28px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
}
.kpi .label { color: var(--admin-muted); font-size: 0.85rem; margin-bottom: 6px; }
.kpi .num { font-size: 2rem; font-weight: 800; color: var(--admin-primary); line-height: 1; }
.kpi .sub { color: var(--admin-muted); font-size: 0.82rem; margin-top: 6px; }

.panel {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.panel-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.panel-head h2 { margin: 0; font-size: 1.1rem; color: var(--admin-sidebar); }
.panel-body { padding: 20px; }

.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--admin-border); }
.table th { background: #FAFBFD; color: var(--admin-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:hover td { background: #FAFBFD; }
.table .actions a, .table .actions button { font-size: 0.85rem; padding: 6px 10px; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-gray { background: #F3F4F6; color: #374151; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 0; cursor: pointer;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
  transition: all .15s;
}
.btn-primary { background: var(--admin-primary); color: #fff; }
.btn-primary:hover { background: #002A6E; color: #fff; }
.btn-yellow { background: var(--admin-accent); color: var(--admin-sidebar); }
.btn-yellow:hover { background: #E5C700; }
.btn-ghost { background: #fff; color: var(--admin-primary); border: 1px solid var(--admin-border); }
.btn-ghost:hover { background: #F9FAFB; }
.btn-danger { background: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { padding: 8px 12px; font-size: 0.9rem; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 5px; }
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0; border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(0,56,148,0.15);
}
.textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 0.93rem; }
.alert-success { background: #ECFDF5; color: #065F46; }
.alert-error { background: #FEF2F2; color: #991B1B; }
.alert-info { background: #EFF6FF; color: #1E40AF; }

.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0A1A3F 0%, #123878 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  width: 100%; max-width: 420px;
  padding: 40px 32px;
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
.login-card h1 { margin: 0 0 8px; font-size: 1.5rem; color: var(--admin-sidebar); }
.login-card p { color: var(--admin-muted); margin-bottom: 24px; }

@media (max-width: 900px) {
  .sidebar { width: 220px; }
}
@media (max-width: 700px) {
  .admin-shell { flex-direction: column; }
  .sidebar { position: static; width: 100%; height: auto; }
}
