:root {
  --font: "IBM Plex Sans Arabic", sans-serif;
  --bg: #eff6ff;
  --bg-2: #dbeafe;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.64);
  --border: rgba(148, 163, 184, 0.26);
  --line: rgba(148, 163, 184, 0.22);
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --brand: #0f766e;
  --brand-2: #2563eb;
  --danger: #e11d48;
  --warning: #d97706;
  --success: #15803d;
  --pending: #2563eb;
  --shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --grad-main: linear-gradient(135deg, #0f766e, #2563eb);
  --grad-soft: linear-gradient(135deg, rgba(15, 118, 110, 0.18), rgba(37, 99, 235, 0.12));
  --backdrop: rgba(15, 23, 42, 0.5);
  --theme-color: #0f172a;
}

body[data-theme="dark"] {
  --bg: #07111f;
  --bg-2: #111c2f;
  --surface: rgba(10, 18, 32, 0.84);
  --surface-strong: rgba(11, 19, 34, 0.96);
  --surface-soft: rgba(17, 25, 40, 0.84);
  --border: rgba(100, 116, 139, 0.24);
  --line: rgba(100, 116, 139, 0.2);
  --text: #e2e8f0;
  --text-muted: #cbd5e1;
  --text-soft: #94a3b8;
  --shadow-soft: 0 18px 42px rgba(2, 6, 23, 0.42);
  --shadow-lg: 0 28px 80px rgba(2, 6, 23, 0.56);
  --grad-soft: linear-gradient(135deg, rgba(15, 118, 110, 0.26), rgba(37, 99, 235, 0.16));
  --backdrop: rgba(2, 6, 23, 0.72);
  --theme-color: #07111f;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 30%),
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 32%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  min-height: 100vh;
  padding: env(safe-area-inset-top) 0 calc(112px + env(safe-area-inset-bottom));
  transition: background 0.22s ease, color 0.22s ease;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.shell-header {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 30;
  width: min(100% - 20px, 1140px);
  margin: 10px auto 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.brand-block {
  min-width: 0;
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  background: var(--grad-main);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.28);
  flex: 0 0 auto;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.brand-copy span {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 900;
}

.brand-copy h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.brand-copy p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
  line-height: 1.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 100%;
  width: 100%;
  justify-content: space-between;
}

.icon-btn,
.pill-btn,
.primary-btn,
.danger-btn,
.ghost-btn {
  border: none;
  cursor: pointer;
  border-radius: 16px;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.icon-btn:active,
.pill-btn:active,
.primary-btn:active,
.danger-btn:active,
.ghost-btn:active,
.request-item:active {
  transform: scale(0.98);
}

.icon-btn {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.has-badge {
  overflow: visible;
}

.icon-btn .badge-dot {
  position: absolute;
  top: -4px;
  left: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: none;
  place-items: center;
  padding: 0 6px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid var(--surface-strong);
}

.icon-btn .badge-dot.show {
  display: grid;
}

.ghost-btn,
.pill-btn,
.primary-btn,
.danger-btn {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 900;
}

.ghost-btn,
.pill-btn {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border);
}

.primary-btn {
  color: #fff;
  background: var(--grad-main);
  box-shadow: 0 14px 26px rgba(15, 118, 110, 0.22);
}

.danger-btn {
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #fb7185);
  box-shadow: 0 14px 26px rgba(225, 29, 72, 0.2);
}

.icon-btn[disabled],
.pill-btn[disabled],
.primary-btn[disabled],
.danger-btn[disabled],
.ghost-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.primary-btn.is-loading,
.danger-btn.is-loading,
.ghost-btn.is-loading,
.pill-btn.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn.is-loading::after,
.danger-btn.is-loading::after,
.ghost-btn.is-loading::after,
.pill-btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  animation: btnSpin 0.75s linear infinite;
}

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

.shell-main {
  width: min(100% - 16px, 1140px);
  margin: 14px auto 0;
}

.page {
  display: none;
  gap: 16px;
  animation: pageFade 0.22s ease;
}

.page.active {
  display: grid;
}

@keyframes pageFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card-pad {
  padding: 16px;
}

.home-overview {
  position: relative;
  overflow: hidden;
  padding: 16px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 36%),
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 36%),
    var(--surface);
}

.home-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.home-overview-copy {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 900;
  color: var(--text-soft);
}

.home-overview h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 900;
}

.home-overview p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.75;
  font-weight: 800;
}

.home-open-btn {
  width: 100%;
  padding-inline: 14px;
}

.home-meta-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.home-meta-chip {
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  display: grid;
  gap: 5px;
}

.home-meta-chip span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
}

.home-meta-chip strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 900;
}

.home-stats-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-stat {
  padding: 12px 13px;
  min-height: 78px;
  border-radius: 18px;
  background: var(--surface-strong);
  display: grid;
  gap: 6px;
  align-content: center;
}

.home-stat span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
}

.home-stat strong {
  color: var(--text);
  font-size: 21px;
  line-height: 1.1;
  font-weight: 900;
}

.home-stat-wide {
  grid-column: 1 / -1;
}

.home-inbox-card {
  padding-top: 14px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.section-head p,
.section-head span {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.7;
}

.section-head > .ghost-btn,
.section-head > .pill-btn,
.section-head > .primary-btn {
  width: 100%;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 2px;
}

.chip-filter {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text-muted);
  font-weight: 900;
  cursor: pointer;
}

.chip-filter.active {
  background: var(--grad-main);
  color: #fff;
  border-color: transparent;
}

.queue-list,
.request-list,
.notification-list {
  display: grid;
  gap: 10px;
}

.request-item,
.queue-item,
.notification-item {
  width: 100%;
  text-align: right;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-strong);
  padding: 14px;
  cursor: pointer;
  color: var(--text);
}

.request-item {
  display: grid;
  gap: 10px;
}

.request-item-top,
.request-item-bottom,
.queue-item-top,
.notification-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.request-item-main,
.queue-item-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.request-item-main strong,
.queue-item-main strong,
.notification-item strong {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
}

.request-item-main span,
.queue-item-main span,
.notification-item span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 800;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.request-tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.muted {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.amount-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.amount-pill {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.status-pill.submitted {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.status-pill.reviewing,
.status-pill.approved {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.status-pill.completed {
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
}

.status-pill.rejected {
  background: rgba(225, 29, 72, 0.12);
  color: #be123c;
}

.filter-grid,
.settings-grid,
.meta-grid,
.execute-grid {
  display: grid;
  gap: 12px;
}

.filter-grid {
  grid-template-columns: 1fr;
}

.field,
.field textarea {
  width: 100%;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pager-actions {
  display: flex;
  gap: 10px;
}

.empty-state {
  padding: 22px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 900;
  border-radius: 20px;
  border: 1px dashed var(--border);
  background: var(--surface-soft);
}

.meta-grid {
  grid-template-columns: 1fr;
}

.meta-item {
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.meta-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
}

.meta-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.8;
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.timeline-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.timeline-item span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.proof-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
}

.proof-preview {
  min-height: 148px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  border: 1px dashed var(--border);
  background: var(--surface-soft);
}

.proof-preview img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.proof-preview.empty {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 900;
}

.proof-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 900;
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(50%);
  z-index: 40;
  width: min(100% - 12px, 620px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.bottom-nav button {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 10px 6px;
  min-height: 54px;
  border-radius: 18px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 900;
  cursor: pointer;
  overflow-wrap: anywhere;
  display: grid;
  place-items: center;
  position: relative;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.bottom-nav button.active {
  color: #fff;
  background: color-mix(in srgb, var(--surface-strong) 98%, transparent);
  color: color-mix(in srgb, var(--brand-2) 90%, var(--text));
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-8px) scale(1.04);
}

body[data-theme="dark"] .bottom-nav button.active {
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.42);
}

.bottom-nav button.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.dock-icon {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke: none;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: var(--backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 80;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface-strong);
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-backdrop.show .modal-sheet {
  transform: translateY(0);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  position: sticky;
  top: -16px;
  padding-top: 2px;
  background: linear-gradient(180deg, var(--surface-strong) 78%, rgba(255,255,255,0));
  z-index: 1;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.modal-head p {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 800;
}

.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.modal-body {
  display: grid;
  gap: 14px;
  padding-bottom: 96px;
}

.modal-foot {
  position: sticky;
  bottom: calc(-18px - env(safe-area-inset-bottom));
  margin: 18px -16px calc(-18px - env(safe-area-inset-bottom));
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface-strong) 20%, var(--surface-strong) 100%);
}

body[data-theme="dark"] .modal-foot {
  background: linear-gradient(180deg, rgba(7, 17, 31, 0), var(--surface-strong) 24%);
}

.modal-note {
  padding: 14px;
  border-radius: 18px;
  background: var(--grad-soft);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
  font-weight: 800;
}

.notification-item {
  text-align: right;
  cursor: default;
}

.notification-item.unread {
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.notification-item small {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 900;
}

.notification-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.notification-actions button {
  padding: 10px 12px;
  width: 100%;
}

.toast {
  position: fixed;
  right: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(50%) translateY(18px);
  width: min(100% - 24px, 420px);
  padding: 14px 16px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 90;
}

.toast.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

.toast strong {
  display: block;
  margin-bottom: 5px;
}

.toast p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.7;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

@media (max-width: 759px) {
  body {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

  .shell-header {
    width: min(100% - 14px, 1140px);
    padding: 10px 12px;
    gap: 10px;
  }

  .brand-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .shell-main {
    width: min(100% - 12px, 1140px);
    margin-top: 12px;
  }

  .card {
    border-radius: 24px;
  }

  .card-pad {
    padding: 16px;
  }

  .home-overview,
  .home-inbox-card {
    border-radius: 24px;
  }

  .request-item-top,
  .request-item-bottom,
  .queue-item-top,
  .notification-item-top {
    align-items: flex-start;
  }

  .request-item-bottom {
    flex-direction: column;
  }

  .request-tail {
    width: 100%;
  }

  .proof-preview {
    min-height: 124px;
  }

  .modal-sheet {
    width: 100%;
    max-height: calc(100dvh - 10px);
    border-radius: 28px 28px 20px 20px;
  }
}

@media (min-width: 760px) {
  body {
    padding-bottom: 30px;
  }

  .shell-header {
    flex-wrap: nowrap;
  }

  .header-actions {
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-end;
  }

  .section-head > .ghost-btn,
  .section-head > .pill-btn,
  .section-head > .primary-btn {
    width: auto;
  }

  .summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-overview {
    padding: 18px;
  }

  .home-open-btn {
    width: auto;
  }

  .home-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .home-stat {
    min-height: 92px;
    padding: 14px;
  }

  .home-stat strong {
    font-size: 24px;
  }

  .home-stat-wide {
    grid-column: auto;
  }

  .filter-grid,
  .settings-grid,
  .execute-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .modal-sheet {
    width: min(100%, 880px);
    max-height: min(92vh, 920px);
    border-radius: 28px;
    padding: 18px 18px 20px;
  }

  .modal-head {
    top: -18px;
  }

  .modal-body {
    padding-bottom: 88px;
  }

  .modal-foot {
    bottom: -20px;
    margin: 18px -18px -20px;
    padding: 14px 18px 20px;
    grid-template-columns: 1fr 1fr;
  }

  .bottom-nav {
    position: static;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: 18px;
  }

  .bottom-nav button {
    min-height: 58px;
  }

  .notification-actions button {
    width: auto;
  }
}

@media (min-width: 980px) {
  .home-overview h2 {
    font-size: 22px;
  }

  .home-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
  }

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