/* Admin Panel Styles - E-Journal Akiopedia Press */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --admin-sidebar: #1a2238;
  --admin-sidebar-dark: #111827;
  --admin-sidebar-active: #044194;
  --admin-primary: #044194;
  --admin-accent: #3b82f6;
  --admin-danger: #ef4444;
  --admin-success: #22c55e;
  --admin-warning: #f59e0b;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 8px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; min-height: 100vh; display: flex; }
a { color: var(--admin-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Sidebar */
.admin-sidebar {
  width: 240px;
  background: var(--admin-sidebar-dark);
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.sidebar-brand-main { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sidebar-brand-sub { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 3px; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.8px;
  padding: 12px 18px 6px;
}

.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: 13.5px; color: rgba(255,255,255,0.7); transition: all 0.2s; cursor: pointer; }
.nav-item:hover, .nav-item.active { background: var(--admin-sidebar-active); color: #fff; text-decoration: none; }
.nav-item .fa { width: 18px; text-align: center; font-size: 14px; }
.nav-item.active .fa { color: #fff; }

.sidebar-footer { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 12px; color: rgba(255,255,255,0.4); }

/* Main Content */
.admin-main {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}

.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.topbar-user .avatar { width: 32px; height: 32px; background: var(--admin-primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }

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

/* Breadcrumb */
.admin-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 20px; }
.admin-breadcrumb a { color: var(--admin-primary); }
.admin-breadcrumb .sep { opacity: 0.5; }

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}
.card-header h3 { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.stat-icon { width: 50px; height: 50px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; flex-shrink: 0; }
.stat-icon.blue { background: linear-gradient(135deg, #044194, #1a5ba0); }
.stat-icon.green { background: linear-gradient(135deg, #16a34a, #22c55e); }
.stat-icon.orange { background: linear-gradient(135deg, #d97706, #f59e0b); }
.stat-icon.red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.stat-icon.teal { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.stat-info { flex: 1; min-width: 0; }
.stat-number { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Tables */
.table-responsive { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg); padding: 12px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; color: var(--muted); text-align: left; border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; }
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-primary { background: #dbeafe; color: #1d4ed8; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-secondary { background: var(--border); color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: all 0.2s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--admin-primary); color: #fff; }
.btn-primary:hover { background: #023070; color: #fff; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-warning:hover { background: #b45309; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-light { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-light:hover { background: var(--border); color: var(--text); }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  color: var(--text);
}
.form-control:focus { outline: none; border-color: var(--admin-primary); box-shadow: 0 0 0 3px rgba(4,65,148,0.1); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; align-items: center; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 16px; }

/* Alert */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar { width: 0; overflow: hidden; }
  .admin-sidebar.open { width: 240px; }
  .admin-main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-title { font-size: 14px; }
}
