:root {
  --admin-navy: #071827;
  --admin-navy-dark: #030d17;
  --admin-navy-light: #0f2b45;
  --admin-blue: #1d4ed8;
  --admin-blue-hover: #1e40af;
  --admin-gold: #d97706;
  --admin-gold-light: #fef3c7;
  --admin-bg: #f8fafc;
  --admin-card: #ffffff;
  --admin-border: #e2e8f0;
  --admin-text: #1e293b;
  --admin-muted: #64748b;
  --admin-success: #16a34a;
  --admin-danger: #dc2626;
  --admin-warning: #ea580c;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--admin-navy);
  color: #cbd5e1;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: var(--admin-navy-dark);
}

.sidebar-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.sidebar-brand-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.sidebar-brand-title small {
  display: block;
  font-size: 11px;
  color: var(--admin-gold);
  font-weight: 500;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  list-style: none;
}

.sidebar-section-title {
  padding: 12px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-item a:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.sidebar-item.active a {
  background: var(--admin-blue);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-item a i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  color: #94a3b8;
}

.sidebar-item.active a i,
.sidebar-item a:hover i {
  color: #ffffff;
}

.sidebar-badge {
  margin-left: auto;
  background: var(--admin-gold);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: #64748b;
  background: var(--admin-navy-dark);
}

/* Main Content Wrapper */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.admin-topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
}

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

.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--admin-text);
  cursor: pointer;
  padding: 4px;
}

.page-breadcrumb {
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-navy);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.topbar-btn-website {
  background: var(--admin-gold-light);
  color: #92400e;
  border-color: #fde68a;
}
.topbar-btn-website:hover {
  background: #fde68a;
}

.topbar-btn-logout {
  background: #fee2e2;
  color: var(--admin-danger);
  border-color: #fecaca;
}
.topbar-btn-logout:hover {
  background: #fecaca;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-navy);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--admin-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* Page Body Container */
.admin-content {
  padding: 28px;
  flex: 1;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.content-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--admin-navy);
}

.content-sub {
  font-size: 13.5px;
  color: var(--admin-muted);
  margin-top: 2px;
}

/* Flash Alerts */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Cards & Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-icon.blue { background: #eff6ff; color: var(--admin-blue); }
.stat-icon.gold { background: #fffbeb; color: var(--admin-gold); }
.stat-icon.green { background: #f0fdf4; color: var(--admin-success); }
.stat-icon.purple { background: #faf5ff; color: #7c3aed; }

.stat-details {
  flex: 1;
}
.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--admin-navy);
  line-height: 1.2;
}
.stat-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--admin-muted);
}

/* Panel Box */
.panel {
  background: #ffffff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--admin-navy);
}

.panel-body {
  padding: 20px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-navy);
  margin-bottom: 6px;
}

.form-label small {
  font-weight: 400;
  color: var(--admin-muted);
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--admin-text);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--admin-blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--admin-blue);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--admin-blue-hover);
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}
.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-danger {
  background: #fee2e2;
  color: var(--admin-danger);
  border-color: #fecaca;
}
.btn-danger:hover {
  background: var(--admin-danger);
  color: #ffffff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.admin-table th {
  background: #f8fafc;
  color: var(--admin-muted);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--admin-border);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-blue { background: #eff6ff; color: var(--admin-blue); }
.badge-gold { background: #fef3c7; color: #b45309; }
.badge-green { background: #ecfdf5; color: #047857; }
.badge-red { background: #fef2f2; color: #b91c1c; }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-main {
    margin-left: 0;
  }
  .sidebar-toggle-btn {
    display: block;
  }
}

