@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --color-primary:      #635BFF;
  --color-primary-dark: #4F46E5;
  --color-primary-light:#EEF2FF;
  --color-success:      #0EA968;
  --color-success-bg:   #ECFDF5;
  --color-warning:      #E8A000;
  --color-warning-bg:   #FFFBEB;
  --color-danger:       #DF1B41;
  --color-danger-bg:    #FFF1F2;
  --color-info:         #3B82F6;
  --color-info-bg:      #EFF6FF;
  --color-bg:           #F6F9FC;
  --color-surface:      #FFFFFF;
  --color-border:       #E3E8EF;
  --color-text:         #1A1F36;
  --color-text-muted:   #697386;
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
}

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

html { font-size: 14px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

/* ── Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.logo-icon {
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--color-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .15s;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--color-text);
  background: var(--color-bg);
}

.nav-item.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  background: var(--color-primary-light);
}

.nav-item svg { flex-shrink: 0; opacity: .7; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 30px;
  height: 30px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--color-text-muted); text-transform: capitalize; }

.main-content {
  margin-left: 220px;
  flex: 1;
  padding: 32px;
  min-height: 100vh;
}

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title { font-size: 20px; font-weight: 600; }
.page-subtitle { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Card ── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
}

.card-body { padding: 20px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

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

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--color-bg);
  border-color: #c4ccd8;
}

.btn-success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}
.btn-success:hover:not(:disabled) { filter: brightness(.92); }

.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border-color: var(--color-border);
}
.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
}

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 20px; font-size: 14px; }
.btn-icon { padding: 6px; }

/* ── Form elements ── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 5px;
}

.form-label .required { color: var(--color-danger); margin-left: 2px; }

.form-control {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99,91,255,.18);
}

.form-control.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(223,27,65,.15);
}

textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

.form-hint {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--color-danger);
  margin-top: 4px;
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Table ── */
.table-wrapper { overflow-x: auto; }

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

thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #FAFBFC; }

/* .row-actions { opacity: 0; transition: opacity .15s; } */
tbody tr:hover .row-actions { opacity: 1; }

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.badge-incomplete {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.badge-incomplete .badge-dot { background: var(--color-warning); }

.badge-complete {
  background: var(--color-success-bg);
  color: var(--color-success);
}
.badge-complete .badge-dot { background: var(--color-success); }

.badge-pushed {
  background: var(--color-info-bg);
  color: var(--color-info);
}
.badge-pushed .badge-dot { background: var(--color-info); }

/* ── Progress bar ── */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--color-border);
  border-radius: 100px;
  overflow: hidden;
  min-width: 80px;
}

.progress-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--color-primary);
  transition: width .3s;
}

.progress-fill.complete { background: var(--color-success); }
.progress-label { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }

/* ── Auth pages ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 36px 32px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo .logo-icon { width: 36px; height: 36px; font-size: 16px; }
.auth-logo span { font-size: 17px; font-weight: 700; }

.auth-heading { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.auth-subheading { font-size: 13.5px; color: var(--color-text-muted); margin-bottom: 24px; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ── Alert / toast ── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid #fecdd3;
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid #a7f3d0;
}

/* ── Merchant form layout ── */
.merchant-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto auto;
  gap: 24px;
  align-items: start;
}

.form-panel { grid-column: 1; grid-row: 1; }
.side-panel { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; gap: 20px; }
.documents-panel { grid-column: 1; grid-row: 2; }

/* ── Completeness sidebar ── */
.completeness-card { }

.completeness-checklist { list-style: none; padding: 0; }
.completeness-checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.completeness-checklist li:last-child { border-bottom: none; }
.completeness-checklist li.done { color: var(--color-text); }

.check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.check-icon.done { background: var(--color-success); color: #fff; }
.check-icon.missing { background: var(--color-border); color: var(--color-text-muted); }

.ready-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--color-success-bg);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-success);
  margin-top: 12px;
  display: none;
}

/* ── AI panel ── */
.ai-extracted-list { list-style: none; padding: 0; margin: 12px 0; }
.ai-extracted-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed var(--color-border);
}
.ai-extracted-list li:last-child { border-bottom: none; }
.ai-field-key { font-weight: 600; color: var(--color-text); min-width: 120px; }
.ai-field-val { color: var(--color-text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); flex-shrink: 0; }

/* ── Document list ── */
.doc-list { list-style: none; padding: 0; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.doc-item:last-child { border-bottom: none; }
.doc-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 13px;
  flex-shrink: 0;
}
.doc-info { flex: 1; overflow: hidden; }
.doc-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-label { font-size: 11px; color: var(--color-text-muted); }
.doc-date { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; }

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar select,
.filter-bar input {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  outline: none;
  font-family: inherit;
}

.filter-bar select:focus,
.filter-bar input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99,91,255,.18);
}

/* ── Admin table ── */
.field-key-cell { font-family: monospace; font-size: 12px; color: var(--color-text-muted); }

.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
}

.toggle-switch input { display: none; }

.toggle-track {
  width: 32px;
  height: 18px;
  background: var(--color-border);
  border-radius: 100px;
  position: relative;
  transition: background .2s;
}

.toggle-switch input:checked + .toggle-track { background: var(--color-success); }

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb { left: 16px; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,31,54,.4);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  padding: 28px;
  position: relative;
}

.modal-title { font-size: 16px; font-weight: 700; margin-bottom: 20px; }

.modal-preview { max-width: 900px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .4;
}

.empty-state-title { font-size: 15px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.empty-state-text { font-size: 13px; }

/* ── Utility ── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 12px; }
.font-mono { font-family: monospace; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Spinner ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

.spinner-dark {
  border-color: rgba(99,91,255,.3);
  border-top-color: var(--color-primary);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Notification toast ── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 16px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease;
  max-width: 320px;
}

.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-danger); }

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Drag handle ── */
.drag-handle { cursor: grab; color: var(--color-text-muted); padding: 0 4px; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; }

/* ── Tab strip ── */
.tab-strip {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px;
  padding: 0 2px;
}

.tab-btn {
  position: relative;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s, border-color .15s;
}

.tab-btn:hover { color: var(--color-text); }

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.edd-tab-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 100px;
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.edd-tab-badge.edd-badge-submitted {
  background: var(--color-success-bg);
  color: var(--color-success);
}

/* ── EDD Questionnaire ── */
.edd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.edd-doc-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.edd-submitted-notice {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.edd-section { margin-bottom: 20px; }

/* Business info 2-col grid */
.edd-biz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.edd-full-width { grid-column: 1 / -1; }

.edd-field-group { display: flex; flex-direction: column; gap: 4px; }

.edd-field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Radio / checkbox groups */
.edd-yesno {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.edd-yn-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
}

.edd-yn-label input[type="radio"],
.edd-yn-label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.edd-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 4px;
}

.edd-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--color-text);
}

.edd-check-label input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Compliance items */
.edd-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.edd-item:last-child { border-bottom: none; }

.edd-item-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 24px;
  padding-top: 1px;
}

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

.edd-item-question {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.5;
}

.edd-item-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 6px;
  font-style: italic;
}

.edd-item-note-no { color: var(--color-text-muted); }

.edd-conditional {
  margin-top: 14px;
  padding: 14px;
  background: var(--color-bg);
  border-left: 3px solid var(--color-primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Attestation */
.edd-attest-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.edd-attest-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.edd-attest-row:last-child { border-bottom: none; }

.edd-attest-question {
  font-size: 13px;
  color: var(--color-text);
  flex: 1;
  min-width: 200px;
  line-height: 1.5;
}

/* ── Mobile top bar ── */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 90;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-topbar .logo-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}

.btn-hamburger {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

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

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,31,54,.4);
  z-index: 150;
}

.sidebar-overlay.active { display: block; }

/* ── Responsive / Mobile ── */
@media (max-width: 768px) {
  .mobile-topbar { display: flex; }

  .sidebar {
    transform: translateX(-240px);
    transition: transform .25s ease;
    z-index: 200;
  }

  .sidebar.is-open { transform: translateX(0); }

  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 68px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .merchant-layout {
    grid-template-columns: 1fr;
  }

  .form-panel,
  .side-panel,
  .documents-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .form-row { grid-template-columns: 1fr; }

  /* Always show row actions on touch devices */
  .row-actions { opacity: 1; }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar select,
  .filter-bar input,
  #filter-search { width: 100% !important; }

  .modal { max-width: calc(100vw - 32px); padding: 20px; }
  .modal-overlay { padding: 16px; align-items: flex-end; }

  #toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { max-width: 100%; }

  .tab-strip { flex-wrap: wrap; }

  .edd-biz-grid { grid-template-columns: 1fr; }
  .edd-full-width { grid-column: 1; }
  .edd-toolbar { flex-direction: column; align-items: flex-start; }
}
