:root {
  --surface: #f7f8fb;
  --surface-2: #eceff5;
  --surface-raised: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.84);
  --line: #c4cad4;
  --line-soft: #dde2eb;
  --ink: #1e2530;
  --ink-2: #434b57;
  --ink-3: #667085;
  --accent: #3368d0;
  --accent-deep: #2151af;
  --accent-tint: #e2ecff;
  --navy: #202733;
  --green: #007f35;
  --green-tint: #e4f6eb;
  --red: #b32322;
  --red-tint: #fcebeb;
  --amber: #a66b00;
  --amber-tint: #fef5e5;
  --shadow-sm: 0 2px 8px rgba(17, 24, 39, 0.04);
  --shadow-md: 0 12px 32px rgba(17, 24, 39, 0.07);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0d0f13;
  --surface-2: #141820;
  --surface-raised: #191e28;
  --surface-glass: rgba(20, 24, 32, 0.86);
  --line: #313948;
  --line-soft: #242a35;
  --ink: #eef2f8;
  --ink-2: #b9c3d1;
  --ink-3: #838f9f;
  --accent: #4c82eb;
  --accent-deep: #6b99f2;
  --accent-tint: rgba(76, 130, 235, 0.16);
  --navy: #2a3342;
  --green: #38c973;
  --green-tint: rgba(56, 201, 115, 0.14);
  --red: #f16767;
  --red-tint: rgba(241, 103, 103, 0.14);
  --amber: #f0b144;
  --amber-tint: rgba(240, 177, 68, 0.14);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
.mono,
.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Header & Theme Switcher */
.topbar {
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 35;
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15.5px;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, #22262e, #0c0e12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(11, 12, 15, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  gap: 2px;
}

.theme-opt {
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.theme-opt:hover {
  color: var(--ink);
}

.theme-opt.active {
  background: var(--surface-raised);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Containers & Surfaces */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 28px 64px;
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 28px 64px;
}

.card {
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-pro {
  border: 1.5px solid var(--accent);
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 0 3px var(--green-tint);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #ffffff;
}

[data-theme="dark"] .btn-primary {
  background: #3368d0;
  border-color: #2857b4;
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

[data-theme="dark"] .btn-primary:hover {
  background: #4177e0;
}

.btn-danger {
  color: var(--red);
  border-color: rgba(179, 35, 34, 0.35);
}

.btn-danger:hover {
  background: var(--red-tint);
}

.btn-green {
  background: #007f35;
  border-color: #006329;
  color: #ffffff;
}

.btn-green:hover {
  background: #00682c;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--ink-2);
}

.badge-free {
  background: var(--accent-tint);
  color: var(--accent-deep);
}

.badge-pro {
  background: var(--amber-tint);
  color: var(--amber);
  border: 1px solid rgba(240, 177, 68, 0.35);
}

.badge-ok {
  background: var(--green-tint);
  color: var(--green);
}

.badge-warn {
  background: var(--amber-tint);
  color: var(--amber);
}

.badge-err {
  background: var(--red-tint);
  color: var(--red);
}

/* Forms */
.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 4px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.input,
.select,
.textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(51, 104, 208, 0.16);
}

input[type="range"] {
  width: 100%;
  accent-color: #3368d0;
  cursor: pointer;
}

.otp-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto 14px;
  max-width: 312px;
}

.otp-cell {
  width: 100%;
  height: 48px;
  padding: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.otp-cell:focus {
  outline: none;
  background: var(--surface-raised);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(51, 104, 208, 0.18);
}

.otp-cell.filled {
  background: var(--surface-raised);
  border-color: rgba(51, 104, 208, 0.55);
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 860px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
}

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

th {
  text-align: left;
  padding: 9px 12px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--line-soft);
}

td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr.row-clickable {
  cursor: pointer;
  transition: background 0.1s ease;
}

tr.row-clickable:hover {
  background: var(--surface-2);
}

tr.row-selected {
  background: var(--accent-tint);
}

/* Alert boxes */
.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}

.alert-ok {
  background: var(--green-tint);
  color: var(--green);
  border-color: rgba(0, 127, 53, 0.25);
}

.alert-err {
  background: var(--red-tint);
  color: var(--red);
  border-color: rgba(179, 35, 34, 0.25);
}

.alert-info {
  background: var(--accent-tint);
  color: var(--accent-deep);
  border-color: rgba(51, 104, 208, 0.25);
}

.alert-warn {
  background: var(--amber-tint);
  color: var(--amber);
  border-color: rgba(166, 107, 0, 0.25);
}

/* Preloader Logo Screen */
.upyu-preload {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: opacity 0.36s ease, visibility 0.36s ease;
}
.upyu-preload.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.preload-mark {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(145deg, #22262e, #0c0e12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  animation: upyuFocus 1.15s ease-in-out infinite alternate;
}
.preload-bar {
  width: 88px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}
.preload-bar > span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  animation: upyuSlide 0.9s ease-in-out infinite alternate;
}
@keyframes upyuFocus {
  from { transform: scale(0.96); opacity: 0.9; }
  to { transform: scale(1.03); opacity: 1; }
}
@keyframes upyuSlide {
  from { transform: translateX(-20%); }
  to { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) {
  .preload-mark, .preload-bar > span { animation: none; }
}

/* Landing Page Editorial & Full-Grid Visual Components */
.nav-link-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 5px 10px;
  border-radius: 6px;
}

.nav-link-text:hover {
  color: var(--ink);
  text-decoration: none;
  background: var(--surface-2);
}

.btn-pill {
  border-radius: 999px;
  padding: 10px 22px;
}

.hero-wide {
  display: grid;
  grid-template-columns: minmax(310px, 0.72fr) minmax(0, 1.28fr);
  gap: 36px;
  align-items: center;
  margin: 22px 0 76px;
}

@media (max-width: 980px) {
  .hero-wide {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 12px 0 56px;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.09;
  margin: 0 0 14px;
}

.hero-sub {
  font-size: 15.5px;
  color: var(--ink-2);
  margin: 0 0 24px;
  max-width: 420px;
  line-height: 1.55;
}

.shot-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.shot-tab {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 6px 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.shot-tab:hover {
  color: var(--ink);
  border-color: var(--line);
}

.shot-tab.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #ffffff;
}

.app-shot-frame {
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.app-shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1240 / 740;
  object-fit: cover;
}

/* Open Editorial Sections (Aligned 100% with 1240px Topbar & Container) */
.ed-section {
  width: 100%;
  margin: 0 0 76px;
}

.ed-heading {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 8px;
}

.ed-sub {
  font-size: 15px;
  color: var(--ink-3);
  margin: 0 0 28px;
  max-width: 560px;
}

.steps-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

@media (max-width: 780px) {
  .steps-3 {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.step-item {
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.step-desc {
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.55;
}

.feature-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px;
  align-items: center;
  margin-bottom: 56px;
}

@media (max-width: 820px) {
  .feature-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.feature-visual {
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  padding: 20px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.ba-photo-stage {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0d1016;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.ba-photo-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  color: #11151d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.feature-list li {
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13.5px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.feature-list li span:last-child {
  color: var(--ink-3);
  font-size: 12.5px;
}

.pricing-wrap {
  width: 100%;
  margin: 0 0 40px;
}

/* Portal Charts & Spotlight */
.svg-chart-wrap {
  width: 100%;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.rank-bar-row {
  margin-bottom: 10px;
}

.rank-bar-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin-top: 4px;
}

.rank-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.loyal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.loyal-tile {
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

/* Admin Layout & Mission Control */
.admin-shell {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  min-height: calc(100vh - 55px);
}

.admin-sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--line-soft);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.admin-nav-btn:hover {
  background: rgba(100, 116, 139, 0.12);
  color: var(--ink);
}

.admin-nav-btn.active {
  background: var(--navy);
  color: #ffffff;
}

.admin-main {
  padding: 24px 28px;
  min-width: 0;
}

@media (max-width: 860px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }

  .admin-nav-btn {
    white-space: nowrap;
    width: auto;
  }
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1040px) {
  .admin-split {
    grid-template-columns: 1fr;
  }
}

.funnel-row {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
}

.funnel-track {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.funnel-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.chip-btn.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

/* Tabs & KPI helpers */
.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab-btn:hover {
  background: rgba(100, 116, 139, 0.12);
  color: var(--ink);
}

.tab-btn.active {
  background: var(--navy);
  color: #ffffff;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.stat-card {
  background: var(--surface-raised);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 15px 17px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stat-value {
  font-size: 22px;
  font-weight: 800;
  margin: 4px 0 2px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

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

.nav-pill-count {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--amber-tint);
  color: var(--amber);
}

.admin-nav-btn.active .nav-pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.pkg-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.pkg-pill {
  border: 1px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--ink-2);
  padding: 4px 9px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.pkg-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.pkg-pill.active {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #ffffff;
}

.pkg-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.pkg-choice {
  text-align: left;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-soft);
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
}

.pkg-choice:hover {
  border-color: var(--accent);
}

.pkg-choice.active {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.hidden {
  display: none !important;
}

/* ── Kalender Event Lari ─────────────────────────────────────────── */
.cal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ev-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ev-card:hover,
.ev-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.ev-date-tile {
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent-deep);
  text-align: center;
  padding: 6px 0;
  line-height: 1.1;
}

.ev-date-tile strong {
  display: block;
  font-size: 20px;
}

.ev-date-tile span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.ev-card-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 3px;
}

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

.dist-chip {
  display: inline-block;
  padding: 1px 7px;
  margin-right: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-2);
}

#cal-dist-filter .chip-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

/* Landing teaser */
.cal-teaser {
  padding: 22px;
}

.cal-teaser-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.cal-teaser-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* /kalender page */
.calpage-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin: 8px 0 18px;
}

.calgrid-card {
  padding: 18px;
}

.calgrid-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.calgrid-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calgrid-month {
  margin: 0;
  min-width: 170px;
  text-align: center;
  font-size: 19px;
  font-weight: 800;
}

.calgrid-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.calgrid-filters input {
  width: 200px;
}

.calgrid-dow,
.calgrid-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calgrid-dow span {
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-3);
}

.calgrid-days {
  border-top: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
}

.calday {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-height: 104px;
  padding: 6px;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-raised);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: default;
  min-width: 0;
}

.calday-has {
  cursor: pointer;
}

.calday-has:hover {
  background: var(--accent-tint);
}

.calday-out {
  background: var(--surface-2);
  color: var(--ink-3);
  opacity: 0.55;
}

.calday-past .calday-num {
  color: var(--ink-3);
}

.calday-num {
  font-size: 12.5px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 999px;
}

.calday-today .calday-num {
  background: var(--accent);
  color: #ffffff;
}

.calday-selected {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.calday-ev {
  display: block;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calday-past .calday-ev {
  opacity: 0.6;
}

.calday-ev-warn {
  background: var(--amber);
}

.calday-ev.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.calday-more {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-deep);
  padding-left: 2px;
}

.calday-dots {
  display: none;
}

.calpage-below {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}

.calpage-subhead {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.ev-detail-full dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 7px 12px;
  margin: 14px 0 0;
  font-size: 13.5px;
}

.ev-detail-full dt {
  color: var(--ink-3);
}

.ev-detail-full dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.ev-detail-full img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  margin-top: 14px;
}

/* /kalender/usulkan form */
.form-section-title {
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-2);
}

#ev-submit-form .form-section-title:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 38px;
  align-items: center;
  font-size: 13px;
}

.check-row label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  font-weight: 500 !important;
  cursor: pointer;
}

[aria-invalid="true"] {
  border-color: var(--red) !important;
}

@media (max-width: 860px) {
  .cal-teaser-list,
  .calpage-below {
    grid-template-columns: 1fr;
  }

  .calgrid-filters,
  .calgrid-filters input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .calgrid-card {
    padding: 12px;
  }

  .calgrid-month {
    min-width: 0;
    flex: 1;
    font-size: 16px;
  }

  .calday {
    min-height: 52px;
    align-items: center;
    padding: 4px 2px;
  }

  .calday-ev,
  .calday-more {
    display: none;
  }

  .calday-dots {
    display: flex;
    gap: 3px;
  }

  .calday-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
  }

  .calgrid-dow span {
    padding: 6px 0;
    text-align: center;
  }
}

.calpage-below > section:first-child {
  position: sticky;
  top: 76px;
}

@media (max-width: 860px) {
  .calpage-below > section:first-child {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar .nav-link-text {
    display: none;
  }

  .topbar .theme-switch {
    display: none;
  }

  #nav-ver-pill {
    display: none;
  }

  .topbar .btn {
    white-space: nowrap;
  }
}
