/* Product interface by Simiyya */
@font-face {
  font-family: "Vazirmatn";
  src: url("./assets/fonts/Vazirmatn-Variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #172720;
  --ink-soft: #46594f;
  --ink-faint: #66766e;
  --paper: #f4f0e5;
  --surface: #fffef9;
  --surface-raised: #ffffff;
  --surface-tint: #eef1e8;
  --line: #d8dcd0;
  --line-strong: #c2c8ba;
  --olive-950: #102e27;
  --olive-900: #173f35;
  --olive-800: #205346;
  --olive-700: #2f6a59;
  --olive-100: #dfeae2;
  --olive-50: #f0f5f1;
  --clay: #ad4e35;
  --clay-soft: #f8e9e3;
  --amber: #b17a22;
  --amber-soft: #fbf1db;
  --danger: #a63d32;
  --danger-soft: #f8e8e5;
  --blue: #3f6c85;
  --blue-soft: #e7f0f4;
  --shadow-sm: 0 4px 18px rgb(23 39 32 / 5%);
  --shadow-md: 0 20px 60px rgb(28 43 34 / 16%);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --sidebar-width: 286px;
  --topbar-height: 76px;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 8%, rgb(46 105 88 / 4.5%) 0 1.5px, transparent 2px) 0 0 / 26px 26px,
    var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(47 106 89 / 25%);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--olive-950);
  color: white;
  padding: 10px 16px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.network-banner {
  position: fixed;
  inset-block-start: 10px;
  inset-inline: 50%;
  z-index: 200;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 24px);
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid #dcae8d;
  border-radius: 12px;
  background: #fff6ee;
  box-shadow: var(--shadow-md);
  color: #7d3b26;
  padding: 8px 14px;
  transform: translateX(50%);
  font-size: 12px;
  font-weight: 700;
}

.network-banner[hidden] {
  display: none;
}

.network-banner span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clay);
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.05fr) minmax(440px, 0.95fr);
  background: var(--paper);
}

.login-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 78%, rgb(255 255 255 / 8%) 0 2px, transparent 2.5px) 0 0 / 30px 30px,
    var(--olive-950);
  color: white;
  padding: clamp(34px, 5vw, 72px);
}

.login-story::after {
  position: absolute;
  inset-block-start: 18%;
  inset-inline-end: -170px;
  width: 410px;
  height: 410px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 49% 51% 44% 56%;
  content: "";
  transform: rotate(18deg);
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 13px;
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand strong {
  font-size: 22px;
  line-height: 1.25;
}

.login-brand small {
  color: #b7c6c0;
  font-size: 11px;
}

.login-story-copy {
  position: relative;
  z-index: 1;
  width: min(610px, 100%);
  margin-block: 70px;
}

.login-story-copy .eyebrow {
  color: #e5c77f;
}

.login-story-copy h1 {
  margin: 12px 0 18px;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 850;
  letter-spacing: -2px;
  line-height: 1.25;
}

.login-story-copy p {
  width: min(520px, 100%);
  margin: 0;
  color: #c5d1cc;
  font-size: 16px;
  line-height: 2;
}

.founder-signature {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.founder-signature span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #dce6e1;
  font-size: 12px;
}

.founder-signature i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 50%;
  background: rgb(255 255 255 / 8%);
  color: #f4e4b6;
  font-style: normal;
  font-weight: 800;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
}

.login-panel-inner {
  width: min(500px, 100%);
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--olive-700);
  padding-inline: 11px;
  font-size: 11px;
  font-weight: 750;
}

.login-panel h2 {
  margin: 18px 0 4px;
  font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -1px;
  line-height: 1.35;
}

.login-panel-inner > p {
  margin: 0;
  color: var(--ink-soft);
}

.login-users {
  display: grid;
  gap: 12px;
  margin-block: 30px 22px;
}

.login-user-card {
  display: grid;
  width: 100%;
  min-height: 94px;
  grid-template-columns: 54px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
  padding: 15px;
  text-align: start;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.login-user-card:hover {
  border-color: var(--olive-700);
  box-shadow: 0 12px 34px rgb(23 63 53 / 10%);
  transform: translateY(-1px);
}

.login-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--olive-100);
  color: var(--olive-900);
  font-size: 20px;
  font-weight: 850;
}

.login-avatar.clay {
  background: var(--clay-soft);
  color: var(--clay);
}

.login-user-copy b,
.login-user-copy small,
.login-user-copy em {
  display: block;
}

.login-user-copy b {
  font-size: 16px;
}

.login-user-copy small {
  width: max-content;
  color: var(--ink-faint);
  font-size: 11px;
}

.login-user-copy em {
  margin-block-start: 3px;
  color: var(--olive-700);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.login-arrow {
  color: var(--olive-700);
  font-size: 21px;
  transition: transform 150ms ease;
}

.login-user-card:hover .login-arrow {
  transform: translateX(-3px);
}

.demo-login-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-block-start: 1px solid var(--line);
  color: var(--ink-soft);
  padding-block-start: 20px;
}

.demo-login-note > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: #775011;
  font-family: Georgia, serif;
  font-weight: 800;
}

.demo-login-note p,
.demo-login-note b {
  display: block;
  margin: 0;
}

.demo-login-note p {
  font-size: 11px;
  line-height: 1.9;
}

.demo-login-note b {
  color: var(--ink);
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 89%, rgb(255 255 255 / 7%) 0 2px, transparent 2.5px) 0 0 / 30px 30px,
    var(--olive-950);
  color: #eaf1ec;
}

.brand {
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  gap: 12px;
  border-block-end: 1px solid rgb(255 255 255 / 10%);
  padding-inline: 24px;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 41px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 50% 50% 48% 52%;
  background: #f3e8c9;
  transform: rotate(-5deg);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  border-radius: 60% 10% 60% 10%;
  background: var(--olive-700);
}

.brand-mark::before {
  width: 14px;
  height: 22px;
  transform: translate(6px, -2px) rotate(26deg);
}

.brand-mark::after {
  width: 12px;
  height: 18px;
  background: var(--clay);
  transform: translate(-7px, 5px) rotate(-35deg);
}

.brand-mark span:first-child {
  position: absolute;
  z-index: 2;
  width: 1px;
  height: 22px;
  background: var(--olive-950);
  transform: rotate(-25deg);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.brand small {
  margin-block-start: 2px;
  color: #aebeb7;
  font-size: 11px;
}

.close-menu {
  display: none !important;
  margin-inline-start: auto;
  color: white;
}

.main-nav {
  flex: 1;
  padding: 22px 14px;
}

.nav-label {
  margin: 18px 14px 7px;
  color: #859b92;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.nav-label:first-child {
  margin-block-start: 0;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c5d1cc;
  padding: 9px 13px;
  text-align: start;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-item:hover {
  background: rgb(255 255 255 / 6%);
  color: white;
}

.nav-item:active {
  transform: scale(0.99);
}

.nav-item.is-active {
  background: #f0ead7;
  color: var(--olive-950);
  font-weight: 700;
}

.nav-item.is-active::before {
  position: absolute;
  inset-block: 10px;
  inset-inline-start: -14px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--clay);
  content: "";
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.nav-count {
  min-width: 24px;
  margin-inline-start: auto;
  border-radius: 20px;
  background: rgb(255 255 255 / 10%);
  color: inherit;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

.is-active .nav-count {
  background: #d8decf;
}

.status-dot {
  width: 8px;
  height: 8px;
  margin-inline-start: auto;
  border: 2px solid var(--olive-950);
  border-radius: 50%;
  background: #e98b5e;
  box-shadow: 0 0 0 2px #e98b5e;
}

.sidebar-foot {
  margin: 12px 18px 20px;
  border-block-start: 1px solid rgb(255 255 255 / 10%);
  padding-block-start: 18px;
}

.storage-row {
  display: flex;
  justify-content: space-between;
  color: #dfe8e4;
  font-size: 11px;
}

.progress-track {
  height: 4px;
  margin-block: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: rgb(255 255 255 / 12%);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #e1b969;
}

.sidebar-foot small {
  display: block;
  color: #8fa29a;
  font-size: 10px;
  line-height: 1.75;
}

.app-main {
  min-height: 100vh;
  margin-inline-start: var(--sidebar-width);
}

.topbar {
  position: sticky;
  inset-block-start: 0;
  z-index: 30;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-block-end: 1px solid var(--line);
  background: rgb(248 245 236 / 94%);
  padding-inline: clamp(20px, 3vw, 42px);
  backdrop-filter: blur(14px);
}

.topbar-start,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-start {
  min-width: 0;
  flex: 1;
  gap: 10px;
}

.topbar-actions {
  gap: 11px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
}

.icon-button:hover {
  border-color: var(--line);
  background: var(--surface);
}

.icon-button svg {
  width: 21px;
  height: 21px;
}

.menu-button {
  display: none;
}

.global-search {
  position: relative;
  display: flex;
  width: min(470px, 100%);
  height: 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(255 254 249 / 92%);
  padding-inline: 13px 10px;
  transition: border 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.global-search:focus-within {
  border-color: var(--olive-700);
  background: var(--surface-raised);
  box-shadow: 0 0 0 3px rgb(47 106 89 / 10%);
}

.global-search > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--ink-faint);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
}

.global-search input::placeholder {
  color: #8c9892;
}

.global-search kbd {
  direction: ltr;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f2f0e9;
  color: var(--ink-faint);
  padding: 1px 6px;
  font-family: inherit;
  font-size: 10px;
}

.search-results {
  position: absolute;
  inset-block-start: calc(100% + 8px);
  inset-inline: 0;
  z-index: 80;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  padding: 7px;
}

.search-result {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 7px 9px;
  text-align: start;
}

.search-result:hover {
  background: var(--olive-50);
}

.search-result span:first-child {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-tint);
  font-weight: 700;
}

.search-result b,
.search-result small {
  display: block;
}

.search-result small {
  color: var(--ink-faint);
}

.demo-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  border: 1px solid #ded8c7;
  border-radius: 20px;
  background: #f7f1df;
  color: #75623e;
  padding: 3px 10px;
  font-size: 10px;
  white-space: nowrap;
}

.demo-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.notification-button {
  position: relative;
}

.notification-button span {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--clay);
  box-sizing: content-box;
}

.profile-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-inline-start: 1px solid var(--line);
  background: transparent;
  padding: 2px 14px 2px 0;
  text-align: start;
}

.profile-menu-wrap {
  position: relative;
}

.profile-button[aria-expanded="true"] {
  color: var(--olive-800);
}

.profile-button .avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--olive-100);
  color: var(--olive-900);
  font-weight: 800;
}

.profile-button .avatar.clay {
  background: var(--clay-soft);
  color: var(--clay);
}

.profile-copy b,
.profile-copy small {
  display: block;
  white-space: nowrap;
}

.profile-copy b {
  font-size: 12px;
}

.profile-copy small {
  color: var(--ink-faint);
  font-size: 10px;
}

.profile-button > svg {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.profile-menu {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 90;
  width: 310px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  padding: 8px;
}

.profile-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border-block-end: 1px solid var(--line);
  margin: 0 4px 7px;
  padding: 9px 5px 13px;
}

.profile-menu-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--olive-100);
  color: var(--olive-900);
  font-weight: 850;
}

.profile-menu-avatar.clay {
  background: var(--clay-soft);
  color: var(--clay);
}

.profile-menu-head b,
.profile-menu-head small {
  display: block;
}

.profile-menu-head small {
  color: var(--ink-faint);
  font-size: 11px;
}

.profile-menu-label {
  display: block;
  padding: 7px 10px 4px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
}

.profile-menu-user,
.profile-menu-logout {
  display: flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 7px 9px;
  text-align: start;
}

.profile-menu-user:hover,
.profile-menu-logout:hover {
  background: var(--olive-50);
}

.profile-menu-user i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-tint);
  font-style: normal;
  font-weight: 800;
}

.profile-menu-user span {
  min-width: 0;
  flex: 1;
}

.profile-menu-user b,
.profile-menu-user small {
  display: block;
}

.profile-menu-user small {
  width: max-content;
  color: var(--ink-faint);
  font-size: 10px;
}

.profile-menu-user .active-check {
  color: var(--olive-700);
  font-weight: 900;
}

.profile-menu-logout {
  border-block-start: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  margin-block-start: 6px;
  color: var(--danger);
}

#main-content {
  width: min(1510px, 100%);
  margin-inline: auto;
  padding: 34px clamp(20px, 3vw, 42px) 54px;
}

.page-enter {
  animation: page-in 250ms ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-block-end: 25px;
}

.eyebrow {
  display: block;
  margin-block-end: 4px;
  color: var(--olive-700);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.page-heading h1,
.section-title h2,
.modal-header h2,
.hero-copy h2 {
  margin: 0;
  letter-spacing: -0.65px;
  line-height: 1.45;
}

.page-heading h1 {
  font-size: clamp(22px, 2.3vw, 31px);
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.dashboard-hero {
  position: relative;
  min-height: 174px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cbd7ca;
  border-radius: 24px;
  background:
    linear-gradient(118deg, rgb(255 254 248 / 98%) 0 54%, rgb(225 235 222 / 94%) 100%);
  box-shadow: 0 16px 45px rgb(25 58 47 / 8%);
  padding: 26px 28px;
}

.dashboard-hero::before,
.dashboard-hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.dashboard-hero::before {
  inset-block-start: -72px;
  inset-inline-end: -40px;
  width: 230px;
  height: 230px;
  border: 38px solid rgb(31 84 69 / 5.5%);
  border-radius: 47% 53% 62% 38%;
  transform: rotate(18deg);
}

.dashboard-hero::after {
  inset-block-end: 19px;
  inset-inline-end: 24%;
  width: 58px;
  height: 28px;
  background: radial-gradient(circle, rgb(32 83 70 / 14%) 0 2px, transparent 2.5px) 0 0 / 13px 13px;
  opacity: 0.8;
}

.dashboard-hero .heading-copy,
.dashboard-hero .heading-actions {
  position: relative;
  z-index: 1;
}

.dashboard-hero .eyebrow {
  color: var(--clay);
}

.dashboard-hero h1 {
  font-size: clamp(27px, 2.6vw, 38px);
  font-weight: 820;
}

.dashboard-hero .heading-actions {
  align-self: flex-start;
}

.brand-story {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-start: 18px;
}

.brand-story b,
.brand-story small {
  display: block;
}

.brand-story b {
  font-size: 12px;
}

.brand-story small {
  color: var(--ink-faint);
  font-size: 11px;
}

.founder-marks {
  display: flex;
  direction: ltr;
  padding-inline-start: 7px;
}

.founder-marks i {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--olive-900);
  color: white;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.founder-marks i + i {
  margin-inline-start: -8px;
  background: var(--clay);
}

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

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 15px;
  font-weight: 700;
  transition: background 150ms ease, border 150ms ease, transform 150ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button.primary {
  border-color: var(--olive-900);
  background: var(--olive-900);
  color: white;
  box-shadow: 0 8px 20px rgb(23 63 53 / 18%);
}

.button.primary:hover {
  background: var(--olive-800);
}

.button.secondary {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--olive-900);
}

.button.secondary:hover,
.button.ghost:hover {
  border-color: var(--olive-700);
  background: var(--olive-50);
}

.button.ghost {
  background: transparent;
  color: var(--ink-soft);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 254 249 / 88%);
  box-shadow: var(--shadow-sm);
  margin-block-end: 24px;
}

.kpi {
  position: relative;
  min-width: 0;
  padding: 21px clamp(15px, 2vw, 26px);
}

.kpi::after {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 24px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--olive-700);
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 160ms ease, transform 160ms ease;
}

.kpi:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.kpi + .kpi {
  border-inline-start: 1px solid var(--line);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
}

.kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--olive-100);
  color: var(--olive-800);
}

.kpi-icon.warn {
  background: var(--clay-soft);
  color: var(--clay);
}

.kpi-icon svg {
  width: 17px;
  height: 17px;
}

.kpi strong {
  display: block;
  margin-block: 8px 2px;
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -0.5px;
  line-height: 1.5;
}

.kpi small {
  color: var(--ink-faint);
  font-size: 12px;
}

.trend {
  color: var(--olive-700) !important;
  font-weight: 700;
}

.trend.down {
  color: var(--clay) !important;
}

.attention-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-block-end: 24px;
  border: 1px solid #e4cfaa;
  border-radius: var(--radius-md);
  background: #fcf5e5;
  box-shadow: 0 5px 18px rgb(117 78 22 / 5%);
  padding: 14px 16px;
}

.attention-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: #f1dfba;
  color: #8c5c12;
}

.attention-icon svg {
  width: 19px;
  height: 19px;
}

.attention-strip b,
.attention-strip small {
  display: block;
}

.attention-strip small {
  margin-block-start: 1px;
  color: #796a4e;
  font-size: 12px;
}

.text-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--olive-800);
  font-weight: 800;
  white-space: nowrap;
}

.text-action svg {
  width: 16px;
  height: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.75fr);
  gap: 24px;
}

.content-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 254 249 / 92%);
  box-shadow: var(--shadow-sm);
}

.content-section.flush {
  overflow: hidden;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
}

.section-title h2 {
  font-size: 16px;
}

.section-title p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
}

.section-title .text-action {
  min-height: 30px;
  font-size: 11px;
}

.order-list {
  border-block-start: 1px solid var(--line);
}

.order-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) 0.75fr 0.75fr 0.7fr auto;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  border-block-end: 1px solid var(--line);
  padding: 10px 20px;
}

.order-row:last-child {
  border-block-end: 0;
}

.order-row:hover {
  background: rgb(240 245 241 / 70%);
}

.order-customer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.mini-avatar,
.product-thumb {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--olive-100);
  color: var(--olive-800);
  font-size: 12px;
  font-weight: 800;
}

.mini-avatar.clay { background: var(--clay-soft); color: var(--clay); }
.mini-avatar.blue { background: var(--blue-soft); color: var(--blue); }
.mini-avatar.amber { background: var(--amber-soft); color: var(--amber); }

.order-customer b,
.order-customer small,
.order-cell b,
.order-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-customer b,
.order-cell b {
  font-size: 12px;
}

.order-customer small,
.order-cell small {
  color: var(--ink-faint);
  font-size: 10px;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill.success { background: var(--olive-100); color: var(--olive-700); }
.status-pill.wait { background: var(--amber-soft); color: #916217; }
.status-pill.info { background: var(--blue-soft); color: var(--blue); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.neutral { background: #ecece6; color: var(--ink-soft); }

.row-menu {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.low-stock-list {
  padding: 0 20px 11px;
}

.stock-item {
  padding-block: 13px;
  border-block-start: 1px solid var(--line);
}

.stock-head,
.stock-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stock-head b {
  font-size: 12px;
}

.stock-head strong {
  color: var(--clay);
  font-size: 11px;
}

.stock-bar {
  height: 6px;
  margin-block: 8px;
  overflow: hidden;
  border-radius: 6px;
  background: #e8e8e0;
}

.stock-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--clay);
}

.stock-bar.is-warning span {
  background: var(--amber);
}

.stock-meta {
  color: var(--ink-faint);
  font-size: 10px;
}

.insight-card {
  position: relative;
  overflow: hidden;
  margin-block-start: 24px;
  border-radius: var(--radius-lg);
  background: var(--olive-900);
  color: white;
  padding: 22px;
}

.insight-card::after {
  position: absolute;
  inset-block-end: -50px;
  inset-inline-end: -35px;
  width: 150px;
  height: 150px;
  border: 30px solid rgb(255 255 255 / 4%);
  border-radius: 45% 55% 50% 50%;
  content: "";
  transform: rotate(20deg);
}

.insight-card .eyebrow {
  color: #b9d0c5;
}

.insight-card h3 {
  position: relative;
  z-index: 1;
  margin: 5px 0 7px;
  font-size: 17px;
}

.insight-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 16px;
  color: #c1d0ca;
  font-size: 11px;
}

.insight-card .button {
  position: relative;
  z-index: 1;
  min-height: 40px;
  border-color: rgb(255 255 255 / 18%);
  background: rgb(255 255 255 / 10%);
  color: white;
  font-size: 11px;
}

.chart-section {
  margin-block-start: 24px;
  padding-block-end: 12px;
}

.chart-wrap {
  height: 225px;
  padding: 0 18px 15px;
}

.chart-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: #e5e5dd;
  stroke-width: 1;
}

.chart-area {
  fill: url(#chartGradient);
  stroke: none;
}

.chart-line {
  fill: none;
  stroke: var(--olive-700);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: var(--surface-raised);
  stroke: var(--olive-700);
  stroke-width: 3;
}

.chart-text {
  fill: var(--ink-faint);
  stroke: none;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 11px;
}

.chart-value {
  fill: var(--olive-900);
  stroke: none;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 11px;
  font-weight: 700;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 18px;
}

.filter-search {
  position: relative;
  min-width: 230px;
  flex: 1;
}

.filter-search svg {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 13px;
  width: 18px;
  height: 18px;
  color: var(--ink-faint);
}

.filter-search input,
.filters-row select,
.sale-form select,
.sale-form input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface-raised);
  color: var(--ink);
  padding-inline: 13px;
}

.filter-search input {
  padding-inline-start: 42px;
}

.filters-row select {
  width: 170px;
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 253 248 / 76%);
}

.data-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  text-align: start;
}

.data-table th,
.data-table td {
  height: 64px;
  border-block-end: 1px solid var(--line);
  padding: 10px 16px;
  text-align: start;
}

.data-table th {
  height: 46px;
  background: #eeeee7;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-block-end: 0;
}

.data-table tbody tr:hover {
  background: var(--olive-50);
}

.product-cell {
  display: flex;
  min-width: 220px;
  align-items: center;
  gap: 11px;
}

.product-cell b,
.product-cell small {
  display: block;
}

.product-cell small,
.muted-cell {
  color: var(--ink-faint);
  font-size: 10px;
}

.product-thumb.olive { background: #dfe8d1; color: #5e743b; }
.product-thumb.garlic { background: #eee8d7; color: #887347; }
.product-thumb.red { background: var(--clay-soft); color: var(--clay); }
.product-thumb.gold { background: var(--amber-soft); color: var(--amber); }

.stock-number strong,
.stock-number small {
  display: block;
}

.stock-number small {
  color: var(--ink-faint);
  font-size: 9px;
}

.stock-number.is-low strong {
  color: var(--danger);
}

.table-action {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  padding: 4px 10px;
  color: var(--olive-800);
  font-size: 10px;
  font-weight: 700;
}

.table-action:hover {
  background: var(--olive-50);
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-start: 15px;
  color: var(--ink-faint);
  font-size: 11px;
}

.pagination {
  display: flex;
  direction: rtl;
  gap: 5px;
}

.pagination button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
}

.pagination button.is-current {
  border-color: var(--olive-900);
  background: var(--olive-900);
  color: white;
}

.customer-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-block-end: 20px;
}

.segment-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px;
}

.segment-card::after {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--olive-700);
  content: "";
}

.segment-card.gold::after { background: var(--amber); }
.segment-card.clay::after { background: var(--clay); }
.segment-card span,
.segment-card small {
  color: var(--ink-soft);
  font-size: 10px;
}

.segment-card strong {
  display: block;
  margin-block: 4px;
  font-size: 23px;
}

.customer-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-name b,
.customer-name small {
  display: block;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}

.balance-due {
  color: var(--danger);
  font-weight: 700;
}

.campaign-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.campaign-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
}

.campaign-card.is-featured {
  border-color: #b7cbbb;
  background: #edf3ed;
}

.campaign-top,
.campaign-stats,
.campaign-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.campaign-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--clay-soft);
  color: var(--clay);
}

.campaign-icon svg {
  width: 21px;
  height: 21px;
}

.campaign-card h3 {
  margin: 17px 0 5px;
  font-size: 16px;
}

.campaign-card > p {
  min-height: 48px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.campaign-stats {
  margin-block: 18px;
  border-block: 1px solid var(--line);
  padding-block: 13px;
}

.campaign-stats div {
  min-width: 0;
  flex: 1;
}

.campaign-stats div + div {
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 12px;
}

.campaign-stats b,
.campaign-stats small {
  display: block;
}

.campaign-stats small,
.campaign-foot small {
  color: var(--ink-faint);
  font-size: 9px;
}

.create-campaign {
  display: grid;
  min-height: 280px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgb(255 253 248 / 35%);
  padding: 24px;
  text-align: center;
}

.create-campaign span {
  display: grid;
  width: 48px;
  height: 48px;
  margin: auto;
  place-items: center;
  border-radius: 50%;
  background: var(--olive-100);
  color: var(--olive-700);
  font-size: 26px;
}

.create-campaign h3 {
  margin: 13px 0 4px;
}

.create-campaign p {
  max-width: 250px;
  margin: 0 auto 14px;
  color: var(--ink-faint);
  font-size: 11px;
}

.portal-preview {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.portal-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--olive-900);
  color: white;
  padding: clamp(28px, 5vw, 58px);
}

.portal-copy .eyebrow { color: #bad1c6; }
.portal-copy h2 { margin: 0; font-size: clamp(23px, 3vw, 37px); line-height: 1.5; }
.portal-copy p { color: #c7d5cf; }
.portal-features { display: grid; gap: 11px; margin-block: 12px 24px; }
.portal-features span { display: flex; align-items: center; gap: 8px; }
.portal-features svg { width: 18px; height: 18px; color: #e3bd6d; }
.portal-copy .button { align-self: flex-start; border-color: rgb(255 255 255 / 20%); background: white; color: var(--olive-900); }

.portal-window {
  position: relative;
  min-width: 0;
  background: #ece9df;
  padding: clamp(20px, 4vw, 45px);
}

.browser-chrome {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 5px;
  border-radius: 14px 14px 0 0;
  background: #e1e0d8;
  padding-inline: 12px;
}

.browser-chrome i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ba29c;
}

.portal-ui {
  min-height: 430px;
  border-radius: 0 0 14px 14px;
  background: #faf9f4;
  padding: 18px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block-end: 1px solid #e4e3dc;
  padding-block-end: 14px;
}

.mini-brand { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; }
.mini-brand i { width: 22px; height: 22px; border-radius: 50%; background: var(--olive-900); }
.portal-header span { font-size: 9px; color: var(--ink-faint); }
.portal-greeting { margin-block: 20px; }
.portal-greeting h3 { margin: 0; font-size: 18px; }
.portal-greeting p { margin: 3px 0 0; color: var(--ink-faint); font-size: 10px; }
.portal-offer { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 14px; background: #e4ebdf; padding: 16px; }
.portal-offer b { display: block; font-size: 13px; }
.portal-offer small { color: var(--ink-soft); font-size: 9px; }
.offer-seal { display: grid; width: 54px; height: 54px; flex: 0 0 54px; place-items: center; border: 1px dashed var(--olive-700); border-radius: 50%; color: var(--olive-800); font-size: 15px; font-weight: 900; transform: rotate(-7deg); }
.portal-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-block-start: 12px; }
.portal-product { border: 1px solid #e3e2db; border-radius: 11px; background: white; padding: 10px; }
.portal-product .mock-img { height: 67px; border-radius: 8px; background: #e4e8d8; }
.portal-product:nth-child(2) .mock-img { background: #eee7d4; }
.portal-product:nth-child(3) .mock-img { background: #ecdcd6; }
.portal-product b { display: block; margin-block-start: 8px; font-size: 9px; }
.portal-product small { color: var(--ink-faint); font-size: 8px; }

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 30px;
  text-align: center;
}

.empty-state svg {
  width: 43px;
  height: 43px;
  margin: auto;
  color: var(--ink-faint);
}

.empty-state h3 { margin: 12px 0 3px; }
.empty-state p { margin: 0; color: var(--ink-faint); }

.modal-layer[hidden] {
  display: none;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(10 24 19 / 52%);
  backdrop-filter: blur(4px);
}

.sale-modal {
  position: relative;
  z-index: 1;
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 22px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  animation: modal-in 200ms ease both;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-block-end: 1px solid var(--line);
  padding: 18px 22px;
}

.modal-header h2 { font-size: 20px; }

.sale-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f3f2ec;
  padding: 10px 20px;
  color: var(--ink-faint);
  font-size: 10px;
}

.sale-stepper span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sale-stepper b { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; }
.sale-stepper .is-current { color: var(--olive-900); font-weight: 800; }
.sale-stepper .is-current b { border-color: var(--olive-900); background: var(--olive-900); color: white; }
.sale-stepper i { width: 40px; height: 1px; background: var(--line-strong); }

.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, 0.65fr);
}

.sale-form { padding: 22px; }
.field-label { display: block; margin-block-end: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.customer-rule { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; margin-block: 9px 20px; border-inline-start: 3px solid var(--olive-700); background: var(--olive-50); padding: 9px 11px; }
.customer-rule span { font-size: 11px; }
.customer-rule strong { grid-row: span 2; align-self: center; color: var(--olive-700); font-size: 17px; }
.customer-rule small { color: var(--ink-faint); font-size: 9px; }
.field-split { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; align-items: end; gap: 9px; }
.add-line-button { min-width: 74px; }
.cart-lines { margin-block-start: 18px; border-block-start: 1px solid var(--line); }
.cart-empty { padding: 25px 8px; color: var(--ink-faint); text-align: center; font-size: 11px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; border-block-end: 1px solid var(--line); padding: 11px 5px; }
.cart-line b, .cart-line small { display: block; }
.cart-line small { color: var(--ink-faint); font-size: 9px; }
.remove-line { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--danger); }
.remove-line:hover { background: var(--danger-soft); }

.order-summary { border-inline-start: 1px solid var(--line); background: #f4f3ed; padding: 22px; }
.order-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block: 12px; font-size: 11px; }
.order-summary .discount-line b { color: var(--olive-700); }
.order-summary hr { border: 0; border-block-start: 1px solid var(--line-strong); margin-block: 18px; }
.order-summary .grand-total { align-items: flex-end; }
.order-summary .grand-total strong { font-size: 18px; }
.order-summary p { display: flex; align-items: flex-start; gap: 7px; margin-block-start: 30px; color: var(--ink-faint); font-size: 9px; }
.order-summary p svg { width: 17px; height: 17px; flex: 0 0 17px; color: var(--olive-700); }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-block-start: 1px solid var(--line);
  padding: 14px 22px;
}

.toast-region {
  position: fixed;
  inset-block-end: 22px;
  inset-inline-end: 22px;
  z-index: 150;
  display: grid;
  gap: 8px;
}

.toast {
  display: flex;
  min-width: 290px;
  max-width: 390px;
  align-items: center;
  gap: 10px;
  border: 1px solid #bfcfc4;
  border-radius: 12px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  padding: 12px 14px;
  animation: toast-in 220ms ease both;
}

.toast span { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 50%; background: var(--olive-100); color: var(--olive-700); font-weight: 900; }
.toast b, .toast small { display: block; }
.toast small { color: var(--ink-faint); font-size: 9px; }

/* اندازه‌های خوانا برای داده‌های عملیاتی؛ ریزمتنِ ماکاپ پنل مشتری مستثناست. */
.eyebrow,
.section-title p,
.order-customer small,
.order-cell small,
.stock-meta,
.muted-cell,
.segment-card span,
.segment-card small,
.campaign-stats small,
.campaign-foot small,
.field-label,
.customer-rule span,
.customer-rule small,
.cart-line small,
.order-summary > div,
.order-summary p,
.toast small {
  font-size: 12px;
}

.status-pill,
.table-action,
.demo-badge,
.profile-copy small,
.sidebar-foot small,
.nav-label {
  font-size: 11px;
}

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

.mobile-backdrop { display: none; }

@media (max-width: 1180px) {
  .profile-copy { display: none; }
  .profile-button { padding-inline-start: 10px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-inline-start: 0; border-block-start: 1px solid var(--line); }
  .kpi:nth-child(4) { border-block-start: 1px solid var(--line); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .insight-card { margin-block-start: 0; }
  .campaign-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --topbar-height: 66px; }
  .sidebar { transform: translateX(105%); box-shadow: var(--shadow-md); transition: transform 200ms ease; }
  .menu-open .sidebar { transform: translateX(0); }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 35; background: rgb(9 23 18 / 45%); }
  .menu-open .mobile-backdrop { display: block; }
  .close-menu, .menu-button { display: grid !important; }
  .app-main { margin-inline-start: 0; }
  .topbar { padding-inline: 16px; }
  #main-content { padding-block-start: 24px; }
  .portal-preview { grid-template-columns: 1fr; }
  .portal-copy { padding: 32px; }
  .portal-window { padding: 24px; }
}

@media (max-width: 820px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 28px clamp(22px, 6vw, 48px) 34px; }
  .login-story::after { width: 260px; height: 260px; inset-block-start: -85px; inset-inline-end: -105px; }
  .login-story-copy { margin-block: 42px 30px; }
  .login-story-copy h1 { font-size: clamp(34px, 8vw, 50px); }
  .login-story-copy p { font-size: 14px; }
  .login-panel { min-height: auto; padding: 42px clamp(22px, 6vw, 48px) 56px; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .topbar { gap: 8px; }
  .global-search kbd, .demo-badge { display: none; }
  .profile-copy, .profile-button > svg { display: none; }
  .profile-button { min-width: 44px; min-height: 44px; justify-content: center; border: 0; padding: 0; }
  .profile-button .avatar { width: 38px; height: 38px; }
  .profile-menu { position: fixed; inset-block-start: 70px; inset-inline: 12px; width: auto; }
  .topbar-actions { gap: 2px; }
  .login-panel h2 { font-size: 30px; }
  .login-user-card { min-height: 88px; grid-template-columns: 48px minmax(0, 1fr) 24px; padding: 13px; }
  .login-avatar { width: 46px; height: 46px; border-radius: 13px; }
  .founder-signature { gap: 12px 20px; }
  .page-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .dashboard-hero { min-height: 0; border-radius: 19px; padding: 21px 18px 18px; }
  .dashboard-hero::before { inset-block-start: -100px; inset-inline-end: -90px; }
  .dashboard-hero::after { display: none; }
  .dashboard-hero h1 { font-size: 27px; }
  .dashboard-hero .heading-actions { align-self: stretch; }
  .brand-story { margin-block-start: 14px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 16px 12px; }
  .kpi strong { font-size: 18px; }
  .attention-strip { grid-template-columns: auto 1fr; }
  .attention-strip .text-action { grid-column: 1 / -1; justify-self: end; }
  .side-column { grid-template-columns: 1fr; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; min-height: 82px; }
  .order-row .order-cell:nth-child(2) { display: none; }
  .order-row .order-cell:nth-child(3) { grid-column: 1; padding-inline-start: 48px; }
  .order-row .status-pill { grid-row: 1; grid-column: 2; }
  .order-row .row-menu { display: none; }
  .filters-row { align-items: stretch; flex-wrap: wrap; }
  .filter-search { flex-basis: 100%; }
  .filters-row select { width: calc(50% - 5px); }
  .customer-overview { grid-template-columns: 1fr; }
  .campaign-grid { grid-template-columns: 1fr; }
  .modal-layer { place-items: end center; padding: 0; }
  .sale-modal { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .sale-stepper span { font-size: 0; }
  .sale-stepper b { font-size: 10px; }
  .sale-stepper i { flex: 1; }
  .modal-body { grid-template-columns: 1fr; }
  .order-summary { border-block-start: 1px solid var(--line); border-inline-start: 0; }
  .field-split { grid-template-columns: minmax(0, 1fr) 90px; }
  .add-line-button { grid-column: 1 / -1; }
  .portal-window { padding: 14px; }
  .portal-ui { min-height: 390px; padding: 12px; }
  .portal-products { grid-template-columns: repeat(2, 1fr); }
  .portal-product:last-child { display: none; }
  .pagination-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .sidebar { width: min(90vw, 300px); }
  #main-content { padding-inline: 14px; }
  .global-search input::placeholder { font-size: 11px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi + .kpi { border-block-start: 1px solid var(--line); border-inline-start: 0; }
  .kpi { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; }
  .kpi-head { grid-column: 1 / -1; }
  .kpi strong { margin-block-end: 0; }
  .attention-strip { padding: 12px; }
  .section-title, .order-row { padding-inline: 14px; }
  .modal-header, .sale-form, .order-summary, .modal-footer { padding-inline: 16px; }
  .cart-line { grid-template-columns: minmax(0, 1fr) auto; }
  .cart-line > b { grid-column: 1; }
  .cart-line .remove-line { grid-row: 1; grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Operational workspace v2 */
.local-mode-strip,
.integration-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  margin-block-end: 22px;
  border: 1px solid #d8caa5;
  border-radius: var(--radius-lg);
  background: #fff9e9;
  padding: 14px 18px;
}

.local-mode-strip > span:first-child,
.integration-notice > span:first-child {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: #f2e4bd;
  color: #855f19;
}

.local-mode-strip svg,
.integration-notice svg {
  width: 21px;
  height: 21px;
}

.local-mode-strip b,
.local-mode-strip small,
.integration-notice b,
.integration-notice small {
  display: block;
}

.local-mode-strip small,
.integration-notice small {
  color: #6b624c;
  font-size: 12px;
}

.operational-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.action-list {
  display: grid;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) 70px minmax(170px, 1fr) auto;
  align-items: center;
  gap: 15px;
  min-height: 82px;
  border-block-end: 1px solid var(--line);
  padding: 12px 20px;
}

.action-row:last-child {
  border-block-end: 0;
}

.action-row-copy b,
.action-row-copy small {
  display: block;
}

.action-row-copy small {
  color: var(--ink-faint);
  font-size: 11px;
}

.score-badge {
  display: grid;
  width: 56px;
  min-height: 48px;
  place-items: center;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
}

.score-badge b,
.score-badge small {
  display: block;
  line-height: 1.25;
}

.score-badge b {
  font-size: 17px;
}

.score-badge small {
  color: var(--ink-faint);
  font-size: 9px;
}

.score-badge.danger { border-color: #e6bdb5; background: var(--danger-soft); color: var(--danger); }
.score-badge.wait { border-color: #ead5a6; background: var(--amber-soft); color: #7d5719; }
.score-badge.info { border-color: #c5dce6; background: var(--blue-soft); color: var(--blue); }

.button.compact {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 11px;
  white-space: nowrap;
}

.data-health-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--olive-950);
  color: white;
  padding: 22px;
}

.data-health-card strong {
  display: block;
  margin-block: 6px;
  color: #f4df9d;
  font-size: 35px;
}

.data-health-card p {
  margin: 0 0 18px;
  color: #c4d2cd;
  font-size: 12px;
}

.data-health-card .button {
  border-color: rgb(255 255 255 / 20%);
  background: rgb(255 255 255 / 8%);
  color: white;
}

.monthly-brief {
  margin-block-start: 22px;
}

.brief-metrics,
.inventory-status,
.report-summary,
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.brief-metrics > div,
.inventory-status > div,
.report-summary > article,
.funnel-grid > article {
  min-width: 0;
  border-inline-end: 1px solid var(--line);
  padding: 18px 22px;
}

.brief-metrics > div:last-child,
.inventory-status > div:last-child,
.report-summary > article:last-child,
.funnel-grid > article:last-child {
  border-inline-end: 0;
}

.brief-metrics span,
.brief-metrics b,
.inventory-status span,
.inventory-status b,
.report-summary span,
.report-summary strong,
.report-summary small,
.funnel-grid span,
.funnel-grid strong,
.funnel-grid small {
  display: block;
}

.brief-metrics span,
.inventory-status span,
.report-summary span,
.funnel-grid span {
  color: var(--ink-faint);
  font-size: 11px;
}

.brief-metrics b,
.inventory-status b,
.report-summary strong,
.funnel-grid strong {
  margin-block-start: 4px;
  font-size: clamp(18px, 2vw, 25px);
}

.report-summary small,
.funnel-grid small {
  color: var(--ink-faint);
  font-size: 10px;
}

.inventory-status,
.report-summary,
.funnel-grid,
.question-summary {
  margin-block-end: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.operational-empty {
  min-height: 260px;
  border: 0;
  background: transparent;
}

.operational-empty .button {
  margin-block-start: 16px;
}

.quiet-copy {
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
}

.rule-engine {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 28px;
  align-items: center;
  margin-block-start: 22px;
  border-radius: var(--radius-xl);
  background: var(--olive-950);
  color: white;
  padding: clamp(22px, 4vw, 38px);
}

.rule-engine h2 {
  margin: 5px 0 8px;
  font-size: clamp(22px, 3vw, 31px);
}

.rule-engine p {
  margin: 0;
  color: #c6d3ce;
}

.rule-engine ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-engine li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 11px;
  background: rgb(255 255 255 / 5%);
  padding: 8px 11px;
  font-size: 11px;
}

.rule-engine li b {
  color: #efd58e;
  font-size: 15px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.table-actions .table-action {
  min-height: 30px;
  padding-inline: 6px;
  font-size: 10px;
}

.product-photo {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-tint);
}

.product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-photo.large,
.product-thumb.large {
  width: 100%;
  height: 170px;
  border-radius: 15px;
  font-size: 48px;
}

.form-modal {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  animation: modal-in 180ms ease both;
}

.operation-form {
  padding: 22px;
}

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

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span,
.check-field span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 9px 11px;
}

.field textarea {
  resize: vertical;
}

.field input:disabled {
  background: var(--surface-tint);
  color: var(--ink-faint);
}

.span-2 {
  grid-column: 1 / -1;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-inline-end: 42px;
}

.input-suffix i {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 14px;
  color: var(--ink-faint);
  font-style: normal;
  transform: translateY(-50%);
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--olive-800);
}

.form-note {
  margin-block-start: 18px;
  border-inline-start: 3px solid var(--olive-700);
  background: var(--olive-50);
  color: var(--ink-soft);
  padding: 10px 12px;
  font-size: 11px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-block-start: 22px;
  border-block-start: 1px solid var(--line);
  padding-block-start: 16px;
}

.event-recorder {
  padding: 22px;
}

.event-recorder > p {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.event-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 18px;
  border-radius: 12px;
  background: var(--olive-50);
  padding: 13px 16px;
}

.payment-balance strong {
  color: var(--olive-800);
  font-size: 21px;
}

.settlement-fields {
  grid-template-columns: minmax(140px, 0.7fr) minmax(120px, 0.5fr) minmax(180px, 1fr);
  margin-block-start: 20px;
}

.receivable-list {
  display: grid;
}

.receivable-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(120px, 0.7fr) minmax(140px, 0.7fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 78px;
  border-block-end: 1px solid var(--line);
  padding: 12px 20px;
}

.receivable-row:last-child {
  border-block-end: 0;
}

.receivable-row.is-overdue {
  background: #fff8f6;
}

.receivable-row > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
}

.receivable-row > div:first-child small {
  grid-column: 2;
}

.receivable-row > div:not(:first-child) span,
.receivable-row > div:not(:first-child) b {
  display: block;
}

.receivable-row span,
.receivable-row small {
  color: var(--ink-faint);
  font-size: 10px;
}

.data-table-wrap.flat {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-block-end: 22px;
}

.ranking-list {
  display: grid;
  gap: 4px;
}

.ranking-list article {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  border-block-end: 1px solid var(--line);
  padding: 8px 4px;
}

.ranking-list article > span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--olive-100);
  color: var(--olive-800);
  font-size: 11px;
  font-weight: 800;
}

.ranking-list b,
.ranking-list small {
  display: block;
}

.ranking-list small {
  color: var(--ink-faint);
  font-size: 10px;
}

.ranking-list i {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 38px;
  width: var(--rank);
  height: 2px;
  background: var(--olive-700);
}

.decline-list {
  display: grid;
}

.decline-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-block-end: 1px solid var(--line);
  padding: 9px 2px;
}

.decline-list article:last-child { border-block-end: 0; }
.decline-list article > span { color: var(--danger); }
.decline-list svg { width: 20px; height: 20px; }
.decline-list b,
.decline-list small { display: block; }
.decline-list small { color: var(--ink-faint); font-size: 10px; }

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

.question-summary > div {
  border-inline-end: 1px solid var(--line);
  padding: 18px 22px;
}

.question-summary > div:last-child { border-inline-end: 0; }
.question-summary span,
.question-summary b { display: block; }
.question-summary span { color: var(--ink-faint); font-size: 11px; }
.question-summary b { font-size: 25px; }

.question-list {
  display: grid;
  gap: 12px;
}

.question-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px 20px;
}

.question-list h3 {
  margin: 8px 0 3px;
  font-size: 16px;
}

.question-list p {
  margin: 0;
  color: var(--ink-soft);
}

.question-list small {
  color: var(--ink-faint);
  font-size: 10px;
}

.catalog-readiness {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 0.45fr)) minmax(280px, 1.65fr);
  align-items: center;
  gap: 0;
  margin-block-end: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.catalog-readiness > div,
.catalog-readiness > p {
  margin: 0;
  border-inline-end: 1px solid var(--line);
  padding: 15px 18px;
}

.catalog-readiness > p {
  border-inline-end: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.catalog-readiness span,
.catalog-readiness b {
  display: block;
}

.catalog-readiness span { color: var(--ink-faint); font-size: 10px; }
.catalog-readiness b { font-size: 21px; }

.catalog-grid,
.public-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.catalog-card,
.public-product-grid article {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 12px;
}

.catalog-card > div,
.public-product-grid article > :not(.product-photo):not(.product-thumb) {
  margin-inline: 4px;
}

.catalog-card > div > span,
.public-product-grid article > span {
  display: block;
  margin-block-start: 12px;
  color: var(--olive-700);
  font-size: 10px;
  font-weight: 800;
}

.catalog-card h3,
.public-product-grid h2 {
  margin: 3px 0;
  font-size: 16px;
}

.catalog-card p,
.public-product-grid p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.catalog-card strong,
.catalog-card small,
.public-product-grid strong,
.public-product-grid small {
  display: block;
}

.catalog-card strong,
.public-product-grid strong {
  margin-block-start: 12px;
  font-size: 15px;
}

.catalog-card small,
.public-product-grid small {
  color: var(--ink-faint);
  font-size: 10px;
}

.catalog-faq {
  margin-block-start: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
}

.catalog-faq details {
  border-block-start: 1px solid var(--line);
  padding-block: 12px;
}

.catalog-faq summary {
  cursor: pointer;
  font-weight: 800;
}

.catalog-faq p {
  color: var(--ink-soft);
}

.public-catalog-shell {
  min-height: 100vh;
  background: var(--paper);
  padding: 24px max(20px, calc((100vw - 1180px) / 2));
}

.public-catalog-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.public-catalog-shell .login-brand {
  color: var(--ink);
}

.public-catalog-shell .login-brand small {
  color: var(--ink-faint);
}

.public-catalog-shell > header > a {
  color: var(--olive-800);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.public-catalog-hero {
  margin-block: 40px 28px;
  border-radius: var(--radius-xl);
  background: var(--olive-950);
  color: white;
  padding: clamp(28px, 5vw, 56px);
}

.public-catalog-hero h1 {
  margin: 8px 0;
  font-size: clamp(32px, 5vw, 54px);
}

.public-catalog-hero p {
  margin: 0;
  color: #c5d1cc;
}

.public-catalog-shell > footer {
  margin-block-start: 28px;
  border-block-start: 1px solid var(--line);
  color: var(--ink-soft);
  padding-block: 20px;
  text-align: center;
}

.toast.is-error span {
  background: var(--danger-soft);
  color: var(--danger);
}

@media (max-width: 1180px) {
  .operational-grid { grid-template-columns: 1fr; }
  .catalog-grid,
  .public-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-readiness { grid-template-columns: repeat(3, 1fr); }
  .catalog-readiness > p { grid-column: 1 / -1; border-block-start: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .brief-metrics,
  .inventory-status,
  .report-summary,
  .funnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-metrics > div:nth-child(2),
  .inventory-status > div:nth-child(2),
  .report-summary > article:nth-child(2),
  .funnel-grid > article:nth-child(2) { border-inline-end: 0; }
  .brief-metrics > div:nth-child(-n + 2),
  .inventory-status > div:nth-child(-n + 2),
  .report-summary > article:nth-child(-n + 2),
  .funnel-grid > article:nth-child(-n + 2) { border-block-end: 1px solid var(--line); }
  .rule-engine,
  .report-grid { grid-template-columns: 1fr; }
  .action-row { grid-template-columns: minmax(0, 1fr) auto; }
  .action-row-copy { grid-column: 1; }
  .action-row .button { grid-column: 2; grid-row: 2; }
  .receivable-row { grid-template-columns: minmax(0, 1fr) auto; }
  .receivable-row > div:nth-child(2),
  .receivable-row > div:nth-child(3) { grid-row: 2; }
  .receivable-row > .button { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 680px) {
  .local-mode-strip,
  .integration-notice { grid-template-columns: auto 1fr; align-items: start; }
  .local-mode-strip .text-action,
  .integration-notice > .status-pill { grid-column: 2; justify-self: start; }
  .form-modal { width: 100%; max-height: 94vh; border-radius: 20px 20px 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .settlement-fields { grid-template-columns: 1fr; }
  .event-buttons { grid-template-columns: 1fr; }
  .question-summary { grid-template-columns: 1fr; }
  .question-summary > div { border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .question-summary > div:last-child { border-block-end: 0; }
  .question-list article { grid-template-columns: 1fr; }
  .catalog-grid,
  .public-product-grid { grid-template-columns: 1fr; }
  .catalog-readiness { grid-template-columns: repeat(3, 1fr); }
  .catalog-readiness > div,
  .catalog-readiness > p { padding: 12px; }
  .product-photo.large,
  .product-thumb.large { height: 150px; }
  .public-catalog-shell { padding: 18px; }
}

@media (max-width: 480px) {
  .brief-metrics,
  .inventory-status,
  .report-summary,
  .funnel-grid { grid-template-columns: 1fr; }
  .brief-metrics > div,
  .inventory-status > div,
  .report-summary > article,
  .funnel-grid > article { border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .brief-metrics > div:last-child,
  .inventory-status > div:last-child,
  .report-summary > article:last-child,
  .funnel-grid > article:last-child { border-block-end: 0; }
  .rule-engine ol { grid-template-columns: 1fr; }
  .catalog-readiness { grid-template-columns: 1fr; }
  .catalog-readiness > div { border-inline-end: 0; border-block-end: 1px solid var(--line); }
  .catalog-readiness > p { grid-column: auto; }
}
