:root {
  --paper: #f8fafc;
  --card: #ffffff;
  --surface-2: #f1f5f9;
  --rule: #e2e8f0;
  --rule-soft: #f1f5f9;
  --ink: #0f172a;
  --ink-body: #334155;
  --ink-muted: #64748b;
  --ink-subtle: #94a3b8;

  /* RT 10 Tegalsari Brand Blue Palette */
  --brand: #154c79;
  --brand-dark: #0f395c;
  --brand-mid: #1d6fa5;
  --brand-accent: #0284c7;
  --brand-soft: #e0f2fe;
  --brand-50: #f0f9ff;

  /* Semantic Aliases */
  --daun: #154c79;
  --daun-dark: #0f395c;
  --daun-soft: #e0f2fe;
  --daun-50: #f0f9ff;

  --success: #15803d;
  --success-soft: #dcfce7;
  --terakota: #ea580c;
  --terakota-soft: #ffedd5;
  --amber-50: #fffbeb;
  --amber-200: #fde68a;
  --amber-900: #78350f;
  --blue-50: #eff6ff;
  --blue-600: #2563eb;
  --purple-50: #faf5ff;
  --purple-700: #7e22ce;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.1);
  --radius-3xl: 24px;
  --radius-2xl: 16px;
  --radius-xl: 12px;
  --radius-lg: 10px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 8% -4%, rgba(14, 165, 233, 0.11) 0%, transparent 40%),
    radial-gradient(circle at 92% 6%, rgba(37, 99, 235, 0.08) 0%, transparent 36%),
    #f3f7fc;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.56;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

p, li {
  text-wrap: pretty;
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
}

.tabular { font-variant-numeric: tabular-nums; }

.sr-only,
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--brand-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.28;
  text-wrap: balance;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
  background: #ffffff;
  border: 1.5px solid var(--rule);
  box-shadow: var(--shadow-xs);
}

.brand-text { min-width: 0; }

.brand-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--brand-dark);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 639px) {
  .topbar-inner {
    height: 58px;
    padding: 0 0.85rem;
  }

  .brand { gap: 0.55rem; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-title { font-size: 0.98rem; }
  .brand-sub { font-size: 0.72rem; }
}

/* Desktop Navigation */
.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    background: rgba(241, 245, 249, 0.85);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.75);
  }
}

.nav-pill {
  border: 0;
  background: transparent;
  padding: 0.42rem 0.78rem;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.nav-pill[aria-current="page"],
.nav-pill.active {
  background: linear-gradient(135deg, #154c79 0%, #0284c7 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.28);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Mobile Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid var(--rule);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  padding: 0.35rem 0.45rem max(0.45rem, env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
}

.bottom-nav.admin-cols-6 {
  grid-template-columns: repeat(6, 1fr);
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

.bnav-btn {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.15rem;
  border-radius: 12px;
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  min-height: 52px;
}

.bnav-btn svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.bnav-btn[aria-current="page"],
.bnav-btn.active {
  color: var(--brand);
  background: var(--brand-50);
}

.bnav-center-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #154c79 0%, #0ea5e9 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
  margin-bottom: 2px;
}

.bnav-btn.active .bnav-center-icon {
  background: var(--brand-dark);
}

/* Main Container */
.container {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.85rem 0.85rem 1.75rem;
}

@media (min-width: 640px) {
  .container { padding: 1.65rem 1.25rem 2.75rem; }
}

/* Modern Gen-Z Blue Gradient Mesh Hero */
.hero-sheet {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0b2948 0%, #154c79 44%, #0284c7 84%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 22px;
  padding: 1.15rem 1.05rem 1.25rem;
  box-shadow: 0 18px 40px -14px rgba(15, 57, 92, 0.38);
  margin-bottom: 1.15rem;
}

.hero-sheet::before,
.hero-sheet::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.hero-sheet::before {
  width: 340px;
  height: 340px;
  top: -130px;
  right: -80px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.42) 0%, rgba(56, 189, 248, 0) 70%);
}

.hero-sheet::after {
  width: 260px;
  height: 260px;
  bottom: -120px;
  left: -60px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.3) 0%, rgba(96, 165, 250, 0) 72%);
}

.hero-sheet > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .hero-sheet {
    border-radius: 26px;
    padding: 1.75rem 2rem 1.85rem;
    margin-bottom: 1.35rem;
  }
}

.hero-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.74rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulse-live 1.8s infinite ease-in-out;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(224, 242, 254, 0.94);
  background: rgba(15, 23, 42, 0.22);
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-date svg { color: #7dd3fc; flex-shrink: 0; }

.hero-bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  margin-top: 0.95rem;
  align-items: end;
}

.hero-main { min-width: 0; }

@media (min-width: 860px) {
  .hero-bento-grid {
    grid-template-columns: minmax(0, 1.32fr) minmax(260px, 0.78fr);
    gap: 1.5rem;
    margin-top: 1.15rem;
    align-items: stretch;
  }
}

.hero-title {
  margin: 0;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.52rem, 1.18rem + 1.8vw, 2.32rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #ffffff;
}

.hero-sub {
  margin: 0.45rem 0 0;
  font-size: clamp(0.88rem, 0.85rem + 0.2vw, 1rem);
  color: rgba(224, 242, 254, 0.9);
  max-width: 54ch;
  line-height: 1.5;
}

.hero-search {
  margin-top: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.98);
  padding: 0.28rem;
  border-radius: 15px;
  box-shadow: 0 10px 28px rgba(8, 28, 52, 0.24);
  max-width: 39rem;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-input-wrap svg {
  position: absolute;
  left: 0.78rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-subtle);
  pointer-events: none;
}

.search-input-wrap input,
.search-input-wrap input[type="search"] {
  min-height: 44px;
  padding: 0.48rem 0.55rem 0.48rem 2.35rem;
  background: transparent;
  color: var(--ink);
  border: 0;
  font-size: 0.92rem;
  border-radius: 11px;
}

.search-input-wrap input:focus,
.search-input-wrap input:focus-visible {
  outline: none;
  box-shadow: none;
}

.hero-search-btn {
  min-height: 44px;
  padding: 0 1.2rem;
  border-radius: 12px;
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 700;
  background: linear-gradient(135deg, #154c79 0%, #0284c7 100%);
  color: #ffffff;
  border: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.28);
}

.hero-search-btn:hover {
  background: linear-gradient(135deg, #0f395c 0%, #0369a1 100%);
}

.quick-strip {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  align-items: center;
  gap: 0.45rem;
}

.quick-strip::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  .quick-strip {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-top: 1.05rem;
  }
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex: 0 0 auto;
  scroll-snap-align: start;
  white-space: nowrap;
  min-height: 40px;
  padding: 0.42rem 0.92rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.quick-btn.primary {
  background: #ffffff;
  color: #0f395c;
  border-color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.quick-btn.primary:hover {
  background: #f0f9ff;
}

/* Frosted Bento Telemetry Widget inside Hero (Desktop/Tablet) */
.hero-bento-panel {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1rem 1.1rem;
}

@media (min-width: 860px) {
  .hero-bento-panel { display: flex; }
}

.hero-bento-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero-bento-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(224, 242, 254, 0.88);
}

.hero-bento-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.hero-bento-live .dot-pulse {
  width: 6px;
  height: 6px;
  background: #34d399;
}

.hero-bento-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.hero-bento-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  padding: 0.62rem 0.72rem;
}

.hero-bento-stat.span-2 {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero-bento-stat span {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(186, 230, 253, 0.88);
}

.hero-bento-stat strong {
  display: block;
  margin-top: 0.12rem;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
}

.hero-bento-stat.span-2 strong {
  margin-top: 0;
  font-size: 1.08rem;
}

.hero-bento-cta {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 12px;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
}

.hero-bento-cta:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Metrics Strip - Modern Gen-Z Bento Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.05rem;
}

@media (min-width: 1024px) {
  .metrics-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
}

.metric-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 18px;
  padding: 0.88rem 0.92rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, #154c79, #38bdf8);
  opacity: 0.85;
}

.metric-card-emerald::before { background: linear-gradient(90deg, #16a34a, #34d399); }
.metric-card-blue::before { background: linear-gradient(90deg, #154c79, #38bdf8); }
.metric-card-amber::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.metric-card-purple::before { background: linear-gradient(90deg, #6366f1, #a855f7); }

@media (min-width: 640px) {
  .metric-card {
    border-radius: 20px;
    padding: 1.08rem 1.15rem;
  }
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(21, 76, 121, 0.18);
  border-color: #93c5fd;
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.metric-kicker {
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  color: var(--ink-muted);
}

.metric-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon svg { width: 15px; height: 15px; }

@media (min-width: 640px) {
  .metric-kicker { font-size: 0.74rem; }
  .metric-icon { width: 36px; height: 36px; border-radius: 11px; }
  .metric-icon svg { width: 18px; height: 18px; }
}

.metric-icon.emerald { background: linear-gradient(135deg, #dcfce7, #ecfdf5); color: #15803d; border: 1px solid #bbf7d0; }
.metric-icon.blue { background: linear-gradient(135deg, #dbeafe, #eff6ff); color: #154c79; border: 1px solid #bfdbfe; }
.metric-icon.amber { background: linear-gradient(135deg, #fef3c7, #fffbeb); color: #b45309; border: 1px solid #fde68a; }
.metric-icon.red { background: linear-gradient(135deg, #fee2e2, #fef2f2); color: #dc2626; border: 1px solid #fecaca; }
.metric-icon.purple { background: linear-gradient(135deg, #ede9fe, #faf5ff); color: #6d28d9; border: 1px solid #ddd6fe; }

.metric-card-emerald:hover { border-color: #86efac; }
.metric-card-emerald:hover .metric-link { color: #15803d; }
.metric-card-blue:hover { border-color: #7dd3fc; }
.metric-card-blue:hover .metric-link { color: #0284c7; }
.metric-card-amber:hover { border-color: #fcd34d; }
.metric-card-amber:hover .metric-link { color: #b45309; }
.metric-card-purple:hover { border-color: #c4b5fd; }
.metric-card-purple:hover .metric-link { color: #6d28d9; }

.metric-val {
  margin: 0.5rem 0 0;
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.05rem, 3.8vw, 1.38rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.2;
}

.metric-link {
  margin: 0.24rem 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-mid);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CCTV Live Stream Card */
.cctv-card {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-2xl);
  padding: 0.95rem 0.95rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.15rem;
}

@media (min-width: 640px) {
  .cctv-card {
    border-radius: var(--radius-3xl);
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.35rem;
  }
}

.cctv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

@media (min-width: 640px) {
  .cctv-head {
    gap: 0.75rem;
    margin-bottom: 0.9rem;
  }
}

.cctv-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-badge.standby {
  background: var(--brand-50);
  color: var(--brand);
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #dc2626;
  animation: pulse-live 1.5s infinite ease-in-out;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.82); }
}

.cctv-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #0b243b;
  border: 1px solid var(--rule);
}

.cctv-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.cctv-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 0.92rem;
  color: var(--ink-body);
}

/* Home Content Grid (KabarWarga 1fr main + 22rem sidebar) */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr) 22rem;
    gap: 1.85rem;
  }
}

.btn-link-green {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-link-green:hover { color: var(--brand-dark); }

/* Pinned Headline (KabarWarga Amber-Terakota) */
.pinned-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(253, 230, 138, 0.85);
  border-radius: 20px;
  padding: 1.15rem 1.15rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1.4rem;
  transition: box-shadow 0.18s ease;
}

.pinned-card:hover { box-shadow: var(--shadow-sm); }

.pinned-accent-bar {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 4px;
  background: linear-gradient(90deg, #fbbf24 0%, #ea580c 100%);
}

.pinned-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .pinned-card {
    border-radius: var(--radius-3xl);
    padding: 1.45rem 1.5rem;
  }
  .pinned-layout {
    flex-direction: row;
    gap: 1.35rem;
    align-items: flex-start;
  }
}

.pinned-thumb {
  display: block;
  border: 0;
  padding: 0;
  background: var(--surface-2);
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .pinned-thumb {
    order: 2;
    width: 240px;
    aspect-ratio: 4 / 3;
  }
}

.pinned-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.pinned-card:hover .pinned-thumb img { transform: scale(1.04); }

.pinned-body {
  min-width: 0;
  flex: 1;
}

.pinned-title {
  margin: 0;
  font-size: clamp(1.12rem, 1rem + 0.5vw, 1.32rem);
  font-weight: 800;
  line-height: 1.32;
}

.pinned-excerpt {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.58;
}

.badge-disematkan,
.badge-dipasang {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-disematkan svg { width: 12px; height: 12px; color: #d97706; }
.badge-dipasang {
  border-radius: 7px;
  color: var(--terakota);
}
.badge-dipasang svg { width: 12px; height: 12px; }

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.55rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid var(--rule);
}

.section-bar-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-bar-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--brand);
  flex-shrink: 0;
}

/* Cards, Sheets & KabarWarga Post Card with Photo */
.sheet, .card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-2xl);
  padding: 1.05rem;
  box-shadow: var(--shadow-xs);
}

.post-card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-2xl);
  padding: 1rem 1.05rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.post-card .pin {
  position: absolute;
  top: -7px;
  left: 22px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--terakota);
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.35);
}

.post-card-layout {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.post-thumb {
  display: block;
  border: 0;
  padding: 0;
  background: var(--surface-2);
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumb img { transform: scale(1.05); }

.post-card-main {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.post-card-body {
  min-width: 0;
  flex: 1;
}

.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.post-date-txt { font-size: 0.78rem; color: var(--ink-muted); }

.post-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.32;
}

.post-title-btn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.15s ease;
}

.post-card:hover .post-title-btn,
.pinned-card:hover .post-title-btn {
  color: var(--brand);
}

.post-event-line {
  margin: 0.35rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-body);
}

.post-event-line svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
  flex-shrink: 0;
}

.post-excerpt {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-foot {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.post-read-link {
  border: 0;
  background: transparent;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
}

.post-read-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.18s ease;
}

.post-card:hover .post-read-link svg,
.pinned-card:hover .post-read-link svg {
  transform: translateX(3px);
}

@media (min-width: 640px) {
  .post-card { padding: 1.2rem 1.25rem; }
  .post-card-layout {
    flex-direction: row;
    gap: 1.1rem;
    align-items: flex-start;
  }
  .post-thumb {
    order: 2;
    width: 168px;
    aspect-ratio: 4 / 3;
  }
  .section-bar {
    gap: 0.85rem;
    padding-bottom: 0.65rem;
    margin-bottom: 1rem;
  }
  .section-bar-title { font-size: 1.26rem; }
  .sheet, .card { padding: 1.25rem; }
}

.post-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

/* Stamp & Event Date Tile (KabarWarga) */
.stamp {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

.stamp-daun, .stamp-kegiatan { color: #0f395c; background: #f0f9ff; border-color: #bae6fd; }
.stamp-pengumuman { color: #78350f; background: #fffbeb; border-color: #fde68a; }
.stamp-berita, .stamp-blue { color: #1e40af; background: #eff6ff; border-color: #bfdbfe; }
.stamp-iuran { color: #115e59; background: #f0fdfa; border-color: #99f6e4; }
.stamp-terakota { color: #c2410c; background: #ffedd5; border-color: #fdba74; }
.stamp-lunas {
  color: #15803d;
  border-color: #16a34a;
  background: #dcfce7;
  transform: rotate(-2deg);
}

.event-date {
  width: 56px;
  flex-shrink: 0;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.event-date-m {
  background: linear-gradient(90deg, #154c79 0%, #0284c7 100%);
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.22rem 0;
  letter-spacing: 0.06em;
}

.event-date-body { padding: 0.28rem 0; }

.event-date-d {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--ink);
}

.event-date-w {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: capitalize;
  margin-top: 0.1rem;
}

/* Kabar Page Header & Chips (KabarWarga posts/index.blade.php) */
.kabar-page-head { margin-bottom: 1.25rem; }

.kabar-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 0.35rem;
}

.kabar-page-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kabar-page-desc {
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.kabar-search-wrap {
  display: block;
  max-width: 48rem;
  margin-bottom: 0.85rem;
}

.kabar-search-box {
  position: relative;
}

.kabar-search-box svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-subtle);
  pointer-events: none;
}

.kabar-search-box input,
.kabar-search-box input[type="search"] {
  padding-left: 2.6rem;
  background: #ffffff;
}

.kabar-chips .tab-btn {
  border-radius: 12px;
  font-size: 0.8rem;
  padding: 0.48rem 1rem;
  min-height: 40px;
}

.kabar-chips .tab-btn::after { display: none; }

.kabar-chips .tab-btn.chip-all[aria-selected="true"] {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.kabar-chips .tab-btn[aria-selected="true"]:not(.chip-all) {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.kabar-feed { max-width: 48rem; }

/* Progress Bar */
.progress-track {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
  margin: 0.45rem 0;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-accent));
  transition: width 0.4s ease;
}

/* Buttons - Generous touch targets & clear contrast */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn-sm {
  min-height: 40px;
  padding: 0.42rem 0.85rem;
  font-size: 0.86rem;
  border-radius: 10px;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover { background: var(--brand-dark); }

.btn-quiet,
.btn-soft {
  background: #ffffff;
  color: var(--brand-dark);
  border-color: var(--rule);
}

.btn-quiet:hover,
.btn-soft:hover {
  background: var(--brand-50);
  border-color: var(--brand-accent);
}

.btn-danger {
  background: #ffffff;
  color: var(--terakota);
  border-color: rgba(220, 38, 38, 0.35);
}

.btn-danger:hover { background: var(--terakota-soft); }

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: var(--amber-50); color: var(--amber-900); border: 1px solid var(--amber-200); }
.badge-danger { background: var(--terakota-soft); color: #991b1b; }
.badge-info { background: var(--brand-soft); color: var(--brand-dark); }
.badge-muted { background: var(--surface-2); color: var(--ink-body); }

/* Grid Helpers */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .span-2 { grid-column: span 2; }
}

.stat-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.stat-mini {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.78rem 0.9rem;
}

.stat-mini-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-muted); display: block; }
.stat-mini-val { font-size: 1.05rem; font-weight: 800; margin-top: 0.15rem; display: block; font-variant-numeric: tabular-nums; }

.text-success { color: #15803d; }
.text-danger { color: var(--terakota); }
.text-muted { color: var(--ink-muted); }

/* Ronda Members & Strip */
.member-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.member-item {
  background: var(--paper);
  border: 1.5px solid var(--rule);
  border-radius: 11px;
  padding: 0.55rem 0.7rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.member-item.hl {
  border-color: var(--brand);
  background: var(--brand-50);
  color: var(--brand-dark);
}

.member-num {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.member-name {
  overflow-wrap: break-word;
  line-height: 1.25;
}

@media (max-width: 559px) {
  .member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .member-item {
    flex: 1 1 150px;
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
  }
}

.rotation-strip {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}
.rotation-strip::-webkit-scrollbar { display: none; }

.rot-pill {
  flex: 0 0 auto;
  min-width: 124px;
  background: #ffffff;
  border: 1.5px solid var(--rule);
  border-radius: 13px;
  padding: 0.65rem 0.85rem;
  text-align: left;
  cursor: pointer;
}

.rot-pill.today {
  border-color: var(--brand);
  background: var(--brand-50);
}

.rot-pill-day { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); display: block; }
.rot-pill.today .rot-pill-day { color: var(--brand-dark); font-weight: 700; }
.rot-pill-grp { font-size: 0.96rem; font-weight: 800; display: block; margin-top: 0.15rem; color: var(--ink); }

/* Responsive Dues Matrix Table */
.table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  background: #ffffff;
}

table.dues-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 720px;
}

.dues-table th,
.dues-table td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--rule-soft);
  text-align: center;
  white-space: nowrap;
}

.dues-table th {
  background: var(--paper);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.dues-table th:first-child,
.dues-table td:first-child {
  position: sticky;
  left: 0;
  background: #ffffff;
  text-align: left;
  padding-left: 0.9rem;
  z-index: 2;
  border-right: 1px solid var(--rule-soft);
}

.dues-table th:first-child { background: var(--paper); }

.cell-paid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.55rem;
  border-radius: 7px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.cell-unpaid {
  color: var(--ink-subtle);
  font-size: 0.82rem;
}

/* Cashflow Chart */
.chart-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 0.55rem;
  align-items: end;
  min-height: 150px;
  padding: 0.75rem 0.25rem 0.25rem;
  border-bottom: 1px solid var(--rule);
}

.chart-col { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.chart-bars { height: 108px; display: flex; align-items: flex-end; gap: 4px; }
.chart-bar { width: 14px; border-radius: 5px 5px 1px 1px; min-height: 4px; }
.chart-bar.in { background: var(--brand); }
.chart-bar.out { background: var(--terakota); opacity: 0.85; }
.chart-label { font-size: 0.74rem; font-weight: 600; color: var(--ink-muted); }

/* Stack & Row Cards */
.stack-list { display: flex; flex-direction: column; gap: 0.65rem; }

.row-card {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  padding: 0.88rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.row-card:hover { border-color: var(--brand-accent); box-shadow: var(--shadow-xs); }

.row-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.row-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
  background: var(--surface-2); color: var(--ink-muted);
}
.row-icon.masuk { background: #dcfce7; color: #166534; }
.row-icon.keluar { background: var(--terakota-soft); color: #991b1b; }
.row-meta { min-width: 0; }
.row-title { margin: 0; font-size: 0.98rem; font-weight: 700; color: var(--ink); }
.row-sub { margin: 0.18rem 0 0; font-size: 0.84rem; color: var(--ink-muted); }
.row-amount { font-weight: 800; font-size: 0.98rem; white-space: nowrap; flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* Segmented Tabs */
.tablist {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  margin-bottom: 0.9rem;
}
.tablist::-webkit-scrollbar { display: none; }

.tab-btn {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 0.48rem 0.95rem;
  border-radius: 11px;
  border: 1.5px solid var(--rule);
  background: #ffffff;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  color: var(--brand-dark);
  background: var(--brand-50);
  border-color: var(--brand-accent);
}

.tab-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 20%;
  inset-block-end: 2px;
  border-block-end: 2.5px solid var(--brand);
  border-radius: 99px;
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-block-end: 1rem;
}

.field label { font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.hint { font-size: 0.82rem; color: var(--ink-muted); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  min-height: 48px;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--rule);
  background: #ffffff;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
}

textarea { min-height: 98px; resize: vertical; }

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--terakota);
  background-color: #fef2f2;
}

.error-msg {
  display: none;
  color: var(--terakota);
  font-size: 0.84rem;
  font-weight: 600;
}

:is(input, select, textarea):is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}

/* Native Modal Dialog */
dialog {
  margin: auto;
  width: min(94dvw, 560px);
  max-height: 88dvh;
  border: 1.5px solid var(--rule);
  border-radius: 22px;
  background: #ffffff;
  color: var(--ink);
  padding: 1.35rem;
  box-shadow: var(--shadow-md);
}

dialog.dialog-wide {
  width: min(96dvw, 1020px);
}

dialog:modal { overscroll-behavior: contain; }
dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.dialog-head h1,
.dialog-head h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; }

.close-x {
  min-width: 40px; min-height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: var(--brand-dark);
  color: #ffffff;
  padding: 0.72rem 1.15rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  max-width: min(92dvw, 440px);
  text-align: center;
}

.media-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface-2);
  margin-bottom: 0.8rem;
}

.qr-box {
  background: #ffffff;
  border: 1.5px dashed var(--rule);
  border-radius: 16px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-box img { width: min(250px, 70dvw); height: auto; aspect-ratio: 1/1; border-radius: 10px; }

.code-preview {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.9rem;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0.65rem; }
.var-chip {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.3rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1.5px solid var(--rule);
  background: #ffffff;
  padding: 1.65rem 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.footer-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

@media print {
  .print-hide, .topbar, .bottom-nav, .site-footer { display: none !important; }
  body { background: #ffffff !important; padding: 0 !important; }
}

/* Upgraded Ronda UI */
.ronda-spotlight {
  background: linear-gradient(135deg, #154c79 0%, #1d6fa5 58%, #0f395c 100%);
  color: #ffffff;
  border-radius: var(--radius-3xl);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
}

@media (min-width: 640px) {
  .ronda-spotlight { padding: 1.65rem 1.85rem; }
}

.ronda-spot-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.ronda-spot-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem);
  font-weight: 800;
  color: #ffffff;
}

.ronda-spot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin-top: 0.45rem;
  font-size: 0.92rem;
  color: rgba(240, 249, 255, 0.92);
  font-weight: 600;
}

.ronda-spot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .ronda-spot-grid { grid-template-columns: repeat(4, 1fr); }
}

.ronda-spot-member {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.ronda-spot-member.ketua {
  background: #ffffff;
  color: var(--brand-dark);
  border-color: #ffffff;
}

.ronda-card {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-2xl);
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ronda-card.tonight {
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-sm);
}

.ronda-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  padding-bottom: 0.7rem;
  margin-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--rule-soft);
}

.ronda-group-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

.ronda-card.tonight .ronda-group-num {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.ketua-tag {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.42rem;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  margin-left: auto;
  flex-shrink: 0;
}

/* Modern Financial Statement (/kas) — RT 10 Brand Blue Hero */
.fin-hero {
  background: linear-gradient(135deg, #154c79 0%, #1d6fa5 58%, #0f395c 100%);
  color: #ffffff;
  border-radius: var(--radius-3xl);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 820px) {
  .fin-hero {
    padding: 1.75rem 2rem;
    grid-template-columns: 1.15fr 1.25fr;
    align-items: center;
  }
}

.fin-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #bae6fd;
}

.fin-balance {
  margin: 0.25rem 0 0;
  font-size: clamp(1.85rem, 1.45rem + 1.8vw, 2.55rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
}

.fin-sub {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  color: rgba(240, 249, 255, 0.9);
}

.fin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.fin-kpi {
  background: #ffffff;
  color: var(--ink);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
}

.fin-kpi-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.fin-kpi-val {
  display: block;
  margin-top: 0.18rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.svg-chart-box {
  width: 100%;
  min-height: 210px;
}

.svg-chart-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.cat-comp-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: center;
}

@media (min-width: 500px) {
  .cat-comp-wrap { grid-template-columns: 130px 1fr; }
}

.cat-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cat-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.cat-row-top > span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.cat-bar-bg {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.cat-bar-fg {
  height: 100%;
  border-radius: 999px;
}

.ledger-desktop { display: none; }
.ledger-mobile { display: flex; flex-direction: column; gap: 0.6rem; }

@media (min-width: 820px) {
  .ledger-desktop { display: block; }
  .ledger-mobile { display: none; }
}

table.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.ledger-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--rule);
}

table.ledger-table td {
  padding: 0.78rem 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}

table.ledger-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

table.ledger-table tbody tr:hover {
  background: var(--brand-50);
}

table.ledger-table th.num,
table.ledger-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ==================== KAS RONDA (KELOMPOK 1-8 & PER SESI) ==================== */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.rf-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.rf-group-card {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.rf-group-card:hover {
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(21, 76, 121, 0.09);
  transform: translateY(-1px);
}

.rf-group-card.tonight {
  border-color: var(--brand-accent);
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.rf-group-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

.rf-group-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

.rf-group-amt {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
  margin: 0.1rem 0 0;
}

.rf-group-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
  border-top: 1px dashed var(--rule);
  padding-top: 0.45rem;
  margin-top: 0.15rem;
}

.rf-table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(620px, 78vh);
  container-type: inline-size;
}

table.rf-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

table.rf-table thead th {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  text-align: left;
  padding: 0.7rem 0.75rem;
  background: var(--paper);
  color: var(--ink-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1.5px solid var(--rule);
  white-space: nowrap;
}

table.rf-table td {
  padding: 0.78rem 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
  background: var(--surface);
}

table.rf-table tbody tr {
  cursor: pointer;
}

table.rf-table tbody tr:hover td {
  background: var(--brand-50);
}

table.rf-table th.num,
table.rf-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@container (width < 640px) {
  table.rf-table,
  table.rf-table thead,
  table.rf-table tbody,
  table.rf-table tr,
  table.rf-table td {
    display: block;
    width: 100%;
  }

  table.rf-table thead {
    display: none;
  }

  table.rf-table tbody tr {
    margin-block-end: 0.75rem;
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
    background: var(--surface);
  }

  table.rf-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.42rem 0;
    border-bottom: 1px dashed var(--rule-soft);
    text-align: right;
  }

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

  table.rf-table td[data-label]::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--ink-muted);
    text-align: left;
    flex-shrink: 0;
  }
}

/* ==================== ADMIN CCTV & YOUTUBE REDESIGN ==================== */
.cctv-adm-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.cctv-adm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cctv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 900px) {
  .cctv-kpi-grid { grid-template-columns: repeat(4, 1fr); }
}

.cctv-kpi-card {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-2xl);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.cctv-kpi-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-subtle);
}

.cctv-kpi-value {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.cctv-kpi-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cctv-oauth-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: var(--radius-2xl);
  padding: 1rem 1.15rem;
  margin-bottom: 1.15rem;
}

.cctv-cam-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 700px) {
  .cctv-cam-grid { grid-template-columns: repeat(2, 1fr); }
}

.cctv-cam-card {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-2xl);
  padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.cctv-cam-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-sm);
}

.cctv-cam-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.cctv-cam-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
}

.cctv-cam-watch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-mid);
}

.cctv-cam-watch:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.cctv-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.26rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.cctv-live-pill.is-live {
  background: #dcfce7;
  color: #166534;
}

.cctv-live-pill.is-live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  animation: pulse-live 1.6s infinite ease-in-out;
}

.cctv-live-pill.is-offline {
  background: var(--surface-2);
  color: var(--ink-muted);
}

.cctv-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
}

.cctv-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

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

.cctv-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0284c7 0%, #154c79 100%);
  transition: width 0.35s ease;
}

.cctv-progress-fill.is-soon {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.cctv-toolbar-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  align-items: end;
}

@media (min-width: 760px) {
  .cctv-toolbar-form {
    grid-template-columns: 1fr 1.15fr 1.15fr auto;
  }
}

.cctv-toolbar-form .field {
  margin-bottom: 0;
}

.cctv-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.cctv-feed-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.9rem;
  padding: 0.68rem 0.85rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
}

.cctv-feed-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.cctv-feed-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Native accessible accordion (modern-web-guidance) */
.cctv-acc-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

details.cctv-acc {
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

details.cctv-acc > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.15rem;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  min-height: 52px;
  transition: background 0.15s ease;
}

details.cctv-acc > summary::-webkit-details-marker {
  display: none;
}

details.cctv-acc > summary:hover {
  background: var(--brand-50);
}

.cctv-acc-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.cctv-acc-label::before {
  content: "";
  inline-size: 1.05em;
  block-size: 1.05em;
  flex-shrink: 0;
  background-color: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
  rotate: -90deg;
}

details.cctv-acc[open] > summary .cctv-acc-label::before {
  rotate: 0deg;
}

@media (prefers-reduced-motion: no-preference) {
  .cctv-acc-label::before {
    transition: rotate 0.2s ease;
  }

  details.cctv-acc::details-content {
    transition: block-size 0.28s ease, content-visibility 0.28s ease allow-discrete, display 0.28s ease allow-discrete;
  }
}

details.cctv-acc::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

details.cctv-acc:not([open])::details-content {
  block-size: 0;
}

.cctv-acc-body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--rule-soft);
  padding-top: 1rem;
}

.cctv-vigi-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
}

.cctv-vigi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* ==================== VISION COUNTER (OFFLINE YOLO) ==================== */
.vision-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.vision-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.vision-controls select,
.vision-controls input[type="date"] {
  width: auto;
  border-radius: 10px;
}

.vision-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

@media (min-width: 780px) {
  .vision-kpi-grid { grid-template-columns: repeat(5, 1fr); }
}

.vision-kpi {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.vision-kpi-label {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-subtle);
}

.vision-kpi-val {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.vision-kpi-sub {
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.vision-chart-wrap {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
}

.vision-bars {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  align-items: end;
  gap: 3px;
  height: 54px;
}

.vision-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 2px;
}

.vision-bar-fill {
  width: 100%;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: var(--brand-mid);
  opacity: 0.85;
  transition: height 0.25s ease, opacity 0.15s ease;
}

.vision-bar-fill.is-empty {
  background: var(--rule);
  opacity: 0.7;
}

.vision-bar-lbl {
  font-size: 0.6rem;
  color: var(--ink-subtle);
  line-height: 1;
}

.vision-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vision-ev-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 14px;
}

.vision-ev-info {
  min-width: 0;
  flex: 1;
}

.vision-ev-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.vision-ev-summary {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-body);
}

.vision-ev-meta {
  margin: 0.15rem 0 0;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.vision-thumb-btn {
  border: 1.5px solid var(--rule);
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  cursor: pointer;
  flex-shrink: 0;
  width: 84px;
  height: 48px;
}

.vision-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vision-live-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.vision-live-grid.cols-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 780px) {
  .vision-live-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.vision-live-grid.cols-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .vision-live-grid.cols-3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .vision-live-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vision-live-box {
  background: #0f172a;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--rule);
  aspect-ratio: 16 / 9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vision-live-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vision-live-placeholder {
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 600;
}

.vision-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  font-size: 0.76rem;
}

.vision-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font-weight: 600;
}

.vision-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ==================== 4-SCREEN NVR QUAD MONITOR (/cctv) ==================== */
.cctv-quad-stage {
  background: #020617;
  border-radius: var(--radius-2xl);
  padding: 5px;
  box-shadow: var(--shadow-md);
  border: 1.5px solid #1e293b;
}

.cctv-quad-fsbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  background: #0f172a;
  border-radius: 10px;
  margin-bottom: 5px;
}

.cctv-quad-stage:fullscreen {
  border-radius: 0;
  border: 0;
  padding: 6px;
  inline-size: 100dvw;
  block-size: 100dvh;
  display: flex;
  flex-direction: column;
}

.cctv-quad-stage:fullscreen .cctv-quad-fsbar {
  display: flex;
  flex-shrink: 0;
}

.cctv-quad-stage:fullscreen .cctv-quad-grid {
  flex: 1;
  min-block-size: 0;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.cctv-quad-stage:fullscreen .cctv-quad-grid.has-zoom {
  grid-template-rows: 1fr;
}

.cctv-quad-stage:fullscreen .cctv-quad-cell {
  aspect-ratio: auto;
  block-size: 100%;
}

.cctv-quad-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

@media (min-width: 640px) {
  .cctv-quad-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cctv-quad-grid.has-zoom {
  grid-template-columns: 1fr;
}

.cctv-quad-cell {
  position: relative;
  background: #0b1120;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid #1e293b;
}

.cctv-quad-cell.is-hidden-by-zoom {
  display: none;
}

.cctv-quad-video {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  background: #020617;
  cursor: pointer;
}

.cctv-quad-stage:fullscreen .cctv-quad-video,
.cctv-quad-grid.has-zoom .cctv-quad-video {
  object-fit: contain;
}

.cctv-quad-hud {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.5rem 0.55rem;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0) 100%);
  pointer-events: none;
}

.cctv-quad-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #f8fafc;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cctv-quad-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  flex-shrink: 0;
}

.cctv-quad-dot.offline {
  background: #94a3b8;
  box-shadow: none;
}

.cctv-quad-tools {
  display: flex;
  gap: 0.3rem;
  pointer-events: auto;
}

.cctv-hud-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  color: #f8fafc;
  border-radius: 8px;
  padding: 0.24rem 0.52rem;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.cctv-hud-btn:hover {
  background: rgba(30, 41, 59, 0.92);
}

.cctv-quad-sub {
  position: absolute;
  inset-block-end: 0.45rem;
  inset-inline-start: 0.55rem;
  z-index: 2;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.64);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  pointer-events: none;
}

.cctv-player-wrap video {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  background: #020617;
}

/* Mobile & Sidebar CTA Polish */
.cta-rt-box {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cta-rt-copy h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--ink);
}

.cta-rt-copy p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.cta-rt-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 960px) {
  .cta-rt-actions {
    grid-template-columns: 1fr;
  }
}

.btn-compact {
  padding: 0.42rem 0.82rem;
  font-size: 0.84rem;
  min-height: 38px;
}

@media (pointer: coarse) {
  .hero-search-btn,
  .cta-rt-actions .btn,
  .quick-chip {
    min-block-size: 44px;
  }
}







/* ==================== CIVIC PORTAL REDESIGN (2026-12-02) ==================== */
body.civic-app {
  background: #f1f5f9;
  color: #0f172a;
}

.civic-app .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e2e8f0;
}

.civic-app .topbar-inner {
  max-width: 1120px;
}

.btn-pill-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-pill-quiet:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* Mobile Adaptive Sub-header Bar */
.topbar-sub-row {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 0.85rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.subbar-back {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: 0;
  background: transparent;
  color: #0f395c;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.4rem 0.35rem 0.4rem 0;
  min-height: 44px;
  cursor: pointer;
  flex-shrink: 0;
}

.subbar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subbar-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 72px;
}

@media (min-width: 1024px) {
  .topbar-home-mode { display: flex !important; }
  .topbar-sub-row { display: none !important; }
}

.civic-container {
  max-width: 1120px;
  padding: 0.85rem 0.85rem 2rem;
}

@media (min-width: 768px) {
  .civic-container {
    padding: 1.25rem 1.25rem 2.5rem;
  }
}

/* Desktop View Header (hidden on mobile where topbar-sub-row handles it) */
.desktop-view-head {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-view-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }
}

.view-h1 {
  margin: 0;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.65rem);
  font-weight: 800;
  color: #0f172a;
}

.view-sub {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

/* Home 2-column responsive layout */
.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.home-col-primary,
.home-col-secondary {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
}

@media (min-width: 920px) {
  .home-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
  }
}

/* Reusable Civic Card */
.civic-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.card-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.card-title-sm {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
}

.subsec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 1rem 0 0.55rem;
}

.subsec-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
}

/* 01. Ronda Hero Card (Deep Navy) */
.ronda-hero-card {
  background: linear-gradient(155deg, #0d263f 0%, #133b60 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 1.05rem 1.1rem;
  box-shadow: 0 10px 24px rgba(13, 38, 63, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ronda-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.ronda-hero-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #93c5fd;
  text-transform: uppercase;
}

.ronda-hero-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hero-status-pill,
.hero-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.74rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}

.live-dot-green {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}

.ronda-hero-title {
  margin: 0;
  font-size: clamp(1.65rem, 1.35rem + 1vw, 2rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.ronda-hero-leader {
  margin: 0.45rem 0 0.15rem;
  font-size: 0.92rem;
  color: #e2e8f0;
  font-weight: 500;
}

.ronda-hero-leader strong {
  color: #ffffff;
  font-weight: 800;
}

.ronda-hero-members {
  margin: 0;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.ronda-hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.btn-hero-light {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  color: #0d263f;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn-hero-light:hover {
  background: #f1f5f9;
}

.btn-hero-dark {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-hero-dark:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 4 Quick Action Tiles */
.quick-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.7rem 0.35rem;
  min-height: 82px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.quick-tile:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.qt-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qt-icon svg {
  width: 20px;
  height: 20px;
}

.qt-green { background: #ecfdf5; color: #15803d; }
.qt-blue { background: #eff6ff; color: #1d4ed8; }
.qt-amber { background: #fffbeb; color: #d97706; }
.qt-slate { background: #f1f5f9; color: #334155; }

.qt-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

/* 2-Column Finance Split Card */
.kas-split-card {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.kas-split-col {
  border: 0;
  background: transparent;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.15rem;
  cursor: pointer;
  min-width: 0;
}

.kas-split-col:hover {
  background: #f8fafc;
}

.kas-split-divider {
  background: #e2e8f0;
  margin: 0.75rem 0;
}

.kas-split-kicker {
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
}

.kas-split-val {
  font-size: clamp(1.08rem, 0.95rem + 0.4vw, 1.24rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.kas-split-link {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.link-blue { color: #0284c7; }
.link-green { color: #15803d; }

/* Pills & Buttons */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.live-pill.standby {
  background: #f1f5f9;
  color: #475569;
}

.btn-navy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 0;
  background: #0d263f;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-navy-pill:hover { background: #133b60; }

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline-pill:hover { background: #f8fafc; }

.btn-link-blue {
  border: 0;
  background: transparent;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.25rem 0;
  cursor: pointer;
  white-space: nowrap;
}

.btn-text-link {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
}

.btn-wa-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: #15803d;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-wa-green:hover { background: #166534; }

.btn-navy-block {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #0d263f;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-navy-block:hover { background: #133b60; }
.btn-navy-block:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-navy-btn {
  min-height: 48px;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 12px;
  background: #0d263f;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

/* Home CCTV Frame */
.home-cctv-frame,
.cctv-focus-frame {
  border-radius: 14px;
  overflow: hidden;
  background: #0b1120;
  aspect-ratio: 16 / 9;
  width: 100%;
  position: relative;
}

.home-cctv-frame iframe,
.cctv-focus-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.cctv-placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: #e2e8f0;
  padding: 1.2rem;
  text-align: center;
  font-size: 0.86rem;
}

.home-cctv-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.home-cctv-caption {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact Kabar List (Home & Surat) */
.kabar-compact-list {
  display: flex;
  flex-direction: column;
}

.kabar-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.15rem;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.kabar-compact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0.15rem;
}

.kabar-compact-row:hover .kabar-compact-title {
  color: #0284c7;
}

.kabar-compact-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}

.kabar-tag-amber {
  padding: 0.18rem 0.5rem;
  border-radius: 7px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.kabar-tag-date {
  padding: 0.18rem 0.5rem;
  border-radius: 7px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.kabar-compact-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kabar-chevron {
  color: #94a3b8;
  font-size: 1.05rem;
  font-weight: 700;
  flex-shrink: 0;
}

.home-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.home-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.home-cta-text {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
}

.home-cta-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: #15803d;
}

/* 02. Detail Ronda Page */
.ronda-spot-card {
  background: linear-gradient(145deg, #0a2138 0%, #133e68 55%, #174f82 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 1.1rem;
  border: 1px solid #2b6296;
  box-shadow: 0 12px 28px rgba(11, 34, 57, 0.22);
}

.hero-time-pill-accent {
  background: #1a4670;
  border-color: #38bdf8;
  color: #ffffff;
}

.shift-dot-amber {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fbbf24;
  flex-shrink: 0;
}

.ronda-spot-sub {
  margin: 0.25rem 0 0.85rem;
  font-size: 0.8rem;
  color: #93c5fd;
  font-weight: 600;
}

.ronda-members-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
}

.ronda-pill-member {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.6rem;
  border-radius: 10px;
  background: #133658;
  border: 1px solid #24517d;
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 0;
}

.ronda-num-badge {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #1e4b78;
  color: #93c5fd;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ronda-member-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.ronda-pill-member.is-ketua {
  background: linear-gradient(135deg, #1e4e7d 0%, #1a568c 100%);
  border: 1.5px solid #f59e0b;
  color: #ffffff;
  font-weight: 700;
}

.ronda-pill-member.is-ketua .ronda-num-badge {
  background: #f59e0b;
  color: #0f172a;
}

.ronda-ketua-tag {
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.rotation-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.rotation-strip::-webkit-scrollbar { display: none; }

.rot-pill-card {
  flex: 0 0 auto;
  min-width: 86px;
  padding: 0.58rem 0.72rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.14rem;
}

.rot-pill-card.is-next {
  background: #eff6ff;
  border: 1.5px solid #0d263f;
}

.rot-pill-card.is-next .rot-day-sm {
  background: #0d263f;
  color: #ffffff;
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 800;
}

.rot-pill-card.is-today {
  background: #0d263f;
  border-color: #0d263f;
  color: #ffffff;
}

.rot-day-sm {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
}

.rot-pill-card.is-today .rot-day-sm {
  color: #93c5fd;
}

.rot-grp-sm {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.rot-leader-sm {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  max-width: 74px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rot-pill-card.is-next .rot-leader-sm {
  color: #475569;
}

.rot-pill-card.is-today .rot-grp-sm {
  color: #ffffff;
}

.search-head-row {
  align-items: center;
}

.inline-search-box {
  position: relative;
  width: min(175px, 48vw);
}

.inline-search-box svg {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #94a3b8;
  pointer-events: none;
}

.inline-search-box input[type="search"] {
  min-height: 38px;
  padding: 0.35rem 0.7rem 0.35rem 2rem;
  border-radius: 999px;
  font-size: max(0.9rem, 16px);
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.ronda-accordion-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ronda-acc-item {
  border-bottom: 1px solid #f1f5f9;
}

.ronda-acc-item:last-child { border-bottom: 0; }

.ronda-acc-item.is-tonight {
  background: #f0f9ff;
}

.ronda-acc-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.ronda-acc-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ronda-acc-item.is-tonight .ronda-acc-num {
  background: #0d263f;
  color: #ffffff;
}

.ronda-acc-item.is-tomorrow .ronda-acc-num {
  background: #e0f2fe;
  color: #0369a1;
}

.ronda-acc-item.is-tonight .ronda-acc-meta {
  color: #0369a1;
  font-weight: 600;
}

.pill-tonight-sm {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 0.72rem;
  font-weight: 800;
}

.pill-besok-sm {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #0284c7;
  font-size: 0.72rem;
  font-weight: 700;
}

.ronda-acc-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.ronda-acc-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: #0f172a;
}

.ronda-acc-meta {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.ronda-acc-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.pill-dark-sm {
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  background: #0d263f;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.ronda-acc-body {
  padding: 0 1rem 0.85rem;
}

.ronda-acc-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.ronda-acc-chip {
  padding: 0.28rem 0.6rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
}

.ronda-acc-chip.hl {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #78350f;
}

/* 03. Monitor CCTV Page */
.cam-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

@media (min-width: 900px) {
  .cam-thumb-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cam-thumb-card {
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 14px;
  padding: 0.42rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.cam-thumb-card:hover { border-color: #94a3b8; }

.cam-thumb-card.is-active {
  border-color: #0d263f;
  box-shadow: 0 4px 12px rgba(13, 38, 63, 0.1);
}

.cam-thumb-media {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.cam-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cam-thumb-badge {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  padding: 0.14rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  background: #15803d;
  color: #ffffff;
}

.cam-thumb-card.is-active .cam-thumb-badge {
  background: #0d263f;
}

.cam-thumb-badge.is-off {
  background: #475569;
}

.cam-thumb-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.cam-thumb-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.gdrive-rec-card {
  margin-bottom: 0.65rem;
}

.gdrive-rec-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.gdrive-rec-desc {
  margin: 0.25rem 0 0.1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.gdrive-rec-folder {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #154c79;
}

.refresh-strip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 1rem;
}

.refresh-strip-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
}

/* Segmented Tabs (2 or 3 cols) */
.seg-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.28rem;
  padding: 0.28rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  margin-bottom: 0.85rem;
}

.seg-tabs.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg-tab-btn {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg-tab-btn[aria-selected="true"] {
  background: #0d263f;
  color: #ffffff;
}

/* 04 & 05. Navy Finance Hero */
.navy-fin-hero {
  background: linear-gradient(155deg, #0d263f 0%, #133b60 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 1rem 1.05rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 8px 20px rgba(13, 38, 63, 0.16);
}

.navy-fin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.navy-fin-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #93c5fd;
  text-transform: uppercase;
}

.navy-fin-pill {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill-wa-active {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #15803d;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill-wa-active.standby {
  background: rgba(255, 255, 255, 0.16);
  color: #e2e8f0;
}

.navy-fin-balance {
  margin: 0 0 0.8rem;
  font-size: clamp(1.75rem, 1.45rem + 1vw, 2.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.12;
}

.navy-fin-sub {
  margin: -0.45rem 0 0.78rem;
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 600;
}

.navy-fin-stats {
  display: grid;
  gap: 0.5rem;
}

.navy-fin-stats.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.navy-fin-stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.navy-stat-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.navy-stat-label {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
}

.navy-stat-val {
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
}

.navy-stat-val.val-green { color: #86efac; }
.navy-stat-val.val-coral { color: #fca5a5; }
.navy-stat-val.val-sky { color: #93c5fd; }

.navy-fin-foot {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  color: #cbd5e1;
  font-weight: 600;
}

.chart-legend-inline {
  display: flex;
  gap: 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
}

.chart-legend-inline span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}
.leg-blue { background: #0284c7; }
.leg-orange { background: #ea580c; }

/* Kas Filter Bar */
.kas-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.pill-filter-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.pill-filter-row::-webkit-scrollbar { display: none; }

.filter-pill {
  flex: none;
  min-height: 34px;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.filter-pill[aria-selected="true"] {
  background: #0d263f;
  border-color: #0d263f;
  color: #ffffff;
}

.filter-select-pill {
  width: auto !important;
  max-width: 108px;
  min-height: 34px !important;
  padding: 0.22rem 0.55rem !important;
  border-radius: 999px !important;
  font-size: 0.74rem !important;
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 440px) {
  .filter-pill {
    min-height: 32px;
    padding: 0.26rem 0.5rem;
    font-size: 0.71rem;
  }
  .filter-select-pill {
    max-width: 96px;
    min-height: 32px !important;
    padding: 0.18rem 0.44rem !important;
    font-size: 0.71rem !important;
  }
}

.kas-search-compact {
  display: block;
  margin-bottom: 0.65rem;
}

.kas-search-compact input[type="search"] {
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  font-size: max(0.92rem, 16px);
  background: #f8fafc;
}

.mutasi-clean-list {
  display: flex;
  flex-direction: column;
}

.mutasi-row-btn {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  padding: 0.72rem 0.15rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.72rem;
  text-align: left;
  cursor: pointer;
}

.mutasi-row-btn:hover { background: #f8fafc; }
.mutasi-row-btn:last-child { border-bottom: 0; }

.mutasi-dir-ico {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.12rem;
}

.mutasi-dir-ico svg {
  width: 15px;
  height: 15px;
}

.mutasi-dir-ico.in {
  background: #dcfce7;
  color: #15803d;
}

.mutasi-dir-ico.out {
  background: #fee2e2;
  color: #dc2626;
}

.mutasi-main {
  flex: 1;
  min-width: 0;
}

.mutasi-desc {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.mutasi-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.28rem;
}

.mutasi-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.35;
}

.mutasi-pill.cat-jimpitan { background: #dcfce7; color: #166534; }
.mutasi-pill.cat-sosial { background: #ffe4e6; color: #be123c; }
.mutasi-pill.cat-perlengkapan { background: #fef3c7; color: #b45309; }
.mutasi-pill.cat-administrasi { background: #e0e7ff; color: #4338ca; }
.mutasi-pill.cat-iuran { background: #e0f2fe; color: #0369a1; }
.mutasi-pill.cat-keamanan { background: #ccfbf1; color: #0f766e; }
.mutasi-pill.cat-operasional { background: #f3e8ff; color: #7e22ce; }
.mutasi-pill.cat-default { background: #f1f5f9; color: #334155; }
.mutasi-pill.type-in { background: #ecfdf5; color: #047857; }
.mutasi-pill.type-out { background: #fef2f2; color: #b91c1c; }

.adm-mutasi-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.78rem;
  padding: 0.78rem 0.25rem;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.adm-mutasi-row:last-child { border-bottom: 0; }

.adm-mutasi-left {
  display: flex;
  align-items: flex-start;
  gap: 0.72rem;
  flex: 1 1 260px;
  min-width: 0;
}

.adm-mutasi-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.adm-mutasi-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mutasi-meta {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.24rem;
}

.mutasi-amt-col {
  text-align: right;
  flex-shrink: 0;
}

.mutasi-amt {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
}

.mutasi-bal {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 0.1rem;
}

.btn-show-more {
  width: 100%;
  border: 0;
  border-top: 1px solid #f1f5f9;
  background: transparent;
  color: #0284c7;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.7rem 0.25rem 0.2rem;
  margin-top: 0.25rem;
  cursor: pointer;
}

/* Kas Jimpitan Ringkasan Kategori & Rekap */
.rf-cat-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.rf-cat-box {
  border-radius: 12px;
  padding: 0.65rem 0.78rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.rf-cat-box.in {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.rf-cat-box.out.has-out {
  background: #fef2f2;
  border-color: #fecaca;
}

.rf-cat-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: #475569;
}

.rf-cat-box.in .rf-cat-label { color: #15803d; }
.rf-cat-box.out.has-out .rf-cat-label { color: #b91c1c; }

.rf-cat-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
}

.rf-kel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .rf-kel-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rf-kel-item {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.62rem 0.72rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rf-kel-item.has-income {
  background: #f0fdf4;
  border-color: #86efac;
}

.rf-kel-item.is-tonight {
  background: #eff6ff;
  border-color: #93c5fd;
}

.rf-kel-item.is-selected {
  outline: 2px solid #0d263f;
}

.rf-kel-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
}

.rf-kel-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.rf-kel-item.has-income .rf-kel-val { color: #15803d; }
.rf-kel-item.is-tonight .rf-kel-val { color: #1d4ed8; }

.pill-count-blue {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-weight: 800;
}

.rf-filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .rf-filter-row {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.rf-filter-row input[type="search"],
.rf-filter-row select {
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border-radius: 10px;
  font-size: max(0.88rem, 16px);
  background: #f8fafc;
}

.sesi-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sesi-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.65rem;
}

.sesi-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sesi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.sesi-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.sesi-sub {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: #64748b;
}

.sesi-amt {
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.sesi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.42rem;
  flex-wrap: wrap;
}

.sesi-badges {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.rf-charts-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.rf-charts-summary::-webkit-details-marker { display: none; }

/* 06. Surat Layout */
.surat-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.surat-layout > *,
.home-layout > *,
.civic-app .stack-list,
.civic-card {
  min-width: 0;
}

.civic-app .svg-chart-box {
  min-height: 0;
  height: auto;
}

.civic-app .svg-chart-box svg {
  display: block;
  width: 100%;
  height: auto;
}

#cctv-focus-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1023px) {
  .civic-app .site-footer {
    display: none;
  }
}

@media (min-width: 900px) {
  .surat-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: start;
  }
}

.pay-months-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

/* Mobile Bottom Nav Pill Active State */
.civic-bnav {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e2e8f0;
  padding: 0.32rem 0.4rem max(0.45rem, env(safe-area-inset-bottom, 0px));
}

.civic-bnav .bnav-btn {
  min-height: 50px;
  gap: 0.18rem;
  border-radius: 12px;
  background: transparent !important;
  color: #64748b;
}

.civic-bnav .bnav-pill {
  width: 44px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.civic-bnav .bnav-pill svg {
  width: 19px;
  height: 19px;
  margin: 0;
}

.civic-bnav .bnav-btn[aria-current="page"],
.civic-bnav .bnav-btn.active {
  color: #0d263f;
  font-weight: 800;
}

.civic-bnav .bnav-btn[aria-current="page"] .bnav-pill,
.civic-bnav .bnav-btn.active .bnav-pill {
  background: #0d263f;
  color: #ffffff;
}

@media (max-width: 420px) {
  .navy-fin-stats.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }
  .navy-stat-box {
    padding: 0.48rem 0.5rem;
  }
  .navy-stat-val {
    font-size: 0.84rem;
  }
}

/* ==================== DESKTOP V1 UPGRADED: VERTICAL CIVIC FLOW (>= 1024px) ==================== */
/* Strictly hidden on mobile/tablet (< 1024px) so mobile UI remains 100% unchanged */
.desktop-live-pill,
.desktop-only-inline,
.desktop-home-intro,
.hero-civic-ornament,
.desktop-ronda-chips,
.desktop-ronda-next,
.qt-sub,
.desktop-kas-pills,
.desktop-jimp-meta,
.home-cctv-cams,
.footer-brand-icon {
  display: none;
}

.ronda-hero-footer {
  display: contents;
}

@media (min-width: 1024px) {
  /* Modern subtle architectural mesh + dot-grid backdrop */
  body.civic-app {
    background:
      radial-gradient(ellipse 68% 42% at 6% -6%, rgba(14, 165, 233, 0.14) 0%, transparent 65%),
      radial-gradient(ellipse 52% 38% at 94% 4%, rgba(99, 102, 241, 0.09) 0%, transparent 60%),
      radial-gradient(rgba(15, 57, 92, 0.055) 1px, transparent 1px),
      #f2f6fb;
    background-size: auto, auto, 24px 24px, auto;
  }

  .civic-app .topbar {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.72);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  }

  .civic-app .topbar-inner,
  .civic-container,
  .civic-app .footer-inner {
    max-width: 1060px;
  }

  .civic-container {
    padding: 1.45rem 1.25rem 3rem;
  }

  .topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .desktop-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 36px;
    padding: 0.35rem 0.82rem;
    border-radius: 999px;
    border: 1px solid #86efac;
    background: #dcfce7;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  }

  .desktop-live-pill:hover {
    background: #bbf7d0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.16);
  }

  .desktop-only-inline {
    display: inline-flex;
    color: #15803d;
    border-color: #bbf7d0;
  }

  .civic-app .desktop-nav {
    background: rgba(241, 245, 249, 0.92);
    padding: 0.28rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
  }

  .civic-app .nav-pill {
    padding: 0.45rem 0.92rem;
    border-radius: 10px;
    font-weight: 700;
  }

  .civic-app .nav-pill[aria-current="page"] {
    background: #0d263f;
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(13, 38, 63, 0.22);
  }

  /* Desktop Intro Header */
  .desktop-home-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.2rem;
  }

  .desktop-intro-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    color: #0284c7;
    margin-bottom: 0.22rem;
  }

  .desktop-intro-title {
    margin: 0;
    font-size: 1.72rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
    line-height: 1.18;
  }

  .desktop-intro-sub {
    margin: 0.28rem 0 0;
    font-size: 0.88rem;
    font-weight: 500;
    color: #64748b;
  }

  .desktop-intro-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
  }

  .desktop-intro-actions .btn-outline-pill,
  .desktop-intro-actions .btn-navy-pill {
    min-height: 40px;
    padding: 0.45rem 1.05rem;
    border-radius: 12px;
    font-size: 0.84rem;
  }

  /* Strict Top-to-Bottom Vertical Stack on Desktop */
  .home-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
  }

  .home-col-primary,
  .home-col-secondary {
    display: contents;
  }

  .ronda-hero-card { order: 1; }
  .quick-tiles { order: 2; }
  .home-cctv-card { order: 3; }
  .kas-split-card { order: 4; }
  .home-kabar-card { order: 5; }
  .home-cta-bar { order: 6; }

  /* 01. Ronda Hero Showcase */
  .ronda-hero-card {
    position: relative;
    overflow: hidden;
    padding: 1.55rem 1.75rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #081b33 0%, #103a68 55%, #155386 100%);
    box-shadow: 0 16px 36px rgba(13, 38, 63, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-civic-ornament {
    display: block;
    position: absolute;
    right: -12px;
    top: -18px;
    width: 270px;
    height: 230px;
    color: #7dd3fc;
    pointer-events: none;
  }

  .ronda-hero-top {
    position: relative;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
  }

  .ronda-hero-title {
    position: relative;
    font-size: 2.15rem;
  }

  .ronda-hero-leader {
    position: relative;
    font-size: 0.98rem;
    color: #bae6fd;
  }

  #home-ronda-summary {
    display: none;
  }

  .desktop-ronda-chips {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.85rem;
  }

  .dr-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.72rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 600;
  }

  .dr-chip.is-ketua {
    background: rgba(245, 158, 11, 0.2);
    border-color: #fbbf24;
    color: #fef3c7;
    font-weight: 800;
  }

  .ronda-hero-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.15rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .desktop-ronda-next {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    font-size: 0.82rem;
    font-weight: 600;
  }

  .ronda-hero-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0;
    flex-shrink: 0;
  }

  .ronda-hero-actions .btn-hero-light,
  .ronda-hero-actions .btn-hero-dark {
    min-width: 156px;
    padding: 0.55rem 1.1rem;
    position: relative;
    overflow: hidden;
  }

  /* 02. 4 Quick Action Cards */
  .quick-tiles {
    gap: 0.9rem;
  }

  .quick-tile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.12rem;
    align-items: center;
    justify-items: start;
    text-align: left;
    padding: 0.95rem 1rem;
    min-height: 80px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.2s ease;
  }

  .quick-tile:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(15, 57, 92, 0.09);
  }

  .qt-icon {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .quick-tile:hover .qt-icon {
    transform: scale(1.06);
  }

  .qt-label {
    font-size: 0.92rem;
    font-weight: 800;
    align-self: end;
  }

  .qt-sub {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
    align-self: start;
  }

  /* 03. CCTV Widescreen Spotlight */
  .home-cctv-card {
    padding: 1.3rem 1.45rem;
    border-radius: 22px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.05);
  }

  .home-cctv-card .card-title-sm {
    font-size: 1.12rem;
  }

  .home-cctv-frame {
    border-radius: 16px;
    max-height: 460px;
    box-shadow: 0 10px 26px rgba(11, 17, 32, 0.18);
  }

  .home-cctv-cams {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.85rem;
  }

  .home-cctv-cam-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
    min-width: 0;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, background 0.2s ease, box-shadow 0.22s ease;
  }

  .home-cctv-cam-btn:hover {
    transform: translateY(-2px);
    background: #ffffff;
    border-color: #7dd3fc;
    box-shadow: 0 8px 18px rgba(2, 132, 199, 0.1);
  }

  .home-cctv-cam-thumb {
    width: 108px;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    flex-shrink: 0;
  }

  .home-cctv-cam-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .home-cctv-cam-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
  }

  .home-cctv-cam-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-cctv-cam-status {
    font-size: 0.74rem;
    font-weight: 700;
    color: #64748b;
  }

  .home-cctv-cam-status.is-live {
    color: #15803d;
  }

  /* 04. Kas Utama & Jimpitan 2-Card Finance Band */
  .kas-split-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .kas-split-divider {
    display: none;
  }

  .kas-split-col {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 1.35rem 1.45rem;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease, border-color 0.2s ease;
  }

  .kas-split-col::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
  }

  .kas-split-col.kas-split-jimpitan {
    background: linear-gradient(155deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #bbf7d0;
  }

  .kas-split-col.kas-split-jimpitan::before {
    background: linear-gradient(90deg, #16a34a, #34d399);
  }

  .kas-split-col:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 57, 92, 0.09);
  }

  .kas-split-col.kas-split-jimpitan:hover {
    background: linear-gradient(155deg, #ffffff 0%, #ecfdf5 100%);
  }

  .kas-split-kicker {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .kas-split-col.kas-split-jimpitan .kas-split-kicker {
    color: #15803d;
  }

  .kas-split-val {
    font-size: 1.75rem;
    margin: 0.22rem 0 0.45rem;
  }

  .desktop-kas-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
  }

  .dk-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.62rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
  }

  .dk-pill-in { background: #dcfce7; color: #166534; }
  .dk-pill-out { background: #ffedd5; color: #9a3412; }

  .desktop-jimp-meta {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.55rem;
  }

  /* 05. Kabar & Pengumuman Warga */
  .home-kabar-card {
    padding: 1.3rem 1.45rem;
    border-radius: 22px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.045);
  }

  .home-kabar-card .card-title-sm {
    font-size: 1.08rem;
  }

  .home-kabar-card .kabar-compact-list {
    gap: 0.55rem;
  }

  .home-kabar-card .kabar-compact-row {
    padding: 0.78rem 1rem;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  }

  .home-kabar-card .kabar-compact-row:hover {
    background: #ffffff;
    border-color: #93c5fd;
    transform: translateX(3px);
  }

  /* 06. CTA Banner Pengurus RT */
  .home-cta-bar {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b 0%, #0f766e 100%);
    border: 0;
    border-radius: 20px;
    padding: 1.3rem 1.65rem;
    box-shadow: 0 12px 28px rgba(6, 78, 59, 0.18);
  }

  .home-cta-text {
    color: #ffffff;
    font-size: 1.04rem;
    font-weight: 800;
  }

  .home-cta-sub {
    color: #a7f3d0;
    font-size: 0.84rem;
  }

  .home-cta-bar .btn-wa-green {
    background: #ffffff;
    color: #064e3b;
    font-weight: 800;
    min-height: 44px;
    padding: 0.55rem 1.35rem;
    border-radius: 12px;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
  }

  .home-cta-bar .btn-wa-green:hover {
    background: #ecfdf5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  }

  .footer-brand-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
  }

  .footer-brand-icon {
    display: block;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--rule);
    object-fit: contain;
  }
}

/* ==================== DESKTOP MOTION & SCROLL REVEALS ==================== */
@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  @keyframes civic-rise {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
  }

  @keyframes beacon-ring {
    0% {
      transform: scale(1);
      opacity: 0.65;
    }
    75%, 100% {
      transform: scale(2.5);
      opacity: 0;
    }
  }

  @keyframes hero-ornament-float {
    from {
      transform: translate3d(0, 0, 0) scale(1);
    }
    to {
      transform: translate3d(-8px, 6px, 0) scale(1.04);
    }
  }

  .live-dot-green {
    position: relative;
  }

  .live-dot-green::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #22c55e;
    animation: beacon-ring 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    pointer-events: none;
  }

  .hero-civic-ornament {
    animation: hero-ornament-float 11s ease-in-out infinite alternate;
  }

  .desktop-home-intro {
    animation: civic-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .ronda-hero-card {
    animation: civic-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 60ms backwards;
  }

  .quick-tiles {
    animation: civic-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 120ms backwards;
  }

  .home-cctv-card {
    animation: civic-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 180ms backwards;
  }

  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes civic-scroll-enter {
      from {
        opacity: 0.25;
        transform: translateY(18px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .kas-split-card,
    .home-kabar-card,
    .home-cta-bar {
      animation: civic-scroll-enter auto linear both;
      animation-timeline: view(block);
      animation-range: entry 0% entry 35%;
    }
  }

  @supports not ((animation-timeline: view()) and (animation-range: entry)) {
    .kas-split-card {
      animation: civic-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 240ms backwards;
    }
    .home-kabar-card {
      animation: civic-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 290ms backwards;
    }
    .home-cta-bar {
      animation: civic-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 340ms backwards;
    }
  }

  .view-section:not([hidden]) {
    animation: civic-rise 0.36s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }
}

/* Status Pantauan Hujan & Sungai Pos Ronda */
.river-status-strip {
  margin-top: 0.55rem;
  padding: 0.48rem 0.72rem;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}
.river-status-strip.is-normal {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.river-status-strip.is-waspada,
.river-status-strip.is-siaga {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.river-status-strip.is-bahaya {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.river-status-main {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-weight: 700;
}
.river-status-meta {
  font-size: 0.72rem;
  opacity: 0.85;
}
