/* =========================================================================
   ESP Dashboard — design tokens
   Palet: Xiaomi orange (#ff6900) di atas neutral ramp dingin ala HyperOS.
   ========================================================================= */
:root {
  --brand: #ff6900;
  --brand-2: #ff8a3d;
  --brand-press: #e85f00;
  --brand-soft: #fff3ea;
  --brand-soft-2: #ffe4d1;
  --brand-ink: #8a3600;
  --on-brand: #ffffff;

  --ink-1: #0c0c10;
  --ink-2: #42424c;
  --ink-3: #71717d;
  --ink-4: #9c9ca8;

  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --surface-3: #f0f0f4;
  --line: #e9e9ef;
  --line-strong: #dadae4;

  --ok: #0f9d58;
  --ok-soft: #e8f8ef;
  --warn: #e5840b;
  --warn-soft: #fff5e5;
  --danger: #d92d20;
  --danger-soft: #fdecea;
  --info: #2f6fed;
  --info-soft: #ecf2fe;
  --gold: #a9791a;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(12, 12, 16, 0.05), 0 12px 30px -20px rgba(12, 12, 16, 0.28);
  --sh-2: 0 32px 90px -44px rgba(12, 12, 16, 0.5);
  --sh-brand: 0 10px 24px -12px rgba(255, 105, 0, 0.65);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sidebar: 264px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --brand: #ff7a1a;
  --brand-2: #ff9d55;
  --brand-press: #ff8f3d;
  --brand-soft: #2a1a0f;
  --brand-soft-2: #3a2314;
  --brand-ink: #ffc79c;

  --ink-1: #f4f4f7;
  --ink-2: #c3c3cd;
  --ink-3: #9696a3;
  --ink-4: #6f6f7c;

  --bg: #0b0b0e;
  --surface: #15151a;
  --surface-2: #1a1a20;
  --surface-3: #22222a;
  --line: #26262f;
  --line-strong: #33333e;

  --ok: #3ddc84;
  --ok-soft: #12291d;
  --warn: #ffb020;
  --warn-soft: #2b2110;
  --danger: #ff6b5e;
  --danger-soft: #2e1513;
  --info: #7aa7ff;
  --info-soft: #141d2e;
  --gold: #e3b341;

  --sh-1: 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 40px -28px rgba(0, 0, 0, 0.9);
  --sh-2: 0 40px 100px -50px rgba(0, 0, 0, 1);
  --sh-brand: 0 10px 26px -14px rgba(255, 105, 0, 0.8);
}

/* ---------------------------------- reset --------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* --------------------------------- helpers -------------------------------- */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -180%);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--ink-1);
  color: var(--surface);
  font-weight: 600;
  transition: transform 0.18s var(--ease);
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Angka selalu rata kolom agar tabel tidak "menari" saat nilainya berubah. */
.num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.neg {
  color: var(--danger);
}

.pos {
  color: var(--ok);
}

.muted {
  color: var(--ink-3);
}

.nowrap {
  white-space: nowrap;
}

/* ---------------------------------- brand --------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 19px;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--brand-2), var(--brand) 55%, #e35c00);
  box-shadow: var(--sh-brand);
  position: relative;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 9px 8px;
  border-radius: 3px;
  background: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 30%, 34% 30%, 34% 46%, 100% 46%, 100% 100%, 0 100%, 0 70%, 66% 70%, 66% 54%, 0 54%);
}

.brand__dot {
  color: var(--brand);
}

.brand--lg {
  font-size: 24px;
}

.brand--lg .brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

/* --------------------------------- buttons -------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink-1);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--btn-border);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.12s var(--ease),
    box-shadow 0.16s var(--ease), color 0.16s var(--ease);
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.btn:hover {
  --btn-bg: var(--surface-3);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-busy="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.btn--primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--on-brand);
  --btn-border: transparent;
  box-shadow: var(--sh-brand);
}

.btn--primary:hover {
  --btn-bg: var(--brand-press);
}

.btn--secondary {
  --btn-bg: var(--surface);
  --btn-border: var(--line-strong);
}

.btn--secondary:hover {
  --btn-bg: var(--surface-3);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink-2);
}

.btn--ghost:hover {
  --btn-bg: var(--surface-3);
  --btn-fg: var(--ink-1);
}

.btn--danger {
  --btn-bg: var(--danger-soft);
  --btn-fg: var(--danger);
}

.btn--danger:hover {
  --btn-bg: var(--danger);
  --btn-fg: #fff;
}

.btn--sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--r-xs);
}

.btn--lg {
  min-height: 48px;
  font-size: 15px;
  padding: 0 22px;
  border-radius: 14px;
}

.btn--block {
  width: 100%;
}

.btn--icon {
  min-height: 38px;
  width: 38px;
  padding: 0;
  border-radius: var(--r-sm);
}

.btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

.btn[aria-busy="true"] .btn__spinner {
  display: inline-block;
}

.btn[aria-busy="true"] > .btn__label {
  opacity: 0.75;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------- fields -------------------------------- */
.field {
  display: grid;
  gap: 7px;
}

.field > label,
.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-1);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.16s var(--ease);
  appearance: none;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-4);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-4);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.field__row input {
  flex: 1;
}

.field__row .btn--icon {
  position: absolute;
  right: 4px;
  min-height: 36px;
  width: 36px;
  color: var(--ink-3);
}

.field__hint {
  font-size: 12px;
  color: var(--ink-3);
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
}

.form-grid {
  display: grid;
  gap: 14px;
}

@media (min-width: 620px) {
  .form-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------- surfaces -------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}

.card__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card__desc {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-3);
}

.card__body {
  padding: 18px 22px 22px;
}

.card__foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.section {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section__title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* ---------------------------------- chips --------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.chip--brand {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.chip--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip--info {
  background: var(--info-soft);
  color: var(--info);
}

.chip--gold {
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  color: var(--gold);
}

.chip--outline {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* -------------------------------- skeleton -------------------------------- */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface-3);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton--text {
  height: 12px;
  margin: 8px 0;
}

.skeleton--title {
  height: 22px;
  width: 40%;
}

.skeleton--card {
  height: 132px;
  border-radius: var(--r-lg);
}

.skeleton--chart {
  height: 240px;
  border-radius: var(--r-md);
}

.skeleton--row {
  height: 44px;
  margin-bottom: 8px;
}

/* --------------------------------- states --------------------------------- */
.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 44px 24px;
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--surface-3);
  color: var(--ink-3);
}

.empty__title {
  font-size: 15px;
  font-weight: 700;
}

.empty__desc {
  max-width: 42ch;
  font-size: 13px;
  color: var(--ink-3);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}

.alert--danger {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  background: var(--danger-soft);
  color: var(--danger);
}

.alert__body {
  display: grid;
  gap: 2px;
}

.alert__title {
  font-weight: 700;
}

/* --------------------------------- toasts --------------------------------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: grid;
  gap: 10px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--ink-1);
  color: var(--surface);
  box-shadow: var(--sh-2);
  font-size: 13px;
  animation: toast-in 0.24s var(--ease);
  pointer-events: auto;
}

.toast--ok .icon {
  color: #5be08d;
}

.toast--error .icon {
  color: #ff8a7d;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

/* -------------------------------- segmented ------------------------------- */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
}

.segmented__btn {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.segmented__btn:hover {
  color: var(--ink-1);
}

.segmented__btn[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink-1);
  box-shadow: 0 1px 2px rgba(12, 12, 16, 0.12);
}

[data-theme="dark"] .segmented__btn[aria-selected="true"] {
  background: var(--surface-2);
}

/* ---------------------------------- meter --------------------------------- */
.meter {
  position: relative;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width 0.5s var(--ease);
}

.meter--ok .meter__fill {
  background: linear-gradient(90deg, #4ade80, var(--ok));
}

.meter--warn .meter__fill {
  background: linear-gradient(90deg, #fbbf24, var(--warn));
}

.meter--danger .meter__fill {
  background: linear-gradient(90deg, #f87171, var(--danger));
}

/* --------------------------------- dialog --------------------------------- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 8, 12, 0.5);
  backdrop-filter: blur(3px);
  animation: fade-in 0.16s var(--ease);
}

.dialog {
  width: min(520px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-2);
  animation: dialog-in 0.2s var(--ease);
}

.dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.dialog__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dialog__desc {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-3);
}

.dialog__body {
  padding: 18px 22px;
}

.dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 22px 22px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

/* ================================== LOGIN ================================= */
.login {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 0.95fr);
  min-height: 100dvh;
  background: var(--surface);
}

.login__brand {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 56px;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 90% 0%, rgba(255, 138, 61, 0.5), transparent 60%),
    radial-gradient(90% 70% at 8% 92%, rgba(255, 105, 0, 0.42), transparent 62%),
    linear-gradient(160deg, #191014 0%, #0b0b0e 55%, #120c0a 100%);
  color: #fff;
}

.login__brand::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.03), 0 0 0 140px rgba(255, 255, 255, 0.02);
}

.login__brand-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  max-width: 470px;
}

.login__headline {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.login__lede {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  max-width: 46ch;
}

.login__points {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.login__points li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login__points .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-2);
}

.login__panel {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: var(--surface);
}

.login__form {
  width: min(380px, 100%);
  display: grid;
  gap: 16px;
  animation: rise 0.35s var(--ease);
}

.login__form .form-error {
  margin-top: -2px;
}

.login__title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login__sub {
  margin-top: -10px;
  font-size: 14px;
  color: var(--ink-3);
}

.login__hint {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.6;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

@media (max-width: 900px) {
  .login {
    grid-template-columns: 1fr;
  }

  .login__brand {
    padding: 28px 24px 34px;
    align-items: flex-start;
  }

  .login__brand::after {
    width: 280px;
    height: 280px;
    right: -90px;
    top: -120px;
  }

  .login__headline {
    font-size: 26px;
    max-width: 22ch;
  }

  .login__lede,
  .login__points {
    display: none;
  }

  .login__panel {
    padding: 28px 24px 48px;
    place-items: start center;
  }
}

/* ================================ APP SHELL =============================== */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100dvh;
  padding: 22px 16px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
}

.sidebar__close {
  display: none;
}

.nav {
  display: grid;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
  padding-bottom: 8px;
}

.nav__group {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.nav__item .icon {
  width: 19px;
  height: 19px;
  color: var(--ink-3);
  transition: color 0.16s var(--ease);
}

.nav__item:hover {
  background: var(--surface-3);
  color: var(--ink-1);
}

.nav__item[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
}

.nav__item[aria-current="page"] .icon {
  color: var(--brand);
}

[data-theme="dark"] .nav__item[aria-current="page"] {
  color: var(--brand-2);
}

.sidebar__foot {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.whoami {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px;
  min-width: 0;
}

.whoami__meta {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.whoami__name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whoami__role {
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(16px, 3vw, 36px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar__menu {
  display: none;
}

.topbar__title {
  min-width: 0;
  margin-right: auto;
}

.topbar__title h1 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__sub {
  font-size: 12.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.icon--moon,
[data-theme="dark"] .icon--sun {
  display: none;
}

[data-theme="dark"] .icon--moon {
  display: block;
}

.main {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 32px) clamp(16px, 3vw, 36px) 64px;
  flex: 1;
}

.main:focus {
  outline: none;
}

.view {
  display: grid;
  gap: 18px;
  animation: rise 0.22s var(--ease);
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(8, 8, 12, 0.45);
  backdrop-filter: blur(2px);
  animation: fade-in 0.16s var(--ease);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--ink-1);
  color: var(--surface);
  font-size: 14px;
  text-align: center;
}

/* ------------------------------ page header ------------------------------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.page-head__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.page-head__title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.page-head__desc {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-3);
  max-width: 68ch;
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ------------------------------ period picker ----------------------------- */
.period {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-1);
}

.period__label {
  min-width: 118px;
  padding: 0 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.period .btn--icon {
  min-height: 30px;
  width: 30px;
  border-radius: var(--r-pill);
}

/* ================================= KPI =================================== */
.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 18px 20px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}

.stat__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
}

.stat__label .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-4);
}

.stat__value {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat__value small {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
  margin-left: 4px;
}

.stat__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

/* Cincin pencapaian: conic-gradient, tanpa pustaka chart. */
.ring {
  --ring-value: 0;
  --ring-color: var(--brand);
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(clamp(0, var(--ring-value), 100) * 1%), var(--surface-3) 0);
  transition: background 0.6s var(--ease);
}

.ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--surface);
}

.ring__text {
  position: relative;
  display: grid;
  justify-items: center;
  line-height: 1.05;
}

.ring__num {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.ring__unit {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 138, 61, 0.16), transparent 60%), var(--surface);
  box-shadow: var(--sh-1);
}

.hero__body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.hero__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}

.hero__value {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ================================= CHART ================================== */
.chart {
  position: relative;
  width: 100%;
  height: 240px;
}

.chart__svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart__grid-line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart__axis-label {
  fill: var(--ink-4);
  font-size: 10.5px;
  font-weight: 500;
}

.chart__area {
  opacity: 1;
}

.chart__line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart__dot {
  fill: var(--surface);
  stroke: var(--brand);
  stroke-width: 2;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}

.chart__hit {
  fill: transparent;
  cursor: crosshair;
}

.chart__point:hover .chart__dot,
.chart__point:focus-visible .chart__dot {
  opacity: 1;
}

.chart__tooltip {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -130%);
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--ink-1);
  color: var(--surface);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: var(--sh-2);
}

.chart-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-3);
}

.chart-legend__swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  margin-right: 6px;
}

/* ================================= TABLE ================================== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--r-lg);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table caption {
  text-align: left;
  padding: 0 0 12px;
  font-size: 13px;
  color: var(--ink-3);
}

.table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 0.14s var(--ease);
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table .is-right {
  text-align: right;
}

.table__store {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.table__store-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table__code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-4);
}

.table__bar {
  display: grid;
  gap: 6px;
  min-width: 130px;
}

.table__bar-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ============================== LEADERBOARD =============================== */
.board {
  display: grid;
  gap: 8px;
}

.board__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.2fr) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.board__row:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
  box-shadow: var(--sh-1);
}

.board__row--top {
  background: linear-gradient(90deg, var(--brand-soft), transparent 55%), var(--surface);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.rank {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rank--1 {
  background: linear-gradient(140deg, #ffd166, #f5a623);
  color: #5a3b00;
}

.rank--2 {
  background: linear-gradient(140deg, #e8e8ef, #c9c9d6);
  color: #3d3d47;
}

.rank--3 {
  background: linear-gradient(140deg, #f0c9a8, #d79b6a);
  color: #4d2f13;
}

.board__store {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.board__name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.board__sub {
  font-size: 11.5px;
  color: var(--ink-4);
  font-family: var(--mono);
}

.board__value {
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.board__value small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0;
}

/* ================================ STORES ================================== */
.store-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}

.store-card {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}

.store-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: var(--line-strong);
}

.store-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.store-card__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.store-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
}

.store-card__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.metric {
  display: grid;
  gap: 2px;
}

.metric__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.metric__value {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* =============================== OPERATIONS =============================== */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink-1);
  box-shadow: 0 1px 2px rgba(12, 12, 16, 0.1);
}

.tab__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.tab[aria-selected="true"] .tab__count {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}

.list__item {
  display: grid;
  gap: 10px;
  padding: 16px 20px;
  background: var(--surface);
  transition: background 0.14s var(--ease);
}

.list__item:hover {
  background: var(--surface-2);
}

.list__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.list__title {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.list__desc {
  font-size: 13px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-4);
}

/* ================================= BADGES ================================= */
.badge-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.badge-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(255, 138, 61, 0.14), transparent 60%),
    var(--surface);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.badge-card__medal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, #ffd166, #ff6900);
  color: #fff;
  box-shadow: var(--sh-brand);
}

.badge-card__medal .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.badge-card__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.badge-card__store {
  font-size: 12.5px;
  color: var(--ink-3);
}

.badge-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
}

/* ================================ ACCOUNT ================================= */
.profile {
  display: grid;
  gap: 16px;
}

.profile__head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile__avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 18px;
}

.profile__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile__email {
  font-size: 13px;
  color: var(--ink-3);
}

.kv {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}

.kv__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.kv__row:last-child {
  border-bottom: 0;
}

.kv__key {
  color: var(--ink-3);
}

.kv__val {
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.perm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ================================ PAGINATION ============================== */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}

.pager__actions {
  display: flex;
  gap: 6px;
}

/* ================================ RESPONSIVE ============================== */
@media (max-width: 960px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, 86vw);
    transform: translateX(-102%);
    transition: transform 0.24s var(--ease);
    box-shadow: var(--sh-2);
    border-right: 1px solid var(--line);
  }

  .nav-open .sidebar {
    transform: none;
  }

  .sidebar__close,
  .topbar__menu {
    display: inline-flex;
  }

  .topbar {
    padding: 12px 16px;
  }

  .main {
    padding-bottom: 48px;
  }
}

@media (min-width: 961px) {
  .scrim {
    display: none;
  }
}

@media (max-width: 700px) {
  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
  }

  .table tr:last-child {
    border-bottom: 0;
  }

  .table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    padding: 7px 16px;
    text-align: right;
  }

  .table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-4);
    text-align: left;
    flex: none;
  }

  .table td > * {
    min-width: 0;
  }

  .table__bar {
    width: 58%;
  }

  .board__row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 12px;
  }

  .board__bar {
    display: none;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .list__top {
    flex-direction: column;
    gap: 8px;
  }

  .toasts {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .login__title {
    font-size: 21px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .period__label {
    min-width: 96px;
    font-size: 12px;
  }
}

/* Hormati preferensi pengguna: tanpa animasi dekoratif. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .toasts,
  .scrim {
    display: none !important;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .card,
  .stat,
  .store-card {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ==========================================================================
   Kanban & Extended Elements
   ========================================================================== */
.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  overflow-x: auto;
  align-items: start;
}
.kanban__col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}
.kanban__col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.kanban__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.kanban__card-title {
  font-weight: 600;
  font-size: 14px;
}
.progress-bar {
  background: var(--border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 100%;
}
.progress-bar__fill {
  background: var(--brand);
  height: 100%;
  border-radius: 999px;
}

/* ==========================================================================
   Power BI / Tableau Style Dashboard
   ========================================================================== */
.bi-canvas {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.bi-slicers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.bi-slicers__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.bi-ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.bi-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.bi-kpi--green { border-top-color: var(--ok); }
.bi-kpi--blue { border-top-color: #0284c7; }
.bi-kpi--purple { border-top-color: #8b5cf6; }
.bi-kpi--orange { border-top-color: var(--brand); }
.bi-kpi__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bi-kpi__val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.bi-kpi__sub {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bi-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.bi-col-8 { grid-column: span 8; }
.bi-col-4 { grid-column: span 4; }
.bi-col-6 { grid-column: span 6; }
.bi-col-12 { grid-column: span 12; }
@media (max-width: 900px) {
  .bi-col-8, .bi-col-4, .bi-col-6 { grid-column: span 12; }
}
.bi-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.bi-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bi-chart-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.bi-chart-desc {
  font-size: 12px;
  color: var(--text-2);
}
.waterfall-step {
  display: grid;
  grid-template-columns: 140px 1fr 100px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.funnel-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.funnel-bar__header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
}
.funnel-bar__track {
  height: 22px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.funnel-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: width 0.3s ease;
}
.matrix-cell-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.matrix-bar {
  height: 6px;
  background: var(--brand);
  border-radius: 3px;
}

/* ----------------------------- BI Subtabs & Comparative ----------------------------- */
.bi-subtabs {
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow-x: auto;
}
.bi-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.bi-tab-btn:hover {
  color: var(--text);
  background: var(--surface-3);
}
.bi-tab-btn.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}
.bi-prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 840px) {
  .bi-prod-grid {
    grid-template-columns: 1fr;
  }
}
.bi-prod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.bi-prod-card--highlight {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-sm);
}
.bi-prod-card--highlight::after {
  content: "RILIS SEKARANG (CURRENT)";
  position: absolute;
  top: 14px;
  right: -32px;
  transform: rotate(45deg);
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 34px;
  letter-spacing: 0.5px;
}
.bi-prod-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.bi-prod-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.bi-prod-card--highlight .bi-prod-icon {
  background: rgba(255, 105, 0, 0.12);
  color: var(--brand);
}
.bi-prod-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.bi-prod-sub {
  font-size: 12px;
  color: var(--text-2);
}
.bi-prod-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--surface-2);
  padding: 14px;
  border-radius: 8px;
}
.bi-prod-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bi-prod-stat-label {
  font-size: 11px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.bi-prod-stat-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.bi-delta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.bi-delta-tag--up {
  background: rgba(16, 185, 129, 0.15);
  color: var(--ok);
}
.bi-delta-tag--down {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
.bi-insight-box {
  background: rgba(255, 105, 0, 0.06);
  border: 1px solid rgba(255, 105, 0, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bi-insight-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
}
.bi-insight-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* ----------------------------- POS Cashier & Thermal Receipt ----------------------------- */
.pos-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - 180px);
  min-height: 540px;
}
@media (max-width: 900px) {
  .pos-container {
    grid-template-columns: 1fr;
    height: auto;
  }
}
.pos-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
}
.pos-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.pos-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pos-card:active {
  transform: translateY(0);
}
.pos-card__img {
  width: 100%;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
}
.pos-card__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pos-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.pos-card__price {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
}
.pos-card__stock {
  font-size: 11px;
  font-weight: 600;
}
.pos-cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.pos-cart__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pos-cart__items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pos-cart__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--surface-2);
}
.pos-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 700;
  cursor: pointer;
}
.pos-cart__foot {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Struk Thermal */
.receipt-paper {
  width: 320px;
  margin: 0 auto;
  background: #fff;
  color: #111;
  font-family: "Courier New", Courier, monospace;
  padding: 24px 18px;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-size: 12px;
  line-height: 1.4;
}
.receipt-header {
  text-align: center;
  border-bottom: 1px dashed #666;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
}
.receipt-divider {
  border-top: 1px dashed #666;
  margin: 8px 0;
}
@media print {
  body * {
    visibility: hidden;
  }
  .receipt-paper, .receipt-paper * {
    visibility: visible;
  }
  .receipt-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    padding: 0;
  }
}

/* ----------------------------- Telegram Assistant Simulator ----------------------------- */
.tg-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tg-chat-head {
  padding: 12px 18px;
  background: #229ed9;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tg-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-2);
}
.tg-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tg-msg--bot {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border-bottom-left-radius: 2px;
}
.tg-msg--user {
  align-self: flex-end;
  background: #229ed9;
  color: #fff;
  border-bottom-right-radius: 2px;
}
.tg-quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.tg-chip-btn {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #229ed9;
  color: #229ed9;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tg-chip-btn:hover {
  background: #229ed9;
  color: #fff;
}
.tg-input-bar {
  padding: 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}





/* Shared tokens keep analytics, POS and operational modules on one visual system. */
:root {
  --border: var(--line);
  --text: var(--ink-1);
  --text-2: var(--ink-2);
  --radius: var(--r-md);
  --radius-sm: var(--r-sm);
  --shadow-sm: var(--sh-1);
}
.view__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.view__title { font-size: 24px; line-height: 1.25; letter-spacing: -.025em; }
.view__desc { color: var(--ink-3); margin-top: 6px; max-width: 68ch; }
.view__actions, .quick-actions, .filter-bar__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.quick-actions { margin-bottom: 20px; }
.filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.filter-bar__actions { align-self: end; }
.filter-bar .form-error { grid-column: 1 / -1; }
.results-summary { margin: 16px 0 12px; color: var(--ink-3); font-size: 13px; }
.field__input { width: 100%; min-height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 13px; background: var(--surface); color: var(--ink-1); font: inherit; }
.action-panel { margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.action-panel__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.action-panel__row:last-child { border-bottom: 0; padding-bottom: 0; }
.action-panel__row p { font-size: 13px; margin-top: 4px; max-width: 70ch; }
.sidebar__search { margin: 0 18px 12px; }
.sidebar__search input { min-width: 0; }
#nav-no-results { padding: 12px; font-size: 13px; }
.demo-accounts { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
.demo-accounts summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 10px 0; }
.demo-accounts .btn { height: auto; white-space: normal; flex-wrap: wrap; min-height: 44px; padding: 10px 12px; }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 14px 24px; }
.detail-list dt { color: var(--ink-3); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.pos-card { font: inherit; color: var(--ink-1); text-align: left; }
.pos-card:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.pos-card__placeholder { display: grid; place-items: center; height: 90px; background: var(--surface-2); border-radius: var(--r-xs); color: var(--ink-3); }
.pos-card__placeholder .icon { width: 32px; height: 32px; }
.pos-qty-btn { min-width: 44px; width: 44px; min-height: 44px; height: 44px; color: var(--ink-1); }
.bi-chart-card { min-width: 0; overflow-x: auto; }
.bi-grid > *, .pos-container > * { min-width: 0; }
.bi-chart-head { gap: 12px; flex-wrap: wrap; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; }
@media (max-width: 700px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 12px; }
  .view__actions { width: 100%; }
  .view__actions .btn { flex: 1 1 auto; }
  .action-panel__row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .action-panel__row .btn { width: 100%; }
  .waterfall-step { grid-template-columns: minmax(80px, 1fr) 1fr auto; gap: 8px; }
  .pos-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pos-cart__item { flex-wrap: wrap; }
  .bi-slicers { padding: 12px; }
}
@media (max-width: 420px) {
  .filter-bar { grid-template-columns: minmax(0, 1fr); }
  .filter-bar__actions > .btn { flex: 1; }
  .view__title { font-size: 21px; }
  .detail-list { grid-template-columns: 1fr; gap: 6px; }
  .detail-list dd { margin-bottom: 10px; }
}
/* SVG indicators share the same geometry as the markup. */
.ring { background: transparent; }
.ring::before { display: none; }
.ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track, .ring__bar { fill: none; stroke-width: 3.5; }
.ring__track { stroke: var(--surface-3); }
.ring__bar { stroke: var(--ring-color); stroke-linecap: round; }
.ring--ok { --ring-color: var(--ok); }
.ring--warn { --ring-color: var(--warn); }
.meter__svg { display: block; width: 100%; height: 100%; }
.meter__fill { fill: var(--meter-color, var(--brand)); }
.report-stats { margin: 20px 0; }
#report-filters + .results-summary { line-height: 1.6; }
.report-stats .stat { min-width: 0; }
.report-stats .stat__value { font-size: clamp(20px, 2vw, 28px); overflow-wrap: anywhere; }
#import-form { max-width: 620px; }
#import-result caption { text-align: left; padding: 16px; font-size: 13px; color: var(--ink-3); }
#import-result .table td { overflow-wrap: anywhere; }
#import-result .action-panel p { margin: 12px 0; }
.report-completeness-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; color: var(--ink-2); font-size: 14px; }
#completeness-filters ~ .table-wrap .table td { vertical-align: top; }
#completeness-filters ~ .table-wrap .field__hint { max-width: 28ch; white-space: normal; margin-top: 6px; }
#report-confirm-form { margin-top: 20px; }
.comparison-ranges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.comparison-ranges > div { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.comparison-ranges p { margin-top: 6px; color: var(--ink-2); font-size: 13px; }
.comparison-chart { display: block; width: 100%; height: auto; }
.comparison-line { fill: none; stroke: var(--brand); stroke-width: 2.5; }
.comparison-line--baseline { stroke: var(--ink-3); stroke-dasharray: 6 4; }
.comparison-dot { fill: var(--brand); }
.comparison-dot--baseline { fill: var(--ink-3); }
.comparison-legend { display: inline-flex; gap: 8px; align-items: center; }
.comparison-legend i { width: 20px; border-top: 3px solid var(--brand); }
.comparison-legend--baseline i { border-color: var(--ink-3); border-top-style: dashed; }
.comparison-metrics th[scope="row"] { color: var(--ink-1); font-size: 14px; letter-spacing: normal; text-transform: none; }
#comparison-filters input[readonly] { background: var(--surface-2); color: var(--ink-2); }
@media (max-width: 700px) { .comparison-ranges { grid-template-columns: minmax(0, 1fr); gap: 10px; } .comparison-metrics th[scope="row"] { display: block; padding: 12px 16px; } }
.target-progress { display: grid; gap: 6px; min-width: 90px; }
.target-progress meter { width: 100%; height: 12px; accent-color: var(--brand); }
#sales-target-filters ~ .table-wrap .field__hint { max-width: 28ch; white-space: normal; margin-top: 6px; }
#sales-target-filters ~ .table-wrap .table td { vertical-align: top; }
#sales-target-form { min-width: 0; }
#sales-target-filters ~ .table-wrap .chip { white-space: normal; max-width: 150px; }
@media (min-width: 701px) {
  #sales-target-filters ~ .table-wrap .table { table-layout: fixed; }
  #sales-target-filters ~ .table-wrap .table th,
  #sales-target-filters ~ .table-wrap .table td { padding-left: 10px; padding-right: 10px; font-size: 13px; overflow-wrap: anywhere; }
  #sales-target-filters ~ .table-wrap .table .btn { white-space: normal; height: auto; padding: 8px; min-width: 0; }
}
.report-value-link { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.report-value-link:hover { color: var(--brand-ink); text-decoration-color: currentColor; }
.trace-context { padding: 18px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); }
.trace-context p { margin-top: 8px; font-size: 13px; }
.trace-items { margin-top: 20px; }
.trace-items caption { padding: 12px; text-align: left; color: var(--ink-3); font-size: 13px; }
.trace-items .table td { overflow-wrap: anywhere; }
.reconciliation-transactions .chip { white-space: normal; }
.reconciliation-transactions td { vertical-align: top; font-size: 13px; }
.reconciliation-transactions .field__hint { max-width: 28ch; margin-top: 6px; }
#components-form { margin-top: 18px; }
.reconciliation-equation { margin-top: 18px; }
.history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.history-hash { overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; }
.import-history-table td { vertical-align: top; font-size: 13px; overflow-wrap: anywhere; }
.import-history-table .chip { white-space: normal; }
#cancel-import-form { margin-top: 18px; }
.period-lock-table td { vertical-align: top; }
.period-lock-table .field__hint { max-width: 30ch; margin-top: 6px; }
#period-action-form { margin-top: 20px; }

/* Reporting workspace: clear hierarchy, compact navigation and readable data. */
:root { --bg: #f4f6f9; --ink-3: #626b7a; --line: #e5e9ef; --r-md: 14px; }
[data-theme="dark"] { --bg: #0e1117; --ink-3: #a0a8b8; --line: #2a303c; }
.sidebar { gap: 14px; padding: 22px 12px 14px; }
.sidebar__search { margin: 0 6px; }
.nav { align-content: start; scrollbar-width: thin; }
.nav__group { padding-top: 19px; color: var(--ink-3); font-size: 10px; }
.nav__item { padding: 9px 12px; font-size: 13px; border-radius: 9px; min-height: 40px; }
.nav__item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brand); }
.topbar { background: var(--surface); }
.view__title { font-size: clamp(23px, 2.3vw, 30px); letter-spacing: -.035em; }
.view__desc { font-size: 13px; }
.filter-bar { gap: 14px; padding: 20px; box-shadow: 0 2px 5px rgba(12,12,16,.02); }
.filter-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.filter-heading strong { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.filter-heading span { color: var(--ink-3); font-size: 12px; }
.advanced-filters { grid-column: 1 / -1; grid-row: 3; border-top: 1px solid var(--line); padding-top: 12px; }
.advanced-filters summary, .report-notes summary { cursor: pointer; color: var(--ink-2); font-size: 13px; width: fit-content; }
.advanced-filters__fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 14px; }
#report-filters .filter-bar__actions { grid-column: 1 / -1; justify-content: flex-end; }
.active-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 10px; font-size: 12px; }
.scope-label { color: var(--ink-3); margin-right: 3px; }
.scope-chip { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; background: var(--surface); color: var(--ink-2); font: inherit; }
.scope-chip--removable { cursor: pointer; background: var(--brand-soft); border-color: var(--brand-soft-2); color: var(--brand-ink); }
.scope-chip--removable:hover { border-color: var(--brand); }
.scope-chip--removable span { font-size: 17px; line-height: 1; }
.report-notes { margin: 10px 0 16px; }
.report-notes .results-summary { margin-top: 8px; max-width: 95ch; }
.data-notice { display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border: 1px solid color-mix(in srgb,var(--warn) 25%,var(--surface)); border-radius: 10px; background: var(--warn-soft); color: var(--ink-2); font-size: 13px; }
.data-notice .icon { color: var(--warn); margin-top: 2px; }
.report-stats { gap: 14px; }
.report-stats .stat { box-shadow: none; border-radius: 14px; padding: 20px; }
.report-stats .stat:first-child { background: var(--brand-soft); border-color: var(--brand-soft-2); }
.report-stats .stat:first-child .stat__value { color: var(--brand-ink); }
.stat__value, .table td { font-variant-numeric: tabular-nums; }
.stat__value .report-value-link { text-decoration: none; }
.stat__value .report-value-link:hover { text-decoration: underline; }
.card { box-shadow: 0 2px 6px rgba(12,12,16,.025); }
.table th { background: var(--surface-2); font-size: 11px; color: var(--ink-3); }
.table td { padding-top: 17px; padding-bottom: 17px; }
.table tbody tr { transition: background .15s ease; }
.table .btn--ghost { padding-left: 0; white-space: normal; text-align: left; justify-content: flex-start; }
.section__head { gap: 12px; flex-wrap: wrap; }
.section__head > .muted { font-size: 12px; }
.report-completeness-link { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); gap: 8px; }
.report-completeness-link > span { flex: 1 1 100%; font-size: 12px; color: var(--ink-3); }
.dialog { width: min(640px,100%); border-radius: 20px; }
.dialog__head { position: sticky; top: 0; z-index: 1; background: var(--surface); padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dialog__body .detail-list { background: var(--surface-2); border: 1px solid var(--line); padding: 16px; border-radius: 12px; gap: 12px 20px; font-size: 13px; }
.dialog__body .action-panel { margin-top: 18px; }
@media (max-width: 700px) {
  .filter-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  #report-filters .field:first-of-type { grid-column: 1 / -1; }
  .advanced-filters { grid-row: auto; }
  .report-stats .stat { padding: 16px; }
  .report-completeness-link .btn { flex: 1 1 auto; white-space: normal; height: auto; padding: 8px 10px; }
  .dialog-backdrop { padding: 10px; }
  .dialog { max-height: calc(100dvh - 20px); }
  .table td { padding-top: 12px; padding-bottom: 12px; }
}
@media (max-width: 420px) { .advanced-filters__fields { grid-template-columns: 1fr; } }
.view > .view__head, .view > .report-stats, .view > .active-scope, .view > .report-notes, .view > .report-completeness-link { margin-top: 0; margin-bottom: 0; }
.report-completeness-link { justify-content: flex-start; }
.report-completeness-link > span { flex: 1 1 180px; }
#report-filters .advanced-filters { grid-row: auto; }

/* Charts and report tables */
.chart { height: 280px; }
.chart__axis-label { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart__grid-line { stroke-dasharray: 2 5; opacity: .8; }
.chart__line { stroke-width: 3; }
.chart__average { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 5 5; opacity: .55; }
.chart__guide { stroke: var(--brand); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0; pointer-events: none; }
.chart__point:hover .chart__guide, .chart__point:focus .chart__guide { opacity: .5; }
.chart__tooltip { max-width: calc(100% - 12px); width: max-content; white-space: normal; text-align: center; line-height: 1.6; padding: 10px 14px; border-radius: 10px; transform: translate(-50%, -110%); }
.chart-summary { display: flex; flex-wrap: wrap; gap: 16px 36px; padding: 0 4px 22px; align-items: center; }
.chart-summary > div { display: grid; gap: 4px; }
.chart-summary span { color: var(--ink-3); font-size: 12px; }
.chart-summary strong { font-size: 19px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.chart-summary__unit { margin-left: auto; }
.chart-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 16px 4px 0; font-size: 11px; color: var(--ink-3); }
.chart-footer > span { display: inline-flex; align-items: center; gap: 7px; }
.chart-footer > span:last-child { margin-left: auto; }
.chart-footer i { width: 16px; border-top: 3px solid var(--brand); border-radius: 2px; }
.chart-footer .average-key { border-top: 1px dashed var(--ink-3); }
.sales-data-wrap { border-radius: 14px; }
.sales-data-table caption { padding: 15px 20px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; }
.sales-data-table th { font-size: 11px; letter-spacing: .035em; padding: 14px 20px; }
.sales-data-table td { padding: 18px 20px; }
.sales-data-table tbody tr:nth-child(even) { background: color-mix(in srgb,var(--surface-2) 55%,var(--surface)); }
.sales-data-table tbody tr:hover { background: var(--brand-soft); }
.sales-data-table .report-value-link { text-decoration: none; font-weight: 600; }
.sales-data-table .report-value-link:hover { text-decoration: underline; }
.store-identity { display: flex; align-items: center; gap: 12px; }
.store-rank { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.sales-data-table tbody tr:first-child .store-rank { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-soft-2); }
.store-identity .btn { min-height: 26px; font-weight: 600; }
.store-identity .field__hint { font-size: 11px; }
.contribution { display: grid; justify-items: end; gap: 7px; }
.contribution meter { width: 90px; height: 6px; border: 0; background: var(--surface-3); border-radius: 4px; }
.contribution meter::-webkit-meter-bar { height: 6px; border: 0; background: var(--surface-3); border-radius: 4px; }
.contribution meter::-webkit-meter-optimum-value { background: var(--brand); border-radius: 4px; }
.contribution meter::-moz-meter-bar { background: var(--brand); border-radius: 4px; }
.table-empty { display: grid; justify-items: center; gap: 10px; padding: 32px 16px; text-align: center; }
.table-empty .icon { width: 28px; height: 28px; color: var(--ink-3); }
.table-empty span { color: var(--ink-3); font-size: 12px; }
@media (max-width:700px) {
  .chart-summary { gap: 16px 24px; }
  .chart-summary strong { font-size: 17px; }
  .chart-summary__unit { display: none; }
  .chart-footer > span:last-child { margin-left: 0; flex-basis: 100%; }
  .sales-data-table caption { padding: 14px 16px; }
  .sales-data-table td { padding: 10px 16px; }
  .sales-data-table tr { padding: 8px 0; }
  .sales-data-table td:first-child { background: var(--surface-2); padding-top: 14px; padding-bottom: 14px; }
  .sales-data-table td:first-child::before { display: none; }
  .store-identity { text-align: left; }
  .contribution { display: inline-grid; }
}
.chart__point:focus { outline: none; }
.chart__point:focus-visible .chart__dot { opacity: 1; stroke-width: 3; r: 6px; }
.sales-data-table caption { width: 100%; }
@media (max-width:700px) { .sales-data-table caption { display: block; text-align: left; box-sizing: border-box; } }

/* New Retail area sign-in */
.login__brand { align-items: center; padding: clamp(32px,5vw,76px); background: radial-gradient(ellipse at 0% 100%,#80371066,transparent 65%),radial-gradient(ellipse at 100% 0%,#ff69002b,transparent 55%),#17191e; }
.login__brand-inner { max-width: 570px; gap: 22px; }
.login__brand .brand { margin-bottom: 24px; font-size: 22px; }
.login__eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #ffb581; font-weight: 600; }
.login__headline { font-size: clamp(30px,3.4vw,48px); line-height: 1.15; max-width: none; }
.login__headline > span { color: #ff9c56; }
.login__headline small { display: block; font-size: .52em; font-weight: 500; letter-spacing: -.015em; line-height: 1.4; margin-top: 14px; color: #e5e7eb; }
.login__lede { max-width: 53ch; line-height: 1.8; font-size: 14px; color: #c4c7ce; }
.login__regions { display: flex; flex-wrap: wrap; gap: 8px; }
.login__regions span { border: 1px solid #ffffff24; background: #ffffff08; padding: 6px 12px; border-radius: 6px; color: #e5e7eb; font-size: 11px; }
.login__points { padding-top: 24px; border-top: 1px solid #ffffff1f; gap: 20px; margin-top: 8px; }
.login__points li { align-items: flex-start; gap: 13px; }
.login__points .icon { width: 20px; height: 20px; margin-top: 2px; }
.login__points li div { display: grid; gap: 3px; }
.login__points strong { font-weight: 600; color: #f3f4f6; }
.login__points li span { font-size: 12px; color: #afb4bf; }
.login__panel { background: var(--bg); padding: 48px 32px; }
.login__form { width: min(420px,100%); background: var(--surface); padding: 32px; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--sh-1); gap: 20px; }
.login__welcome { color: var(--brand-ink); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.login__title { font-size: 26px; }
.login__sub { line-height: 1.7; font-size: 13px; }
.login__form .field input { min-height: 48px; }
.login__hint { line-height: 1.8; }
@media(max-width:900px) {
  .login__brand { padding: 30px 24px; }
  .login__brand-inner { gap: 14px; max-width: 600px; }
  .login__brand .brand { margin-bottom: 4px; }
  .login__headline { font-size: 30px; }
  .login__headline br { display: none; }
  .login__headline > span::before { content: " "; }
  .login__lede { display: block; font-size: 12px; }
  .login__points { display: none; }
  .login__panel { padding: 24px 20px 40px; }
  .login__form { width: min(480px,100%); padding: 24px; }
}

/* Refined New Retail entry */
.login { background: #f7f8fa; grid-template-columns: minmax(0,1.15fr) minmax(420px,.85fr); padding: 16px; gap: 16px; }
.login__brand { border-radius: 24px; background: radial-gradient(ellipse at 100% 100%,#bc4f1526,transparent 55%),#15171b; padding: clamp(36px,5vw,80px); min-height: calc(100dvh - 32px); }
.login__brand::after { right: -220px; top: auto; bottom: -280px; width: 660px; height: 660px; border-color: #ff9c5620; box-shadow: 0 0 0 70px #ff9c5605,0 0 0 140px #ff9c5604; pointer-events: none; }
.login__brand-inner { gap: 24px; max-width: 600px; width: 100%; }
.login__brand .brand { margin-bottom: 56px; font-size: 21px; letter-spacing: -.035em; }
.login__brand .brand__mark { box-shadow: none; border-radius: 11px; width: 34px; height: 34px; }
.login__eyebrow { display: flex; gap: 9px; align-items: center; color: #a4a9b3; letter-spacing: .18em; font-size: 10px; }
.login__eyebrow > span { width: 6px; height: 6px; border-radius: 50%; background: #ff8735; box-shadow: 0 0 0 4px #ff873514; }
.login__headline { font-size: clamp(34px,3.7vw,54px); font-weight: 650; line-height: 1.12; letter-spacing: -.045em; }
.login__headline > span { color: #ff8735; }
.login__headline small { color: #e0e2e7; margin-top: 20px; font-size: 19px; letter-spacing: -.02em; font-weight: 400; }
.login__lede { color: #9fa5b0; max-width: 45ch; font-size: 13px; line-height: 1.85; }
.login__regions { gap: 7px; }
.login__regions span { border-color: #ffffff18; padding: 5px 10px; font-size: 10px; border-radius: 5px; }
.login__points { margin-top: 24px; padding-top: 24px; gap: 16px; }
.login__points li span { color: #9299a6; }
.login__panel { background: transparent; padding: 40px 24px; }
.login__form { background: transparent; box-shadow: none; border: 0; border-radius: 0; padding: 0; width: min(350px,100%); gap: 20px; }
.login__form-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fff; border: 1px solid #e5e7eb; box-shadow: 0 3px 7px #161c2605; margin-bottom: 12px; color: #f06b20; }
.login__form-mark .icon { width: 23px; height: 23px; }
.login__welcome { color: #868d99; font-size: 9px; letter-spacing: .16em; margin-bottom: -10px; }
.login__title { color: #1b2029; font-size: 29px; line-height: 1.25; max-width: 12ch; letter-spacing: -.045em; font-weight: 650; }
.login__sub { color: #7b8390; font-size: 12px; line-height: 1.8; margin-top: -8px; margin-bottom: 10px; }
.login__form .field label { color: #414957; font-size: 12px; font-weight: 600; }
.login__form input { background: #fff; border-color: #e0e4ea; border-radius: 10px; font-size: 13px; box-shadow: 0 1px 2px #161c2603; }
.login__form input:focus { border-color: #ff9c56; box-shadow: 0 0 0 3px #ff69000c; }
.login__form .btn--primary { background: #f57328; color: #fff; border-radius: 10px; box-shadow: 0 4px 10px #f5732820; font-size: 13px; }
.login__form .btn--primary:hover { background: #e7651d; }
.login__hint { color: #939aa5; font-size: 11px; }
.login__form .demo-accounts { border-color: #e5e7eb; padding-top: 8px; margin-top: 8px; }
.login__form .demo-accounts summary { color: #969da7; font-size: 11px; font-weight: 400; }
@media(max-width:900px) {
  .login { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .login__brand { min-height: auto; border-radius: 0 0 26px 26px; padding: 30px 32px 34px; }
  .login__brand-inner { gap: 15px; max-width: 560px; margin: 0 auto; }
  .login__brand .brand { margin-bottom: 20px; font-size: 19px; }
  .login__eyebrow { font-size: 9px; }
  .login__headline { font-size: clamp(32px,6vw,44px); }
  .login__headline br { display: block; }
  .login__headline > span::before { content: none; }
  .login__headline small { font-size: 15px; margin-top: 12px; }
  .login__lede { font-size: 12px; max-width: 52ch; }
  .login__regions { margin-top: 2px; }
  .login__panel { padding: 32px 28px 40px; }
  .login__form { width: min(400px,100%); gap: 16px; }
  .login__form-mark, .login__welcome { display: none; }
  .login__title { font-size: 24px; max-width: none; }
  .login__sub { margin-top: -8px; margin-bottom: 4px; }
}
@media(max-width:420px) {
  .login__brand { padding: 25px 24px 28px; }
  .login__brand .brand { margin-bottom: 12px; }
  .login__headline { font-size: 32px; }
  .login__lede br { display: none; }
  .login__regions { display: none; }
  .login__panel { padding: 28px 24px; }
}
.login__form input { color: #252c37; }
.login__form input::placeholder { color: #a1a7b1; }
.login__form #toggle-password { color: #737c8b; }
.login__panel { color: #252c37; }

.audit-table td { vertical-align: top; font-size: 13px; }
.audit-table .chip { white-space: normal; }
.audit-summary { display: block; max-width: 28ch; overflow-wrap: anywhere; color: var(--ink-2); }
.audit-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.audit-pagination > div { display: flex; gap: 8px; }
.audit-reason { padding: 16px; background: var(--warn-soft); border: 1px solid var(--line); border-radius: 12px; margin: 18px 0; font-size: 13px; }
.audit-reason p { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.audit-raw { margin-top: 20px; }
.audit-raw summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.audit-raw pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.7; background: var(--surface-2); padding: 16px; border: 1px solid var(--line); border-radius: 10px; max-height: 380px; overflow-y: auto; }

/* New Retail sign-in: scoped independently from the reporting workspace. */
.entry-screen{min-height:100dvh;display:grid;place-items:center;padding:28px;background:#f3f4f6;color:#202329;font-family:inherit}.entry-frame{width:min(1280px,100%);min-height:min(780px,calc(100dvh - 56px));display:grid;grid-template-columns:1.12fr 1fr;overflow:hidden;border:1px solid #e4e5e8;border-radius:24px;background:#fff;box-shadow:0 8px 48px #222a3810}.entry-story{position:relative;display:flex;flex-direction:column;padding:42px 52px 28px;background:linear-gradient(145deg,#fffaf5 0%,#fff4e9 60%,#ffeddd 100%);border-right:1px solid #f0e3d7;overflow:hidden}.entry-story:before{content:'';position:absolute;inset:0;background-image:radial-gradient(#bd865829 .8px,transparent .8px);background-size:20px 20px;mask-image:linear-gradient(transparent 35%,#000 100%);pointer-events:none}.entry-story>*{position:relative}.entry-brand{display:inline-flex;align-items:center;gap:11px;align-self:flex-start;font-size:23px;font-weight:750;letter-spacing:-1px;color:#25272d;text-decoration:none}.entry-logo{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#ff6900;color:white;font-size:12px;letter-spacing:-.3px;font-weight:750;box-shadow:0 4px 12px #ff69001a}.entry-brand-dot{color:#ff6900}.entry-story-content{margin:auto 0;padding:60px 0 42px}.entry-eyebrow{display:flex;align-items:center;gap:9px;font-size:10px;font-weight:650;letter-spacing:1.6px;color:#98603a;margin-bottom:22px}.entry-eyebrow>span{width:6px;height:6px;background:#ff6900;border-radius:50%}.entry-story h1{font-size:clamp(38px,4.2vw,61px);font-weight:650;letter-spacing:-3px;line-height:1.12;margin:0 0 23px;color:#25282e}.entry-story h1>span{color:#ef6a24}.entry-description{font-size:14px;color:#7d7168;line-height:1.85;max-width:360px}.entry-network{max-width:435px;margin-top:38px;padding:20px 22px 16px;background:#ffffffb8;border:1px solid #ffffff;border-radius:16px;box-shadow:0 8px 30px #bd71390a}.entry-network-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#9b8b7c;font-size:8px;letter-spacing:1.1px;font-weight:600}.entry-network-heading .icon{width:16px;height:16px;color:#ca8e65}.entry-network-stores{display:flex;align-items:center;justify-content:space-between;margin:24px 8px 20px}.entry-network-stores>div{display:grid;gap:10px;justify-items:center;color:#b7794d;font-size:11px;min-width:48px}.entry-network-stores>div:nth-of-type(2){color:#f16b21}.entry-store-icon{width:44px;height:44px}.entry-network-link{flex:1;border-top:1px dashed #ddbaa0;margin:0 13px 23px;position:relative}.entry-network-link:after{content:'';position:absolute;top:-3px;left:calc(50% - 3px);width:5px;height:5px;border-radius:50%;background:#f3c3a1}.entry-network-caption{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #efebe6;padding-top:13px;font-size:9px;color:#9e9084}.entry-network-caption span:first-child{color:#b27348}.entry-story-footer{display:flex;justify-content:space-between;gap:12px;font-size:8px;letter-spacing:.7px;color:#af927b}.entry-form-panel{display:flex;flex-direction:column;align-items:center;padding:42px 48px 28px;background:#fff}.entry-panel-label{align-self:flex-end;display:flex;align-items:center;gap:7px;font-size:8px;letter-spacing:1.2px;color:#a1a7b0}.entry-panel-label .icon{width:14px;height:14px}.entry-form{width:min(350px,100%);display:flex;flex-direction:column;gap:22px;margin:auto 0;padding:40px 0}.entry-form-heading{margin-bottom:9px}.entry-form-heading>p{font-size:9px;letter-spacing:1.7px;color:#9299a4;font-weight:600;margin-bottom:15px}.entry-form h2{font-size:42px;font-weight:650;line-height:1.12;letter-spacing:-1.8px;color:#24272e;margin:0 0 18px}.entry-form h2>span{color:#ff6900}.entry-form-heading>div{font-size:13px;color:#747d8b;line-height:1.8}.entry-form .field{display:grid;gap:9px}.entry-form .field label{font-size:12px;color:#515762;font-weight:600}.entry-form input{width:100%;height:49px;border:1px solid #e1e4e9;border-radius:9px;background:#fcfcfd;color:#252a34;font:inherit;font-size:13px;padding:13px 15px;box-shadow:none;transition:border-color .15s,box-shadow .15s}.entry-form input::placeholder{color:#b2b7c0}.entry-form input:focus{outline:none;border-color:#f38b4c;box-shadow:0 0 0 3px #fff1e7;background:#fff}.entry-password{position:relative}.entry-password input{padding-right:48px}.entry-password button{position:absolute;right:5px;top:5px;display:grid;place-items:center;width:39px;height:39px;background:none;border:0;border-radius:6px;color:#9ba1ac;cursor:pointer}.entry-password button:hover{background:#f3f4f6;color:#555c68}.entry-password button:focus-visible{outline:2px solid #f38b4c;outline-offset:1px}.entry-eye-slash{display:none}.entry-password button[aria-pressed=true] .entry-eye-slash{display:block}.entry-submit{position:relative;justify-content:space-between;gap:12px;min-height:49px;border-radius:9px!important;background:#ff6900!important;color:#fff!important;font-size:12px!important;font-weight:600;box-shadow:0 5px 14px #ff69001a!important;padding:13px 17px!important}.entry-submit:hover{background:#ed6100!important;transform:none!important}.entry-submit:focus-visible{outline:2px solid #cb5000;outline-offset:3px}.entry-submit-arrow{width:18px;height:18px}.entry-submit[aria-busy=true] .entry-submit-arrow{visibility:hidden}.entry-submit[aria-busy=true] .btn__spinner{position:absolute;right:18px;opacity:1;display:block}.entry-help{display:flex;gap:10px;padding-top:7px;color:#7a8390;line-height:1.8}.entry-help>.icon{margin-top:4px;width:16px;height:16px;flex-shrink:0}.entry-help p{font-size:11px}.entry-help strong{color:#777f8c;font-weight:500}.entry-panel-footer{color:#b0b5bf;font-size:9px;text-align:center}.entry-error{padding:10px 12px;background:#fff1f0;border:1px solid #fdd9d5;border-radius:8px;color:#b42318;font-size:12px;line-height:1.6}
@media(min-width:1600px){.entry-frame{min-height:790px}.entry-story{padding:50px 60px 32px}.entry-story h1{font-size:64px}}
@media(max-width:1050px){.entry-story{padding:34px 34px 26px}.entry-story h1{font-size:45px;letter-spacing:-2px}.entry-form-panel{padding:34px 34px 26px}.entry-story-footer span:last-child{display:none}.entry-network{padding:18px 15px}.entry-network-caption{font-size:8px}}
@media(max-width:760px){.entry-screen{padding:0;display:block;background:#fff}.entry-frame{display:block;border:0;border-radius:0;box-shadow:none;min-height:100dvh}.entry-story{padding:26px 28px 25px;border:0;background:linear-gradient(125deg,#fffaf5,#fff0e4)}.entry-brand{font-size:20px;gap:9px}.entry-logo{width:33px;height:33px;border-radius:10px;font-size:10px}.entry-story-content{padding:27px 0 0;margin:0}.entry-eyebrow{font-size:8px;letter-spacing:1.2px;margin-bottom:12px}.entry-story h1{font-size:36px;letter-spacing:-1.6px;line-height:1.1;margin-bottom:12px}.entry-story h1 br{display:none}.entry-story h1>span:before{content:' '}.entry-description{font-size:11px;line-height:1.8;max-width:340px}.entry-description br{display:none}.entry-network,.entry-story-footer{display:none}.entry-form-panel{padding:30px 28px 22px}.entry-panel-label{display:none}.entry-form{width:min(420px,100%);gap:20px;padding:0;margin:0}.entry-form-heading{margin-bottom:2px}.entry-form-heading>p{font-size:8px;margin-bottom:10px}.entry-form h2{font-size:31px;letter-spacing:-1.1px;margin-bottom:11px}.entry-form h2 br{display:none}.entry-form h2 br:after{content:' '}.entry-form-heading>div{font-size:12px;line-height:1.7}.entry-form-heading>div br{display:none}.entry-panel-footer{margin-top:26px;font-size:9px}.entry-help{padding-top:0}.entry-form input{font-size:16px}.entry-help p{font-size:10px}.entry-form .field label{font-size:11px}}
@media(max-width:380px){.entry-story{padding:22px 24px}.entry-story h1{font-size:32px}.entry-form-panel{padding:26px 24px 20px}}

.entry-brand-copy,.brand__identity{display:flex;flex-direction:column;gap:4px}.entry-brand-copy small{font-size:8px;line-height:1.4;letter-spacing:1.15px;color:#9a7359;font-weight:550}.brand__identity small{font-size:7px;line-height:1.5;letter-spacing:.65px;color:var(--ink-3);font-weight:500}.app-workspace-name{font-size:8px;letter-spacing:1.1px;line-height:1.5;color:var(--ink-3);font-weight:600;margin-bottom:4px}@media(max-width:760px){.entry-brand-copy small{font-size:7px;letter-spacing:.9px}.app-workspace-name{font-size:7px;letter-spacing:.7px}}

.user-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.user-row-actions .btn{white-space:nowrap}

/* Native dropdowns follow the app theme rather than the operating-system theme. */
:root{color-scheme:light}html[data-theme="light"]{color-scheme:light}html[data-theme="dark"]{color-scheme:dark}select,select option,select optgroup{background-color:var(--surface);color:var(--ink-1)}.entry-screen{color-scheme:light}

.language-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line,#e4e5e8);background:var(--surface-2,#fafafb);border-radius:8px;flex-shrink:0}.language-switch button{display:grid;place-items:center;min-width:32px;height:28px;padding:0 7px;border:0;border-radius:5px;background:transparent;color:var(--ink-3,#71717d);font-size:10px;font-weight:650;font-family:inherit;cursor:pointer}.language-switch button[aria-pressed=true]{background:var(--surface,#fff);color:var(--brand-ink,#8a3600);box-shadow:0 1px 4px #20293812}.language-switch button:focus-visible{outline:2px solid var(--brand,#ff6900);outline-offset:2px}.entry-panel-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%}.entry-panel-tools .language-switch{background:#f8f9fb;border-color:#e4e5e8}.entry-panel-tools .language-switch button{color:#737c89}.entry-panel-tools .language-switch button[aria-pressed=true]{background:#fff;color:#ad4b13}@media(max-width:760px){.entry-panel-tools{margin-bottom:20px;justify-content:flex-end}.entry-panel-tools .entry-panel-label{display:none}.language-switch button{height:28px;min-width:30px}.topbar__actions{gap:6px}}

/* Login regional illustration: local vector, geographic source in assets/. */
.entry-region-map{display:block;width:100%;height:auto;margin:18px 0 12px;border-radius:12px}
.entry-map-credit{display:block;margin-top:10px;text-align:right;font-size:7px;line-height:1.5;color:#9b8876;text-decoration:none;letter-spacing:.1px}
.entry-map-credit:hover{color:#a45b2a;text-decoration:underline}
.entry-map-credit:focus-visible{outline:2px solid #f58236;outline-offset:3px;border-radius:2px}

/* A broad, quiet map composition replaces the small illustration card. */
.entry-network{max-width:none;margin-top:34px;padding:22px 0 0;background:transparent;border:0;border-top:1px solid #e9d8c7;border-radius:0;box-shadow:none}
.entry-network-heading{color:#a27350;font-size:8px;letter-spacing:1.5px}
.entry-map-index{font-size:8px;letter-spacing:1px;color:#b49c87}
.entry-region-map{width:calc(100% + 28px);max-width:none;margin:12px -14px 0;border-radius:0}
.entry-region-labels{display:grid;grid-template-columns:1fr .65fr 1.35fr;gap:12px;margin:0 0 21px;font-size:12px;font-weight:600;letter-spacing:.1px;color:#8e6346}
.entry-region-labels span:nth-child(2){color:#e76b27}
.entry-region-labels span:last-child{text-align:right}
.entry-network-caption{border-color:#e9d8c7;font-size:9px;padding-top:14px;color:#a18873}
.entry-map-credit{font-size:7px;color:#ac9682;margin-top:9px}
@media(min-width:761px) and (max-width:1050px){.entry-network{padding:18px 0 0}.entry-region-labels{font-size:10px;gap:6px}.entry-network-heading{font-size:6px;letter-spacing:1px}}

/* Regional palette: terracotta / orange / warm ochre. NTB and NTT share one region color. */
.entry-region-labels span{display:flex;align-items:center;gap:7px;color:#9e5a46}
.entry-region-labels span::before{content:'';width:7px;height:7px;border-radius:50%;background:#c77f66;flex-shrink:0}
.entry-region-labels span:nth-child(2){color:#c65c15}
.entry-region-labels span:nth-child(2)::before{background:#fb8b30}
.entry-region-labels span:last-child{justify-content:flex-end;color:#92712e}
.entry-region-labels span:last-child::before{background:#c9a35a}
