/* ==========================================================================
   OnDuty — Event Crew Agency Design System (PRD v1.1 Bab 10 & Bab 11)
   Warna: Hitam #111111 (30%), Putih #FFFFFF / Abu #F5F5F5 (60%), Oranye #F97316 (10%)
   Mobile-first: diuji di 360px, 768px, 1280px tanpa horizontal overflow
   ========================================================================== */

:root {
  --black: #111111;
  --black-soft: #1f1f1f;
  --black-muted: #2d2d2d;
  --orange: #f97316;
  --orange-hover: #ea580c;
  --orange-text-on-light: #c2410c; /* WCAG AA 5.2:1 on #FFFFFF */
  --orange-soft: #ffedd5;
  --white: #ffffff;
  --gray-bg: #f5f5f5;
  --gray-border: #e5e5e5;
  --gray-text: #4b5563; /* WCAG AA 7.5:1 on #FFFFFF */
  --green: #15803d; /* WCAG AA 5.1:1 on #FFFFFF */
  --green-bg: #dcfce7;
  --red: #b91c1c; /* WCAG AA 6.5:1 on #FFFFFF */
  --red-bg: #fee2e2;
  --blue: #1d4ed8;
  --blue-bg: #dbeafe;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(17, 17, 17, 0.08);
  --shadow-md: 0 6px 20px rgba(17, 17, 17, 0.08);
  --shadow-lg: 0 14px 32px rgba(17, 17, 17, 0.14);

  --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1180px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--black);
  background-color: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.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;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 1.5rem;
  }
}

/* ======================== HEADER & NAVIGATION ======================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--black);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 64px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-chip {
  background: var(--white);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
}

.brand-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.site-nav {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.75rem 1rem 1rem;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow-lg);
}

.site-nav.is-open {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e5e7eb;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-link[aria-current='page'] {
  background: rgba(249, 115, 22, 0.16);
  color: var(--orange);
}

.nav-auth-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--black-muted);
  color: var(--white);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

  .site-nav {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border-bottom: 0;
    padding: 0;
    box-shadow: none;
    gap: 0.25rem;
  }

  .nav-auth-area {
    margin-top: 0;
    padding-top: 0;
    margin-left: 0.5rem;
    padding-left: 0.75rem;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
  }
}

/* Demo banner */
.demo-banner {
  background: var(--orange-soft);
  color: var(--black);
  border-bottom: 1px solid #fdba74;
  font-size: 0.84rem;
  padding: 0.45rem 0;
}

.demo-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ======================== EVENT TICKER (BAB 11) ======================== */

.ticker-bar {
  background: var(--black-soft);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 0.5rem;
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ticker-label {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--orange);
  color: var(--black);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
}

@media (prefers-reduced-motion: no-preference) {
  .ticker-track.is-animated {
    animation: tickerScroll 28s linear infinite;
  }
}

.ticker-track.is-paused {
  animation-play-state: paused !important;
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  white-space: nowrap;
  color: #f3f4f6;
}

.ticker-pause-btn {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
}

.ticker-pause-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ======================== BUTTONS ======================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
  }
  .btn:active:not(:disabled) {
    transform: scale(0.98);
  }
}

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

/* WCAG AAA: #111111 on #F97316 = 7.5:1 */
.btn-primary {
  background: var(--orange);
  color: var(--black);
}

.btn-primary:hover:not(:disabled) {
  background: var(--orange-hover);
  color: var(--white);
}

.btn-dark {
  background: var(--black);
  color: var(--white);
}

.btn-dark:hover:not(:disabled) {
  background: var(--black-muted);
}

.btn-outline {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}

.btn-outline:hover:not(:disabled) {
  background: var(--gray-bg);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: #fca5a5;
}

.btn-danger:hover:not(:disabled) {
  background: var(--red);
  color: var(--white);
}

.btn-sm {
  min-height: 36px;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
}

/* ======================== HERO & LIVING CLOCK LOGO ======================== */

.hero-section {
  background: var(--white);
  padding-block: 2.5rem 3rem;
  border-bottom: 1px solid var(--gray-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-section {
    padding-block: 3.5rem 4rem;
  }
  .hero-grid {
    grid-template-columns: 1.25fr 0.9fr;
    gap: 3rem;
  }
}

/* Living logo lockup: Clock SVG strictly SEPARATE from letter O in ONDUTY (PRD 2.1) */
.hero-logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.hero-clock-svg {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .hero-clock-svg {
    width: 82px;
    height: 82px;
  }
}

.clock-hand-moving {
  transform-origin: 50px 50px;
}

@media (prefers-reduced-motion: no-preference) {
  .clock-hand-moving {
    animation: clockHandRotate 60s linear infinite;
  }
}

@keyframes clockHandRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.hero-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.hero-wordmark-main {
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--black);
}

.hero-wordmark-o {
  color: var(--orange);
}

.hero-wordmark-tagline {
  font-size: clamp(0.7rem, 1.8vw, 0.92rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--black);
  margin-top: 0.3rem;
}

.hero-title {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 1rem;
  color: var(--black);
}

.hero-subtitle {
  font-size: 1.03rem;
  color: var(--gray-text);
  margin: 0 0 1.5rem;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-vest-card {
  background: var(--gray-bg);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
}

.hero-vest-img {
  border-radius: var(--radius-md);
  margin-inline: auto;
  max-height: 290px;
  object-fit: contain;
}

.hero-vest-caption {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--gray-text);
}

/* ======================== SECTIONS & CARDS ======================== */

.section {
  padding-block: 2.75rem;
}

.section-gray {
  background: var(--gray-bg);
}

.section-dark {
  background: var(--black);
  color: var(--white);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-text-on-light);
  margin-bottom: 0.35rem;
}

.section-dark .section-eyebrow {
  color: var(--orange);
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}

.section-desc {
  margin: 0.4rem 0 0;
  color: var(--gray-text);
  max-width: 62ch;
}

.section-dark .section-desc {
  color: #d1d5db;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

@media (prefers-reduced-motion: no-preference) {
  .card-interactive {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  }
  .card-interactive:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #d4d4d4;
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

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

/* ======================== CLIENT DASHBOARD STATS (BAB 7) ======================== */

.stat-card {
  background: var(--black-soft);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-number {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--orange); /* 7.5:1 on #1F1F1F */
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.stat-source {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Admin summary light cards */
.kpi-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--black);
  line-height: 1.1;
}

.kpi-value-accent {
  color: var(--orange-text-on-light);
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--gray-text);
  margin-top: 0.25rem;
}

/* ======================== STATUS BADGES & ON DUTY PULSE ======================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

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

.badge-orange {
  background: var(--orange-soft);
  color: var(--orange-text-on-light);
}

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

.badge-dark {
  background: var(--black);
  color: var(--white);
}

.badge-gray {
  background: var(--gray-bg);
  color: var(--gray-text);
  border: 1px solid var(--gray-border);
}

.badge-blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.onduty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-block;
}

@media (prefers-reduced-motion: no-preference) {
  .onduty-dot {
    animation: onDutyPulse 1.8s ease-in-out infinite;
  }
}

@keyframes onDutyPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.35);
  }
}

/* ======================== PROGRESS BAR SLOT ======================== */

.slot-progress {
  width: 100%;
  height: 10px;
  background: var(--gray-bg);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
}

.slot-progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background-color 0.25s ease;
}

.slot-progress-bar.is-available {
  background: var(--green);
}

.slot-progress-bar.is-almost {
  background: var(--orange);
}

.slot-progress-bar.is-full {
  background: var(--red);
}

/* ======================== SKELETON LOADING (BAB 11) ======================== */

.skeleton {
  background: #e5e7eb;
  border-radius: 6px;
  min-height: 1.25rem;
}

.section-dark .skeleton {
  background: #374151;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton {
    animation: skeletonPulse 1.4s ease-in-out infinite;
  }
}

@keyframes skeletonPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ======================== FORMS & ACCESSIBLE VALIDATION ======================== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

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

.field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--black);
}

.hint {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-text);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.textarea {
  min-height: 88px;
  resize: vertical;
}

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

/* Validate after interaction (:user-invalid + fallback via :is()) */
:is(.input, .select, .textarea):is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--red);
  background-color: #fef2f2;
}

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

:is(.input, .select, .textarea):is(:user-valid, .user-valid-fallback) {
  border-color: var(--green);
}

.consent-box {
  background: var(--gray-bg);
  border: 1.5px solid var(--gray-border);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.consent-box input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--orange);
}

/* ======================== RESPONSIVE CONTAINER TABLES ======================== */

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 75vh);
  container-type: inline-size;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-md);
  background: var(--white);
}

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

.data-table caption {
  text-align: left;
  font-weight: 700;
  padding: 0.85rem 1rem;
  background: var(--gray-bg);
  border-bottom: 1px solid var(--gray-border);
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: var(--black);
  color: var(--white);
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-border);
  vertical-align: top;
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--white);
  font-weight: 700;
  z-index: 1;
}

@container (width < 600px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    margin: 0.75rem;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--white);
  }

  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--gray-bg);
    border-bottom: 1px solid var(--gray-border);
  }

  .data-table td {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border-bottom: 1px solid #f3f4f6;
  }

  .data-table td::before {
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gray-text);
  }
}

/* ======================== TABS ======================== */

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--gray-border);
  padding-bottom: 0.75rem;
}

.tab-btn {
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-border);
  background: var(--white);
  color: var(--black);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}

.tab-btn[aria-selected='true'] {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* ======================== NATIVE MODAL DIALOG ======================== */

dialog {
  padding: 0;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  max-width: min(560px, calc(100vw - 2rem));
  width: 100%;
  box-shadow: var(--shadow-lg);
  background: var(--white);
  color: var(--black);
}

dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgba(17, 17, 17, 0.65);
  overflow: hidden;
  overscroll-behavior: contain;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-border);
}

.dialog-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.dialog-body {
  padding: 1.25rem;
  overflow-y: auto;
  max-height: 70vh;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--gray-border);
  background: var(--gray-bg);
}

/* ======================== TOAST FEEDBACK (BAB 11) ======================== */

.toast-region {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  left: 1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}

@media (min-width: 640px) {
  .toast-region {
    left: auto;
    max-width: 390px;
  }
}

.toast {
  pointer-events: auto;
  width: 100%;
  background: var(--black);
  color: var(--white);
  border-left: 4px solid var(--orange);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
}

.toast.is-success {
  border-left-color: #22c55e;
}

.toast.is-error {
  border-left-color: #ef4444;
}

/* ======================== VIEWS & FOOTER ======================== */

.view-panel {
  display: none;
}

.view-panel.is-active {
  display: block;
}

.wa-community-card {
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--orange);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.live-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-text);
  background: var(--gray-bg);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.site-footer {
  background: var(--black);
  color: #d1d5db;
  padding-block: 2.5rem 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

.footer-heading {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Utility helpers */
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-md { display: flex; flex-direction: column; gap: 1rem; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.text-muted { color: var(--gray-text); }
.text-sm { font-size: 0.86rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
