@import url('variables.css');

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Layout — Admin (sidebar + content) ─────────────────── */
.layout-admin {
  display: block;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--color-primary-dark);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-brand {
  padding: var(--space-6) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand-name {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text-inverse);
  letter-spacing: -0.3px;
  text-transform: capitalize;
}
.brand-company {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-primary-light);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.sidebar-nav {
  flex: 1;
  padding: var(--space-4) 0;
}
.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: rgba(255,255,255,0.75);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.sidebar-nav .nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: var(--color-text-inverse);
  border-left-color: var(--color-primary-light);
  text-decoration: none;
}
.sidebar-nav .nav-item.active {
  background: rgba(82,183,136,0.15);
  color: var(--color-text-inverse);
  border-left-color: var(--color-primary-light);
}
.sidebar-nav .nav-section {
  padding: var(--space-4) var(--space-5) var(--space-2);
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-footer .user-name {
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.sidebar-footer .logout-link {
  font-size: var(--font-size-xs);
  color: rgba(255,255,255,0.5);
  transition: color var(--transition-fast);
}
.sidebar-footer .logout-link:hover { color: var(--color-danger); text-decoration: none; }

/* ── Layout — User (topbar + content) ───────────────────── */
.layout-user {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  z-index: 100;
}
.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.topbar-brand .brand-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-primary-dark);
}
.topbar-brand .brand-company {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.topbar-nav .nav-item {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--border-radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
}
.topbar-nav .nav-item:hover {
  background: var(--color-surface);
  color: var(--color-primary);
  text-decoration: none;
}
.topbar-nav .nav-item.active {
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* ── Main Content ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: var(--space-8);
  padding-top: calc(var(--topbar-height) + var(--space-6));
}
.user-main-content {
  margin-top: var(--topbar-height);
  padding: var(--space-8);
  flex: 1;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
}
.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}
.card-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text-primary);
}
.card-body { }

.stat-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}
.stat-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ── Tables ──────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--color-border);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}
.data-table th {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-weight: 600;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-border);
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--color-primary); }
.data-table th.sort-asc::after { content: ' ↑'; }
.data-table th.sort-desc::after { content: ' ↓'; }
.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-primary);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--color-surface); }
.data-table .actions { display: flex; gap: var(--space-2); align-items: center; }
.table-empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-muted);
}

/* Spreadsheet-style table — gridded cells, zebra rows, sticky header, right-aligned numbers */
.sheet-table { border-collapse: collapse; }
.sheet-table th,
.sheet-table td { border: 1px solid var(--color-border); }
.sheet-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--color-surface);
}
.sheet-table tbody tr:nth-child(even) { background: #FAFCFA; }
.sheet-table tbody tr:hover { background: var(--color-surface); }
.sheet-table .num { text-align: right; white-space: nowrap; }

/* Stacked record view — each field on its own line (Expenses) */
.expense-stack-list { display: flex; flex-direction: column; gap: var(--space-3); }
.expense-stack { padding: var(--space-4); }
.stack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.stack-title { font-weight: 700; font-size: var(--font-size-base); color: var(--color-text-primary); }
.stack-row {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-1) 0;
  font-size: var(--font-size-sm);
  border-bottom: 1px dashed var(--color-border);
}
.stack-row:last-of-type { border-bottom: none; }
.stack-k { flex: 0 0 120px; color: var(--color-text-muted); font-weight: 500; }
.stack-v { flex: 1; min-width: 0; color: var(--color-text-primary); word-break: break-word; }
.stack-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* ── Filter/Search Bar ───────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.filter-bar .form-input { max-width: 280px; }
.filter-bar .form-select { max-width: 180px; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}
.form-label .required { color: var(--color-danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.form-error { font-size: var(--font-size-xs); color: var(--color-danger); display: none; }
.form-group.has-error .form-input,
.form-group.has-error .form-select,
.form-group.has-error .form-textarea {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(197,48,48,0.1);
}
.form-group.has-error .form-error { display: block; }
/* Some pages (expenses, payments, industries) flag the input directly with
   .is-invalid instead of .has-error on the group — support both so their
   inline validation errors are actually visible. */
.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 3px rgba(197,48,48,0.1);
}
.is-invalid + .form-error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

/* ── Password Toggle ─────────────────────────────────────── */
.pw-wrapper { position: relative; display: block; }
.pw-wrapper > .form-input { padding-right: 40px; }
.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition-fast);
  line-height: 1;
}
.pw-toggle:hover { color: var(--color-primary); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:disabled, .btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
}
.btn-primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover { background: var(--color-surface); }
.btn-danger {
  background: var(--color-danger);
  color: var(--color-text-inverse);
  border-color: var(--color-danger);
}
.btn-danger:hover { background: #9B2C2C; border-color: #9B2C2C; }
.btn-success {
  background: var(--color-accent, #52B788);
  color: var(--color-text-inverse);
  border-color: var(--color-accent, #52B788);
}
.btn-success:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--color-surface); color: var(--color-primary); }
.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--font-size-xs); }
.btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--font-size-base); }
.btn-icon { padding: var(--space-2); border-radius: var(--border-radius-md); }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: 20px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info); }
.badge-gray    { background: #EDF2F7; color: #4A5568; }
.badge-primary { background: var(--color-surface); color: var(--color-primary); }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.alert-success { background: var(--color-success-bg); color: var(--color-success); border-color: #B7DFC5; }
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning); border-color: #F6D860; }
.alert-danger  { background: var(--color-danger-bg);  color: var(--color-danger);  border-color: #FEB2B2; }
.alert-info    { background: var(--color-info-bg);    color: var(--color-info);    border-color: #BEE3F8; }

/* ── Toasts ──────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 360px;
}
.toast {
  background: var(--color-white);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  border-left: 4px solid var(--color-primary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  animation: slideInRight 0.25s ease;
}
.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-warning { border-left-color: var(--color-warning); }
.toast.toast-danger  { border-left-color: var(--color-danger); }
.toast.toast-info    { border-left-color: var(--color-info); }
.toast-content { flex: 1; }
.toast-title { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text-primary); }
.toast-message { font-size: var(--font-size-xs); color: var(--color-text-secondary); margin-top: 2px; }
.toast-close {
  background: none; border: none; cursor: pointer;
  color: var(--color-text-muted); font-size: 16px; padding: 0; line-height: 1;
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  animation: fadeIn 0.15s ease;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s ease;
}
.modal-lg { max-width: 720px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.modal-title { font-size: var(--font-size-lg); font-weight: 600; }
.modal-close {
  font-size: 20px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.modal-close:hover { color: var(--color-danger); }
.modal-body { padding: var(--space-6); overflow-y: auto; flex: 1; }
.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
}
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Notification Bell ───────────────────────────────────── */
.notification-bell {
  position: relative;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  transition: background var(--transition-fast);
}
.notification-bell:hover { background: var(--color-surface); }
.notification-bell svg, .notification-bell .bell-icon { font-size: 20px; }
.badge-dot {
  position: absolute;
  top: 4px; right: 4px;
  min-width: 16px;
  height: 16px;
  background: var(--color-danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--color-white);
}
.badge-dot.hidden { display: none; }

/* ── Loading States ──────────────────────────────────────── */
.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-spinner.dark {
  border-color: rgba(45,106,79,0.2);
  border-top-color: var(--color-primary);
}
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--border-radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Utilities ───────────────────────────────────────────── */
.text-muted    { color: var(--color-text-muted); }
.text-secondary{ color: var(--color-text-secondary); }
.text-danger   { color: var(--color-danger); }
.text-success  { color: var(--color-success); }
.text-primary  { color: var(--color-primary); }
.text-sm  { font-size: var(--font-size-sm); }
.text-xs  { font-size: var(--font-size-xs); }
.text-lg  { font-size: var(--font-size-lg); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.d-flex     { display: flex; }
.d-grid     { display: grid; }
.d-none     { display: none; }
.d-block    { display: block; }
/* Global hide utility — used to toggle tab panels (e.g. Payments Projects tab).
   Only scoped .modal-overlay/.badge-dot/.user-assign-panel variants existed,
   so a plain `class="hidden"` element never actually hid. */
.hidden     { display: none !important; }
.align-center    { align-items: center; }
.align-start     { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.flex-col   { flex-direction: column; }
.flex-1     { flex: 1; }
.flex-wrap  { flex-wrap: wrap; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.ml-auto { margin-left: auto; }

.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

.w-full   { width: 100%; }
.h-full   { height: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only  { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .layout-admin { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform var(--transition-base); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: var(--space-4); }
  .form-row { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-input, .filter-bar .form-select { max-width: 100%; }
  .topbar { padding: 0 var(--space-4); }
}
