/* =========================================================
   ARENA — Sistem Pendaftaran Perlombaan
   Palet: Midnight Field (#12213D) + Signal Amber (#F2A93B)
          + Court Green (#2E9E6B) + Chalk (#F6F4EE)
   Tipografi: 'Space Grotesk' (display) + 'Inter' (teks)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --midnight: #12213D;
  --midnight-2: #1B3358;
  --amber: #F2A93B;
  --amber-dark: #D6900F;
  --green: #2E9E6B;
  --red: #C4453D;
  --chalk: #F6F4EE;
  --chalk-2: #ECE8DD;
  --ink: #1A1D22;
  --ink-soft: #565B66;
  --line: #DEDACC;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(18, 33, 61, 0.12);
  --sidebar-width: 250px;
  --navbar-height: 76px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--chalk);
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, .display {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--midnight);
  line-height: 1.15;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--amber); color: var(--midnight); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; border-color: var(--midnight); color: var(--midnight); }
.btn-outline:hover { background: var(--midnight); color: #fff; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a8332c; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #257d54; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

/* ---------- Login dengan Google ---------- */
.btn-google {
  background: #fff;
  color: #757575;
  border: 1px solid #ddd;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-size: 16px;
  text-decoration: none;
}
.btn-google:hover {
  background: #f5f5f5;
  border-color: #ccc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.btn-google img {
  width: 20px;
  height: 20px;
}
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}
.divider:not(:empty)::before {
  margin-right: 15px;
}
.divider:not(:empty)::after {
  margin-left: 15px;
}
.divider span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--midnight);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
  padding: 0 24px;
}

/* ===== BRAND WITH LOGO ===== */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  height: 48px;
  width: auto;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.brand-logo .logo-placeholder {
  width: 48px;
  height: 48px;
  background: var(--amber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  color: var(--midnight);
  flex-shrink: 0;
}

.brand .brand-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .brand-name {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.brand .brand-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--amber);
  opacity: 0.85;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand .dot {
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: #C9CFDD;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: #fff; }

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--midnight);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 84px 0 100px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(242,169,59,0.20), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(46,158,107,0.18), transparent 40%);
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  color: var(--amber);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 14px;
  display:flex;
  align-items:center;
  gap:8px;
}
.hero h1 {
  font-size: 48px;
  max-width: 560px;
}
.hero p.lead {
  color: #B8BFCF;
  font-size: 17px;
  max-width: 480px;
  margin-bottom: 30px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 46px;
}
.hero-stats div strong {
  font-family: 'Space Grotesk';
  font-size: 28px;
  display: block;
  color: var(--amber);
}
.hero-stats div span {
  font-size: 13px;
  color: #9AA2B4;
}

.hero-panel {
  background: var(--midnight-2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  padding: 28px;
}
.hero-panel .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(255,255,255,.14);
}
.hero-panel .row:last-child { border-bottom: none; }
.hero-panel .row .num {
  font-family: 'Space Grotesk';
  color: var(--amber);
  font-weight: 700;
  margin-right: 12px;
}
.hero-panel .row .txt strong {
  display: block;
  font-size: 14px;
  color: #fff;
}
.hero-panel .row .txt small {
  color: #9AA2B4;
}

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-head {
  max-width: 620px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head h2 { font-size: 32px; }
.section-head p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- Cards Lomba ---------- */
.grid-lomba {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card-lomba {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card-lomba:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card-lomba .tag {
  display: inline-block;
  background: var(--chalk-2);
  color: var(--midnight);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.card-lomba-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-lomba h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.card-lomba p {
  color: var(--ink-soft);
  font-size: 14.5px;
  flex: 1;
  margin-bottom: 16px;
}
.card-lomba .meta {
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 16px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.card-lomba .meta b { color: var(--ink); }

/* ---------- Forms ---------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 7px;
  color: var(--midnight);
}
.form-group .hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 5px;
}
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #FBFAF6;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--amber);
  background: #fff;
}
textarea { resize: vertical; min-height: 90px; }

/* File upload dropzone */
.file-drop {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 26px;
  text-align: center;
  background: #FBFAF6;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-drop:hover, .file-drop.dragover {
  border-color: var(--amber);
  background: #FFF7E9;
}
.file-drop strong { color: var(--midnight); }
.file-drop small {
  display: block;
  color: var(--ink-soft);
  margin-top: 6px;
}
#file-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13.5px;
}
.file-item .file-remove {
  color: var(--red);
  cursor: pointer;
  font-weight: 600;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14.5px;
  border: 1px solid transparent;
}
.alert-success {
  background: #E7F5EE;
  color: #1C6B47;
  border-color: #BFE3D2;
}
.alert-danger {
  background: #FBEAE9;
  color: #9C2F28;
  border-color: #F3C7C4;
}
.alert ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.badge-warning {
  background: #FDF1DC;
  color: #A6720B;
}
.badge-success {
  background: #E1F4EB;
  color: #1C6B47;
}
.badge-danger {
  background: #FBEAE9;
  color: #9C2F28;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--midnight) 0%, var(--midnight) 260px, var(--chalk) 260px);
  padding: 40px 20px;
}
.auth-head {
  text-align: center;
  margin-bottom: 26px;
}
.auth-head .dot {
  width: 14px;
  height: 14px;
  background: var(--amber);
  margin: 0 auto 14px;
  border-radius: 4px;
  transform: rotate(45deg);
}
.auth-head h1 {
  color: #fff;
  font-size: 26px;
}
.auth-head p {
  color: #B8BFCF;
  font-size: 14.5px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
}
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.auth-switch a {
  color: var(--amber-dark);
  font-weight: 600;
}

/* =========================================================
   ===== DASHBOARD LAYOUT =====
   ========================================================= */
.dash-wrap {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - var(--navbar-height));
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--midnight);
  color: #fff;
  padding: 28px 18px;
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar .user-box {
  padding: 14px;
  background: var(--midnight-2);
  border-radius: 10px;
  margin-bottom: 24px;
}
.sidebar .user-box strong {
  display: block;
  font-size: 14.5px;
}
.sidebar .user-box span {
  font-size: 12.5px;
  color: #9AA2B4;
}
.sidebar .sidebar-section {
  margin-bottom: 8px;
}
.sidebar .sidebar-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6B7590;
  padding: 0 14px;
  margin-bottom: 6px;
  font-weight: 600;
}
.sidebar nav {
  flex: 1;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: #C9CFDD;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .15s ease;
}
.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--midnight-2);
  color: #fff;
}
.sidebar nav a.active {
  border-left: 3px solid var(--amber);
}
.sidebar nav a .badge-sidebar {
  margin-left: auto;
  background: var(--amber);
  color: var(--midnight);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar .sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  color: #C9CFDD;
  font-weight: 500;
}
.sidebar .sidebar-footer a:hover {
  background: var(--midnight-2);
  color: #fff;
}
.sidebar .sidebar-footer a.logout {
  color: #E8807A;
}
.sidebar .sidebar-footer a.logout:hover {
  background: rgba(196, 69, 61, 0.2);
  color: #FF9A94;
}

/* ---------- Main Content ---------- */
.main-content {
  padding: 36px 40px;
  background: var(--chalk);
  min-height: calc(100vh - var(--navbar-height));
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-head h1 { font-size: 24px; }

/* ---------- Stat cards ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.stat-card .n {
  font-family: 'Space Grotesk';
  font-size: 30px;
  font-weight: 700;
  color: var(--midnight);
}
.stat-card .l {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.stat-card.accent .n { color: var(--amber-dark); }

/* ---------- Table ---------- */
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
thead {
  background: var(--chalk-2);
}
th, td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FBFAF6; }
.table-actions { display: flex; gap: 8px; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.empty-state .dot {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--chalk-2);
  margin: 0 auto 16px;
}

/* ===== Filter Chips (kategori) ===== */
.chip-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}
.chip-filter .chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
  touch-action: manipulation;
}
.chip-filter .chip:hover {
  border-color: var(--amber);
  color: var(--midnight);
}
.chip-filter .chip.active {
  background: var(--midnight);
  border-color: var(--midnight);
  color: #fff;
}
.chip-filter .chip .count {
  opacity: .7;
  font-weight: 500;
  margin-left: 4px;
}

/* ===== Section preview di dashboard ===== */
.section-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-mini-head h2 { font-size: 18px; }
.section-mini-head a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--amber-dark);
}
.grid-lomba.compact {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 36px;
}

/* Card clickable (buka modal) */
.card-lomba.clickable { cursor: pointer; }
.card-lomba .badge-daftar {
  position: absolute;
  top: 14px;
  right: 14px;
}
.card-lomba { position: relative; }

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,18,32,.6);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 16px;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow);
  animation: modalIn .18s ease;
}
@keyframes modalIn {
  from { opacity:0; transform: translateY(12px);}
  to { opacity:1; transform:translateY(0);}
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: var(--ink-soft);
}
.modal-close:hover {
  background: var(--midnight);
  color: #fff;
  border-color: var(--midnight);
}
.modal-box .tag { display:inline-block; margin-bottom: 12px; }
.modal-box h2 {
  font-size: 22px;
  margin-bottom: 10px;
  padding-right: 30px;
}
.modal-box .desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-bottom: 18px;
  white-space: pre-line;
}
.modal-box .kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 22px;
}
.modal-box .kv-grid .kv-item span:first-child {
  display:block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.modal-box .kv-grid .kv-item span:last-child {
  font-weight: 600;
  font-size: 14.5px;
}
.modal-box .persyaratan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-box .persyaratan-list li {
  font-size: 14px;
  padding-left: 22px;
  position: relative;
  color: var(--ink);
}
.modal-box .persyaratan-list li::before {
  content: '📄';
  position: absolute;
  left: 0;
  top: 0;
  font-size: 13px;
}

/* ===== Upload 4 dokumen ===== */
.doc-slot {
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color .15s ease;
}
.doc-slot.filled {
  border-color: var(--green);
  background: #F5FBF8;
  border-style: solid;
}
.doc-slot .doc-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.doc-slot .doc-slot-label {
  font-weight: 600;
  font-size: 14px;
}
.doc-slot .doc-slot-label .opsional {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 12.5px;
}
.doc-slot .doc-slot-req { color: var(--red); }
.doc-slot input[type=file] {
  width: 100%;
  font-size: 13.5px;
}
.doc-slot .doc-slot-info {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 6px;
}
.doc-slot .doc-slot-info.ok {
  color: var(--green);
  font-weight: 600;
}

/* ===== Price list per kategori (admin) ===== */
.kategori-block { margin-bottom: 26px; }
.kategori-block-title {
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--chalk-2);
  border-radius: 10px 10px 0 0;
  font-weight: 700;
  font-size: 14.5px;
}
.kategori-block .table-wrap { border-radius: 0 0 10px 10px; }
.harga-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.harga-inline-form input[type=number] {
  width: 130px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13.5px;
}
.harga-inline-form button {
  padding: 7px 12px;
  font-size: 12.5px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--midnight);
  color: #9AA2B4;
  padding: 40px 0;
  font-size: 13.5px;
  text-align: center;
}
.site-footer strong { color: #fff; }

/* ---------- Detail page ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
.info-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}
.info-box h3 {
  font-size: 16px;
  margin-bottom: 14px;
}
.kv {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--chalk-2);
  font-size: 14.5px;
}
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--ink-soft); }
.kv span:last-child {
  font-weight: 600;
  text-align: right;
}

/* ===== MOBILE NAV TOGGLE ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  touch-action: manipulation;
}

/* =========================================================
   ===== RESPONSIVE - TABLET & MOBILE =====
   ========================================================= */

/* ===== TABLET LANDSCAPE (1024px) ===== */
@media (max-width: 1024px) {
  .grid-lomba {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-lomba.compact {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero h1 {
    font-size: 40px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-box .kv-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== TABLET PORTRAIT (900px) ===== */
@media (max-width: 900px) {
  :root {
    --navbar-height: 64px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero {
    padding: 50px 0 60px;
  }
  .hero h1 {
    font-size: 34px;
    max-width: 100%;
  }
  .hero p.lead {
    max-width: 100%;
    font-size: 16px;
  }
  .hero-stats {
    gap: 24px;
    margin-top: 28px;
  }
  .hero-stats div strong {
    font-size: 24px;
  }
  
  .grid-lomba {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .grid-lomba.compact {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* ===== DASHBOARD SIDEBAR - TABLET ===== */
  .dash-wrap {
    grid-template-columns: 1fr;
    min-height: calc(100vh - var(--navbar-height));
  }
  
  .sidebar {
    position: sticky;
    top: var(--navbar-height);
    height: auto;
    max-height: 56px;
    overflow: hidden;
    padding: 0 16px;
    background: var(--midnight);
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-direction: column;
    transition: max-height .3s ease;
  }
  .sidebar.expanded {
    max-height: 500px;
    overflow-y: auto;
    padding: 12px 16px 16px;
  }
  
  .sidebar .user-box {
    display: none;
  }
  
  .sidebar .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
  }
  .sidebar .sidebar-toggle .arrow {
    transition: transform .3s ease;
    font-size: 18px;
  }
  .sidebar.expanded .sidebar-toggle .arrow {
    transform: rotate(180deg);
  }
  
  .sidebar .sidebar-content {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .sidebar.expanded .sidebar-content {
    display: flex;
  }
  
  .sidebar .sidebar-section-title {
    font-size: 10px;
    padding: 0 12px;
    margin-top: 8px;
  }
  
  .sidebar nav a {
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 2px;
    border-radius: 6px;
  }
  .sidebar nav a.active {
    border-left: none;
    border-left: 3px solid var(--amber);
  }
  
  .sidebar .sidebar-footer {
    display: none;
  }
  .sidebar.expanded .sidebar-footer {
    display: block;
    margin-top: 8px;
    padding-top: 12px;
  }
  .sidebar .sidebar-footer a {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .main-content {
    padding: 24px 20px;
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .section {
    padding: 50px 0;
  }
  .section-head h2 {
    font-size: 28px;
  }
  
  .form-card {
    padding: 28px 24px;
  }
}

/* ===== MOBILE LARGE (768px) ===== */
@media (max-width: 768px) {
  .brand .brand-sub {
    display: none;
  }
  .brand .brand-name {
    font-size: 20px;
  }
  .brand-logo img {
    height: 40px;
  }
  .brand-logo .logo-placeholder {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  .brand {
    gap: 10px;
  }
  
  .navbar .container {
    height: var(--navbar-height);
    padding: 0 16px;
  }
  
  .nav-links {
    gap: 16px;
  }
  .nav-links a {
    font-size: 13px;
  }
  .nav-cta .btn-sm {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== MOBILE SMALL (600px) ===== */
@media (max-width: 600px) {
  :root {
    --navbar-height: 60px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  .navbar .container {
    height: var(--navbar-height);
    padding: 0 14px;
  }
  
  .brand {
    gap: 8px;
  }
  .brand .brand-name {
    font-size: 17px;
  }
  .brand .brand-sub {
    display: none;
  }
  .brand-logo img {
    height: 34px;
  }
  .brand-logo .logo-placeholder {
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 8px;
  }
  .brand .dot {
    width: 6px;
    height: 6px;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--midnight);
    padding: 16px 20px 20px;
    gap: 6px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-direction: column;
  }
  .nav-links.mobile-open {
    display: flex;
  }
  .nav-links a {
    font-size: 15px;
    padding: 10px 0;
    width: 100%;
  }
  .nav-links .nav-cta {
    flex-direction: column;
    width: 100%;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .nav-links .nav-cta .btn {
    width: 100%;
    justify-content: center;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-cta {
    gap: 6px;
  }
  .nav-cta .btn-sm {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 6px;
  }
  
  .hero {
    padding: 32px 0 44px;
  }
  .hero h1 {
    font-size: 26px;
  }
  .hero p.lead {
    font-size: 14px;
  }
  .hero-stats {
    flex-wrap: wrap;
    gap: 14px;
  }
  .hero-stats div strong {
    font-size: 20px;
  }
  .hero-stats div span {
    font-size: 11px;
  }
  .hero-panel {
    padding: 16px 14px;
    border-radius: 12px;
  }
  .hero-panel .row {
    padding: 10px 0;
    font-size: 13px;
  }
  
  .grid-lomba {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .grid-lomba.compact {
    grid-template-columns: 1fr;
  }
  
  .card-lomba-body {
    padding: 16px;
  }
  .card-lomba h3 {
    font-size: 17px;
  }
  
  .section {
    padding: 32px 0;
  }
  .section-head {
    margin-bottom: 24px;
  }
  .section-head h2 {
    font-size: 22px;
  }
  .section-head p {
    font-size: 14px;
  }
  
  /* ===== DASHBOARD SIDEBAR - MOBILE ===== */
  .sidebar {
    max-height: 48px;
    padding: 0 14px;
  }
  .sidebar .sidebar-toggle {
    padding: 12px 0;
    font-size: 13px;
  }
  .sidebar.expanded {
    max-height: 400px;
    padding: 10px 14px 14px;
  }
  .sidebar nav a {
    padding: 9px 12px;
    font-size: 13px;
  }
  .sidebar .sidebar-footer a {
    padding: 9px 12px;
    font-size: 13px;
  }
  .sidebar .sidebar-section-title {
    font-size: 9px;
    padding: 0 10px;
  }
  
  .main-content {
    padding: 16px 14px;
  }
  
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .page-head h1 {
    font-size: 20px;
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card {
    padding: 14px;
  }
  .stat-card .n {
    font-size: 22px;
  }
  .stat-card .l {
    font-size: 11px;
  }
  
  .form-card {
    padding: 18px 14px;
    border-radius: 12px;
  }
  .form-group label {
    font-size: 13px;
  }
  input[type=text], input[type=email], input[type=password], input[type=tel],
  input[type=number], input[type=date], textarea, select {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .modal-box {
    padding: 20px 16px;
    margin: 10px;
    border-radius: 12px;
  }
  .modal-box h2 {
    font-size: 18px;
    padding-right: 20px;
  }
  .modal-box .kv-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .modal-close {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .auth-wrap {
    padding: 20px 16px;
    min-height: calc(100vh - var(--navbar-height));
  }
  .auth-head h1 {
    font-size: 22px;
  }
  
  .table-wrap {
    overflow-x: auto;
    border-radius: 10px;
  }
  table {
    font-size: 13px;
    min-width: 580px;
  }
  th, td {
    padding: 10px 14px;
  }
  
  .chip-filter .chip {
    padding: 6px 14px;
    font-size: 12px;
  }
  
  .file-drop {
    padding: 16px 12px;
  }
  .file-drop strong {
    font-size: 14px;
  }
  
  .doc-slot {
    padding: 12px 12px;
  }
  .doc-slot .doc-slot-label {
    font-size: 13px;
  }
  
  .kategori-block-title {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 12px 16px;
  }
  .harga-inline-form {
    flex-wrap: wrap;
    width: 100%;
  }
  .harga-inline-form input[type=number] {
    flex: 1;
    min-width: 80px;
  }
  
  .detail-grid {
    gap: 16px;
  }
  .info-box {
    padding: 16px;
  }
  
  .site-footer {
    padding: 24px 16px;
    font-size: 12px;
  }
  
  .btn {
    padding: 10px 18px;
    font-size: 14px;
  }
  .btn-sm {
    padding: 6px 12px;
    font-size: 11px;
  }
}

/* ===== VERY SMALL PHONES (380px) ===== */
@media (max-width: 380px) {
  .container {
    padding: 0 12px;
  }
  
  .brand .brand-name {
    font-size: 15px;
  }
  .brand-logo img {
    height: 30px;
  }
  .brand-logo .logo-placeholder {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  
  .hero h1 {
    font-size: 22px;
  }
  
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .stat-card {
    padding: 12px;
  }
  .stat-card .n {
    font-size: 18px;
  }
  
  .modal-box {
    padding: 16px 12px;
  }
  
  .form-card {
    padding: 14px 10px;
  }
  
  .sidebar nav a {
    font-size: 12px;
    padding: 8px 10px;
  }
  .sidebar .sidebar-footer a {
    font-size: 12px;
    padding: 8px 10px;
  }
  .sidebar.expanded {
    max-height: 350px;
  }
}

/* ===== FIX iOS ZOOM ===== */
@supports (-webkit-touch-callout: none) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ===== SAFE AREA SUPPORT ===== */
@supports (padding: max(0px)) {
  .navbar .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .main-content {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
  .sidebar {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}