:root {
  --primary: #294CC5;
  --primary-600: #2341a8;
  --primary-50: #eef2ff;
  --light-blue: #83D2ED;
  --purple: #9637B8;
  --turquoise: #32C5BB;
  --dark: #20212A;
  --bg: #F5F6FC;
  --white: #ffffff;
  --text: #20212A;
  --muted: #6b7084;
  --line: rgba(32, 33, 42, 0.08);
  --shadow: 0 1px 2px rgba(32, 33, 42, 0.05), 0 8px 24px rgba(41, 76, 197, 0.06);
  --shadow-lg: 0 18px 50px rgba(32, 33, 42, 0.14);
  --radius: 16px;
  --radius-sm: 12px;
  --sidebar: 264px;
  --sidebar-collapsed: 80px;
  --header: 68px;
  --danger: #e11d48;
  --warning: #d97706;
  --success: #0f9f7a;
  --font: "Inter", system-ui, sans-serif;
  --font-ar: "Tajawal", "Inter", sans-serif;
}

[dir="rtl"] { --font: var(--font-ar); }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; }

.app-shell { display: flex; height: 100%; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.app-content {
  flex: 1;
  overflow: auto;
  padding: 24px 28px 12px;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 28px 16px;
  color: var(--muted);
  font-size: 12px;
}
.muted { color: var(--muted); }

/* Sidebar */
.sidebar {
  width: var(--sidebar);
  background: var(--dark);
  color: #d7dbe8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.28s ease;
  z-index: 40;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px 16px;
  height: var(--header);
}
.brand-mark { width: 40px; height: 40px; border-radius: 12px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { color: #fff; font-size: 16px; letter-spacing: -0.02em; }
.brand-copy span { font-size: 11px; color: #8b91a8; }
.sidebar-nav {
  flex: 1;
  overflow: auto;
  padding: 6px 12px 20px;
}
.sidebar-nav::-webkit-scrollbar { width: 8px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
.nav-label {
  margin: 16px 10px 8px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d8398;
}
.nav-item, .nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #c5cad8;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: start;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}
.nav-group { justify-content: space-between; }
.nav-group > span { display: flex; align-items: center; gap: 12px; }
.nav-item i, .nav-group i { width: 18px; text-align: center; color: #9aa1b7; }
.nav-item:hover, .nav-group:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(135deg, #294CC5, #3d5fe0);
  color: #fff;
  box-shadow: 0 8px 18px rgba(41, 76, 197, 0.35);
}
.nav-item.active i { color: #fff; }
.nav-group .chevron { font-size: 10px; transition: transform 0.2s; }
.nav-group.open .chevron { transform: rotate(180deg); }
.nav-sub { display: none; padding-inline-start: 12px; }
.nav-sub.open { display: block; }
.nav-sub .nav-item { padding: 8px 12px; font-size: 13px; }
.sidebar-foot { padding: 12px; }
.plan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(41,76,197,0.35), rgba(150,55,184,0.28));
  color: #fff;
}
.plan-card span { display: block; font-size: 11px; opacity: 0.75; }
.sidebar-backdrop { display: none; }

body.sidebar-collapsed .sidebar { width: var(--sidebar-collapsed); }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .nav-group span span,
body.sidebar-collapsed .nav-group .chevron,
body.sidebar-collapsed .plan-card,
body.sidebar-collapsed .nav-sub { display: none; }
body.sidebar-collapsed .nav-item, body.sidebar-collapsed .nav-group {
  justify-content: center;
  padding: 12px;
}
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding-inline: 0; }

/* Header */
.topbar {
  height: var(--header);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-right { margin-inline-start: auto; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.breadcrumbs span:last-child { color: var(--text); font-weight: 600; }
.crumb-sep { font-size: 9px; opacity: 0.5; }
.global-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f3f5fb;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 12px;
  height: 42px;
  color: var(--muted);
  transition: border 0.18s, background 0.18s, box-shadow 0.18s;
}
.global-search:focus-within {
  background: #fff;
  border-color: #c9d4f8;
  box-shadow: 0 0 0 4px rgba(41,76,197,0.12);
}
.global-search input {
  border: 0; outline: 0; background: transparent; flex: 1; color: var(--text); font-size: 13px;
}
.global-search kbd, .search-panel kbd {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  background: #fff;
}
.icon-btn {
  width: 40px; height: 40px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.16s, transform 0.16s;
}
.icon-btn:hover { background: #eef1fa; }
.icon-btn:active { transform: scale(0.96); }
.notify-btn { position: relative; }
.badge-dot {
  position: absolute; top: 6px; inset-inline-end: 6px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--purple); color: #fff; border-radius: 99px;
  font-size: 10px; font-weight: 700;
  animation: pulse 1.8s ease infinite;
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 4px 10px 4px 4px;
}
.user-meta { text-align: start; }
.user-meta strong { display: block; font-size: 12.5px; }
.user-meta small { color: var(--muted); font-size: 11px; }
.avatar, .thumb, .initials {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
}
.thumb.lg, .avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.select-wrap {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; height: 40px;
  color: var(--muted);
}
.select-wrap select { border: 0; background: transparent; outline: 0; color: var(--text); font-weight: 600; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  min-width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px;
  display: none; z-index: 50;
}
.dropdown.open .dropdown-menu { display: block; animation: pop 0.16s ease; }
.dropdown-wide { width: 340px; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; width: 100%; align-items: center; gap: 10px;
  border: 0; background: transparent; padding: 9px 10px; border-radius: 10px;
  color: var(--text); text-align: start; font-size: 13px;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: #f3f5fb; }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* Page */
.page-enter { animation: rise 0.42s ease; }
.page-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; transition: 0.16s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 16px rgba(41,76,197,0.22); }
.btn-primary:hover { background: var(--primary-600); }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: #f7f8fd; }
.btn-outline { background: transparent; border-color: #c9d4f8; color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-success { background: var(--turquoise); color: #07332f; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 12.5px;
}
.chip.active, .chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
a.card { color: inherit; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card-h {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px;
}
.card-h h3 { margin: 0; font-size: 15px; }
.stat-card {
  position: relative; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.stat-icon.blue { background: linear-gradient(135deg, #294CC5, #83D2ED); }
.stat-icon.purple { background: linear-gradient(135deg, #9637B8, #294CC5); }
.stat-icon.teal { background: linear-gradient(135deg, #32C5BB, #294CC5); }
.stat-icon.dark { background: linear-gradient(135deg, #20212A, #294CC5); }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -0.04em; margin: 8px 0 4px; }
.delta { font-size: 12px; font-weight: 700; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.spark { height: 42px; margin-top: 10px; }

.table-wrap { overflow: auto; }
table.data {
  width: 100%; border-collapse: collapse; min-width: 720px;
}
table.data th {
  text-align: start; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 700;
}
table.data td {
  padding: 12px; border-bottom: 1px solid #f0f2f8; vertical-align: middle;
}
table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: #f7f9ff; }
.cell-product { display: flex; align-items: center; gap: 10px; }
.cell-product strong { display: block; }
.cell-product small { color: var(--muted); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700;
}
.badge.paid, .badge.active, .badge.in-stock { background: #e6f8f3; color: #0b7a5e; }
.badge.partial, .badge.low { background: #fff4e0; color: #b45309; }
.badge.due, .badge.out, .badge.inactive { background: #ffe8ee; color: #be123c; }
.badge.draft, .badge.hold { background: #eef2ff; color: var(--primary); }
.badge.open { background: #e7f8fb; color: #0e7490; }

.filters {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center;
}
.field {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  height: 40px; padding: 0 12px; color: var(--muted);
}
.field input, .field select { border: 0; outline: 0; background: transparent; color: var(--text); min-width: 0; }
.field.grow { flex: 1; min-width: 180px; }

.pager {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; color: var(--muted); font-size: 12.5px;
}
.pager-btns { display: flex; gap: 6px; }
.pager-btns button {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.pager-btns button.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid #f1f3f9;
}
.bar { height: 8px; background: #eef1f8; border-radius: 99px; overflow: hidden; flex: 1; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), var(--light-blue)); }

/* Modal / toast */
.modal-root[hidden], .search-overlay[hidden] { display: none !important; }
.modal-root, .search-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 33, 42, 0.5);
}
.search-overlay {
  background: rgba(32, 33, 42, 0.45);
  padding: 10vh 16px 16px;
  align-items: start;
}
.modal {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100% - 32px));
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: pop 0.18s ease; max-height: calc(100vh - 40px); overflow: auto;
}
.modal.wide { width: min(920px, calc(100% - 32px)); }
.modal-head, .modal-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.modal-foot { border-bottom: 0; border-top: 1px solid var(--line); gap: 10px; justify-content: flex-end; }
.modal-body { padding: 18px; }
.modal-head h3 { margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
label.lbl { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--muted); }
.input, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfcff;
}
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .textarea:focus { outline: 2px solid rgba(41,76,197,0.25); border-color: var(--primary); }

.toast-stack {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  min-width: 280px; background: var(--dark); color: #fff; border-radius: 14px;
  padding: 12px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center;
  animation: rise 0.25s ease;
}
.toast.success { background: #0f766e; }
.toast.error { background: #be123c; }

.search-panel {
  width: min(640px, 100%); background: #fff; border-radius: 18px; overflow: hidden; margin: 0 auto;
}
.search-panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-panel-head input { flex: 1; border: 0; outline: 0; font-size: 15px; }
.cmd-item { display: flex; gap: 10px; padding: 10px 16px; align-items: center; }
.cmd-item:hover { background: #f5f7ff; }

/* POS */
.pos-page .app-footer { display: none; }
.pos-page .app-content { padding-bottom: 16px; }
.pos-shell {
  display: flex;
  gap: 16px;
  min-height: calc(100vh - var(--header) - 48px);
  align-items: stretch;
}
.pos-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.pos-cart {
  flex: 0 0 360px;
  width: 360px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  max-height: calc(100vh - var(--header) - 48px);
  overflow: auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
}
.pos-cats { display: flex; gap: 8px; overflow: auto; padding-bottom: 8px; }
.pos-cat {
  white-space: nowrap; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 8px 14px; font-weight: 600;
}
.pos-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  overflow: auto;
  padding: 4px 2px 12px;
  flex: 1;
}
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d4f8; }
.product-visual {
  height: 92px; border-radius: 12px; display: grid; place-items: center;
  font-size: 28px; color: #fff;
}
.product-card h4 { margin: 0; font-size: 13.5px; }
.product-card .price { font-weight: 800; color: var(--primary); }
.stock-mini { font-size: 11px; color: var(--muted); }
.cart-items { flex: 1; overflow: auto; margin: 10px 0; }
.cart-item {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid #f0f2f8;
}
.qty { display: flex; align-items: center; gap: 6px; }
.qty button {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
}
.totals { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.totals div { display: flex; justify-content: space-between; }
.grand { font-size: 20px; font-weight: 800; padding-top: 6px; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.pay-methods button {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px; font-weight: 700;
}
.pay-methods button.active { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button {
  height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #f7f8fd; font-weight: 700;
}

.tabs { display: flex; gap: 6px; background: #eef1f8; padding: 4px; border-radius: 12px; }
.tab {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font-weight: 600; color: var(--muted);
}
.tab.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }

.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
.settings-nav button {
  display: flex; width: 100%; gap: 10px; align-items: center;
  border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; text-align: start;
}
.settings-nav button.active { background: var(--primary-50); color: var(--primary); font-weight: 700; }

.empty {
  text-align: center; padding: 40px 16px; color: var(--muted);
}
.empty i { font-size: 36px; color: var(--primary); margin-bottom: 8px; }

.skeleton { background: linear-gradient(90deg, #eef1f8 25%, #f7f8fd 37%, #eef1f8 63%); background-size: 400% 100%; animation: shimmer 1.2s ease infinite; border-radius: 10px; height: 14px; }

.receipt {
  width: 320px; margin: 0 auto; background: #fff; border: 1px dashed #d5d8e4; padding: 16px; font-size: 12px;
}
.success-burst { text-align: center; padding: 20px; }
.success-burst .ring {
  width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%;
  background: #e6f8f3; color: var(--success); display: grid; place-items: center; font-size: 28px;
  animation: pop 0.35s ease;
}

.tooltip {
  position: fixed; background: #111; color: #fff; font-size: 12px; padding: 6px 8px; border-radius: 8px; z-index: 100; pointer-events: none;
}

@media print {
  .sidebar, .topbar, .app-footer, .page-actions, .filters { display: none !important; }
  .app-content { overflow: visible; }
  body { overflow: visible; background: #fff; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1200px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pos-shell { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; height: 100%;
    transform: translateX(-100%);
  }
  [dir="rtl"] .sidebar { inset: 0 0 0 auto; transform: translateX(100%); }
  body.mobile-open .sidebar { transform: none; }
  body.mobile-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(32,33,42,0.45); z-index: 30;
  }
  .grid-3, .grid-2, .settings-layout, .form-grid { grid-template-columns: 1fr; }
  .global-search { display: none; }
  .user-meta { display: none; }
  .app-content { padding: 16px; }
}
@media (max-width: 640px) {
  .grid-6 { grid-template-columns: 1fr 1fr; }
}
