:root {
  /* Deep elegant palette */
  --bg: #070b12;
  --bg2: #0e1522;
  --bg3: #162033;
  --card: rgba(18, 28, 44, 0.82);
  --card-solid: #121c2c;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --muted2: #64748b;
  --accent: #38bdf8;
  --accent-deep: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.28);
  --accent2: #34d399;
  --accent2-soft: rgba(52, 211, 153, 0.16);
  --gold: #fbbf24;
  --warn: #fbbf24;
  --danger: #f87171;
  --samsung: #60a5fa;
  --xiaomi: #fb923c;
  --apple: #c4b5fd;
  --tecno: #6ee7b7;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.2);
  --glow: 0 0 0 1px rgba(56, 189, 248, 0.08), 0 12px 40px rgba(14, 165, 233, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --nav-h: 64px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Roboto",
    "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(14, 165, 233, 0.14), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(139, 92, 246, 0.1), transparent 50%),
    radial-gradient(700px 400px at 50% 100%, rgba(52, 211, 153, 0.06), transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation;
}

/* Mode app: scroll di area content, nav tetap di bawah */
body.app-mode {
  overflow: hidden;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  top: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
  max-width: 100%;
}

/* Touch targets & klik responsif */
button,
.nav-btn,
.btn,
select,
input,
.list-item,
label {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  cursor: pointer;
}

button,
.nav-btn,
.btn {
  -webkit-user-select: none;
  user-select: none;
}

/* iOS: cegah zoom saat fokus input */
select,
input[type="search"],
input[type="text"] {
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

a {
  color: var(--accent);
}

/* ----- Login ----- */
.screen {
  display: none;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}
.screen.active {
  display: block;
}

#login-screen {
  display: none;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 28px 20px calc(28px + var(--safe-bottom));
  padding-left: max(20px, var(--safe-left));
  padding-right: max(20px, var(--safe-right));
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  position: relative;
}
#login-screen.active {
  display: flex;
}
#login-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(167, 139, 250, 0.12), transparent 55%);
  z-index: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(
    165deg,
    rgba(22, 32, 51, 0.95) 0%,
    rgba(14, 21, 34, 0.92) 100%
  );
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px 26px 28px;
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.45),
    rgba(139, 92, 246, 0.15) 40%,
    transparent 70%,
    rgba(52, 211, 153, 0.2)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

#login-meta {
  display: block;
  text-align: center;
  width: 100%;
}

.logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 18px;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}
/* Frame logo login — border gradient pelan (elegan, tidak mencolok) */
.logo.logo-img {
  position: relative;
  width: 118px;
  height: 118px;
  min-width: 118px;
  min-height: 118px;
  margin: 0 auto 20px;
  padding: 3px;
  border-radius: 22px;
  border: none;
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 10px 28px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(56, 189, 248, 0.1);
  overflow: hidden;
  display: grid;
  place-items: center;
  isolation: isolate;
}
/* Cincin gradient berputar pelan di belakang logo */
.logo.logo-img::after {
  content: "";
  position: absolute;
  inset: -45%;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    rgba(56, 189, 248, 0.95),
    rgba(167, 139, 250, 0.7),
    rgba(163, 230, 53, 0.85),
    rgba(56, 189, 248, 0.95)
  );
  animation: logo-ring-spin 10s linear infinite;
  pointer-events: none;
}
.logo.logo-img::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 19px;
  background: #0a0a0a;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.logo.logo-img img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  max-width: 112px;
  max-height: 112px;
  object-fit: cover;
  display: block;
  border-radius: 19px;
}
@keyframes logo-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f8fafc 0%, #7dd3fc 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.login-card .sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 22px;
  text-align: center;
}

label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

select,
input[type="search"] {
  width: 100%;
  background: rgba(7, 11, 18, 0.65);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
select:hover,
input[type="search"]:hover {
  border-color: rgba(56, 189, 248, 0.35);
}
select:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(7, 11, 18, 0.85);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.2s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 55%, #7c3aed 100%);
  color: white;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.45);
}
.btn-ghost {
  background: rgba(148, 163, 184, 0.06);
  color: var(--muted);
  border: 1px solid var(--border-strong);
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}
.meta-line {
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--muted2);
  text-align: center;
  line-height: 1.55;
}

/* ----- App shell ----- */
#app-screen.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.topbar {
  position: relative;
  flex-shrink: 0;
  z-index: 20;
  background: linear-gradient(
    180deg,
    rgba(10, 16, 28, 0.96) 0%,
    rgba(10, 16, 28, 0.88) 100%
  );
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  padding-top: max(12px, var(--safe-top));
  padding-left: max(16px, var(--safe-left));
  padding-right: max(16px, var(--safe-right));
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(56, 189, 248, 0.45),
    rgba(139, 92, 246, 0.35),
    transparent
  );
  opacity: 0.7;
}

.topbar .who {
  flex: 1;
  min-width: 0;
}
.topbar .who strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar .who span {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  padding: 16px 14px calc(18px + var(--nav-h) + var(--safe-bottom));
  padding-left: max(14px, var(--safe-left));
  padding-right: max(14px, var(--safe-right));
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}
.content::-webkit-scrollbar {
  width: 6px;
}
.content::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 99px;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: fade 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  gap: 4px;
  background: linear-gradient(
    180deg,
    rgba(12, 18, 30, 0.92) 0%,
    rgba(8, 12, 20, 0.98) 100%
  );
  border-top: 1px solid var(--border-strong);
  padding: 8px 8px calc(8px + var(--safe-bottom));
  padding-left: max(8px, var(--safe-left));
  padding-right: max(8px, var(--safe-right));
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
  touch-action: manipulation;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}
.nav-btn {
  background: transparent;
  border: none;
  color: var(--muted2);
  width: 100%;
  margin: 0;
  padding: 8px 4px;
  min-height: 54px;
  min-width: 0;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.15;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  border-radius: 14px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.12s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(56, 189, 248, 0.15);
}
.nav-btn .ico {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 10px;
  pointer-events: none;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.nav-btn .nav-label {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.nav-btn.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}
.nav-btn.active .ico {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(124, 58, 237, 0.25));
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.25);
  color: #e0f2fe;
}
.nav-btn:active {
  transform: scale(0.96);
}

/* Cards & KPI */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.kpi .label {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi .value {
  font-size: 1.25rem;
  font-weight: 800;
  margin-top: 6px;
  word-break: break-word;
  letter-spacing: -0.01em;
}
.kpi .hint {
  font-size: 0.72rem;
  color: var(--muted2);
  margin-top: 4px;
}

.card {
  position: relative;
  background: linear-gradient(
    160deg,
    rgba(22, 34, 52, 0.9) 0%,
    rgba(14, 22, 36, 0.88) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 15px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* Aksen atas kartu: shimmer pelan (elegan di Beranda, tidak mengganggu angka) */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 189, 248, 0.15) 15%,
    rgba(56, 189, 248, 0.85) 40%,
    rgba(167, 139, 250, 0.75) 55%,
    rgba(52, 211, 153, 0.55) 70%,
    rgba(56, 189, 248, 0.15) 85%,
    transparent 100%
  );
  background-size: 220% 100%;
  opacity: 0.9;
  animation: card-accent-flow 8s ease-in-out infinite;
}
@keyframes card-accent-flow {
  0%,
  100% {
    background-position: 100% 0;
  }
  50% {
    background-position: 0% 0;
  }
}
.card h3 {
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e2e8f0;
}
.card h3 .muted {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.brand-row:last-child {
  border-bottom: none;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 10px currentColor;
}
.brand-row .name {
  flex: 1;
  font-weight: 650;
  font-size: 0.9rem;
  padding-top: 2px;
}
.brand-row .nums {
  text-align: right;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 7.5rem;
  flex-shrink: 0;
}
.brand-row .nums .muted,
.brand-row .nums .tgt-line {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
}
.brand-row .nums .acv-line {
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}
.brand-row .nums .tgt-line {
  color: #94a3b8;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  border: 1px solid var(--border);
}
.chip.ok {
  background: var(--accent2-soft);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.25);
}
.chip.warn {
  background: rgba(251, 191, 36, 0.12);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.25);
}
.chip.bad {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.25);
}
.chip.b-samsung {
  background: rgba(96, 165, 250, 0.14);
  color: var(--samsung);
  border-color: rgba(96, 165, 250, 0.25);
}
.chip.b-xiaomi {
  background: rgba(251, 146, 60, 0.14);
  color: var(--xiaomi);
  border-color: rgba(251, 146, 60, 0.25);
}
.chip.b-apple {
  background: rgba(196, 181, 253, 0.14);
  color: var(--apple);
  border-color: rgba(196, 181, 253, 0.25);
}
.chip.b-tecno {
  background: rgba(110, 231, 183, 0.14);
  color: var(--tecno);
  border-color: rgba(110, 231, 183, 0.25);
}

/* Search & list */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  margin: 0;
  flex: 1;
  min-width: 120px;
  background: rgba(10, 16, 28, 0.7);
  border-radius: 14px;
}

.list-item {
  background: linear-gradient(
    160deg,
    rgba(20, 30, 46, 0.92) 0%,
    rgba(14, 22, 36, 0.9) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 15px;
  margin-bottom: 10px;
  -webkit-user-select: text;
  user-select: text;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.list-item:hover {
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 6px 24px rgba(14, 165, 233, 0.08);
}
.list-item .row1 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.list-item .title {
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.list-item .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}
.list-item .money {
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  color: #7dd3fc;
  font-variant-numeric: tabular-nums;
}
.list-item .detail,
.list-item .detail.always-open {
  display: block;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sku-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 8px;
}
.sku-line:last-child {
  border-bottom: none;
}
.sku-line:hover {
  background: rgba(56, 189, 248, 0.05);
}
.sku-line .sku-name {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}
.sku-line .sku-stat {
  flex-shrink: 0;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.bar {
  height: 7px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}
.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(
    90deg,
    #0ea5e9,
    #38bdf8 35%,
    #a78bfa 55%,
    #34d399 100%
  );
  background-size: 200% 100%;
  border-radius: 99px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  animation: bar-sheen 5s ease-in-out infinite;
}
@keyframes bar-sheen {
  0%,
  100% {
    background-position: 0% 0;
  }
  50% {
    background-position: 100% 0;
  }
}

/* Activity */
.act-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.act-item:last-child {
  border-bottom: none;
}
.act-date {
  color: var(--muted);
  font-size: 0.72rem;
}
.act-main strong {
  display: block;
  font-size: 0.85rem;
}
.act-main span {
  color: var(--muted);
  font-size: 0.75rem;
}
.act-day {
  margin-bottom: 14px;
}
.act-day-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 12px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.act-dealer-card {
  margin-bottom: 10px;
}
.act-right-stats {
  text-align: right;
  line-height: 1.35;
}
.act-stat-line {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}
.hist-title {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 4px 0 8px;
}

/* QVO Focus (Beranda) + inline di DEALER */
.qvo-focus-card .qvo-focus-sub {
  margin: 0 0 12px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.qvo-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
@media (min-width: 420px) {
  .qvo-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.qvo-stat {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}
.qvo-stat strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.qvo-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.qvo-stat.ok strong {
  color: #6ee7b7;
}
.qvo-stat.bad strong {
  color: #fca5a5;
}
.qvo-stat.warn strong {
  color: #fcd34d;
}
.qvo-need {
  font-size: 0.82rem;
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(252, 165, 165, 0.1);
  border: 1px solid rgba(252, 165, 165, 0.25);
  color: #fecaca;
}
.qvo-need.ok {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}
.qvo-focus-list {
  margin-top: 4px;
}
.qvo-focus-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.qvo-focus-row:last-child {
  border-bottom: none;
}
.qvo-focus-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.qvo-focus-name {
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.qvo-focus-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  margin-top: 6px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
}
.qvo-focus-meta .muted {
  color: var(--muted);
}
.qvo-bar {
  margin-top: 6px;
}
.qvo-focus-hint {
  margin: 12px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}
.qvo-roster-hint {
  margin: 0 0 8px;
  padding: 0 2px;
  font-size: 0.72rem;
}
.qvo-inline {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.qvo-inline-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 10px;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #e2e8f0;
}
.qvo-inline-line .muted {
  color: var(--muted);
}

/* Beranda: target vs achievement */
.vs-block {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.vs-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.vs-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.vs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: start;
}
.vs-col {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 11, 18, 0.45);
  border: 1px solid var(--border);
}
.vs-col-right {
  text-align: right;
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}
.vs-val {
  font-size: 0.95rem;
  font-weight: 800;
  word-break: break-word;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.vs-achv {
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: #7dd3fc;
  text-align: right;
  letter-spacing: 0.02em;
}
.sku-line.hist-focus {
  background: rgba(56, 189, 248, 0.1);
  border-radius: 10px;
  padding-left: 8px;
  padding-right: 8px;
  margin: 0 -2px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  font-size: 0.9rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(14, 22, 36, 0.4);
}

.loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Desktop / tablet landscape */
@media (min-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .content {
    padding: 22px 24px calc(22px + var(--nav-h) + var(--safe-bottom));
  }
  .card {
    padding: 18px 20px;
  }
  .nav-btn {
    font-size: 0.7rem;
    min-height: 56px;
  }
  .bottom-nav {
    position: fixed;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 32px));
    border: 1px solid var(--border-strong);
    border-radius: 18px 18px 0 0;
    bottom: 0;
    grid-template-columns: repeat(4, 1fr);
    padding-left: 12px;
    padding-right: 12px;
  }
  .login-card {
    padding: 36px 32px 30px;
  }
}

/* Preferensi reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
