/* =====================================================
   SIKLASIF NAIVE BAYES — Design System (match React)
   Soft cream + muted coral theme
   ===================================================== */
:root {
  --background: #f8efe6;
  --foreground: #45291f;
  --card: #fdf9f4;
  --card-foreground: #45291f;
  --primary: #cd6e64;
  --primary-foreground: #fdf8f3;
  --secondary: #f0e4d9;
  --secondary-foreground: #4a2e28;
  --muted: #f2e8de;
  --muted-foreground: #8a6a5c;
  --accent: #f1dccf;
  --accent-foreground: #472b24;
  --destructive: #bf4036;
  --destructive-foreground: #fdf6f1;
  --border: #e5d3c5;
  --input: #ecdbcd;
  --ring: #cd6e64;
  --green: #22a36a;
  --green-dark: #1a7a4f;
  --green-bg: rgba(34, 163, 106, 0.15);
  --red: #d23a3a;
  --red-dark: #a32a2a;
  --red-bg: rgba(210, 58, 58, 0.15);
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; align-items: flex-start; }
.sidebar {
  width: 288px; flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 65; opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card); color: var(--foreground);
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 70;
    width: 280px; max-width: 85vw;
    transform: translateX(-105%); transition: transform .25s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    overflow-y: auto;
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  body.no-scroll { overflow: hidden; }
}
.sidebar-brand {
  padding: 16px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img { width: 48px; height: 48px; border-radius: 9999px; object-fit: cover; box-shadow: 0 0 0 2px rgba(205,110,100,.3); }
.sidebar-brand .t { font-weight: 700; line-height: 1.2; }
.sidebar-brand .s { font-size: 12px; color: var(--muted-foreground); }

.nav { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; font-size: 14px;
  color: var(--foreground); background: transparent; border: none; text-align: left;
  transition: background .15s ease;
}
.nav-item:hover:not(.locked):not(.active) { background: rgba(241,220,207,.6); }
.nav-item.active { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.nav-item.locked { color: rgba(138,106,92,.55); cursor: not-allowed; }
.nav-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 9999px; font-size: 11px; font-weight: 700;
  background: var(--secondary); color: var(--foreground); flex-shrink: 0;
}
.nav-item.active .nav-step { background: rgba(253,248,243,.2); color: var(--primary-foreground); }
.nav-item svg.icon { flex-shrink: 0; }
.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-lock { opacity: .7; }

.sidebar-user { padding: 12px; border-top: 1px solid var(--border); background: rgba(241,220,207,.3); }
.sidebar-user-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 9999px; flex-shrink: 0;
  background: rgba(205,110,100,.2); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-user-meta { min-width: 0; }
.sidebar-user-meta .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-meta .u { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-meta .a { font-size: 10px; color: var(--muted-foreground); }
.sidebar-actions { display: flex; gap: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  padding: 16px 32px; border-bottom: 1px solid var(--border);
  background: rgba(253,249,244,.4);
  display: flex; align-items: center; justify-content: center;
  gap: 12px; position: relative;
}
.topbar .menu-toggle { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.breadcrumb-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 9999px;
  background: var(--card); border: 1px solid var(--border);
  font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.05);
  max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.content { padding: 24px 32px; max-width: 1152px; margin: 0 auto; width: 100%; }
.back-home { padding: 0 32px 24px; font-size: 12px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 4px; }
.back-home:hover { color: var(--foreground); }
@media (max-width: 900px) {
  .topbar, .content, .back-home { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-top: 12px; padding-bottom: 12px; }
}
@media (max-width: 640px) {
  .content { padding-top: 16px; padding-bottom: 16px; }
}

/* ---------- Typography ---------- */
.h1 { font-size: 30px; font-weight: 700; }
.h2 { font-size: 20px; font-weight: 700; }
.h3 { font-size: 18px; font-weight: 700; }
.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-green { color: var(--green-dark); }
.text-red { color: var(--red-dark); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- Spacing helpers ---------- */
.space-y > * + * { margin-top: 24px; }
.space-y-sm > * + * { margin-top: 12px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.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; }
.p-3 { padding: 12px; } .p-4 { padding: 16px; } .p-5 { padding: 20px; } .p-6 { padding: 24px; } .p-8 { padding: 32px; }
.px-3 { padding-left: 12px; padding-right: 12px; } .py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; } .flex-1 { flex: 1; min-width: 0; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .grid-md-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-md-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.overflow-auto { overflow-x: auto; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.card-lg { border-radius: 24px; }
.card-pad { padding: 20px; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.08); }
.bg-secondary { background: var(--secondary); }
.bg-accent { background: var(--accent); }
.rounded-lg { border-radius: 8px; } .rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; } .rounded-3xl { border-radius: 24px; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid var(--border); }
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: none;
  font-size: 14px; font-weight: 600; line-height: 1.2;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-destructive { background: var(--destructive); color: var(--destructive-foreground); }
.btn-card { background: var(--card); color: var(--foreground); border: 1px solid var(--border); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-xs { padding: 4px 8px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-pill { border-radius: 9999px; }
.btn-green { background: var(--green-bg); color: var(--green-dark); }
.btn-red { background: var(--red-bg); color: var(--red-dark); }
.btn-icon { padding: 6px; border-radius: 8px; background: transparent; border: none; display: inline-flex; }
.btn-icon:hover { background: var(--accent); }
.btn-icon.primary { color: var(--primary); }
.btn-icon.destructive { color: var(--destructive); }

/* ---------- Forms ---------- */
.label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 4px; }
.input {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--input); background: var(--background); color: var(--foreground);
  outline: none; transition: box-shadow .15s ease;
}
.input:focus { box-shadow: 0 0 0 2px rgba(205,110,100,.4); }
textarea.input { resize: vertical; }
.field { margin-bottom: 12px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (max-width: 640px) { .form-grid-2 { grid-template-columns: 1fr; } }
.input-group { position: relative; }
.input-group .lead-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); }
.input-group .trail-btn {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 8px; border-radius: 8px; border: none; background: transparent; color: var(--muted-foreground);
  display: inline-flex;
}
.input-group .trail-btn:hover { color: var(--foreground); background: var(--accent); }
.input-group .input.has-lead { padding-left: 40px; }
.input-group .input.has-trail { padding-right: 44px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; max-height: 384px; border-radius: 0 0 16px 16px; }
.table-wrap.tall { max-height: 500px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  background: var(--secondary); padding: 8px; text-align: left; font-weight: 600;
  position: sticky; top: 0; z-index: 1; white-space: nowrap;
}
table.data td { padding: 8px; border-top: 1px solid var(--border); vertical-align: middle; }
table.data td.num, table.data th.num { text-align: right; }
table.data td.ctr, table.data th.ctr { text-align: center; }
.empty-cell { padding: 40px; text-align: center; color: var(--muted-foreground); }

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.badge-laris { background: var(--green-bg); color: var(--green-dark); }
.badge-tidak { background: var(--red-bg); color: var(--red-dark); }
.badge-admin { background: rgba(205,110,100,.2); color: var(--primary); }
.badge-user { background: var(--secondary); color: var(--foreground); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 9999px; font-size: 12px; font-weight: 600;
}
.chip-primary { background: rgba(205,110,100,.15); color: var(--primary); }
.chip-green { background: var(--green-bg); color: var(--green-dark); }
.chip-muted { background: var(--secondary); color: var(--foreground); }

/* ---------- Stats / Metrics ---------- */
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.stat .ic { display: inline-flex; padding: 8px; border-radius: 8px; }
.stat .v { font-size: 24px; font-weight: 700; margin-top: 12px; }
.stat .l { font-size: 14px; color: var(--muted-foreground); }
.metric { border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.metric .l { font-size: 14px; font-weight: 500; opacity: .8; }
.metric .v { font-size: 30px; font-weight: 800; margin-top: 4px; }
.metric.m-primary { background: rgba(205,110,100,.1); color: var(--primary); }
.metric.m-green { background: var(--green-bg); color: var(--green-dark); }
.metric.m-coral { background: rgba(210,139,127,.15); color: #a04030; }

/* ---------- Progress bars ---------- */
.progress { height: 8px; border-radius: 9999px; background: var(--secondary); overflow: hidden; margin-top: 4px; }
.progress > div { height: 100%; border-radius: 9999px; }
.progress .fill-green { background: var(--green); }
.progress .fill-red { background: var(--red); }

/* ---------- Charts (pure CSS) ---------- */
.chart-bar { display: flex; align-items: flex-end; justify-content: space-around; height: 224px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.chart-bar .bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 33%; }
.chart-bar .bar {
  width: 56px; border-radius: 6px 6px 0 0; min-height: 4px;
  transition: height .4s ease; position: relative;
}
.chart-bar .bar-val { font-size: 12px; font-weight: 700; }
.chart-bar .bar-name { font-size: 12px; color: var(--muted-foreground); }
.bar.green { background: var(--green); }
.bar.red { background: var(--red); }
.pie-wrap { display: flex; align-items: center; justify-content: center; padding: 12px 0; }
.pie {
  width: 180px; height: 180px; border-radius: 9999px;
  background: conic-gradient(var(--green) 0 calc(var(--pct-laris) * 1%), var(--red) 0 100%);
  position: relative;
}
.pie::after {
  content: ""; position: absolute; inset: 22%;
  background: var(--card); border-radius: 9999px;
}
.pie-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 1; font-size: 12px; text-align: center;
}
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 260px; max-width: 360px; padding: 12px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border); box-shadow: 0 10px 15px rgba(0,0,0,.12);
  font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px;
  animation: toast-in .25s ease;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--destructive); }
.toast.warning { border-left: 4px solid #d99a2b; }
.toast.info { border-left: 4px solid #4a90d9; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 672px; max-height: 90vh; overflow-y: auto;
}
.modal-head {
  padding: 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); z-index: 1;
}
.modal-body { padding: 20px; }
.class-box { border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.class-box.winner { border-color: var(--primary); background: rgba(205,110,100,.05); }

/* ---------- Auth page ---------- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; background: var(--background); }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-photo { display: none; } }
.auth-photo { position: relative; }
.auth-photo img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-photo .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top right, rgba(58,31,26,.82), rgba(90,42,37,.63), rgba(196,122,110,.38));
}
.auth-photo .brand { position: absolute; top: 24px; left: 24px; display: flex; align-items: center; gap: 12px; color: #fff; }
.auth-photo .brand img { width: 48px; height: 48px; border-radius: 9999px; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.auth-photo .brand span { font-weight: 700; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.auth-photo .caption { position: absolute; bottom: 40px; left: 32px; right: 32px; color: #fff; }
.auth-photo .caption h2 { font-size: 36px; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.35); line-height: 1.15; }
.auth-photo .caption p { margin-top: 12px; color: rgba(255,255,255,.85); max-width: 448px; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form-inner { width: 100%; max-width: 448px; }
.tabs { background: var(--secondary); border-radius: 9999px; padding: 4px; display: flex; margin-bottom: 28px; }
.tabs button {
  flex: 1; padding: 10px; border-radius: 9999px; border: none; background: transparent;
  font-size: 14px; font-weight: 600; color: var(--muted-foreground); transition: all .15s ease;
}
.tabs button.active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.link-btn { background: none; border: none; color: var(--primary); font-weight: 600; font-size: 14px; padding: 0; }
.err-text { color: var(--destructive); font-size: 12px; margin-top: 4px; }
.alert-error {
  background: var(--red-bg); color: var(--red-dark);
  padding: 12px; border-radius: 8px; font-size: 14px; margin-bottom: 16px;
}

/* ---------- Landing page ---------- */
.hero {
  position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden;
}
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(58,31,26,.93), rgba(90,42,37,.69), rgba(196,122,110,.5));
}
.hero-header {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 16px 24px; display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; width: 100%;
}
.hero-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.hero-brand img { width: 48px; height: 48px; border-radius: 9999px; object-fit: cover; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.hero-brand span { font-weight: 700; color: #fff; font-size: 18px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.hero-content { position: relative; z-index: 10; max-width: 1024px; margin: 0 auto; padding: 96px 24px; width: 100%; color: #fff; }
.hero-tag {
  display: inline-block; padding: 4px 12px; border-radius: 9999px;
  background: rgba(255,255,255,.15); backdrop-filter: blur(4px);
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.2);
}
.hero-content h1 { margin-top: 20px; font-size: 48px; font-weight: 800; line-height: 1.05; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
@media (max-width: 768px) { .hero-content h1 { font-size: 36px; } }
.hero-content h1 .hl { color: #ffd0c4; }
.hero-content p { margin-top: 24px; font-size: 18px; color: rgba(255,255,255,.9); max-width: 576px; line-height: 1.6; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn-hero {
  padding: 14px 28px; border-radius: 9999px; background: var(--primary); color: var(--primary-foreground);
  font-weight: 600; box-shadow: 0 20px 25px -5px rgba(0,0,0,.2); display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s ease; border: none; font-size: 15px;
}
.btn-hero:hover { transform: scale(1.05); }
.btn-hero.ghost { background: rgba(255,255,255,.15); backdrop-filter: blur(4px); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.section-alur { max-width: 1280px; margin: 0 auto; padding: 80px 24px; }
.section-alur h2 { font-size: 40px; font-weight: 800; text-align: center; }
@media (max-width: 768px) { .section-alur h2 { font-size: 30px; } }
.section-alur .sub { text-align: center; color: var(--muted-foreground); margin-top: 12px; max-width: 672px; margin-left: auto; margin-right: auto; }
.steps-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card { background: var(--card); border-radius: 16px; padding: 24px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: all .2s ease; }
.step-card:hover { box-shadow: 0 4px 6px rgba(0,0,0,.07); transform: translateY(-4px); }
.step-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-card .ic { width: 48px; height: 48px; border-radius: 12px; background: rgba(205,110,100,.15); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.step-card .step-no { font-size: 14px; color: var(--muted-foreground); }
.step-card h3 { font-size: 20px; font-weight: 700; }
.step-card p { font-size: 14px; color: var(--muted-foreground); margin-top: 8px; line-height: 1.6; }
.landing-footer { border-top: 1px solid var(--border); padding: 32px; text-align: center; font-size: 14px; color: var(--muted-foreground); }

/* ---------- Beranda ---------- */
.welcome-card {
  background: linear-gradient(135deg, rgba(205,110,100,.15), rgba(241,220,207,.3));
  border-radius: 24px; padding: 32px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.welcome-card h1 { font-size: 36px; font-weight: 800; }
@media (max-width: 768px) { .welcome-card h1 { font-size: 28px; } }
.photo-frame { border-radius: 24px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 4px 6px rgba(0,0,0,.08); }
.photo-frame img { width: 100%; height: 320px; object-fit: cover; display: block; }
.map-frame { margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); height: 320px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.grad-card { border-radius: 24px; padding: 24px; border: 1px solid var(--border); background: linear-gradient(135deg, rgba(241,220,207,.4), rgba(205,110,100,.1)); }
.grad-card .title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.grad-card p { margin-top: 12px; color: rgba(69,41,31,.85); }
.grad-card ol, .grad-card ul { margin-top: 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: rgba(69,41,31,.85); }
.cta-banner {
  border-radius: 24px; padding: 32px; text-align: center;
  background: linear-gradient(to right, var(--primary), #d28b7f); color: var(--primary-foreground);
  box-shadow: 0 10px 15px rgba(0,0,0,.1);
}
.cta-banner h3 { font-size: 24px; font-weight: 800; }
.cta-banner p { margin-top: 4px; opacity: .9; }
.cta-banner a {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 9999px; background: var(--card); color: var(--foreground);
  font-weight: 700; box-shadow: 0 10px 15px rgba(0,0,0,.12); transition: transform .15s ease;
}
.cta-banner a:hover { transform: scale(1.05); }

/* ---------- Upload dropzone ---------- */
.dropzone {
  display: block; border: 2px dashed rgba(205,110,100,.4); border-radius: 16px;
  padding: 32px; text-align: center; cursor: pointer; transition: background .15s ease;
}
.dropzone:hover { background: rgba(241,220,207,.3); }
.dropzone .ic { color: var(--primary); display: flex; justify-content: center; }
.dropzone .txt { margin-top: 8px; font-weight: 500; }
.tag-quick { font-size: 12px; padding: 2px 8px; border-radius: 9999px; background: rgba(205,110,100,.15); color: var(--primary); font-weight: 500; }
.auto-bayar {
  padding: 10px 12px; border-radius: 8px; background: var(--secondary);
  display: flex; align-items: center; justify-content: space-between;
}
.auto-bayar .val { font-weight: 700; color: var(--primary); }

/* ---------- Search pill ---------- */
.search-pill { position: relative; }
.search-pill .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); }
.search-pill input {
  padding: 8px 12px 8px 36px; border-radius: 9999px; border: 1px solid var(--input);
  background: var(--background); width: 224px; outline: none;
}
.search-pill input:focus { box-shadow: 0 0 0 2px rgba(205,110,100,.4); }

/* ---------- Slider ---------- */
.slider { width: 100%; accent-color: var(--primary); cursor: pointer; }
.scale-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }

/* ---------- Confusion matrix ---------- */
table.cm { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cm th { border: 1px solid var(--border); background: var(--secondary); padding: 8px; text-align: center; }
table.cm td { border: 1px solid var(--border); padding: 12px; text-align: center; font-weight: 700; font-size: 20px; }
table.cm td.rowhead { background: var(--secondary); font-weight: 500; font-size: 14px; }
table.cm td.diag { background: var(--green-bg); color: var(--green-dark); }
table.cm td.offdiag { background: var(--red-bg); color: var(--red-dark); }

/* ---------- Formula boxes ---------- */
.formula-box { background: var(--secondary); border-radius: 8px; padding: 12px; }
.formula-box .name { font-weight: 600; }
.formula-box .body { font-family: ui-monospace, Menlo, Consolas, monospace; margin-top: 4px; color: rgba(69,41,31,.8); }
.rumus-hero {
  background: var(--secondary); border-radius: 8px; padding: 16px;
  font-family: ui-monospace, Menlo, Consolas, monospace; text-align: center; font-size: 18px;
}

/* ---------- Tentang page ---------- */
.sec-head { padding: 16px 24px; color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.sec-emerald { background: linear-gradient(to right, #059669, #10b981); }
.sec-sky { background: linear-gradient(to right, #0ea5e9, #06b6d4); }
.sec-amber { background: linear-gradient(to right, #f59e0b, #eab308); }
.sec-slate { background: linear-gradient(to right, #1e293b, #334155); }
.sec-gray { background: linear-gradient(to right, #475569, #6b7280); }
.sec-rose { background: linear-gradient(to right, #e11d48, #ef4444); }
.sec-instansi { background: linear-gradient(to right, #047857, #10b981); }
.profile-photo { width: 192px; height: 192px; border-radius: 9999px; object-fit: cover; box-shadow: 0 0 0 4px rgba(16,185,129,.4); background: var(--secondary); }
.dosen-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--background); }
.dosen-card .head { background: linear-gradient(to right, #047857, #10b981); color: #fff; padding: 32px; display: flex; flex-direction: column; align-items: center; }
.tech-card { border-radius: 16px; border: 1px solid var(--border); background: var(--background); padding: 20px; text-align: center; transition: box-shadow .2s ease; }
.tech-card:hover { box-shadow: 0 4px 6px rgba(0,0,0,.08); }
.tech-card .ic { margin: 0 auto; width: 48px; height: 48px; border-radius: 12px; background: rgba(16,185,129,.15); color: #059669; display: flex; align-items: center; justify-content: center; }
.info-list li { display: flex; align-items: center; gap: 8px; list-style: none; }
.info-list svg { color: #059669; flex-shrink: 0; }

/* ---------- Print report (PDF) ---------- */
.report-body { background: #fff; }
.report-page { max-width: 800px; margin: 0 auto; padding: 24px; background: #fff; color: #222; }
.report-toolbar { position: fixed; top: 12px; right: 12px; z-index: 10; }
.report-toolbar button {
  padding: 10px 20px; border-radius: 8px; border: none; background: var(--primary); color: #fff;
  font-weight: 600; box-shadow: 0 4px 8px rgba(0,0,0,.15);
}
@media print {
  .report-toolbar { display: none; }
  body { background: #fff; }
  .report-page { padding: 0; max-width: none; }
}

/* =====================================================
   RESPONSIVE REFINEMENTS
   ===================================================== */

/* Hero */
.hero { min-height: 80vh; }
.hero-header { padding: 16px 20px; flex-wrap: wrap; gap: 12px; }
@media (max-width: 640px) {
  .hero { min-height: 92vh; }
  .hero-content { padding: 120px 20px 64px; text-align: center; }
  .hero-content p { margin-left: auto; margin-right: auto; font-size: 16px; }
  .hero-cta { justify-content: center; }
  .hero-brand span { font-size: 15px; }
  .section-alur { padding: 56px 20px; }
}

/* Landing steps */
@media (max-width: 640px) {
  .step-card .head { flex-wrap: wrap; }
}

/* Auth */
@media (max-width: 640px) {
  .auth-form-wrap { padding: 32px 20px; }
  .auth-form-inner h1[style] { font-size: 26px !important; }
}

/* Beranda */
@media (max-width: 640px) {
  .welcome-card { padding: 24px 20px; }
  .photo-frame img { height: 200px; }
  .map-frame { height: 240px; }
  .cta-banner { padding: 24px 20px; }
  .cta-banner h3 { font-size: 20px; }
}

/* Cards & sections */
@media (max-width: 640px) {
  .card-pad { padding: 16px; }
  .p-8 { padding: 20px; }
  .h1 { font-size: 24px; }
  .metric .v { font-size: 24px; }
  .stat .v { font-size: 20px; }
  .rumus-hero { font-size: 14px !important; }
}

/* Tables: compact + always scrollable horizontally */
.table-wrap { -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) {
  table.data { font-size: 13px; }
  table.data th, table.data td { padding: 6px; }
  .table-wrap, .table-wrap.tall { max-height: none; }
  td .btn-icon svg.icon { width: 13px; height: 13px; }
}
table.cm th, table.cm td { word-break: keep-all; }

/* Toolbars: stack controls nicely on small screens */
@media (max-width: 640px) {
  .search-pill { width: 100%; }
  .search-pill input { width: 100%; }
  .content form.search-pill { display: block; width: 100%; }
}

/* Buttons touch-friendly on mobile */
@media (max-width: 640px) {
  .btn { padding: 10px 14px; }
  .btn-sm { padding: 8px 12px; }
  .btn-block { width: 100%; }
  .sidebar-actions .btn { flex: 1; }
}

/* Charts */
@media (max-width: 480px) {
  .chart-bar .bar { width: 42px; }
  .pie { width: 150px; height: 150px; }
}

/* Modal */
@media (max-width: 640px) {
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: 88vh; border-radius: 16px 16px 0 0; }
}

/* Dropzone & upload */
@media (max-width: 640px) {
  .dropzone { padding: 24px 16px; }
  .dropzone svg.icon { width: 28px; height: 28px; }
}

/* Tentang page profile layout stacks */
@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr !important; justify-items: center; text-align: center; }
  .info-list li { justify-content: center; }
}
@media (max-width: 640px) {
  .sec-head { font-size: 16px; padding: 12px 16px; }
  .tech-card { padding: 14px; }
}

/* Kelola pengguna edit grid */
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

/* Auto bayar row stacks when narrow */
@media (max-width: 420px) {
  .auto-bayar { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* Long words / names in tables don't break layout */
td, th { overflow-wrap: anywhere; }
.breadcrumb-pill, .nav-label { overflow-wrap: normal; }
