/* =====================================================================
   FISH-SCM GEO — tema VibeCoder (glassmorphism indigo–violet)
   ===================================================================== */
:root {
  --bg: #F3F0FF;
  --ink: #1F1B3A;
  --muted: #635F82;
  --indigo: #4F46E5;
  --violet: #8B5CF6;
  --pink: #EC4899;
  --sky: #0EA5E9;
  --emerald: #10B981;
  --amber: #F59E0B;
  --rose: #F43F5E;
  --grad: linear-gradient(135deg, #4F46E5, #8B5CF6);
  --glass: rgba(255,255,255,.62);
  --border: rgba(255,255,255,.75);
  --shadow: 0 10px 34px rgba(79,70,229,.12);
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .55em; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: .98rem; margin-top: 1.1em; }
p { margin: .35em 0; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: rgba(79,70,229,.09); padding: .1em .35em; border-radius: 6px; font-size: .88em; color: #4338CA; }
small { color: var(--muted); }
img { max-width: 100%; }
.ta-r { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .84em; }
.pre { white-space: pre-wrap; word-break: break-word; }
.inline { display: inline; }
.full { grid-column: 1 / -1; }

/* ------------------------- glass & card ------------------------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card h2 { display: flex; align-items: center; gap: 8px; border-bottom: 1px dashed rgba(99,95,130,.25); padding-bottom: 10px; }

/* ------------------------- buttons ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 12px; cursor: pointer;
  font: inherit; font-weight: 600; padding: 10px 18px; transition: .18s;
  text-decoration: none !important; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(79,70,229,.35); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.55); border-color: rgba(79,70,229,.25); color: var(--indigo); }
.btn-ghost:hover { background: rgba(255,255,255,.9); }
.btn-xs { padding: 4px 10px; font-size: .8rem; border-radius: 9px; }
.btn-block { width: 100%; margin-top: 8px; }

/* ------------------------- alerts ------------------------- */
.alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; border: 1px solid; }
.alert-success { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.4); color: #065F46; }
.alert-error { background: rgba(244,63,94,.1); border-color: rgba(244,63,94,.4); color: #9F1239; }
.alert-warning { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.45); color: #92400E; }

/* ------------------------- forms ------------------------- */
label { display: block; font-size: .86rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
label input, label select, label textarea {
  display: block; width: 100%; margin-top: 5px;
  font: inherit; font-weight: 400; color: var(--ink);
  padding: 9px 12px; border-radius: 11px;
  border: 1px solid rgba(99,95,130,.3); background: rgba(255,255,255,.75);
  transition: .15s;
}
label input:focus, label select:focus, label textarea:focus {
  outline: none; border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,.18); background: #fff;
}
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
label.check input { width: auto; margin: 0; }
input.lat, input.lng { flex: 1; }
input.acc { width: 130px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.geo-row { display: flex; gap: 8px; align-items: center; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-row input, .filter-row select { padding: 8px 12px; border-radius: 11px; border: 1px solid rgba(99,95,130,.3); font: inherit; background: rgba(255,255,255,.8); }

/* ------------------------- grids ------------------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 18px; margin-bottom: 26px; }
.kpi { border-radius: var(--radius); padding: 18px 20px; }
.kpi span { font-size: .8rem; font-weight: 600; color: var(--muted); display: block; margin-bottom: 6px; }
.kpi b { font-size: 1.55rem; color: var(--ink); }
.kpi b small { font-size: .75rem; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 26px; }
.grid-2 .card { margin-bottom: 0; }
.section-gap { margin-bottom: 26px; }

/* ------------------------- tables ------------------------- */
.table-wrap { overflow-x: auto; border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid rgba(99,95,130,.18); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid rgba(99,95,130,.12); vertical-align: top; }
.tbl tr:hover td { background: rgba(79,70,229,.04); }
.tbl-sm td, .tbl-sm th { padding: 7px 10px; font-size: .84rem; }

/* ------------------------- badges ------------------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.badge-ok { background: rgba(16,185,129,.15); color: #047857; }
.badge-warn { background: rgba(245,158,11,.18); color: #92400E; }
.badge-node { background: rgba(79,70,229,.12); color: #4338CA; }
.badge-qc { background: rgba(14,165,233,.13); color: #0369A1; }
.badge-grade { background: var(--grad); color: #fff; }
.badge-case-study, .badge-project { background: rgba(236,72,153,.13); color: #BE185D; }

/* ------------------------- landing ------------------------- */
.landing { min-height: 100vh; }
.landing-bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 380px at 12% 8%, rgba(139,92,246,.28), transparent 60%),
    radial-gradient(520px 340px at 85% 18%, rgba(236,72,153,.20), transparent 60%),
    radial-gradient(640px 420px at 78% 85%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(420px 300px at 22% 88%, rgba(79,70,229,.16), transparent 60%),
    linear-gradient(160deg, #F6F3FF, #EFEAFF);
}
.landing-wrap { max-width: 1080px; margin: 0 auto; padding: 44px 22px 60px; }
.landing-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; border-radius: 24px; padding: 38px 40px; margin-bottom: 30px; align-items: center; }
.hero-text h1 { font-size: 2.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 8px 0; }
.hero-sub { color: var(--muted); }
.brand-badge { display: inline-block; background: rgba(79,70,229,.1); color: var(--indigo); font-weight: 700; font-size: .78rem; padding: 5px 12px; border-radius: 999px; }
.hero-login form h2 { margin-top: 0; }
.landing-trace { border-radius: 20px; padding: 24px 28px; margin-bottom: 30px; }
.trace-form { display: flex; gap: 10px; margin-top: 10px; }
.trace-form input { flex: 1; padding: 11px 14px; border-radius: 12px; border: 1px solid rgba(99,95,130,.3); font: inherit; background: rgba(255,255,255,.85); }
.landing-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 30px; }
.stat { border-radius: var(--radius); padding: 20px 24px; }
.stat b { font-size: 1.7rem; display: block; }
.stat span { color: var(--muted); font-size: .85rem; }
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 34px; }
.landing-features .card h3 { margin-top: 0; }
.landing-foot { text-align: center; color: var(--muted); font-size: .86rem; padding: 10px; }
.trace-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.trace-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 26px; }
.trace-page h1 { margin-top: 6px; }

/* ------------------------- app shell ------------------------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 262px; flex-shrink: 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
  border-radius: 0 18px 18px 0; border-left: none; border-top: none; border-bottom: none;
  padding: 18px 14px;
}
.side-head { display: flex; gap: 10px; align-items: center; padding: 6px 8px 16px; border-bottom: 1px dashed rgba(99,95,130,.3); margin-bottom: 12px; }
.side-head b { display: block; line-height: 1.2; }
.side-head small { font-size: .72rem; }
.side-nav { flex: 1; overflow-y: auto; }
.nav-group { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 14px 8px 5px; }
.side-nav a {
  display: block; padding: 8px 12px; border-radius: 11px; color: var(--ink);
  font-weight: 500; font-size: .92rem; margin-bottom: 2px; text-decoration: none;
}
.side-nav a:hover { background: rgba(255,255,255,.7); }
.side-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.35); }
.side-foot { border-top: 1px dashed rgba(99,95,130,.3); padding-top: 12px; }
.mini-user { margin-bottom: 10px; }
.mini-user b { display: block; font-size: .9rem; }
.mini-user span { font-size: .72rem; color: var(--muted); }
.app-main { flex: 1; min-width: 0; padding: 18px 24px 40px; }
.topbar { border-radius: var(--radius); padding: 14px 22px; display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.topbar h1 { margin: 0; }
.topbar small { display: block; }
.page-content > .card, .page-content > .grid-2 > .card { margin-bottom: 24px; }
.app-foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 14px 6px 4px; border-top: 1px dashed rgba(99,95,130,.22); margin-top: 8px; }
.app-foot b { color: var(--indigo); }

/* ------------------------- komponen modul ------------------------- */
.batch-detail { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.batch-top { display: grid; grid-template-columns: 1fr 190px; gap: 20px; align-items: start; }
.qr-box { text-align: center; }
.qr-box img { border-radius: 12px; background: #fff; padding: 6px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid rgba(79,70,229,.25); }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: ''; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--grad); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(79,70,229,.4);
}
.timeline time { display: block; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline b { display: block; }
.timeline span { font-size: .86rem; color: var(--muted); }
.split-row { display: flex; gap: 10px; margin-bottom: 10px; }
.split-row input[type=text] { flex: 2; }
.split-row input.w { flex: 1; }
.split-row input { padding: 8px 12px; border-radius: 11px; border: 1px solid rgba(99,95,130,.3); font: inherit; }
.qr-img { background: #fff; padding: 4px; border-radius: 10px; }

/* ------------------------- responsive ------------------------- */
@media (max-width: 980px) {
  .landing-hero, .trace-grid, .chart-grid, .grid-2, .batch-detail { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .batch-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-main { padding: 10px 10px 30px; }
  .topbar { padding: 10px 12px; }
  label input, label select, label textarea, .filter-row input, .filter-row select { font-size: 16px; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .22s ease; width: 270px; box-shadow: 0 0 40px rgba(31,27,58,.25); }
  .sidebar.open { transform: translateX(0); }
  .app-main { padding: 12px 14px 36px; }
  .topbar { padding: 12px 14px; }
  .landing-hero { padding: 26px 22px; }
  .hero-text h1 { font-size: 1.7rem; }
  .trace-form { flex-direction: column; }
  .geo-row { flex-wrap: wrap; }
  input.acc { width: 100%; }
}
