:root {
  --bg-page: #F5F5F7;
  --bg-surface: #FFFFFF;
  --bg-subtle: #ECECEF;
  --bg-selected: #E8F2FC;
  --text-primary: #1D1D1F;
  --text-secondary: #515154;
  --text-muted: #636366;
  --accent: #0071E3;
  --accent-hover: #005BB5;
  --accent-contrast: #FFFFFF;
  --border-subtle: #D2D2D7;
  --border-interactive: #737378;
  --border-active: #0071E3;
  --status-success-bg: #ECFDF5;
  --status-success-text: #065F46;
  --status-success-border: #059669;
  --status-error-bg: #FEF2F2;
  --status-error-text: #991B1B;
  --status-error-border: #DC2626;
  --shadow-elevated: 0 10px 28px rgba(0, 0, 0, 0.12);
  --radius-card: 14px;
  --radius-control: 10px;
  --radius-tag: 6px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, "IBM Plex Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-page: #121212;
  --bg-surface: #1C1C1E;
  --bg-subtle: #2C2C2E;
  --bg-selected: #182436;
  --text-primary: #F5F5F7;
  --text-secondary: #D1D1D6;
  --text-muted: #AEAEB2;
  --accent: #409CFF;
  --accent-hover: #64B5F6;
  --accent-contrast: #121212;
  --border-subtle: #38383A;
  --border-interactive: #8E8E93;
  --border-active: #409CFF;
  --status-success-bg: #064E3B;
  --status-success-text: #D1FAE5;
  --status-success-border: #34D399;
  --status-error-bg: #7F1D1D;
  --status-error-text: #FEE2E2;
  --status-error-border: #F87171;
  --shadow-elevated: 0 12px 32px rgba(0, 0, 0, 0.55);
}

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

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

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1rem);
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Visible high-contrast focus ring for keyboard navigation (R-32) */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  border-radius: var(--radius-control);
  text-decoration: none;
}

.skip-link:focus-visible {
  top: 12px;
}

/* Topbar & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  min-height: 44px;
  padding: 4px 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-domain {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  background-color: var(--bg-subtle);
}

.nav-link.active {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-tag);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.nav-link.active .nav-badge {
  background-color: var(--accent-contrast);
  color: var(--accent);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-btn:hover {
  background-color: var(--bg-subtle);
}

/* Main Page Container */
.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 164px;
}

.page-shell.payment-shell {
  padding-bottom: 64px;
}

/* Intro Banner (iCloud Clean Surface Header) */
.intro-banner {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: clamp(18px, 3vw, 28px);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.intro-top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intro-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
}

.intro-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(0.875rem, 0.85rem + 0.2vw, 0.96875rem);
  max-width: 68ch;
}

.intro-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.intro-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.intro-meta-list strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  background-color: var(--bg-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-tag);
}

.intro-direct-pay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background-color: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.intro-direct-pay:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Workspace Split Grid */
.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

/* Filter & Search Toolbar */
.catalog-controls {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-input-wrap {
  position: relative;
  flex: 1 1 240px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 44px 10px 40px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.clear-search-btn {
  position: absolute;
  right: 4px;
  min-width: 38px;
  min-height: 38px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-tag);
  display: none;
  align-items: center;
  justify-content: center;
}

.clear-search-btn.visible {
  display: inline-flex;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius-control);
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

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

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

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

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-page);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.cat-tab:hover {
  background-color: var(--bg-subtle);
}

.cat-tab.active {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.cat-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Catalog Status Bar */
.catalog-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Map Catalog List */
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.map-item.selected {
  background-color: var(--bg-selected);
  border-color: var(--border-active);
  border-width: 1.5px;
}

.map-item-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.map-check-btn {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-control);
  border: 1.5px solid var(--border-interactive);
  background-color: var(--bg-page);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.map-item.selected .map-check-btn {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

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

.map-meta-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.map-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-tag);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.map-category-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.map-title {
  margin: 0;
  font-size: 0.96875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.map-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.96875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.map-price-unit {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover {
  background-color: var(--bg-subtle);
}

.qty-val {
  min-width: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.9375rem;
}

.select-toggle-btn {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.select-toggle-btn:hover {
  background-color: var(--bg-subtle);
}

/* UI States: Loading, Empty, Error (R-27) */
.state-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.state-card.error {
  background-color: var(--status-error-bg);
  border-color: var(--status-error-border);
  color: var(--status-error-text);
}

.state-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.state-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 46ch;
}

.state-card.error .state-desc {
  color: var(--status-error-text);
}

/* Order Summary Panel (Right Column on Desktop / Modal & Sticky Bar on Mobile) */
.summary-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.summary-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
}

.selected-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}

.selected-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8125rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-subtle);
}

.selected-row-name {
  color: var(--text-primary);
  font-weight: 600;
}

.selected-row-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.summary-total-box {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-total-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.summary-total-amount {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Customer Project Form inside Summary */
.customer-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Sticky Mobile Checkout Bar */
.sticky-checkout-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background-color: var(--bg-surface);
  border-top: 1.5px solid var(--border-interactive);
  box-shadow: var(--shadow-elevated);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
}

.sticky-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sticky-bar-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sticky-bar-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sticky-bar-total {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sticky-bar-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Payment Page Specific Styles (payment.html) */
.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.method-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.method-card.active {
  border-color: var(--border-active);
  border-width: 1.5px;
}

.method-head {
  width: 100%;
  min-height: 68px;
  padding: 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
}

.method-head:hover {
  background-color: var(--bg-subtle);
}

.method-badge {
  width: 48px;
  height: 44px;
  border-radius: var(--radius-control);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.method-badge.qris {
  background-color: var(--bg-selected);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.method-badge.bca {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

.method-title-group {
  flex: 1;
  min-width: 0;
}

.method-name {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.method-sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.method-chevron {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.method-card.active .method-chevron {
  transform: rotate(180deg);
}

.method-body {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--border-subtle);
}

.method-card.active .method-body {
  display: block;
}

/* Account Box & Privacy Blur */
.account-box {
  margin-top: 16px;
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border-interactive);
  border-radius: var(--radius-control);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.account-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.account-number {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.account-owner-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.owner-name-secure {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.blur-segment {
  display: inline-block;
  padding: 0 3px;
  border-radius: 3px;
  background-color: var(--border-subtle);
  color: var(--text-muted);
  filter: blur(3.2px);
  user-select: none;
}

.security-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-tag);
}

/* QRIS Frame */
.qris-container {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.qris-merchant-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qris-merchant-name {
  font-size: 1rem;
  font-weight: 800;
}

.qris-nmid {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.qris-frame {
  width: min(320px, 100%);
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-interactive);
  border-radius: var(--radius-card);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qris-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.qris-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

/* Modal Dialog (QRIS Zoom / Mobile Summary) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background-color: rgba(0, 0, 0, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-interactive);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-elevated);
  width: min(520px, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 800;
}

.modal-close-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-interactive);
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-weight: 700;
  cursor: pointer;
}

/* Toast Notification */
.toast-banner {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 16px);
  z-index: 150;
  background-color: var(--status-success-bg);
  color: var(--status-success-text);
  border: 1.5px solid var(--status-success-border);
  border-radius: var(--radius-control);
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.toast-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 16px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Responsive Breakpoint 1: Tablet / Medium Widths (640px to 1023px) */
@media (min-width: 640px) {
  .header-inner {
    padding: 12px 24px;
  }

  .page-shell {
    padding: 24px 24px 164px;
  }

  .map-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
  }

  .map-footer {
    border-top: none;
    padding-top: 0;
    flex-shrink: 0;
    gap: 16px;
  }
}

/* Responsive Breakpoint 2: Desktop / Wide Widths (>= 1024px) */
@media (min-width: 1024px) {
  .page-shell {
    padding: 28px 24px 64px;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
  }

  .summary-panel-sticky {
    position: sticky;
    top: 84px;
  }

  .sticky-checkout-bar {
    display: none;
  }

  .toast-banner {
    bottom: 32px;
  }
}
