/* ============================================================
   PADI KLASIFIKASI — Premium Dark Mode CSS
   ============================================================ */

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

:root {
  --bg-primary: #0a0f0d;
  --bg-secondary: #0f1a14;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(34, 197, 94, 0.3);

  --accent-green: #22c55e;
  --accent-green-dark: #16a34a;
  --accent-teal: #14b8a6;
  --accent-emerald: #10b981;
  --accent-yellow: #eab308;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --accent-orange: #f97316;

  --text-primary: #f0fdf4;
  --text-secondary: #86efac;
  --text-muted: #6b7280;
  --text-dim: #374151;

  --gradient-primary: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
  --gradient-card: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(20,184,166,0.05) 100%);
  --gradient-bg: radial-gradient(ellipse at top left, rgba(34,197,94,0.08) 0%, transparent 60%),
                 radial-gradient(ellipse at bottom right, rgba(20,184,166,0.06) 0%, transparent 60%);

  --shadow-glow: 0 0 30px rgba(34, 197, 94, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-button: 0 4px 15px rgba(34, 197, 94, 0.3);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --navbar-height: 68px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-primary);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-green-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-green); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  background: rgba(10, 15, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.navbar-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.navbar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-button);
}

.navbar-brand .brand-text {
  font-weight: 700;
  font-size: 16px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.navbar-nav a.active {
  color: var(--accent-green);
}

.nav-badge {
  background: var(--accent-green);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
.main-content {
  padding-top: calc(var(--navbar-height) + 32px);
  padding-bottom: 60px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   CARDS (GLASSMORPHISM)
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 28px;
  transition: var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(34, 197, 94, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

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

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.stat-card:hover::before {
  transform: scaleX(1);
}

.stat-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.green { background: rgba(34, 197, 94, 0.15); }
.stat-icon.teal { background: rgba(20, 184, 166, 0.15); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); }

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

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #000;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(34, 197, 94, 0.45);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
}

.btn-outline:hover {
  background: rgba(34, 197, 94, 0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: translateY(-2px);
}

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

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-green);
  background: rgba(34, 197, 94, 0.05);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-control::placeholder {
  color: var(--text-dim);
}

select.form-control option {
  background: #1a2a1f;
  color: var(--text-primary);
}

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

/* ============================================================
   ALERTS / FLASH MESSAGES
   ============================================================ */
.alert-container {
  position: fixed;
  top: calc(var(--navbar-height) + 16px);
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

@keyframes slideInRight {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.alert.success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.alert.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.alert.warning {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #fde047;
}

.alert-icon { font-size: 18px; flex-shrink: 0; }
.alert-close { margin-left: auto; cursor: pointer; opacity: 0.7; font-size: 18px; }
.alert-close:hover { opacity: 1; }

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

.page-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
}

.page-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   HERO SECTION (INDEX)
   ============================================================ */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-green);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ============================================================
   DISEASE CARDS (UC-01)
   ============================================================ */
.disease-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.disease-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.disease-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  border-radius: 4px 0 0 4px;
  transition: var(--transition);
}

.disease-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.2);
  box-shadow: var(--shadow-card);
}

.disease-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.disease-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.disease-card-treatment {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  line-height: 1.5;
}

/* ============================================================
   UPLOAD AREA (UC-02)
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  background: rgba(255, 255, 255, 0.02);
}

.upload-zone.drag-over,
.upload-zone:hover {
  border-color: var(--accent-green);
  background: rgba(34, 197, 94, 0.05);
}

.upload-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  filter: grayscale(0.3);
}

.upload-zone h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  margin-top: 24px;
  display: none;
}

.upload-preview img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  object-fit: contain;
}

/* ============================================================
   RESULT PAGE (UC-05 & UC-06)
   ============================================================ */
.result-hero {
  background: var(--gradient-card);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 36px;
  text-align: center;
  margin-bottom: 28px;
  box-shadow: var(--shadow-glow);
}

.result-disease-name {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.confidence-gauge-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.confidence-circle {
  width: 160px;
  height: 160px;
  position: relative;
}

.confidence-circle svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.confidence-circle-bg {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 10;
}

.confidence-circle-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.confidence-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.confidence-pct {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.confidence-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Bar Chart Confidence */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }

.bar-item { display: flex; flex-direction: column; gap: 4px; }

.bar-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.bar-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Preprocessing Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.stats-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.stats-item .val {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-teal);
  display: block;
  margin-bottom: 4px;
}

.stats-item .key {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

/* Treatment Box */
.treatment-box {
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.treatment-box h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.treatment-box p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   HISTORY TABLE (UC-07)
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead tr {
  background: rgba(255,255,255,0.04);
}

th {
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.confidence-bar-sm {
  width: 100%;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px;
}

.confidence-bar-sm-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-primary);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.pagination a:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.pagination .active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: #000;
  font-weight: 700;
}

/* ============================================================
   ADMIN LOGIN (UC-08)
   ============================================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-primary);
  background-image: var(--gradient-bg);
  background-attachment: fixed;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(20px);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .icon {
  width: 64px; height: 64px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-button);
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   ADMIN SIDEBAR
   ============================================================ */
.admin-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--navbar-height) + 32px);
}

.admin-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
}

.admin-sidebar-header .admin-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.admin-sidebar-header .admin-role {
  font-size: 12px;
  color: var(--accent-green);
  font-weight: 600;
}

.admin-nav { padding: 10px; }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-green);
}

.admin-content { flex: 1; min-width: 0; }

/* ============================================================
   RETRAIN PROGRESS (UC-10)
   ============================================================ */
.progress-track {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient-primary);
  transition: width 0.5s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 1s infinite;
}

@keyframes shimmer {
  from { opacity: 0; }
  50% { opacity: 1; }
  to { opacity: 0; }
}

.retrain-log {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent-green);
  height: 220px;
  overflow-y: auto;
  line-height: 1.6;
}

.retrain-log-line {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   COLOR INPUT (UC-11)
   ============================================================ */
.color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input-wrapper input[type="color"] {
  width: 48px; height: 48px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 2px;
}

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

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

.modal {
  background: #111a14;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 100%;
  max-width: 540px;
  transform: scale(0.95);
  transition: var(--transition);
}

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

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.modal-close:hover { color: var(--text-primary); background: var(--bg-card-hover); }

/* ============================================================
   IMAGE THUMBNAIL
   ============================================================ */
.img-thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.img-result {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.3);
}

/* ============================================================
   STEP INDICATOR (UPLOAD FLOW)
   ============================================================ */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: var(--transition);
}

.step.active .step-circle {
  border-color: var(--accent-green);
  background: rgba(34,197,94,0.1);
  color: var(--accent-green);
}

.step.done .step-circle {
  border-color: var(--accent-green);
  background: var(--accent-green);
  color: #000;
}

.step-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.step.active .step-label { color: var(--accent-green); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin-bottom: 18px;
  min-width: 40px;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 28px 0;
  margin-top: 60px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

.footer strong {
  color: var(--accent-green);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-green { color: var(--accent-green); }
.text-teal { color: var(--accent-teal); }
.text-red { color: var(--accent-red); }
.text-yellow { color: var(--accent-yellow); }
.text-purple { color: var(--accent-purple); }
.text-orange { color: var(--accent-orange); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.w-full { width: 100%; }

.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; position: static; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .navbar-nav { display: none; }
  .hero h1 { font-size: 32px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .card { padding: 20px; }
  .page-title { font-size: 24px; }
  .stat-grid { grid-template-columns: 1fr; }
}
