/* IQI AG Warriors — shared mobile-first stylesheet
   Theme: AG shield palette (red + gold + silver on charcoal/black). */

:root {
  --color-primary:      #C8102E; /* primary red — buttons, active states, accents */
  --color-primary-dark: #8C0000; /* pressed states, gradients */
  --color-gold:         #C8A064; /* gold trim — badges, highlights, streak/rewards */
  --color-silver:       #C0C0C0; /* secondary text/icons on dark */
  --color-charcoal:     #181818; /* dark-theme background */
  --color-black:        #000000; /* deepest background / headers */
  --color-surface:      #FFFFFF; /* card surfaces in light mode */
  --color-text:         #1A1A1A; /* body text on light surfaces */

  --bg:        var(--color-charcoal);
  --bg-deep:   var(--color-black);
  --card:      #232323;
  --card-line: #333;
  --on-dark:   #F2F2F2;
  --muted:     var(--color-silver);
  --radius:    14px;
  --gap:       16px;
  --header-h:  56px;
  --nav-h:     62px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --maxw:      640px;
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-deep);
  color: var(--on-dark);
  line-height: 1.45;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: var(--color-gold); }

/* ---- App frame ---- */
#app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.appbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: linear-gradient(180deg, var(--color-black), var(--color-charcoal));
  border-bottom: 1px solid var(--card-line);
}
.appbar__logo { height: 34px; width: auto; }
.appbar__title { font-weight: 700; font-size: 1rem; letter-spacing: .3px; }
.appbar__title b { color: var(--color-primary); }
.appbar__spacer { flex: 1; }
.iconbtn {
  background: transparent; border: 0; color: var(--on-dark);
  width: 40px; height: 40px; border-radius: 10px; font-size: 1.15rem;
  display: grid; place-items: center; position: relative;
}
.iconbtn:active { background: #ffffff14; }
.badge-dot {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--color-primary); color: #fff;
  font-size: .65rem; font-weight: 700;
  border-radius: 9px; display: grid; place-items: center;
}
.lang-toggle {
  border: 1px solid var(--color-gold); color: var(--color-gold);
  background: transparent; border-radius: 999px;
  padding: 5px 10px; font-size: .72rem; font-weight: 700;
}

/* ---- Screen + scroll ---- */
.screen {
  flex: 1; overflow-y: auto;
  padding: var(--gap) var(--gap) calc(var(--nav-h) + var(--safe-b) + 20px);
}
.screen__title { font-size: 1.35rem; font-weight: 800; margin: 4px 0 2px; }
.screen__sub { color: var(--muted); margin: 0 0 16px; font-size: .9rem; }

/* ---- Bottom nav (Get Started / My Tools + Home/Profile) ---- */
.bottomnav {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 100%; max-width: var(--maxw);
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; background: var(--color-black);
  border-top: 1px solid var(--card-line); z-index: 30;
}
.bottomnav button {
  flex: 1; background: transparent; border: 0; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: .68rem; font-weight: 600;
}
.bottomnav button .ico { font-size: 1.25rem; line-height: 1; }
.bottomnav button.active { color: var(--color-primary); }

/* ---- Cards / list ---- */
.card {
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.card--gold { border-color: var(--color-gold); }
.card__title { font-weight: 700; margin: 0 0 6px; }
.card__meta { color: var(--muted); font-size: .82rem; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius); padding: 16px 14px; text-align: left;
  color: var(--on-dark); position: relative; min-height: 104px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.tile:active { border-color: var(--color-primary); }
.tile__ico { font-size: 1.6rem; }
.tile__name { font-weight: 700; font-size: .95rem; }
.tile__step { color: var(--muted); font-size: .72rem; }
.tile__lock { position: absolute; top: 12px; right: 12px; color: var(--muted); }
.tile.done .tile__ico { color: var(--color-gold); }
.tile.locked { opacity: .55; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px 18px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-primary-dark));
  color: #fff; font-weight: 700; font-size: 1rem;
}
.btn:active { filter: brightness(.92); }
.btn[disabled] { opacity: .45; }
.btn--ghost { background: transparent; border: 1px solid var(--card-line); color: var(--on-dark); }
.btn--gold { background: linear-gradient(180deg, var(--color-gold), #a87f3f); color: #1a1407; }
.btn--sm { width: auto; padding: 9px 14px; font-size: .85rem; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ---- Forms ---- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 6px; }
.input, .select, textarea.input {
  width: 100%; padding: 13px 14px; border-radius: 11px;
  border: 1px solid var(--card-line); background: #1c1c1c; color: var(--on-dark);
  font-size: 1rem;
}
.input:focus { outline: 2px solid var(--color-primary); border-color: transparent; }

/* ---- Confirm gate ---- */
.gate { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.gate__check {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid var(--card-line); border-radius: 11px; background: #1c1c1c;
}
.gate__check input { width: 20px; height: 20px; accent-color: var(--color-primary); }

/* ---- Pills / status ---- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.pill--done { background: #14391f; color: #6fe39a; }
.pill--notdone { background: #3a1414; color: #ff8a8a; }
.pill--carried { background: #3a2f12; color: var(--color-gold); }
.pill--gold { background: #3a2f12; color: var(--color-gold); }

/* ---- Dashboard ---- */
.dash-row { display: flex; gap: 12px; }
.stat {
  flex: 1; background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius); padding: 14px; text-align: center;
}
.stat__num { font-size: 1.5rem; font-weight: 800; color: var(--color-gold); }
.stat__lbl { font-size: .72rem; color: var(--muted); }
.ring { display: grid; place-items: center; }

/* ---- Leaderboard ---- */
.lb-item { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--card-line); }
.lb-rank { width: 26px; font-weight: 800; color: var(--color-gold); text-align: center; }
.lb-name { flex: 1; font-weight: 600; }
.lb-score { font-weight: 800; color: var(--color-primary); }

/* ---- Mascot / empty states ---- */
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty img { width: 120px; margin: 0 auto 12px; }

/* ---- Splash / login ---- */
.splash {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; padding: 28px;
  background: radial-gradient(120% 120% at 50% 0%, #2a0a0f 0%, var(--color-black) 60%);
  text-align: center;
}
.splash img { width: 160px; }
.splash h1 { font-size: 1.4rem; margin: 0; }
.splash p { color: var(--muted); margin: 0; }
.splash .auth-card { width: 100%; max-width: 360px; }

/* ---- Walkthrough slides ---- */
.slide { background: var(--card); border-radius: var(--radius); padding: 22px; min-height: 280px; }
.slide__count { color: var(--muted); font-size: .8rem; }
.lockbar { height: 4px; background: #333; border-radius: 4px; overflow: hidden; margin: 14px 0; }
.lockbar > i { display: block; height: 100%; background: var(--color-gold); width: 0; transition: width .2s linear; }

/* ---- Notifications ---- */
.notif { display: flex; gap: 12px; padding: 12px; border-bottom: 1px solid var(--card-line); }
.notif.unread { background: #ffffff08; }
.notif__ico { font-size: 1.3rem; }
.notif__time { color: var(--muted); font-size: .72rem; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 18px); left: 50%; transform: translateX(-50%);
  background: #000; border: 1px solid var(--color-gold); color: #fff;
  padding: 12px 18px; border-radius: 12px; z-index: 60; font-size: .9rem;
  max-width: 90%; text-align: center;
}

/* ---- Misc ---- */
.row-split { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.section-h { font-weight: 800; margin: 18px 0 10px; font-size: 1rem; }
.hr { height: 1px; background: var(--card-line); border: 0; margin: 16px 0; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---- Module 9 Rewards ---- */
.rw-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.rw-chip { background: #1c1c1c; border: 1px solid var(--card-line); color: var(--on-dark);
  border-radius: 999px; padding: 7px 14px; font-size: .8rem; font-weight: 700; }
.rw-chip.is-on { background: linear-gradient(180deg, var(--color-gold), #a87f3f); color: #1a1407; border-color: transparent; }
.rw-showhidden { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); margin: 0 0 12px; }

.rw-card { padding: 0; overflow: hidden; cursor: pointer; }
.rw-head { position: relative; aspect-ratio: 16 / 10; background: #1c1c1c; overflow: hidden; }
.rw-head img { width: 100%; height: 100%; object-fit: cover; }
.rw-fallback { display: grid; place-items: center; text-align: center; padding: 16px; color: #fff; }
.rw-fallback-txt span { font-size: .75rem; opacity: .85; display: block; }
.rw-fallback-txt b { font-size: 1.2rem; }
.rw-tier { position: absolute; top: 10px; left: 10px; color: #fff; font-size: .72rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.rw-bumi { position: absolute; top: 10px; right: 10px; background: #14391f; color: #6fe39a; font-size: .68rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.rw-flag { position: absolute; bottom: 10px; right: 10px; background: #000a; color: #fff; font-size: .68rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.rw-body { padding: 14px; }
.rw-group { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rw-dest { font-weight: 800; font-size: 1.1rem; margin: 2px 0 6px; }
.rw-target b { color: var(--color-gold); }
.rw-bar { height: 7px; background: #333; border-radius: 5px; overflow: hidden; margin-top: 8px; }
.rw-bar i { display: block; height: 100%; }
.rw-bar-pct { font-size: .72rem; font-weight: 800; margin-top: 2px; }

.rw-dhead { position: relative; border-radius: var(--radius); overflow: hidden; background: #1c1c1c; margin: 12px 0; }
.rw-dhead img { width: 100%; height: auto; display: block; object-fit: contain; }
.rw-dhead.rw-fallback { aspect-ratio: 16 / 10; }
.rw-targetcard { border-color: var(--color-gold); }
.rw-bigtarget { font-size: 1.15rem; font-weight: 800; }
.rw-bigtarget b { color: var(--color-gold); }
.rw-by { font-weight: 700; font-size: .85rem; margin-top: 4px; }
.rw-h { font-weight: 800; margin-bottom: 6px; }
.rw-h2 { font-weight: 800; font-size: 1.05rem; margin: 18px 2px 8px; }
.rw-line { padding: 6px 0; border-bottom: 1px solid var(--card-line); font-size: .9rem; }
.rw-line:last-child { border-bottom: 0; }
.rw-inc, .rw-rules { margin: 0; padding-left: 18px; }
.rw-inc li, .rw-rules li { margin: 4px 0; font-size: .9rem; }
.rw-collapse { margin: 10px 0; }
.rw-collapse summary { cursor: pointer; font-weight: 700; padding: 10px 0; color: var(--color-gold); }
.rw-track { display: flex; gap: 14px; align-items: center; }
.rw-ring { flex: none; }
.rw-proj { padding: 8px 10px; background: #1c1c1c; border: 1px solid var(--card-line); border-radius: 8px; margin-bottom: 6px; font-size: .85rem; font-weight: 600; }
.rw-chk { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 8px 0; }
.rw-modal { position: fixed; inset: 0; background: #000c; z-index: 55; display: flex; align-items: flex-end; }
.rw-modal__card { width: 100%; max-width: 640px; margin: 0 auto; border-radius: 18px 18px 0 0; max-height: 90vh; overflow: auto; }

/* ---- Module 8 Career Path (winding roadmap) ---- */
/* summary cards above the path (your rank + next target) */
.m8-hero__top { display: flex; align-items: center; gap: 12px; }
.m8-badge { flex: none; min-width: 56px; text-align: center; color: #fff; font-weight: 800;
  font-size: 1.05rem; padding: 12px 10px; border-radius: 12px; text-shadow: 0 1px 2px #0006; }
.m8-prog { height: 8px; background: #333; border-radius: 5px; overflow: hidden; margin-top: 10px; }
.m8-prog > i { display: block; height: 100%; transition: width .3s ease; }
.m8-chip { font-size: .68rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; color: #fff; text-shadow: 0 1px 1px #0006; }
.m8-next-h { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.m8-crit { margin-top: 4px; }
.m8-line { padding: 6px 0; border-bottom: 1px solid var(--card-line); font-size: .9rem; }
.m8-line:last-child { border-bottom: 0; }
.m8-approval { margin-top: 8px; font-size: .78rem; font-weight: 700; color: var(--color-gold); }

/* the path itself */
.m8-road { position: relative; max-width: 430px; margin: 8px auto 4px; padding: 8px 0; }
.m8-spine { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 6px;
  transform: translateX(-50%); border-radius: 3px; opacity: .4; z-index: 0; }
.m8-stop { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 56px 1fr;
  align-items: center; column-gap: 6px; margin: 8px 0; }
.m8-pin { grid-column: 2; justify-self: center; width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 800; position: relative;
  box-shadow: 0 2px 6px #0007, 0 0 0 4px var(--bg); }
.m8-pin__code { font-size: .78rem; text-shadow: 0 1px 2px #0008; }
.m8-pin__check { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px;
  border-radius: 50%; background: #14391f; color: #6fe39a; font-size: .7rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--bg); }
.m8-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 12px; overflow: hidden; }
.m8-stop--left .m8-card { grid-column: 1; }
.m8-stop--right .m8-card { grid-column: 3; }
.m8-card__head { width: 100%; background: none; border: 0; color: inherit; display: flex;
  align-items: center; gap: 6px; padding: 10px 12px; cursor: pointer; text-align: left; font: inherit; }
.m8-card__name { font-weight: 800; font-size: .82rem; line-height: 1.2; flex: 1; min-width: 0; }
.m8-card__chev { flex: none; color: var(--muted); transition: transform .2s ease; }
.m8-stop.is-open .m8-card__chev { transform: rotate(180deg); }
.m8-card__detail { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 12px; }
.m8-stop.is-open .m8-card__detail { max-height: 560px; padding-bottom: 10px; }
.m8-card .m8-line { font-size: .76rem; flex-wrap: wrap; gap: 2px 8px; }
.m8-focus { margin: 8px 0 0; font-size: .8rem; white-space: pre-wrap; }
.m8-here { background: var(--color-gold); color: #1a1407; font-size: .6rem; font-weight: 800;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap; flex: none; }
.m8-goal { color: var(--color-gold); font-size: .6rem; font-weight: 800; white-space: nowrap; flex: none; }

/* states from the current rank */
.m8-stop.is-done { opacity: .5; }
.m8-stop.is-future { opacity: .4; }
.m8-stop.is-current .m8-pin { box-shadow: 0 2px 6px #0007, 0 0 0 4px var(--bg), 0 0 0 6px var(--color-gold); }
.m8-stop.is-current .m8-card { border-color: var(--color-gold); }
.m8-stop.is-next .m8-card { border-color: var(--color-gold); box-shadow: 0 0 14px rgba(200,160,100,.45); }
.m8-stop.is-next .m8-pin { animation: m8pulse 2s ease-in-out infinite; }
@keyframes m8pulse {
  0%, 100% { box-shadow: 0 2px 6px #0007, 0 0 0 4px var(--bg), 0 0 0 5px rgba(200,160,100,0); }
  50%      { box-shadow: 0 2px 6px #0007, 0 0 0 4px var(--bg), 0 0 0 10px rgba(200,160,100,.55); }
}
@media (prefers-reduced-motion: reduce) {
  .m8-stop.is-next .m8-pin { animation: none;
    box-shadow: 0 2px 6px #0007, 0 0 0 4px var(--bg), 0 0 0 8px rgba(200,160,100,.45); }
}

/* builder-ranks divider (mindset shift) between HOT and TM */
.m8-divider { position: relative; z-index: 2; margin: 14px 0; }
.m8-divider__msg { background: #2a2412; border: 1px solid var(--color-gold); border-radius: 12px;
  padding: 10px 12px; font-size: .8rem; }
.m8-divider__msg b { display: block; margin-bottom: 3px; color: var(--color-gold); }

.m8-arow .select { font-weight: 700; }

/* ===== Module 3 — ATLAS resource library (YouTube-style grid) ===== */
.m3-search { position: sticky; top: var(--header-h); z-index: 12; background: var(--bg); padding: 6px 0 10px; }
.m3-chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.m3-chip { white-space: nowrap; border: 1px solid var(--card-line); background: transparent; color: var(--on-dark);
  border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 700; flex: none; }
.m3-chip.active { background: var(--color-gold); color: #1a1407; border-color: var(--color-gold); }
.m3-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 4px; }
@media (min-width: 560px) { .m3-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 820px) { .m3-grid { grid-template-columns: repeat(4, 1fr); } }
.m3-tile { background: var(--color-charcoal); border: 1px solid var(--card-line); border-radius: 16px;
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--sh-sm, 0 2px 8px #0006);
  transition: transform .12s ease, border-color .2s ease; }
.m3-tile:active { transform: translateY(-2px); border-color: var(--color-gold); }
.m3-thumb { position: relative; aspect-ratio: 16/9; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--color-charcoal), var(--color-black)); }
.m3-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m3-thumb .ic { font-size: 2.4rem; filter: drop-shadow(0 2px 6px #000a); }
.m3-thumb::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px #c8a06433; border-radius: 16px 16px 0 0; pointer-events: none; }
.m3-tbody { padding: 10px 12px; }
.m3-ttitle { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.m3-tdesc { color: var(--muted); font-size: .76rem; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m3-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.m3-tag { background: var(--card-line); color: var(--color-gold); border-radius: 999px; padding: 2px 8px; font-size: .66rem; font-weight: 700; }
.m3-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: #000a; color: #fff; font-size: 1.05rem; padding-left: 3px; box-shadow: 0 0 0 2px #c8a06488; }
.m3-msg { background: var(--color-charcoal); border-left: 3px solid var(--color-gold); border-radius: 0 12px 12px 0; padding: 12px 14px; margin: 12px 0; }
.m3-more { background: none; border: 0; color: var(--color-gold); font-weight: 700; font-size: .82rem; padding: 6px 0 0; cursor: pointer; }
.m3-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none;
  background: var(--color-charcoal); border: 1px solid var(--card-line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; color: var(--on-dark); }
.m3-row span:first-child { color: var(--color-gold); font-weight: 600; }

/* ===== Module 1 — Onboarding course ===== */
.m1-prog { height: 8px; background: var(--card-line); border-radius: 999px; overflow: hidden; }
.m1-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--color-gold), #e7c878); }
.m1-lesson { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m1-ic { font-size: 1.4rem; flex: none; }
.m1-scroll { max-height: 48vh; overflow-y: auto; background: var(--color-charcoal); border: 1px solid var(--card-line);
  border-radius: 12px; padding: 14px; margin: 10px 0; line-height: 1.55; }
.embedwrap { position: relative; padding-top: 56.25%; border-radius: 10px; overflow: hidden; }
.embedwrap iframe, .embedwrap > div { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ===== Direktori IQI ===== */
.dir-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dir-chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--color-charcoal); border: 1px solid var(--card-line); border-radius: 999px;
  padding: 7px 12px; font-size: .8rem; color: var(--on-dark); }
.dir-acc { width: 100%; text-align: left; background: var(--color-charcoal); border: 1px solid var(--card-line);
  color: var(--on-dark); border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: .95rem; }
.dir-branches { margin-top: 8px; }
.dir-addr { display: block; color: var(--color-gold); text-decoration: none; font-size: .82rem; margin: 6px 0; }
.dir-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--card-line); }
.dir-person:first-of-type { border-top: 0; }
.dir-acts { display: flex; gap: 8px; flex: none; }
.dir-act { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  background: var(--color-charcoal); border: 1px solid var(--card-line); font-size: 1rem; }
.dir-act.wa { background: #1f3d2b; border-color: #2f6b45; }
.dir-edit-branch { border-top: 1px solid var(--card-line); margin-top: 8px; padding-top: 8px; padding-left: 4px; }
.dir-edit-person { padding: 5px 0; font-size: .85rem; }

/* ---- m5 Time Boxing: day name, task notes, search hits ---- */
.m5-dayname { margin-top: 6px; font-weight: 700; color: var(--color-gold); font-size: .85rem; }
.m5-note { margin-top: 10px; }
.m5-note summary { cursor: pointer; color: var(--muted); font-size: .78rem; list-style: none; user-select: none; }
.m5-note summary::-webkit-details-marker { display: none; }
.m5-note textarea { margin-top: 6px; min-height: 52px; }
.m5-hit:active { border-color: var(--color-primary); }

/* ---- PWA install banner ---- */
.pwa-bar {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--nav-h, 62px) + var(--safe-b, 0px) + 10px);
  z-index: 60; max-width: 616px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #1c1c1c; border: 1px solid var(--color-gold); border-radius: 12px;
  padding: 10px 12px; box-shadow: 0 10px 28px rgba(0,0,0,.55);
  font-size: .85rem; color: var(--on-dark);
}
.pwa-bar b { color: var(--color-gold); }
.pwa-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.pwa-bar button {
  background: linear-gradient(180deg, var(--color-gold), #a87f3f); color: #1a1407;
  border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 700;
}
.pwa-bar .pwa-x { background: transparent; color: var(--muted); font-size: 1.05rem; padding: 4px 8px; }

/* ============================================================================
 *  TIM ELIT (Phase 1) — army command theme. Self-contained palette so it reads
 *  as a distinct "elite" zone without disturbing the app's orange/charcoal look.
 *    bg #11130d · panel #22260f · border #3a3f1f · olive #494a17/#6d7028
 *    gold #b08a3a/#d8b25a · red #a5281c · cream #e9e2cc · muted #9a9374
 * ==========================================================================*/
.elite-launch {
  --el-gold: #d8b25a; --el-olive: #494a17; --el-border: #6d7028;
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  margin: 4px 0 14px; padding: 14px 16px; border: 1px solid var(--el-border);
  border-radius: 14px; cursor: pointer; color: #e9e2cc;
  background:
    repeating-linear-gradient(45deg, rgba(109,112,40,.18) 0 10px, rgba(73,74,23,.18) 10px 20px),
    linear-gradient(180deg, #22260f, #161a0b);
  box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 0 0 1px rgba(216,178,90,.12);
}
.elite-launch__star { font-size: 1.5rem; color: var(--el-gold); flex: none; filter: drop-shadow(0 1px 2px #000); }
.elite-launch__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.elite-launch__txt b {
  font-family: 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .06em; color: var(--el-gold); font-size: 1rem;
}
.elite-launch__txt span { color: #9a9374; font-size: .8rem; }
.elite-launch__arrow { color: var(--el-gold); font-size: 1.2rem; flex: none; }

/* gold rank pill reused in the admin agent list */
.elite-badge {
  display: inline-block; margin-top: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #1a1407; background: linear-gradient(180deg, #d8b25a, #b08a3a);
  border: 1px solid #6d7028;
}
.btn--danger { background: linear-gradient(180deg, #c0392b, #a5281c); color: #fff; }

/* ---- command center shell ---- */
.elite-wrap {
  margin: -4px -2px 0; padding: 4px 2px 8px; color: #e9e2cc;
}
.elite-crest {
  display: flex; align-items: center; gap: 14px; padding: 16px 16px;
  border: 1px solid #3a3f1f; border-radius: 16px; margin-bottom: 16px;
  background:
    repeating-linear-gradient(45deg, rgba(109,112,40,.16) 0 12px, rgba(73,74,23,.16) 12px 24px),
    linear-gradient(180deg, #22260f, #11130d);
  box-shadow: 0 10px 26px rgba(0,0,0,.5);
}
.elite-crest__badge {
  width: 60px; height: 60px; flex: none; display: grid; place-items: center; overflow: hidden;
  font-size: 1.9rem; color: #d8b25a; border-radius: 12px; border: 2px solid #6d7028;
  background: #14180a; box-shadow: 0 4px 10px rgba(0,0,0,.5);
}
.elite-crest__badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.elite-launch__logo { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; flex: none; }
.elite-crest__title {
  font-family: 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .07em; color: #d8b25a;
  font-size: 1.15rem; font-weight: 700; line-height: 1.1;
}
.elite-crest__sub { color: #9a9374; font-size: .8rem; margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }
.elite-crest__sub b { color: #e9e2cc; }

.elite-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.elite-card {
  position: relative; padding: 18px 14px; border: 1px solid #3a3f1f; border-radius: 14px;
  background: linear-gradient(180deg, #22260f, #161a0b); min-height: 118px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.elite-card__ico { font-size: 1.8rem; filter: grayscale(.15); }
.elite-card__label {
  font-family: 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .04em; color: #e9e2cc; font-size: .92rem; font-weight: 600;
}
.elite-card__soon {
  position: absolute; top: 10px; right: 10px; font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: #11130d;
  background: #9a9374; padding: 2px 7px; border-radius: 999px;
}
.elite-card__sub { font-size: .76rem; color: #c9c2a8; line-height: 1.3; }
.elite-card--live { cursor: pointer; border-color: #6d7028; }
.elite-card--live:active { background: linear-gradient(180deg, #2a2f12, #181c0c); }

/* ---- pod command board: per-member activity ---- */
.pod-brow { padding: 10px 0; border-bottom: 1px solid var(--card-line); }
.pod-stat { margin-top: 6px; }
.pod-stat__bar { height: 7px; border-radius: 999px; background: #2a2f12; overflow: hidden; margin-bottom: 4px; }
.pod-stat__bar i { display: block; height: 100%; background: linear-gradient(90deg, #6d7028, #d8b25a); }
.pod-stat span { font-size: .72rem; }

/* ---- pod leads (Lead Saya) ---- */
.lead-row { padding: 10px 0; border-bottom: 1px solid var(--card-line); }
.lead-pill { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 8px; border-radius: 999px; flex: none; }
.lead-new { background: #2a3550; color: #bcd0ff; }
.lead-called { background: #3a2f12; color: var(--color-gold); }
.lead-booked { background: #1f3d2b; color: #7fe0a3; }
.lead-noanswer { background: #3a2f12; color: #d8b25a; }
.lead-notinterested { background: #3a1f1f; color: #f0a3a3; }
.lead-callback { background: #40320a; color: #ffd679; border: 1px solid #6b5416; }

/* ---- admin supervisor: browse all pods ---- */
.sup-wrap { margin-top: 16px; border: 1px solid #3a3f1f; border-radius: 14px;
  background: linear-gradient(180deg, #22260f, #161a0b); padding: 12px 14px; }
.sup-h { font-family: 'Oswald', 'Bebas Neue', system-ui, sans-serif; text-transform: uppercase;
  letter-spacing: .05em; color: #d8b25a; font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.sup-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; padding: 10px 6px; border: 0; border-top: 1px solid var(--card-line);
  background: transparent; color: #e9e2cc; cursor: pointer; }
.sup-row:first-of-type { border-top: 0; }
.sup-row b { color: #e9e2cc; }
.sup-arrow { color: #d8b25a; font-size: 1.1rem; flex: none; }

/* ---- Captain Pool calculator (elite-exclusive) ---- */
.cp-wrap { color: #e9e2cc; padding-bottom: 20px; }
.cp-back { background: transparent; border: 0; color: #9a9374; font-size: .82rem; cursor: pointer; padding: 4px 0; }
.cp-title { font-family: 'Oswald','Bebas Neue',system-ui,sans-serif; text-transform: uppercase; letter-spacing: .05em;
  color: #d8b25a; font-size: 1.3rem; margin: 6px 0 2px; }
.cp-sub { color: #9a9374; font-size: .82rem; margin: 0 0 14px; }
.cp-seg { display: flex; gap: 6px; margin-bottom: 10px; }
.cp-seg__b { flex: 1; padding: 9px 6px; border: 1px solid #3a3f1f; border-radius: 10px; background: #161a0b;
  color: #c9c2a8; font-weight: 700; letter-spacing: .03em; cursor: pointer; font-size: .82rem; }
.cp-seg__b.on { background: linear-gradient(180deg,#d8b25a,#b08a3a); color: #1a1407; border-color: #6d7028; }
.cp-row { display: flex; gap: 6px; margin-bottom: 10px; }
.cp-tog { flex: 1; padding: 8px 6px; border: 1px solid #3a3f1f; border-radius: 10px; background: #161a0b;
  color: #9a9374; font-size: .8rem; cursor: pointer; }
.cp-tog.on { border-color: #6d7028; color: #d8b25a; background: #22260f; }
.cp-slider { margin: 10px 0; }
.cp-slider label { color: #c9c2a8; font-size: .85rem; }
.cp-slider b { color: #d8b25a; }
.cp-slider input[type=range] { width: 100%; accent-color: #b08a3a; margin-top: 4px; }
.cp-out { margin-top: 16px; border: 1px solid #3a3f1f; border-radius: 14px; background: linear-gradient(180deg,#22260f,#161a0b); padding: 6px 12px; }
.cp-orow { padding: 8px 0; border-bottom: 1px solid var(--card-line); }
.cp-orow:last-child { border-bottom: 0; }
.cp-orow b { color: #e9e2cc; }
.cp-total { display: flex; align-items: center; justify-content: space-between; margin-top: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid #6d7028;
  background: repeating-linear-gradient(45deg,rgba(109,112,40,.16) 0 12px,rgba(73,74,23,.16) 12px 24px),linear-gradient(180deg,#2a2f12,#161a0b); }
.cp-total span { text-transform: uppercase; letter-spacing: .05em; color: #c9c2a8; font-size: .82rem; }
.cp-total b { font-family: 'Oswald','Bebas Neue',system-ui,sans-serif; color: #d8b25a; font-size: 1.4rem; }
.cp-perunit { text-align: right; font-size: .76rem; margin-top: 6px; }
.cp-note { font-size: .72rem; margin-top: 14px; line-height: 1.4; }

/* ---- Pool/Balang table ---- */
.bl-balang { margin: 10px 0; padding: 10px 12px; border-radius: 10px; border: 1px solid #6d7028;
  background: linear-gradient(180deg,#2a2f12,#161a0b); color: #c9c2a8; font-size: .82rem; }
.bl-balang b { color: #d8b25a; font-size: 1rem; }
.bl-tbl { width: 100%; border-collapse: collapse; font-size: .78rem; }
.bl-tbl th { text-align: left; color: #9a9374; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  font-size: .66rem; padding: 6px 6px; border-bottom: 1px solid #3a3f1f; }
.bl-tbl td { padding: 8px 6px; border-bottom: 1px solid var(--card-line); color: #e9e2cc; vertical-align: top; }
.bl-tbl tbody tr:last-child td { border-bottom: 0; }

/* ---- segmentation Hijau/Kuning/Merah ---- */
.seg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.seg-dot.seg-hijau { background: #3fae6a; }
.seg-dot.seg-kuning { background: #e0b84f; }
.seg-dot.seg-merah { background: #d0433a; }
.seg-row { display: flex; gap: 6px; margin-top: 8px; }
.seg-b { flex: 1; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 4px; border: 1px solid #3a3f1f; border-radius: 9px; background: #14180a;
  color: #9a9374; font-size: .72rem; font-weight: 600; cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease; }
.seg-b::before { content: ''; width: 9px; height: 9px; border-radius: 50%; flex: none; opacity: .55; }
.seg-b.seg-hijau::before { background: #3fae6a; }
.seg-b.seg-kuning::before { background: #e0b84f; }
.seg-b.seg-merah::before { background: #d0433a; }
.seg-b:hover { border-color: #6d7028; }
.seg-b.on::before { opacity: 1; }
.seg-b.on { color: #e9e2cc; }
.seg-b.on.seg-hijau { background: #18371f; border-color: #3fae6a; }
.seg-b.on.seg-kuning { background: #352b10; border-color: #e0b84f; }
.seg-b.on.seg-merah { background: #361b1a; border-color: #d0433a; }
.seg-legend { display: flex; gap: 14px; margin-bottom: 10px; font-size: .72rem; color: #9a9374; }
.seg-legend span { display: flex; align-items: center; }

/* ---- KPI / Checklist ---- */
.kpi-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 8px; }
.kpi-tab { padding: 7px 10px; border: 1px solid #3a3f1f; border-radius: 8px; background: #14180a;
  color: #9a9374; font-size: .72rem; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.kpi-tab.on { background: linear-gradient(180deg, #d8b25a, #b08a3a); color: #1a1407; border-color: #6d7028; font-weight: 700; }
.kpi-prog { font-size: .74rem; margin-bottom: 8px; }
.kpi-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.kpi-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #3a3f1f;
  border-radius: 10px; background: #161a0b; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.kpi-item input { width: 18px; height: 18px; accent-color: #b08a3a; flex: none; }
.kpi-item span { font-size: .86rem; color: #e9e2cc; }
.kpi-item.on { border-color: #6d7028; background: #1d2210; }
.kpi-item.on span { color: #9a9374; text-decoration: line-through; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.kpi-barwrap { height: 7px; border-radius: 99px; background: #14180a; border: 1px solid #3a3f1f; overflow: hidden; margin-bottom: 10px; }
.kpi-bar { display: block; height: 100%; background: linear-gradient(90deg, #b08a3a, #d8b25a); border-radius: 99px; transition: width .3s ease; }
.kpi-edit { display: flex; align-items: center; gap: 6px; }
.kpi-edit .kpi-edit-in { flex: 1; }
.kpi-del { color: #d08a8a; }

/* ---- Komunikasi "Radio Komando" ---- */
.cm-wrap { display: flex; flex-direction: column; }
.cm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0 10px; border-bottom: 1px solid #3a3f1f; }
.cm-top b { font-size: 1rem; color: #e9e2cc; }
.cm-sp { width: 32px; display: inline-block; }
.cm-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.cm-sec { font-size: .72rem; color: #9a9374; text-transform: uppercase; letter-spacing: .05em; margin: 12px 4px 4px; }
.cm-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid #3a3f1f; border-radius: 12px; background: #161a0b; color: #e9e2cc; cursor: pointer; }
.cm-row:active { background: #1d2210; }
.cm-ava { font-size: 1.25rem; flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: #11130d; border-radius: 50%; border: 1px solid #3a3f1f; }
.cm-row__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-row__mid b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row__last { font-size: .76rem; color: #9a9374; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-row__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.cm-time { font-size: .68rem; color: #7c7860; }
.cm-badge { background: linear-gradient(180deg, #d8b25a, #b08a3a); color: #1a1407; font-size: .68rem; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; }
.cm-chat { height: calc(100vh - 130px); min-height: 380px; }
.cm-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 2px; }
.cm-msg { max-width: 80%; padding: 8px 11px; border-radius: 14px; font-size: .88rem; line-height: 1.35; word-break: break-word; }
.cm-msg.them { align-self: flex-start; background: #1d2210; border: 1px solid #3a3f1f; border-bottom-left-radius: 4px; }
.cm-msg.me { align-self: flex-end; background: linear-gradient(180deg, #5c611f, #4a4e18); border: 1px solid #6d7028; border-bottom-right-radius: 4px; color: #f3eecf; }
.cm-txt { white-space: pre-wrap; }
.cm-img { max-width: 100%; border-radius: 10px; margin-bottom: 4px; display: block; }
.cm-mmeta { font-size: .62rem; color: #9a9374; margin-top: 3px; text-align: right; }
.cm-msg.me .cm-mmeta { color: #cdc79f; }
.cm-tick.on { color: #7fd08a; }
.cm-presets { display: flex; gap: 6px; overflow-x: auto; padding: 6px 0; }
.cm-chip { flex: none; padding: 6px 10px; border: 1px solid #6d7028; border-radius: 99px; background: #1d2210; color: #e9e2cc; font-size: .76rem; cursor: pointer; white-space: nowrap; }
.cm-chip:active { background: #2a300f; }
.cm-composer { display: flex; align-items: flex-end; gap: 8px; padding: 8px 0 4px; border-top: 1px solid #3a3f1f; position: sticky; bottom: 0; background: #11130d; }
.cm-composer--static { position: static; }
.cm-imgbtn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.15rem; border: 1px solid #3a3f1f; border-radius: 10px; background: #161a0b; cursor: pointer; }
.cm-composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 9px 12px; border: 1px solid #3a3f1f; border-radius: 12px; background: #161a0b; color: #e9e2cc; font-family: inherit; font-size: .9rem; }
.cm-sendbtn { flex: none; width: 44px; height: 44px; border: none; border-radius: 12px; background: linear-gradient(180deg, #d8b25a, #b08a3a); color: #1a1407; font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.cm-sendbtn:disabled { opacity: .5; }
.elite-card { position: relative; }
.tile { position: relative; }
.cm-card-badge, .tile__badge { position: absolute; top: 8px; right: 8px; background: linear-gradient(180deg, #d8b25a, #b08a3a); color: #1a1407; font-size: .66rem; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; }
.elite-confirm .btn-row { display: flex; gap: 8px; }
.elite-confirm .btn-row .btn { flex: 1; }

/* ---- elite manager modal (search-to-appoint + member roster) ---- */
.em-sec-h {
  font-family: 'Oswald', 'Bebas Neue', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .05em; font-size: .82rem; font-weight: 700;
  color: var(--color-gold); padding-bottom: 4px; border-bottom: 1px solid var(--card-line);
}
.em-row { padding: 10px 0; border-bottom: 1px solid var(--card-line); align-items: center; gap: 8px; }
.em-row b { display: block; }
