/* =============================================
   SEKAR GURILEM — ADMIN PANEL STYLESHEET
   admin-style.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* --- Sidebar --- */
  --sidebar-bg: #1A0089;
  --sidebar-width: 240px;
  --sidebar-text: rgba(255,255,255,0.65);
  --sidebar-text-hover: rgba(255,255,255,0.9);
  --sidebar-active-bg: #FFFFFF;
  --sidebar-active-text: #1A0089;
  --sidebar-logo-border: rgba(255,255,255,0.15);
  --sidebar-section-label: rgba(255,255,255,0.35);
  --sidebar-hover-bg: rgba(255,255,255,0.08);

  /* --- Topbar --- */
  --topbar-height: 64px;
  --topbar-bg: #FFFFFF;
  --topbar-border: #E8ECEF;

  /* --- Content --- */
  --content-bg: #F5F6FA;
  --card-bg: #FFFFFF;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --card-shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
  --card-radius: 12px;
  --border-color: #E8ECEF;
  --border-radius: 8px;

  /* --- Colors --- */
  --navy: #1A0089;
  --navy-light: #E8E6FF;
  --orange: #FF6B1A;
  --orange-light: #FFF0E8;
  --green: #22C55E;
  --green-light: #DCFCE7;
  --yellow: #F59E0B;
  --yellow-light: #FEF9C3;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --blue: #3B82F6;
  --blue-light: #DBEAFE;
  --purple: #8B5CF6;
  --purple-light: #EDE9FE;
  --teal: #14B8A6;
  --teal-light: #CCFBF1;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* --- Typography --- */
  --font-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* --- Transitions --- */
  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

html { font-size: 16px; }

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--gray-800);
  background: var(--content-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
}

/* Login page override — no sidebar layout */
body.page-login {
  display: block;
}

a { text-decoration: none; color: inherit; }
button { font-family: var(--font-base); cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
select, input, textarea { font-family: var(--font-base); }

/* ===== LAYOUT ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

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

/* ===== SIDEBAR ===== */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* Sidebar Logo */
.sidebar-logo-wrap {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-logo-border);
  flex-shrink: 0;
}

.sidebar-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
}

.sidebar-logo-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sidebar-logo-role {
  font-size: 0.6875rem;
  color: var(--sidebar-text);
  font-weight: 500;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-section-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sidebar-section-label);
  padding: 12px 8px 4px;
  margin-top: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.sidebar-item:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-text-hover);
}

.sidebar-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.sidebar-item.active svg { color: var(--navy); }

.sidebar-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: color var(--transition);
}

.sidebar-badge {
  margin-left: auto;
  background: var(--orange);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--sidebar-logo-border);
  flex-shrink: 0;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  width: 100%;
}

.sidebar-logout:hover {
  background: rgba(239,68,68,0.15);
  color: #FCA5A5;
}

.sidebar-logout svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ===== TOPBAR ===== */
.admin-topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.topbar-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  font-weight: 400;
}

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

.topbar-notif-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), color var(--transition);
  background: white;
}

.topbar-notif-btn:hover { border-color: var(--navy); color: var(--navy); }

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid white;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 12px 6px 6px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--gray-50);
  transition: border-color var(--transition), background var(--transition);
}

.topbar-profile:hover { border-color: var(--navy); background: var(--navy-light); }

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.topbar-profile-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.topbar-profile-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.topbar-profile-role {
  font-size: 0.6875rem;
  color: var(--gray-500);
}

.topbar-profile-caret {
  color: var(--gray-400);
  width: 14px;
  height: 14px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 28px;
}

.page-header-title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.page-header-subtitle {
  font-size: var(--text-base);
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 400;
}

/* ===== STAT CARDS ===== */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-icon svg { width: 22px; height: 22px; }
.stat-card-icon--navy { background: var(--navy-light); color: var(--navy); }
.stat-card-icon--orange { background: var(--orange-light); color: var(--orange); }
.stat-card-icon--green { background: var(--green-light); color: var(--green); }
.stat-card-icon--yellow { background: var(--yellow-light); color: var(--yellow); }
.stat-card-icon--red { background: var(--red-light); color: var(--red); }
.stat-card-icon--purple { background: var(--purple-light); color: var(--purple); }

.stat-card-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--gray-500);
  font-weight: 500;
}

.stat-card-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.stat-card-change--up { color: var(--green); }
.stat-card-change--down { color: var(--red); }
.stat-card-change--neutral { color: var(--gray-400); }

.stat-card-period {
  font-size: var(--text-xs);
  color: var(--gray-400);
  font-weight: 400;
}

/* ===== CARDS ===== */
.admin-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.admin-card-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

.admin-card-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  margin-top: 2px;
}

.admin-card-body {
  padding: 24px;
}

/* ===== FILTER BAR ===== */
.filter-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--navy);
}

.filter-title svg { width: 16px; height: 16px; }

.filter-reset {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}

.filter-reset:hover { opacity: 0.7; }
.filter-reset svg { width: 14px; height: 14px; }

.filter-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.filter-label {
  font-size: var(--text-xs);
  color: var(--gray-500);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.filter-select,
.filter-input {
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--gray-50);
  font-size: var(--text-sm);
  color: var(--gray-800);
  font-weight: 500;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.filter-input {
  background-image: none;
  padding-right: 12px;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--navy);
  background: white;
}

/* ===== SEARCH BAR ===== */
.search-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
}

.search-icon-admin {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-input-admin {
  width: 100%;
  height: 40px;
  padding: 0 16px 0 38px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: var(--gray-50);
  font-size: var(--text-sm);
  color: var(--gray-800);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}

.search-input-admin:focus {
  border-color: var(--navy);
  background: white;
}

.search-input-admin::placeholder { color: var(--gray-400); }

.results-meta {
  font-size: var(--text-sm);
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  height: 40px;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  border: 1.5px solid transparent;
  line-height: 1;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-primary:hover { background: #E55A0E; border-color: #E55A0E; }

.btn-navy {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.btn-navy:hover { background: #130067; border-color: #130067; }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy-light); }

.btn-outline-gray {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--border-color);
}
.btn-outline-gray:hover { background: var(--gray-50); border-color: var(--gray-300); }

.btn-green {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn-green:hover { background: #16A34A; }

.btn-red {
  background: var(--red);
  color: white;
  border-color: var(--red);
}
.btn-red:hover { background: #DC2626; }

.btn-sm {
  height: 34px;
  padding: 0 14px;
  font-size: var(--text-xs);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
  cursor: pointer;
}

.btn-icon:hover { background: var(--navy-light); color: var(--navy); border-color: var(--navy); }
.btn-icon.danger:hover { background: var(--red-light); color: var(--red); border-color: var(--red); }
.btn-icon svg { width: 15px; height: 15px; }

/* ===== TABLE ===== */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  font-size: var(--text-sm);
}

.admin-table thead tr {
  background: var(--gray-50);
  border-bottom: 2px solid var(--border-color);
}

.admin-table th {
  padding: 13px 16px;
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--gray-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr {
  transition: background var(--transition);
}

.admin-table tbody tr:hover { background: var(--gray-50); }

/* Table karya cell */
.table-karya-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-karya-thumb {
  width: 48px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-200);
}

.table-karya-info { flex: 1; min-width: 0; }

.table-karya-title {
  font-weight: 700;
  color: var(--navy);
  font-size: var(--text-sm);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
  cursor: pointer;
  transition: color var(--transition);
}

.table-karya-title:hover { color: var(--orange); }

.table-karya-id {
  font-size: var(--text-xs);
  color: var(--gray-400);
  display: block;
  margin-top: 1px;
}

.table-peserta-name {
  font-weight: 600;
  color: var(--gray-800);
  font-size: var(--text-sm);
  display: block;
}

.table-peserta-school {
  font-size: var(--text-xs);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 1px;
}

.table-peserta-school svg { width: 11px; height: 11px; }

/* ===== BADGES / STATUS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge svg { width: 12px; height: 12px; }

.badge--menunggu { background: var(--yellow-light); color: #92400E; }
.badge--revisi { background: var(--red-light); color: #991B1B; }
.badge--lolos { background: var(--green-light); color: #166534; }
.badge--belum { background: var(--gray-100); color: var(--gray-500); }
.badge--draft { background: var(--yellow-light); color: #92400E; }
.badge--terbit { background: var(--green-light); color: #166534; }
.badge--arsip { background: var(--gray-100); color: var(--gray-500); }

.kategori-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.kategori-badge--inovasi { background: #EDE9FE; color: #5B21B6; }
.kategori-badge--praktik { background: #FFF0E8; color: #9A3412; }
.kategori-badge--seni { background: #FCE7F3; color: #9D174D; }
.kategori-badge--vokasi { background: #ECFDF5; color: #065F46; }
.kategori-badge--info { background: #DBEAFE; color: #1E40AF; }
.kategori-badge--seleksi { background: var(--navy-light); color: var(--navy); }
.kategori-badge--hasil { background: var(--green-light); color: #166534; }

/* Checklist dot */
.check-dot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.check-dot--ok { background: var(--green-light); color: var(--green); }
.check-dot--warn { background: var(--red-light); color: var(--red); }
.check-dot--neutral { background: var(--gray-100); color: var(--gray-400); }
.check-dot svg { width: 13px; height: 13px; }

/* ===== PAGINATION ===== */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--gray-50);
}

.pagination-meta {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.pagination-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn-admin {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1.5px solid var(--border-color);
  background: white;
  color: var(--gray-600);
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn-admin:hover { border-color: var(--navy); color: var(--navy); background: var(--navy-light); }
.page-btn-admin.active { background: var(--navy); color: white; border-color: var(--navy); }
.page-btn-admin:disabled { opacity: 0.4; cursor: default; }
.page-dots-admin { padding: 0 6px; color: var(--gray-400); font-weight: 700; }

/* ===== ACTION BUTTON ROW ===== */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.action-bar-left { display: flex; gap: 10px; align-items: center; }
.action-bar-right { display: flex; gap: 10px; align-items: center; }

/* ===== ACTION DROPDOWN ===== */
.dropdown-wrap {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: white;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
}

.dropdown-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: var(--text-sm);
  color: var(--gray-700);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover { background: var(--gray-50); color: var(--navy); }
.dropdown-item.danger:hover { background: var(--red-light); color: var(--red); }
.dropdown-item svg { width: 15px; height: 15px; }
.dropdown-divider { height: 1px; background: var(--border-color); margin: 4px 0; }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--gray-300);
  border-radius: 99px;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
  backdrop-filter: blur(2px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(8px);
  transition: transform var(--transition-slow);
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 0;
  margin-bottom: 20px;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  border: none;
  background: none;
}

.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { padding: 0 28px 24px; }

.modal-footer {
  padding: 16px 28px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border-color);
}

/* ===== FORM CONTROLS ===== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-label .req { color: var(--red); margin-left: 3px; }

.form-control {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: var(--gray-50);
  font-size: var(--text-sm);
  color: var(--gray-800);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  font-family: var(--font-base);
}

.form-control:focus { border-color: var(--navy); background: white; }
.form-control::placeholder { color: var(--gray-400); }

.form-select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  background: var(--gray-50);
  font-size: var(--text-sm);
  color: var(--gray-800);
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color var(--transition);
  font-family: var(--font-base);
  font-weight: 500;
}

.form-select:focus { border-color: var(--navy); background-color: white; }

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 5px;
}

/* ===== RATING ===== */
.rating-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.rating-row:last-child { border-bottom: none; }

.rating-info { flex: 1; }
.rating-label { font-size: var(--text-sm); font-weight: 600; color: var(--gray-800); }
.rating-sublabel { font-size: var(--text-xs); color: var(--gray-400); margin-top: 1px; }

.rating-stars {
  display: flex;
  gap: 6px;
  align-items: center;
}

.rating-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1.5px solid var(--border-color);
  background: white;
  color: var(--gray-500);
  font-size: var(--text-sm);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.rating-btn.active, .rating-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

.rating-check {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
}

.rating-check svg { width: 15px; height: 15px; }

/* ===== SCORE DISPLAY ===== */
.score-display {
  background: linear-gradient(135deg, var(--navy-light) 0%, #E0DCFF 100%);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.score-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
}

.score-denom {
  font-size: 1rem;
  color: var(--gray-500);
  font-weight: 600;
}

.score-label {
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-weight: 500;
}

.score-verdict {
  font-size: var(--text-sm);
  color: var(--green);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== TABS ===== */
.admin-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 24px;
}

.admin-tab {
  padding: 12px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.admin-tab:hover { color: var(--navy); }
.admin-tab.active { color: var(--navy); border-bottom-color: var(--navy); }

/* ===== PROFILE SECTION ===== */
.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.profile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-color);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  overflow: hidden;
}

.profile-avatar-hint {
  font-size: var(--text-xs);
  color: var(--gray-400);
  text-align: center;
}

/* ===== NOTIFICATION ITEMS ===== */
.notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.notif-item:last-child { border-bottom: none; }

.notif-info { display: flex; align-items: center; gap: 14px; }

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon svg { width: 18px; height: 18px; }
.notif-icon--navy { background: var(--navy-light); color: var(--navy); }
.notif-icon--orange { background: var(--orange-light); color: var(--orange); }
.notif-icon--green { background: var(--green-light); color: var(--green); }
.notif-icon--purple { background: var(--purple-light); color: var(--purple); }

.notif-text-label { font-size: var(--text-sm); font-weight: 700; color: var(--gray-800); }
.notif-text-sub { font-size: var(--text-xs); color: var(--gray-400); margin-top: 2px; }

/* ===== DASHBOARD ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.activity-list { display: flex; flex-direction: column; gap: 0; }

.activity-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child { border-bottom: none; }

.activity-thumb {
  width: 42px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--gray-200);
  flex-shrink: 0;
}

.activity-info { flex: 1; min-width: 0; }
.activity-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-900);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: var(--text-xs);
  color: var(--gray-400);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== SPLIT LAYOUT (Seleksi Media) ===== */
.split-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.split-left, .split-right {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.media-list { overflow-y: auto; max-height: calc(100vh - 240px); }

.media-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition);
}

.media-list-item:last-child { border-bottom: none; }
.media-list-item:hover { background: var(--gray-50); }
.media-list-item.active { background: var(--navy-light); border-left: 3px solid var(--navy); }

.media-list-thumb {
  width: 50px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--gray-200);
  flex-shrink: 0;
}

.media-list-info { flex: 1; min-width: 0; }

.media-list-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-900);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-list-sub {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: 2px;
  display: block;
}

.media-list-date {
  font-size: var(--text-xs);
  color: var(--gray-400);
  white-space: nowrap;
}

.media-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--gray-50);
}

/* Media detail */
.media-detail-header {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  align-items: start;
}

.media-detail-thumb {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--gray-200);
}

.media-detail-title {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.media-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.media-detail-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.media-detail-meta-row svg { width: 14px; height: 14px; flex-shrink: 0; }

.media-files-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.media-file-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.media-file-card:hover { box-shadow: var(--card-shadow-hover); }

.media-file-preview {
  height: 90px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  position: relative;
}

.media-file-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.media-file-badge--pdf { background: #EF4444; color: white; }
.media-file-badge--mp4 { background: #3B82F6; color: white; }
.media-file-badge--jpg { background: #22C55E; color: white; }

.media-file-info {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
}

.media-file-name {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.media-file-size {
  font-size: var(--text-xs);
  color: var(--gray-400);
  white-space: nowrap;
  margin-left: 6px;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 6px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--navy);
  transition: width 0.6s ease;
}

.progress-fill--orange { background: var(--orange); }
.progress-fill--green { background: var(--green); }
.progress-fill--yellow { background: var(--yellow); }

/* ===== FUNNEL CHART ===== */
.funnel-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.funnel-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.funnel-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  width: 140px;
  flex-shrink: 0;
}

.funnel-bar-wrap {
  flex: 1;
  background: var(--border-color);
  border-radius: 99px;
  height: 26px;
  overflow: hidden;
  position: relative;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: 99px;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: white;
  transition: width 0.8s ease;
}

.funnel-count {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-800);
  width: 60px;
  text-align: right;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0D0055 0%, #1A0089 40%, #2D00C0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255,107,26,0.08);
  top: -200px;
  right: -200px;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  bottom: -100px;
  left: -100px;
}

.login-card {
  background: white;
  border-radius: 20px;
  padding: 48px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.35);
  position: relative;
  z-index: 1;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.login-logo { height: 44px; }

.login-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.03em;
}

.login-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 32px;
}

.login-form { display: flex; flex-direction: column; gap: 20px; }

.input-with-icon {
  position: relative;
}

.input-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: var(--text-base);
  color: var(--gray-800);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-base);
  font-weight: 500;
}

.login-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--navy-light);
}

.login-input::placeholder { color: var(--gray-400); font-weight: 400; }

.login-btn {
  height: 50px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-base);
  letter-spacing: -0.01em;
}

.login-btn:hover { background: #E55A0E; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn svg { width: 18px; height: 18px; }

.login-error {
  background: var(--red-light);
  color: #991B1B;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  display: none;
}

.login-error svg { width: 16px; height: 16px; flex-shrink: 0; }
.login-error.show { display: flex; }

.login-back {
  text-align: center;
  margin-top: 20px;
}

.login-back a {
  font-size: var(--text-sm);
  color: var(--gray-500);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.login-back a:hover { color: var(--navy); }

.login-demo-info {
  background: var(--navy-light);
  border: 1px solid rgba(26,0,137,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: var(--text-xs);
  color: var(--navy);
  text-align: center;
  font-weight: 500;
  margin-top: 16px;
}

/* ===== ALERT / TOAST ===== */
.alert-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--navy-light);
  border: 1px solid rgba(26,0,137,0.15);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: var(--text-sm);
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 20px;
}

.alert-info svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  color: var(--gray-400);
  text-align: center;
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state-title { font-size: var(--text-lg); font-weight: 700; color: var(--gray-500); margin-bottom: 6px; }
.empty-state-sub { font-size: var(--text-sm); color: var(--gray-400); }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-900);
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  min-width: 280px;
  animation: toastIn 0.3s ease forwards;
}

.toast--success { background: #166534; }
.toast--error { background: #991B1B; }
.toast--info { background: var(--navy); }

.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== UTILITIES ===== */
.text-navy { color: var(--navy); }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gray { color: var(--gray-500); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.font-bold { font-weight: 700; }
.font-semi { font-weight: 600; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
