/* ============================================================================
   Mockup layout glue — only wrappers / grids / app-shell. Component look comes
   from swarnaloka.css (the real SWARNALOKA design system). Colors use --mp-*.
   ============================================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--mp-font-body);
  color: var(--mp-ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* --- Demo banner (penanda bahwa ini mockup) ---------------------------- */
.demo-flag {
  position: fixed; z-index: 60; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--mp-font-display); font-weight: 700; font-size: var(--mp-text-xs);
  letter-spacing: .04em; color: var(--mp-navy);
  background: var(--mp-surface-glass-strong); backdrop-filter: blur(8px);
  padding: .5em 1em; border-radius: var(--mp-radius-pill);
  box-shadow: var(--mp-shadow-sm); border: 1px solid rgba(255,255,255,.7);
}

/* ====================================================================== */
/* COVER / NAVIGATOR (index.html)                                          */
/* ====================================================================== */
.cover { min-height: 100vh; }
.cover__inner {
  position: relative; z-index: 2;
  max-width: 1080px; margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 1.5rem 6rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.logo-chip {
  background: #fff; border-radius: var(--mp-radius-lg);
  padding: var(--mp-space-4); box-shadow: var(--mp-shadow-md);
  display: inline-flex;
}
.logo-chip img { display: block; }
.cover__lead {
  max-width: 640px; font-size: var(--mp-text-lg); color: var(--mp-navy);
  line-height: 1.5; margin: var(--mp-space-5) 0 var(--mp-space-7);
  background: var(--mp-surface-glass-strong); backdrop-filter: blur(8px);
  padding: var(--mp-space-4) var(--mp-space-6); border-radius: var(--mp-radius-lg);
  border: 1px solid rgba(255,255,255,.6);
}

.nav-grid {
  display: grid; gap: var(--mp-space-5); width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: var(--mp-space-4);
}
.nav-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--mp-space-2);
  background: #fff; border-radius: var(--mp-radius-xl); padding: var(--mp-space-6);
  box-shadow: var(--mp-shadow-md); border: 1px solid var(--mp-line);
  text-align: left; transition: transform .2s var(--mp-ease), box-shadow .2s var(--mp-ease);
}
.nav-card:hover { transform: translateY(-6px); box-shadow: var(--mp-shadow-lg); }
.nav-card__glyph { font-size: 2.4rem; line-height: 1; }
.nav-card__title { font-family: var(--mp-font-display); font-weight: 800; font-size: var(--mp-text-xl); color: var(--mp-navy); }
.nav-card__desc { color: var(--mp-ink-muted); font-size: var(--mp-text-sm); line-height: 1.5; }
.nav-card__cta { margin-top: var(--mp-space-3); }

.cover__steps {
  margin-top: var(--mp-space-8); width: 100%;
  display: grid; gap: var(--mp-space-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.step {
  background: var(--mp-surface-glass-strong); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.6); border-radius: var(--mp-radius-lg);
  padding: var(--mp-space-4); text-align: left;
}
.step__num {
  font-family: var(--mp-font-display); font-weight: 800; color: var(--mp-gold-deep);
  font-size: var(--mp-text-2xl); line-height: 1;
}
.step__txt { font-size: var(--mp-text-sm); color: var(--mp-navy); margin-top: var(--mp-space-1); line-height: 1.45; }

/* ====================================================================== */
/* STAGE / BIG SCREEN (layar-*.html)                                       */
/* ====================================================================== */
.viewer { min-height: 100vh; background: #06101d; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; padding: 14px; }
.viewer__bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center;
  color: #cdd9e6; font-family: var(--mp-font-display); font-size: 13px;
}
.viewer__bar .pill { background: #16365a; color: #fff; padding: .35em .9em; border-radius: 999px; font-weight: 700; }
.viewer__bar a { color: #9ec6ee; text-decoration: underline; }

/* The screen box keeps the LED-wall aspect ratio and becomes a container so
   inner type can scale with the screen size (cqh/cqw units). */
.screen {
  position: relative; overflow: hidden; border-radius: 10px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); container-type: size;
  background: var(--mp-grad-sky);
}
.screen--landscape { aspect-ratio: 8 / 4; width: min(96vw, calc((100vh - 110px) * 2)); }
.screen--portrait  { aspect-ratio: 3 / 4; height: min(calc(100vh - 110px), calc(96vw * 4 / 3)); }

/* Layer that holds the actual stage UI, fills the screen box */
.stage-fill { position: absolute; inset: 0; display: flex; }

/* Field "kocokan" — banyak nomor berputar di belakang reel saat mengundi */
.churn { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(4.2em, 1fr)); align-content: center;
  justify-items: center; gap: .55em var(--mp-space-3); padding: var(--mp-space-5);
  opacity: 0; transition: opacity .4s var(--mp-ease); filter: blur(.4px); }
.churn.on { opacity: .5; }
.churn__n { font-family: var(--mp-font-display); font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--mp-navy); background: var(--mp-surface-glass); border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--mp-radius-sm); padding: .08em .4em; font-size: var(--mp-text-md); letter-spacing: .06em; }
/* hero reel & label di atas field kocokan */
.scene--draw .now-prize, .scene--draw .reel-host { position: relative; z-index: 2; }

/* Mode HERO — field kocokan jadi animasi utama yang besar & jelas */
.churn--hero { filter: none; gap: var(--mp-space-3) var(--mp-space-4);
  grid-template-columns: repeat(auto-fill, minmax(5.2em, 1fr)); }
.churn--hero.on { opacity: 1; }
.churn--hero .churn__n { color: var(--mp-gold-bright);
  background: linear-gradient(180deg, var(--mp-navy) 0%, var(--mp-navy-deep) 100%);
  border: 1px solid rgba(255,255,255,.14); border-radius: var(--mp-radius-md);
  padding: .22em .5em; font-size: var(--mp-text-xl); letter-spacing: .08em;
  box-shadow: var(--mp-shadow-sm), inset 0 1px rgba(255,255,255,.15); }

/* Reel slot-machine (gulir vertikal) */
.sreel { display: flex; flex-direction: column; align-items: center; gap: var(--mp-space-4); }
.sreel__label { font-family: var(--mp-font-display); font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--mp-navy); font-size: var(--mp-text-lg); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.sreel__cells { display: flex; gap: var(--mp-space-3); }
.sreel__cell { position: relative; overflow: hidden; width: .84em; height: 1.16em; border-radius: var(--mp-radius-lg);
  background: linear-gradient(180deg, var(--mp-navy) 0%, var(--mp-navy-deep) 100%);
  box-shadow: var(--mp-shadow-lg), inset 0 2px rgba(255,255,255,.12), inset 0 -16px 24px rgba(0,0,0,.35); }
.sreel__cell::after { content: ""; position: absolute; inset: 0 0 52% 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,0)); }
.sreel--stage .sreel__cell { font-size: var(--mp-text-mega); }
.sreel--lg .sreel__cell { font-size: 4.5rem; }
.sreel--md .sreel__cell { font-size: var(--mp-text-3xl); }
.sreel__strip { display: flex; flex-direction: column; will-change: transform; }
.sreel__strip span { display: flex; align-items: center; justify-content: center; height: 1.16em; line-height: 1;
  font-family: var(--mp-font-display); font-weight: 800;
  background: var(--mp-grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(255,210,63,.6)); }
.sreel__cell--locked { animation: sreel-pop .32s var(--mp-ease-bounce); }
@keyframes sreel-pop { 0% { transform: scale(1); } 45% { transform: scale(1.13); } 100% { transform: scale(1); } }

/* Papan hasil per sesi (nomor undian saja) */
.rboard { width: 100%; height: 100%; display: flex; flex-direction: column; gap: var(--mp-space-3); }
.rboard__head { display: flex; align-items: center; justify-content: space-between; gap: var(--mp-space-4); flex: 0 0 auto; }
.rboard__title { font-family: var(--mp-font-display); font-weight: 800; color: var(--mp-navy);
  font-size: var(--mp-text-xl); text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.rboard__pager { display: inline-flex; align-items: center; gap: var(--mp-space-3);
  font-family: var(--mp-font-display); font-weight: 800; color: var(--mp-navy); font-size: var(--mp-text-md);
  background: var(--mp-surface-glass-strong); padding: .3em .8em; border-radius: var(--mp-radius-pill); }
.rboard__arw { border: none; cursor: pointer; background: var(--mp-navy); color: #fff; border-radius: 50%;
  width: 1.7em; height: 1.7em; font-size: 1em; line-height: 1; font-weight: 800; }
.rboard__arw:hover { background: var(--mp-navy-deep); }
.rboard__grid { flex: 1 1 auto; min-height: 0; display: grid; gap: var(--mp-space-3); align-content: start; }
.rboard__group--wide { grid-column: 1 / -1; }
.rboard__group { background: var(--mp-surface-glass-strong); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.7); border-radius: var(--mp-radius-lg); padding: var(--mp-space-3) var(--mp-space-4);
  box-shadow: var(--mp-shadow-sm); min-width: 0; }
.rboard__group--grand { border: 2px solid var(--mp-gold-bright); box-shadow: var(--mp-glow-gold); }
.rboard__ghead { display: flex; align-items: center; gap: .5em; color: var(--mp-navy);
  font-family: var(--mp-font-display); font-weight: 800; font-size: var(--mp-text-md); }
.rboard__ghead .g { font-size: 1.25em; }
.rboard__ghead .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rboard__ghead .q { margin-left: auto; color: var(--mp-ink-muted); font-weight: 700; font-size: .82em; white-space: nowrap; }
.rboard__nums { display: flex; flex-wrap: wrap; gap: var(--mp-space-2); margin-top: var(--mp-space-2); }
.rnum { font-family: var(--mp-font-display); font-weight: 800; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--mp-navy) 0%, var(--mp-navy-deep) 100%); color: var(--mp-gold-bright);
  border-radius: var(--mp-radius-sm); padding: .18em .5em; letter-spacing: .08em; font-size: var(--mp-text-sm);
  box-shadow: inset 0 1px rgba(255,255,255,.18), var(--mp-shadow-sm); animation: rnum-pop .4s var(--mp-ease-bounce) both; }
.rboard__group--grand .rnum { background: var(--mp-grad-gold); color: var(--mp-navy-deep); }
@keyframes rnum-pop { 0% { opacity: 0; transform: scale(.4) translateY(8px); } 100% { opacity: 1; transform: none; } }

.ctrl {
  display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.ctrl button {
  font-family: var(--mp-font-display); font-weight: 700; cursor: pointer; border: none;
  border-radius: 999px; padding: .7em 1.5em; font-size: 14px; color: #0e2540;
  background: var(--mp-grad-gold); box-shadow: var(--mp-glow-gold);
  transition: transform .15s var(--mp-ease-bounce), filter .2s;
}
.ctrl button:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.05); }
.ctrl button:disabled { opacity: .4; cursor: not-allowed; }
.ctrl button.ghost { background: #16365a; color: #fff; box-shadow: none; }

/* ====================================================================== */
/* ADMIN SHELL (admin.html)                                                */
/* ====================================================================== */
.admin { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr;
  background: linear-gradient(180deg, #eef6ff 0%, #e3f0fb 100%); }

.side { background: var(--mp-navy-deep); color: #fff; padding: var(--mp-space-5) var(--mp-space-4);
  display: flex; flex-direction: column; gap: var(--mp-space-5); position: sticky; top: 0; height: 100vh; }
.side__brand { display: flex; align-items: center; gap: var(--mp-space-3); }
.side__brand .chip { background: #fff; border-radius: var(--mp-radius-md); padding: 6px; display: inline-flex; }
.side__brand .chip img { display: block; width: 34px; height: 34px; object-fit: contain; }
.side__brand b { font-family: var(--mp-font-display); font-size: var(--mp-text-lg); letter-spacing: .04em; }
.side__brand span { display: block; font-size: 11px; color: #9ec6ee; font-weight: 600; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__nav button {
  display: flex; align-items: center; gap: var(--mp-space-3); width: 100%; text-align: left;
  background: none; border: none; color: #c9dcef; cursor: pointer; font-family: var(--mp-font-body);
  font-size: var(--mp-text-sm); font-weight: 600; padding: .7em .9em; border-radius: var(--mp-radius-md);
}
.side__nav button .ic { font-size: 1.1em; width: 1.4em; text-align: center; }
.side__nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side__nav button.active { background: var(--mp-navy-soft); color: #fff; box-shadow: var(--mp-shadow-sm); }
.side__foot { margin-top: auto; font-size: 11px; color: #6f93b8; line-height: 1.5; }

.main { padding: var(--mp-space-6); overflow: auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--mp-space-4);
  flex-wrap: wrap; margin-bottom: var(--mp-space-6); }
.topbar h1 { font-family: var(--mp-font-display); font-size: var(--mp-text-2xl); color: var(--mp-navy);
  margin: 0; font-weight: 800; }
.topbar p { margin: 2px 0 0; color: var(--mp-ink-muted); font-size: var(--mp-text-sm); }
.venue-switch { display: inline-flex; background: #fff; border-radius: var(--mp-radius-pill);
  padding: 4px; box-shadow: var(--mp-shadow-sm); border: 1px solid var(--mp-line); }
.venue-switch button { border: none; background: none; cursor: pointer; font-family: var(--mp-font-display);
  font-weight: 700; font-size: var(--mp-text-sm); color: var(--mp-ink-muted); padding: .5em 1.1em; border-radius: 999px; }
.venue-switch button.active { background: var(--mp-navy); color: #fff; }

.view { display: none; }
.view.active { display: block; }

.cards { display: grid; gap: var(--mp-space-4); grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: var(--mp-space-6); }

.card {
  background: #fff; border-radius: var(--mp-radius-lg); padding: var(--mp-space-5);
  box-shadow: var(--mp-shadow-sm); border: 1px solid var(--mp-line);
}
.card h3 { margin: 0 0 var(--mp-space-4); font-family: var(--mp-font-display); font-size: var(--mp-text-lg); color: var(--mp-navy); }

.stat-card { display: flex; flex-direction: column; gap: 4px; }
.stat-card .ic { font-size: 1.6rem; }
.stat-card .val { font-family: var(--mp-font-display); font-weight: 800; font-size: var(--mp-text-3xl); color: var(--mp-navy); line-height: 1; }
.stat-card .lbl { color: var(--mp-ink-muted); font-size: var(--mp-text-sm); font-weight: 600; }

/* tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--mp-text-sm); }
table.tbl th { text-align: left; color: var(--mp-ink-muted); font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; font-size: var(--mp-text-xs); padding: .7em .8em; border-bottom: 2px solid var(--mp-line); }
table.tbl td { padding: .7em .8em; border-bottom: 1px solid var(--mp-line); color: var(--mp-navy); }
table.tbl tr:hover td { background: var(--mp-cloud-soft); }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: .04em; }

.toolbar { display: flex; gap: var(--mp-space-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--mp-space-4); }
.input { font-family: var(--mp-font-body); font-size: var(--mp-text-sm); padding: .6em 1em;
  border-radius: var(--mp-radius-pill); border: 1px solid var(--mp-line); background: #fff; color: var(--mp-navy); min-width: 220px; }
.input:focus { outline: 2px solid var(--mp-tier-fast); }

.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; margin-right: .4em; vertical-align: middle; }
.dot--on { background: var(--mp-success); }
.dot--off { background: var(--mp-foil-mid); }

/* prize manager grid */
.prize-grid { display: grid; gap: var(--mp-space-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.session-block { margin-bottom: var(--mp-space-6); }
.session-head { display: flex; align-items: center; gap: var(--mp-space-3); margin-bottom: var(--mp-space-4); }
.session-head .glyph { font-size: 1.5rem; }
.session-head h2 { font-family: var(--mp-font-display); font-size: var(--mp-text-xl); color: var(--mp-navy); margin: 0; font-weight: 800; }
.session-head .count { margin-left: auto; }

/* draw control panel */
.draw-panel { display: grid; gap: var(--mp-space-5); grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 900px) { .draw-panel { grid-template-columns: 1fr; } .admin { grid-template-columns: 1fr; } .side { position: static; height: auto; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--mp-space-4); }
.field label { font-size: var(--mp-text-xs); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--mp-ink-muted); }
.field select { font-family: var(--mp-font-body); font-size: var(--mp-text-md); padding: .7em 1em; border-radius: var(--mp-radius-md);
  border: 1px solid var(--mp-line); background: #fff; color: var(--mp-navy); }

/* ---- Administrasi Data ---- */
.subtabs { display: flex; gap: .5em; align-items: center; margin-bottom: var(--mp-space-5); flex-wrap: wrap; }
.subtabs button { font-family: var(--mp-font-display); font-weight: 700; font-size: var(--mp-text-sm);
  border: 1px solid var(--mp-line); background: #fff; color: var(--mp-ink-muted); padding: .5em 1.1em;
  border-radius: var(--mp-radius-pill); cursor: pointer; }
.subtabs button.active { background: var(--mp-navy); color: #fff; border-color: var(--mp-navy); }
.subtabs #dataLock { background: var(--mp-cloud-soft); color: var(--mp-navy); }
.datatab { display: none; }
.datatab.active { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--mp-space-3); margin-bottom: var(--mp-space-4); }
.form-grid .input { min-width: 0; width: 100%; }
.pe-row { display: grid; grid-template-columns: 3.2em 1fr 5em 7em 2.6em; gap: .5em; align-items: center; margin-bottom: .5em; }
.pe-row input, .pe-row select { font-family: var(--mp-font-body); padding: .45em .55em; border: 1px solid var(--mp-line);
  border-radius: var(--mp-radius-sm); font-size: var(--mp-text-sm); min-width: 0; background: #fff; color: var(--mp-navy); }
.pe-row .grand-cell { display: flex; align-items: center; gap: .35em; font-size: var(--mp-text-xs); color: var(--mp-ink-muted); }
.icon-btn { border: none; background: var(--mp-cloud-soft); color: var(--mp-danger); border-radius: var(--mp-radius-sm);
  cursor: pointer; font-weight: 800; padding: .4em .6em; line-height: 1; }
.icon-btn:hover { background: #ffe0e0; }

.draw-stage {
  background: var(--mp-grad-sky); border-radius: var(--mp-radius-xl); padding: var(--mp-space-6);
  display: flex; flex-direction: column; align-items: center; gap: var(--mp-space-4);
  box-shadow: var(--mp-shadow-md) inset; min-height: 320px; justify-content: center; position: relative; overflow: hidden;
}
