@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --bg-app: #F7F5F2;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EFECE7;
  --border-color: #E6E0D8;
  --text-primary: #1C1410;
  --text-secondary: #6E5D54;
  --brand-primary: #B34B20;
  --brand-maroon: #5C1D16;
  --brand-gold: #D4941E;
  --card-shadow: 0 4px 20px rgba(28, 20, 16, 0.05);
  --xurma-primary: var(--brand-primary);
  --xurma-primary-dark: #903A1B;
  --xurma-maroon: var(--brand-maroon);
  --xurma-gold: var(--brand-gold);
  --xurma-bg: var(--bg-app);
  --xurma-surface: var(--bg-surface);
  --xurma-sand: var(--bg-subtle);
  --xurma-border: var(--border-color);
  --xurma-text: var(--text-primary);
  --xurma-muted: var(--text-secondary);
  --xurma-success: #2E6F40;
  --font-main: "Vazirmatn", sans-serif;
  --shadow-card: var(--card-shadow);
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-app);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg-app: #0E0C0B;
  --bg-surface: #191615;
  --bg-subtle: #241F1D;
  --border-color: #2E2825;
  --text-primary: #F5F1ED;
  --text-secondary: #A69890;
  --brand-primary: #E26838;
  --brand-maroon: #4A1712;
  --brand-gold: #F2B538;
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --xurma-primary-dark: #B84A27;
  --xurma-success: #81C995;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg-app);
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-main);
  color: var(--text-primary);
  background: var(--bg-app);
  font-size: 16px;
  line-height: 1.6;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(217 155 38 / 75%);
  outline-offset: 3px;
}

button:active {
  transform: scale(0.975);
}

.app-frame {
  position: relative;
  width: min(100%, 960px);
  min-height: 100vh;
  min-height: 100dvh;
  margin-inline: auto;
  overflow: clip;
  background: var(--bg-app);
  box-shadow: var(--card-shadow);
}

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-app);
}

.screen[hidden] {
  display: none;
}

.screen.is-visible {
  animation: screen-arrive 480ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

@keyframes screen-arrive {
  from {
    opacity: 0;
    transform: translateY(11px) scale(0.996);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.kilim-pattern {
  position: absolute;
  pointer-events: none;
}

.splash-screen {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(132deg, var(--xurma-maroon) 4%, #762817 51%, var(--xurma-primary) 100%);
  cursor: pointer;
  isolation: isolate;
}

.splash-screen::before,
.splash-screen::after {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 50%;
  content: "";
}

.splash-screen::before {
  inset-block-start: -200px;
  inset-inline-start: -130px;
}

.splash-screen::after {
  inset-block-end: -255px;
  inset-inline-end: -100px;
  width: 520px;
  height: 520px;
}

.splash-pattern {
  z-index: -1;
  inset: -20%;
  width: 140%;
  height: 140%;
  opacity: 0.065;
}

.splash-skip {
  display: flex;
  width: min(100%, 380px);
  flex-direction: column;
  align-items: center;
  padding: 48px 25px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  animation: logo-float 4s ease-in-out infinite;
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.brand-emblem {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--xurma-primary);
}

.brand-emblem svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-emblem-large {
  width: 112px;
  height: 112px;
  margin-bottom: 20px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 34px;
  color: #fff;
  background: rgb(255 255 255 / 9%);
  box-shadow: 0 0 50px rgb(255 234 197 / 18%), inset 0 1px 0 rgb(255 255 255 / 30%);
  animation: emblem-glow 2.4s ease-in-out infinite alternate;
}

.brand-emblem-large svg {
  width: 76px;
  height: 76px;
}

@keyframes emblem-glow {
  to { box-shadow: 0 0 65px rgb(255 234 197 / 31%), inset 0 1px 0 rgb(255 255 255 / 40%); }
}

.splash-wordmark {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 5px;
}

.splash-wordmark b {
  font-weight: 900;
}

.splash-welcome {
  margin-top: 21px;
  color: #f5e1d5;
  font-size: 14px;
  font-weight: 500;
}

.splash-tap {
  margin-top: 54px;
  color: rgb(255 255 255 / 55%);
  font-size: 10px;
  animation: tap-pulse 1.8s ease-in-out infinite;
}

@keyframes tap-pulse {
  50% { opacity: 0.5; }
}

.splash-version {
  position: absolute;
  inset-block-end: max(25px, env(safe-area-inset-bottom));
  color: rgb(255 255 255 / 53%);
  font-size: 9px;
  letter-spacing: 1.8px;
}

.setup-screen {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.setup-content {
  display: flex;
  width: min(100%, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-self: center;
  padding: max(24px, env(safe-area-inset-top)) 42px max(24px, env(safe-area-inset-bottom));
}

.setup-header,
.flow-header {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
}

.small-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--xurma-maroon);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-decoration: none;
}

.brand-emblem-small {
  width: 34px;
  height: 34px;
  border: 1px solid #ecd8ca;
  border-radius: 11px;
  background: #fff;
}

.brand-emblem-small svg {
  width: 26px;
  height: 26px;
}

.step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--xurma-muted);
  font-size: 10px;
}

.step-kicker span {
  direction: ltr;
  color: #b7a49a;
  font-size: 9px;
  letter-spacing: 0.6px;
}

.setup-heading {
  margin: 34px 0 20px;
}

.eyebrow {
  margin: 0;
  color: var(--xurma-primary);
  font-size: 10px;
  font-weight: 700;
}

.setup-heading h1 {
  margin: 6px 0 4px;
  color: var(--xurma-maroon);
  font-size: clamp(24px, 5vw, 29px);
  font-weight: 800;
}

.setup-heading p {
  margin: 0;
  color: var(--xurma-muted);
  font-size: 12px;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.language-option {
  position: relative;
  display: grid;
  min-height: 75px;
  grid-template-columns: 39px minmax(0, 1fr);
  grid-template-rows: 1fr 1fr;
  align-content: center;
  align-items: end;
  justify-items: start;
  column-gap: 11px;
  padding: 12px 13px;
  border: 1px solid var(--xurma-border);
  border-radius: 14px;
  background: var(--xurma-surface);
  cursor: pointer;
  text-align: start;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.language-option:hover {
  border-color: #d7b8a5;
  transform: translateY(-1px);
}

.language-option.is-selected {
  border-color: var(--xurma-primary);
  background: #fffaf6;
  box-shadow: 0 0 0 2px rgb(168 78 36 / 9%);
}

.flag {
  grid-row: 1 / span 2;
  width: 39px;
  height: 27px;
  align-self: center;
  border: 1px solid rgb(43 24 16 / 9%);
  border-radius: 5px;
  box-shadow: 0 2px 4px rgb(43 24 16 / 8%);
}

.language-name {
  overflow: hidden;
  max-width: 100%;
  color: var(--xurma-text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-native {
  color: var(--xurma-muted);
  font-size: 9px;
}

.language-check {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--xurma-primary);
  opacity: 0;
  transform: scale(0.7);
  transition: 160ms ease;
}

.language-check svg {
  width: 12px;
  height: 12px;
  stroke-width: 3;
}

.is-selected .language-check {
  opacity: 1;
  transform: scale(1);
}

.setup-footer {
  display: grid;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(120deg, var(--xurma-primary), var(--xurma-primary-dark));
  box-shadow: 0 9px 18px rgb(168 78 36 / 20%);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 11px 22px rgb(168 78 36 / 28%);
  filter: brightness(1.04);
}

.primary-button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.45;
}

.primary-button svg {
  width: 17px;
  height: 17px;
}

.secure-caption {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9a867a;
  font-size: 9px;
}

.secure-caption svg {
  width: 13px;
  height: 13px;
  color: var(--xurma-success);
}

.onboarding-screen {
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) 42px max(20px, env(safe-area-inset-bottom));
}

.flow-header {
  width: min(100%, 740px);
  align-self: center;
}

.text-button,
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  color: var(--xurma-muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.text-button svg {
  width: 15px;
  height: 15px;
}

.onboarding-body {
  display: flex;
  width: min(100%, 700px);
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 16px 0;
  text-align: center;
}

.onboarding-art {
  display: grid;
  width: min(100%, 330px);
  height: clamp(205px, 37vh, 310px);
  min-height: 190px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid #efe4db;
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 51% 47%, #fff 5%, #f9f0e8 70%);
  box-shadow: inset 0 1px 1px #fff, 0 18px 40px rgb(92 29 22 / 5%);
  overflow: hidden;
}

.onboarding-art svg {
  width: min(89%, 275px);
  height: 88%;
}

.onboarding-copy {
  max-width: 570px;
}

.onboarding-copy .eyebrow {
  direction: ltr;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.onboarding-copy h1 {
  margin: 8px 0 7px;
  color: var(--xurma-maroon);
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
}

.onboarding-copy p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--xurma-muted);
  font-size: 12px;
  line-height: 2;
}

.slide-dots {
  display: flex;
  direction: ltr;
  gap: 7px;
  margin-top: 23px;
}

.slide-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: #dfd0c5;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.slide-dot.is-active {
  width: 23px;
  background: var(--xurma-primary);
}

.flow-footer {
  width: min(100%, 740px);
  align-self: center;
}

.onboarding-footer {
  display: grid;
  gap: 12px;
}

.footer-note {
  color: #a48f83;
  font-size: 9px;
  text-align: center;
}

.footer-note span {
  color: var(--xurma-gold);
}

.survey-screen {
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 42px max(18px, env(safe-area-inset-bottom));
}

.back-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--xurma-border);
  border-radius: 12px;
  color: var(--xurma-maroon);
  background: #fff;
}

.back-button svg {
  width: 18px;
  height: 18px;
}

.survey-content {
  display: flex;
  width: min(100%, 680px);
  flex: 1;
  flex-direction: column;
  align-self: center;
  padding-top: 16px;
}

.survey-progress {
  display: grid;
  gap: 10px;
}

.survey-progress-track {
  display: flex;
  align-items: center;
  gap: 7px;
}

.progress-step {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #e9ded5;
}

.progress-step.is-complete {
  background: var(--xurma-primary);
}

.progress-step.is-current {
  width: 10px;
  height: 10px;
  flex-basis: 10px;
  background: var(--xurma-gold);
  box-shadow: 0 0 0 3px rgb(217 155 38 / 16%);
}

.survey-heading {
  margin: 23px 0 17px;
}

.survey-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid #eedbcc;
  border-radius: 13px;
  color: var(--xurma-primary);
  background: #fff;
}

.survey-icon svg {
  width: 19px;
  height: 19px;
}

.survey-heading h1 {
  max-width: 620px;
  margin: 0;
  color: var(--xurma-maroon);
  font-size: clamp(18px, 4vw, 23px);
  font-weight: 800;
  line-height: 1.7;
}

.survey-heading p {
  margin: 4px 0 0;
  color: var(--xurma-muted);
  font-size: 10px;
}

.survey-options {
  display: grid;
  gap: 8px;
}

.survey-option {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border: 1px solid var(--xurma-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: start;
  transition: 160ms ease;
}

.survey-option:hover {
  border-color: #cfad98;
}

.survey-option.is-selected {
  border-color: var(--xurma-primary);
  background: #fff9f5;
  box-shadow: 0 0 0 2px rgb(168 78 36 / 7%);
}

.option-radio {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid #d6c5b9;
  border-radius: 50%;
}

.option-radio::after {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transform: scale(0);
  transition: transform 140ms ease;
}

.survey-option.is-selected .option-radio {
  border-color: var(--xurma-primary);
  background: var(--xurma-primary);
}

.survey-option.is-selected .option-radio::after {
  transform: scale(1);
}

.option-label {
  color: #554238;
  font-size: 11px;
  line-height: 1.7;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: auto 0 13px;
  padding: 10px 12px;
  border: 1px solid #e8eee6;
  border-radius: 12px;
  color: #6f7a6a;
  background: #f6f8f3;
  font-size: 9px;
  line-height: 1.8;
}

.privacy-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--xurma-success);
}

.survey-submit {
  min-height: 49px;
}

.dashboard-screen {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 520px;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-header {
  z-index: 3;
  display: flex;
  height: 68px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid rgb(230 216 204 / 72%);
  background: rgb(250 247 244 / 95%);
  backdrop-filter: blur(14px);
}

.header-leading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--xurma-border);
  border-radius: 12px;
  color: var(--xurma-maroon);
  background: var(--xurma-surface);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.icon-button:hover {
  background: #fff8f1;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.pro-crown {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #f0dfbd;
  border-radius: 12px;
  color: var(--xurma-gold);
  background: #fff9ec;
  cursor: pointer;
  transition: transform 160ms ease;
}

.pro-crown svg {
  width: 18px;
  height: 18px;
  fill: rgb(217 155 38 / 12%);
  stroke-width: 2.2;
}

.dashboard-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--xurma-maroon);
  text-decoration: none;
}

.dashboard-emblem {
  width: 38px;
  height: 38px;
  border: 1px solid #eddaca;
  border-radius: 12px;
  background: #fff;
}

.dashboard-emblem svg {
  width: 30px;
  height: 30px;
}

.dashboard-wordmark {
  display: grid;
  color: var(--xurma-maroon);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 1.1;
}

.dashboard-wordmark b {
  color: var(--xurma-primary);
  font-weight: 900;
}

.dashboard-wordmark small {
  margin-top: 3px;
  color: var(--xurma-muted);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0;
}

.dashboard-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #d8c6b8 transparent;
  scrollbar-width: thin;
}

.dashboard-content {
  width: min(100%, 700px);
  margin-inline: auto;
  padding: 19px 29px 100px;
}

.hero-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: 22px 23px 17px;
  border: 1px solid rgb(255 218 151 / 45%);
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(118deg, var(--xurma-maroon) 0%, #732a1a 53%, var(--xurma-primary-dark) 100%);
  box-shadow: 0 12px 28px rgb(92 29 22 / 19%);
  isolation: isolate;
}

.hero-card::before {
  position: absolute;
  z-index: -1;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: linear-gradient(180deg, #f3d28b, var(--xurma-gold), #a65d28);
  content: "";
}

.hero-pattern {
  z-index: -1;
  inset-block: -40px;
  inset-inline-start: 18%;
  width: 270px;
  height: 270px;
  opacity: 0.075;
}

.hero-top {
  position: relative;
}

.hero-top-tools {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-period {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgb(255 255 255 / 19%);
  border-radius: 99px;
  color: #f9e8d1;
  background: rgb(255 255 255 / 9%);
  font-size: 9px;
}

.hero-period svg {
  width: 12px;
  height: 12px;
  color: #edc875;
}

.hero-label {
  color: #f2ded0;
  font-size: 10px;
  font-weight: 500;
}

.hero-amount-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
}

.hero-amount-row strong {
  color: #fff;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.hero-amount-row > span {
  color: #f5dcc4;
  font-size: 11px;
}

.hero-caption {
  color: rgb(255 255 255 / 58%);
  font-size: 9px;
}

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 16%);
}

.hero-metric {
  display: grid;
  gap: 2px;
}

.hero-metric span {
  color: #efdbcc;
  font-size: 9px;
}

.hero-metric strong {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.hero-divider {
  width: 1px;
  height: 28px;
  background: rgb(255 255 255 / 21%);
}

.visibility-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 10px;
  color: #fff5eb;
  background: rgb(255 255 255 / 9%);
  cursor: pointer;
  transition: background 160ms ease;
}

.visibility-toggle:hover {
  background: rgb(255 255 255 / 16%);
}

.visibility-toggle svg {
  width: 16px;
  height: 16px;
}

.action-section {
  margin-top: 23px;
}

.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 11px;
}

.section-title-row h2 {
  margin: 2px 0 0;
  color: var(--xurma-text);
  font-size: 14px;
  font-weight: 800;
}

.section-count {
  color: #b5a196;
  font-size: 10px;
  letter-spacing: 1px;
}

.action-container {
  display: grid;
  padding: 10px;
  border: 1px solid #eee3d9;
  border-radius: 18px;
  background: var(--xurma-sand);
}

.action-grid-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.action-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 91px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: border-color 170ms ease, background 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.action-card:hover {
  border-color: rgb(230 216 204 / 80%);
  background: rgb(255 255 255 / 74%);
  box-shadow: 0 4px 12px rgb(92 29 22 / 5%);
  transform: translateY(-2px);
}

.action-card > span:last-child:not(.action-icon):not(.new-badge) {
  max-width: 100%;
  color: #554339;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
}

.action-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 68%);
  border-radius: 13px;
  box-shadow: 0 3px 8px rgb(72 40 22 / 5%);
}

.action-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.icon-terracotta { color: #a54b27; background: #f7e3d8; }
.icon-gold { color: #a4771d; background: #fbf0d7; }
.icon-green { color: #36734a; background: #e3efe3; }
.icon-plum { color: #78506c; background: #efe5ef; }
.icon-blue { color: #48708b; background: #e2edf2; }
.icon-rose { color: #a55455; background: #f5e3e1; }
.icon-amber { color: #a26d26; background: #f8ecd8; }

.store-promo {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 143px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  margin-top: 19px;
  padding: 17px 20px;
  border: 1px solid rgb(255 218 151 / 25%);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(116deg, var(--xurma-maroon) 0%, #702718 59%, var(--xurma-primary) 100%);
  cursor: pointer;
  text-align: start;
  isolation: isolate;
  transition: filter 180ms ease, transform 160ms ease;
}

.store-promo:hover {
  filter: brightness(1.06);
}

.promo-pattern {
  z-index: -1;
  inset-block: -30px;
  inset-inline-start: 15%;
  width: 230px;
  height: 230px;
  opacity: 0.075;
}

.store-promo-content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 6px;
}

.promo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e8c89f;
  font-size: 8px;
}

.promo-eyebrow svg {
  width: 12px;
  height: 12px;
}

.store-promo-content > strong {
  font-size: 15px;
  font-weight: 800;
}

.promo-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  padding: 8px 12px;
  border-radius: 99px;
  color: var(--xurma-maroon);
  background: #fffaf4;
  font-size: 9px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgb(34 12 7 / 14%);
}

.promo-button svg {
  width: 13px;
  height: 13px;
}

.store-illustration {
  position: relative;
  display: grid;
  width: 113px;
  height: 104px;
  flex: 0 0 auto;
  place-items: center;
  margin-inline-end: 8%;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 25px 25px 17px 17px;
  color: #f8e6d3;
  background: linear-gradient(145deg, rgb(255 255 255 / 13%), rgb(255 255 255 / 3%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 16%);
  transform: perspective(200px) rotateY(-7deg);
}

.store-illustration::before {
  position: absolute;
  inset-block-start: -9px;
  inset-inline: -7px;
  height: 24px;
  border-radius: 8px 8px 4px 4px;
  background: repeating-linear-gradient(90deg, #efc682 0 15px, #a84826 15px 29px);
  content: "";
}

.store-illustration > svg:first-child {
  width: 51px;
  height: 51px;
  margin-top: 13px;
  stroke-width: 1.2;
}

.store-illustration > svg:last-child {
  position: absolute;
  inset-block-end: 10px;
  inset-inline-start: -13px;
  width: 34px;
  height: 34px;
  padding: 7px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 11px;
  color: #f4cb82;
  background: #7e311f;
}

.delivery-action {
  padding-top: 15px;
}

.new-badge {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-start: 4px;
  padding: 2px 6px;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 99px;
  color: #fff;
  background: linear-gradient(120deg, #d94135, #a91d2e);
  box-shadow: 0 2px 5px rgb(130 22 22 / 14%);
  font-size: 7px;
  font-weight: 700;
}

.pro-banner {
  position: relative;
  overflow: hidden;
  margin-top: 19px;
  padding: 18px 19px 17px;
  border: 1px solid #e8d2ac;
  border-radius: 18px;
  background: linear-gradient(125deg, #fff8e9, #f4e9d8 75%, #f8efe2);
  box-shadow: 0 7px 22px rgb(123 80 22 / 6%);
  isolation: isolate;
}

.pro-pattern {
  z-index: -1;
  inset-block: -30px;
  inset-inline-start: -2%;
  width: 230px;
  height: 230px;
  opacity: 0.055;
}

.pro-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pro-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9a6416;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
}

.pro-mark svg {
  width: 14px;
  height: 14px;
  fill: rgb(217 155 38 / 20%);
}

.pro-sparkle {
  color: #d9a647;
  font-size: 17px;
}

.pro-banner h2 {
  margin: 6px 0 3px;
  color: #4a2d1f;
  font-size: 14px;
  font-weight: 800;
}

.pro-banner > p {
  margin: 0;
  color: #79634e;
  font-size: 9px;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.feature-chips span {
  padding: 5px 8px;
  border: 1px solid #ecddc5;
  border-radius: 99px;
  color: #765d46;
  background: rgb(255 255 255 / 63%);
  font-size: 8px;
}

.pro-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: #8d501c;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.pro-cta svg {
  width: 14px;
  height: 14px;
}

.settings-section {
  margin-top: 22px;
}

.settings-section .action-card {
  min-height: 82px;
}

.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  color: #a38e82;
  font-size: 9px;
}

.dashboard-footer b {
  color: var(--xurma-primary);
  font-weight: 800;
}

.footer-emblem {
  width: 20px;
  height: 20px;
  border: 1px solid #e8d5c6;
  border-radius: 7px;
  background: #fff;
}

.footer-emblem svg {
  width: 16px;
  height: 16px;
}

.bottom-nav {
  position: absolute;
  z-index: 4;
  inset-block-end: 0;
  inset-inline: 0;
  display: grid;
  height: calc(68px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 5px 12px max(5px, env(safe-area-inset-bottom));
  border-top: 1px solid #eee4dc;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 -7px 25px rgb(67 37 21 / 5%);
  backdrop-filter: blur(15px);
}

.bottom-tab {
  display: flex;
  min-width: 0;
  height: 49px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 2px;
  border: 0;
  color: #9a887d;
  background: transparent;
  cursor: pointer;
  font-size: 8px;
  transition: color 160ms ease, transform 160ms ease;
}

.bottom-tab svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.bottom-tab.is-active {
  color: var(--xurma-primary);
  font-weight: 700;
}

.bottom-tab-center {
  overflow: visible;
  height: 60px;
}

.scanner-button {
  display: grid;
  width: 53px;
  height: 53px;
  place-items: center;
  margin-top: -20px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--xurma-primary), var(--xurma-primary-dark));
  box-shadow: 0 0 0 2px #e9c985, 0 7px 17px rgb(92 29 22 / 25%);
  transition: transform 160ms ease;
}

.bottom-tab-center:hover .scanner-button {
  transform: translateY(-2px);
}

.scanner-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.drawer-backdrop {
  position: absolute;
  z-index: 8;
  inset: 0;
  background: rgba(43, 24, 16, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 260ms ease;
}

.drawer-backdrop[hidden],
.drawer-modal-backdrop[hidden] {
  display: none;
}

.drawer-backdrop.is-open {
  opacity: 1;
}

.side-drawer {
  position: absolute;
  z-index: 9;
  inset-block: 0;
  inset-inline-start: 0;
  display: flex;
  width: min(82%, 340px);
  height: 100%;
  flex-direction: column;
  padding: max(18px, env(safe-area-inset-top)) 17px max(16px, env(safe-area-inset-bottom));
  overflow: hidden;
  border-radius: 24px 0 0 24px;
  background: #FAF7F4;
  box-shadow: -18px 0 48px rgb(43 24 16 / 24%);
  transform: translateX(105%);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[dir="rtl"] .side-drawer {
  transform: translateX(105%);
}

[dir="rtl"] .side-drawer.is-open {
  transform: translateX(0);
}

[dir="ltr"] .side-drawer {
  inset-inline-start: auto;
  inset-inline-end: 0;
  border-radius: 0 24px 24px 0;
  box-shadow: 18px 0 48px rgb(43 24 16 / 24%);
  transform: translateX(-105%);
}

[dir="ltr"] .side-drawer.is-open {
  transform: translateX(0);
}

.drawer-account {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 54px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid #E6D8CC;
}

.profile-avatar {
  display: flex;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #A84E24;
  background: #F2EAE2;
}

.profile-avatar svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.account-switcher-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}

.account-switcher {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #3c2b22;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: start;
  transition: background 160ms ease, border-color 160ms ease;
}

.account-switcher:hover,
.account-switcher[aria-expanded="true"] {
  border-color: #ead9cc;
  background: #fff;
}

.account-switcher svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #9a7a68;
  transition: transform 180ms ease;
}

.account-switcher[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  z-index: 4;
  inset-block-start: calc(100% + 6px);
  inset-inline: 0;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid #ead9cc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(43 24 16 / 14%);
  animation: dropdown-enter 160ms ease both;
}

.account-dropdown[hidden] {
  display: none;
}

@keyframes dropdown-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-option {
  min-height: 37px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: #514035;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-align: start;
  transition: background 150ms ease, color 150ms ease;
}

.account-option:hover {
  color: var(--xurma-primary);
  background: #f8f0ea;
}

.account-profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 3px;
}

.account-profile-row .account-option {
  width: 100%;
}

.account-profile-delete {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #dc2626;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 19px;
}

.account-profile-delete:hover {
  background: rgb(220 38 38 / 10%);
}

.account-profile-delete:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.drawer-settings {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 12px;
  color: #8c6b59;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.drawer-settings:hover {
  color: var(--xurma-primary);
  background: #f2eae2;
}

.drawer-settings svg {
  width: 19px;
  height: 19px;
}

.drawer-scroll {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-block: 13px;
  scrollbar-color: #d7c3b4 transparent;
  scrollbar-width: thin;
}

.drawer-pro-card {
  position: relative;
  display: flex;
  min-height: 91px;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  padding: 13px;
  border: 1px solid #d99b26;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(132deg, #5C1D16 0%, #7c2d1b 54%, #A84E24 100%);
  box-shadow: 0 7px 18px rgb(92 29 22 / 16%);
  cursor: pointer;
  text-align: start;
  transition: filter 160ms ease, transform 160ms ease;
}

.drawer-pro-card:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.pro-badge {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 230 170 / 75%);
  border-radius: 50%;
  color: #5C1D16;
  background: #D99B26;
  box-shadow: 0 0 18px rgb(217 155 38 / 55%), inset 0 1px 5px rgb(255 255 255 / 45%);
}

.pro-badge svg {
  width: 21px;
  height: 21px;
  fill: rgb(92 29 22 / 10%);
  stroke-width: 2.2;
}

.drawer-pro-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.drawer-pro-copy strong {
  font-size: 12px;
  font-weight: 800;
}

.drawer-pro-copy small {
  color: #f2d6c3;
  font-size: 9px;
  line-height: 1.5;
}

.drawer-links {
  display: grid;
  gap: 2px;
}

.drawer-links button {
  display: flex;
  min-height: 49px;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  border-radius: 11px;
  color: #514035;
  background: transparent;
  cursor: pointer;
  text-align: start;
  transition: color 150ms ease, background 150ms ease;
}

.drawer-links button:hover {
  color: var(--xurma-primary);
  background: #f7eee8;
}

.drawer-link-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 10px;
  color: #A84E24;
  background: #F2EAE2;
}

.drawer-link-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}

.drawer-links button > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.drawer-link-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #b5a297;
}

.replay-intro {
  display: flex;
  min-height: 43px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  color: #806858;
  background: #f7f0ea;
  cursor: pointer;
  text-align: start;
  transition: background 150ms ease, color 150ms ease;
}

.replay-intro:hover {
  color: var(--xurma-primary);
  background: #f1e4d9;
}

.replay-intro > svg:first-child {
  width: 17px;
  height: 17px;
  color: var(--xurma-primary);
}

.replay-intro > span {
  flex: 1;
  font-size: 10px;
  font-weight: 600;
}

.replay-intro > svg:last-child {
  width: 15px;
  height: 15px;
  color: #b5a297;
}

.drawer-language {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid #E6D8CC;
}

.drawer-language-label {
  color: #735b4d;
  font-size: 10px;
  font-weight: 700;
}

.drawer-language-options {
  display: flex;
  gap: 7px;
}

.drawer-language-options button {
  min-height: 35px;
  flex: 1;
  padding: 0 6px;
  border: 1px solid #ead9cc;
  border-radius: 10px;
  color: #6b5345;
  background: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 600;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.drawer-language-options button:hover {
  border-color: #c99579;
}

.drawer-language-options button.is-active {
  border-color: #A84E24;
  color: #fff;
  background: #A84E24;
  box-shadow: 0 4px 10px rgb(168 78 36 / 20%);
}

.drawer-modal-backdrop {
  position: absolute;
  z-index: 11;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(43 24 16 / 48%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modal-backdrop-enter 180ms ease both;
}

.drawer-modal-backdrop[hidden] {
  display: none;
}

@keyframes modal-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer-modal {
  position: relative;
  display: grid;
  width: min(100%, 350px);
  justify-items: center;
  padding: 29px 23px 22px;
  border: 1px solid #ead9cc;
  border-radius: 22px;
  background: #fffdfa;
  box-shadow: 0 22px 65px rgb(35 17 12 / 25%);
  text-align: center;
  animation: modal-card-enter 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.drawer-modal[hidden],
.developer-brand[hidden] {
  display: none;
}

@keyframes modal-card-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.drawer-modal-close {
  position: absolute;
  inset-block-start: 11px;
  inset-inline-start: 11px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #8b7669;
  background: #f5eee8;
  cursor: pointer;
}

.drawer-modal-close .ph-bold {
  font-size: 19px;
}

.drawer-modal-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 17px;
  color: #A84E24;
  background: #F2EAE2;
}

.drawer-modal-icon .ph-duotone {
  font-size: 30px;
}

.drawer-modal-eyebrow {
  margin: 14px 0 2px;
  color: #A84E24;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.drawer-modal h2 {
  margin: 3px 0 6px;
  color: #5C1D16;
  font-size: 17px;
  font-weight: 800;
}

.drawer-modal-copy {
  margin: 0;
  color: #7C655A;
  font-size: 11px;
  line-height: 1.9;
}

.developer-brand {
  display: grid;
  width: 100%;
  justify-items: center;
  gap: 4px;
  margin-top: 17px;
  padding: 15px;
  border: 1px solid #ead9cc;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #f8f0e9);
}

.developer-brand-mark {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 11px;
  color: #f6d69d;
  background: #5C1D16;
}

.developer-brand-mark .ph-duotone {
  font-size: 23px;
}

.developer-brand strong {
  color: #5C1D16;
  font-family: Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1.1px;
}

.developer-brand small {
  color: #8a7263;
  font-family: Arial, sans-serif;
  font-size: 9px;
}

.drawer-modal-done {
  width: 100%;
  min-height: 43px;
  margin-top: 20px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(120deg, #A84E24, #853916);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.toast-region {
  position: absolute;
  z-index: 12;
  inset-block-end: calc(76px + env(safe-area-inset-bottom));
  inset-inline: 16px;
  display: grid;
  justify-items: center;
  pointer-events: none;
}

.toast-message {
  max-width: min(100%, 440px);
  padding: 11px 17px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 13px;
  color: #fff;
  background: #38241d;
  box-shadow: 0 9px 24px rgb(35 17 12 / 24%);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
  animation: toast-enter 220ms ease both;
}

@keyframes toast-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 500px) {
  body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: #f0e9e3;
  }

  .app-frame {
    width: min(430px, calc(100vw - 48px));
    max-width: 430px;
    height: 92vh;
    height: 92dvh;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgb(92 29 22 / 12%);
    border-radius: 36px;
    background: var(--xurma-bg);
    box-shadow: 0 28px 80px rgb(54 31 21 / 24%), 0 4px 14px rgb(54 31 21 / 9%);
  }

  .screen {
    min-height: 100%;
  }

  .dashboard-screen {
    height: 100%;
    min-height: 0;
  }
}

@media (min-width: 761px) {
  .dashboard-content {
    width: min(100%, 650px);
    padding-top: 23px;
  }

  .hero-card {
    min-height: 202px;
    padding: 25px 27px 19px;
  }

  .action-card {
    min-height: 98px;
  }
}

@media (max-width: 499px) {
  .app-frame {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow: clip;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .setup-content {
    padding-inline: 22px;
  }

  .setup-heading {
    margin-top: 26px;
  }

  .language-grid {
    gap: 8px;
  }

  .language-option {
    min-height: 70px;
    column-gap: 8px;
    padding-inline: 9px;
  }

  .language-check {
    inset-block-start: 6px;
    inset-inline-start: 6px;
  }

  .onboarding-screen {
    padding-inline: 22px;
  }

  .survey-screen {
    padding-inline: 20px;
  }

  .dashboard-header {
    height: 62px;
    padding-inline: 16px;
  }

  .dashboard-content {
    padding: 15px 16px 98px;
  }

  .hero-card {
    min-height: 177px;
    padding: 19px 17px 14px;
    border-radius: 18px;
  }

  .hero-amount-row strong {
    font-size: 28px;
  }

  .action-section {
    margin-top: 19px;
  }

  .action-container {
    padding: 6px;
    border-radius: 15px;
  }

  .action-card {
    min-height: 82px;
    gap: 5px;
  }

  .action-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .action-icon svg {
    width: 16px;
    height: 16px;
  }

  .action-card > span:last-child:not(.action-icon):not(.new-badge) {
    font-size: 8px;
  }

  .store-promo {
    min-height: 130px;
    margin-top: 15px;
    padding: 15px;
  }

  .store-promo-content > strong {
    font-size: 13px;
  }

  .store-illustration {
    width: 86px;
    height: 83px;
    margin-inline-end: 3%;
    transform: scale(0.9);
  }

  .pro-banner {
    margin-top: 15px;
    padding: 15px;
  }

  .feature-chips {
    gap: 4px;
  }

  .feature-chips span {
    padding: 4px 6px;
    font-size: 7px;
  }

  .bottom-nav {
    height: calc(65px + env(safe-area-inset-bottom));
    padding-inline: 4px;
  }

  .bottom-tab {
    font-size: 7px;
  }

  .bottom-tab svg {
    width: 17px;
    height: 17px;
  }

  .scanner-button {
    width: 49px;
    height: 49px;
  }
}

@media (max-width: 380px) {
  .language-option {
    grid-template-columns: 32px minmax(0, 1fr);
    column-gap: 7px;
    padding-inline: 7px;
  }

  .flag {
    width: 32px;
    height: 23px;
  }

  .language-name {
    font-size: 10px;
  }

  .language-native {
    font-size: 8px;
  }

  .dashboard-content {
    padding-inline: 12px;
  }

  .action-card > span:last-child:not(.action-icon):not(.new-badge) {
    font-size: 7px;
  }

  .hero-period {
    padding: 5px 7px;
    font-size: 8px;
  }

  .survey-screen {
    padding-inline: 15px;
  }
}

@media (max-height: 720px) and (min-width: 601px) {
  .setup-content {
    padding-block: 16px;
  }

  .setup-heading {
    margin-block: 20px 14px;
  }

  .language-option {
    min-height: 66px;
  }

  .onboarding-art {
    height: min(31vh, 250px);
  }

  .survey-content {
    padding-top: 7px;
  }

  .survey-heading {
    margin-block: 14px 11px;
  }

  .survey-option {
    min-height: 42px;
    padding-block: 6px;
  }
}

@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;
  }
}

/* Clean theme and typography refinements */
:root,
body,
.app-frame,
.screen,
.dashboard-header,
.bottom-nav,
.side-drawer,
.drawer-modal,
.action-card,
.language-option,
.survey-option,
.pro-banner {
  transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}

i.ph-duotone,
i.ph-bold {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  vertical-align: middle;
  line-height: 1;
}

i.ph-duotone::before,
i.ph-duotone::after,
i.ph-bold::before {
  position: absolute;
  inset: 0;
  width: 1em;
  height: 1em;
  margin: 0;
}

.pro-badge > i.ph-duotone {
  font-size: 25px;
}

.app-frame {
  background: var(--bg-app);
  box-shadow: var(--card-shadow);
}

.screen {
  background: var(--bg-app);
}

.kilim-pattern,
.splash-screen::before,
.splash-screen::after {
  display: none;
}

.setup-content {
  width: min(100%, 620px);
  padding-inline: 22px;
}

.eyebrow {
  font-size: 12px;
}

.step-kicker {
  font-size: 13px;
}

.setup-heading {
  margin-block: 36px 24px;
}

.setup-heading h1,
.onboarding-copy h1,
.survey-heading h1 {
  font-size: clamp(24px, 6vw, 28px);
  line-height: 1.5;
}

.setup-heading p,
.onboarding-copy p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
}

.language-grid {
  gap: 12px;
}

.language-option {
  min-height: 84px;
  padding: 14px;
  border-color: var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.language-option.is-selected {
  background: var(--bg-subtle);
}

.language-name {
  font-size: 16px;
}

.language-native {
  color: var(--text-secondary);
  font-size: 12px;
}

.primary-button {
  min-height: 56px;
  border-radius: 14px;
  font-size: 16px;
}

.secure-caption,
.footer-note {
  color: var(--text-secondary);
  font-size: 12px;
}

.onboarding-screen,
.survey-screen {
  padding-inline: 22px;
}

.onboarding-art {
  border-color: var(--border-color);
  border-radius: 22px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.onboarding-art svg {
  filter: saturate(0.82);
}

.onboarding-copy h1 {
  color: var(--text-primary);
}

.onboarding-copy p {
  max-width: 600px;
}

.slide-dot {
  background: var(--border-color);
}

.survey-screen {
  overflow-y: auto;
}

.survey-content {
  padding-block: 20px;
}

.survey-heading h1 {
  color: var(--text-primary);
}

.survey-heading p {
  color: var(--text-secondary);
  font-size: 14px;
}

.survey-option {
  min-height: 60px;
  padding: 16px 18px;
  border-color: var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
}

.survey-option.is-selected {
  background: var(--bg-subtle);
}

.option-label {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.privacy-note {
  margin-top: 20px;
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-subtle);
  font-size: 12px;
}

.dashboard-header {
  height: 76px;
  padding-inline: 20px;
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--bg-surface) 94%, transparent);
}

.header-leading {
  gap: 7px;
}

.icon-button,
.pro-crown,
.drawer-theme-toggle,
.drawer-settings {
  width: 44px;
  height: 44px;
  border-color: var(--border-color);
  border-radius: 14px;
  color: var(--brand-primary);
  background: var(--bg-surface);
}

.icon-button:hover,
.drawer-theme-toggle:hover,
.drawer-settings:hover {
  background: var(--bg-subtle);
}

.icon-button .ph-duotone,
.icon-button .ph-bold,
.pro-crown .ph-duotone,
.drawer-theme-toggle .ph-duotone,
.drawer-theme-toggle .ph-bold {
  font-size: 26px;
}

.account-switcher .ph-bold {
  font-size: 19px;
  transition: transform 180ms ease;
}

.account-switcher[aria-expanded="true"] .ph-bold {
  transform: rotate(180deg);
}

.pro-crown {
  border-color: color-mix(in srgb, var(--brand-gold) 34%, var(--border-color));
  color: var(--brand-gold);
  background: color-mix(in srgb, var(--brand-gold) 12%, var(--bg-surface));
}

.dashboard-emblem {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-color: var(--border-color);
  border-radius: 14px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

.dashboard-emblem .ph-duotone {
  font-size: 29px;
}

.dashboard-wordmark {
  color: var(--text-primary);
  font-size: 16px;
}

.dashboard-wordmark small {
  color: var(--text-secondary);
  font-size: 11px;
}

.dashboard-content {
  width: min(100%, 700px);
  padding: 20px 20px 108px;
}

.hero-card {
  min-height: 216px;
  padding: 23px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(130deg, #5C1D16 0%, #7B2C1A 52%, #A84E24 100%);
  box-shadow: 0 10px 24px rgb(92 29 22 / 14%);
}

.hero-period {
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.hero-period .ph-duotone {
  font-size: 19px;
}

.visibility-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.visibility-toggle .ph-duotone {
  font-size: 22px;
}

.hero-label {
  font-size: 15px;
}

.hero-amount-row strong {
  font-size: clamp(30px, 8vw, 34px);
  font-weight: 800;
}

.hero-amount-row > span,
.hero-caption,
.hero-metric span {
  font-size: 13px;
}

.hero-metric strong {
  font-size: 15px;
}

.hero-bottom {
  margin-top: 17px;
  padding-top: 14px;
}

.action-section {
  margin-top: 25px;
}

.section-title-row {
  margin-bottom: 14px;
}

.section-title-row h2 {
  color: var(--text-primary);
  font-size: 22px;
}

.section-count {
  color: var(--text-secondary);
  font-size: 13px;
}

.action-container {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
}

.action-card {
  min-height: 132px;
  gap: 10px;
  padding: 14px 7px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.action-card:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 35%, var(--border-color));
  background: var(--bg-surface);
}

.action-icon {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
}

.action-icon .ph-duotone {
  font-size: 28px;
}

.icon-terracotta { color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 13%, var(--bg-surface)); }
.icon-gold { color: var(--brand-gold); background: color-mix(in srgb, var(--brand-gold) 15%, var(--bg-surface)); }
.icon-green { color: #38764C; background: #E8F1E8; }
.icon-plum { color: #78506C; background: #F1EAF1; }
.icon-blue { color: #48708B; background: #E9F0F4; }
.icon-rose { color: #A55455; background: #F5E9E7; }
.icon-amber { color: #A26D26; background: #F7EFDF; }

.action-card > span:last-child:not(.action-icon):not(.new-badge) {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.action-grid-4 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.delivery-action {
  padding-top: 14px;
}

.new-badge {
  inset-block-start: 7px;
  inset-inline-start: 7px;
  padding: 3px 8px;
  font-size: 10px;
}

.action-notification-badge {
  position: absolute;
  inset-block-start: 7px;
  inset-inline-start: 7px;
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding-inline: 5px;
  border: 2px solid var(--bg-surface);
  border-radius: 999px;
  color: #fff;
  background: #DC2626;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.action-notification-badge[hidden] {
  display: none;
}

.store-promo {
  min-height: 126px;
  margin-top: 18px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #5C1D16, #A84E24);
  box-shadow: 0 8px 20px rgb(92 29 22 / 12%);
}

.store-promo-content {
  gap: 8px;
}

.promo-eyebrow {
  font-size: 13px;
}

.promo-eyebrow .ph-duotone {
  font-size: 20px;
}

.store-promo-content > strong {
  font-size: 18px;
}

.promo-button {
  margin-top: 2px;
  padding: 8px 12px;
  font-size: 13px;
}

.promo-button .ph-bold {
  font-size: 17px;
}

.store-illustration {
  display: grid;
  width: 66px;
  height: 66px;
  margin-inline-end: 0;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 19px;
  color: #F5D79A;
  background: rgb(255 255 255 / 9%);
  transform: none;
}

.store-illustration::before {
  display: none;
}

.store-illustration .ph-duotone {
  font-size: 40px;
}

.pro-banner {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 35%, var(--border-color));
  border-radius: 18px;
  background: color-mix(in srgb, var(--brand-gold) 9%, var(--bg-surface));
  box-shadow: var(--card-shadow);
}

.pro-mark {
  color: var(--brand-primary);
  font-size: 13px;
}

.pro-mark .ph-duotone {
  font-size: 22px;
}

.pro-banner h2 {
  margin-top: 12px;
  color: var(--text-primary);
  font-size: 20px;
}

.pro-banner > p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.feature-chips {
  gap: 7px;
  margin-top: 15px;
}

.feature-chips span {
  padding: 6px 10px;
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-surface);
  font-size: 12px;
}

.pro-cta {
  gap: 8px;
  margin-top: 16px;
  color: var(--brand-primary);
  font-size: 14px;
}

.pro-cta .ph-bold {
  font-size: 19px;
}

.dashboard-footer {
  color: var(--text-secondary);
  font-size: 12px;
}

.bottom-nav {
  height: calc(76px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 7px 10px max(7px, env(safe-area-inset-bottom));
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--bg-surface) 88%, transparent);
  box-shadow: 0 -6px 22px rgb(28 20 16 / 5%);
  backdrop-filter: blur(12px);
}

.bottom-tab {
  height: 56px;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.bottom-tab .ph-duotone {
  font-size: 25px;
}

.bottom-tab.is-active {
  color: var(--brand-primary);
}

.bottom-tab-center {
  height: 64px;
}

.scanner-button {
  width: 58px;
  height: 58px;
  margin-top: -19px;
  border-color: var(--bg-surface);
  background: linear-gradient(145deg, var(--brand-primary), var(--xurma-primary-dark));
}

.scanner-button .ph-bold {
  font-size: 29px;
}

.side-drawer {
  background: var(--bg-surface);
  box-shadow: -18px 0 48px rgb(0 0 0 / 18%);
}

.drawer-account {
  min-height: 64px;
  border-color: var(--border-color);
}

.profile-avatar,
.drawer-link-icon {
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

.profile-avatar .ph-duotone {
  font-size: 26px;
}

.account-switcher {
  color: var(--text-primary);
  font-size: 14px;
}

.account-switcher:hover,
.account-switcher[aria-expanded="true"] {
  border-color: var(--border-color);
  background: var(--bg-subtle);
}

.account-dropdown {
  border-color: var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.account-option {
  color: var(--text-primary);
  font-size: 14px;
}

.account-option:hover,
.drawer-links button:hover {
  background: var(--bg-subtle);
}

.drawer-theme-toggle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  cursor: pointer;
}

.drawer-settings .ph-duotone {
  font-size: 25px;
}

.drawer-scroll {
  gap: 12px;
}

.drawer-pro-card {
  min-height: 98px;
  border-radius: 18px;
}

.drawer-pro-copy strong {
  font-size: 15px;
}

.drawer-pro-copy small {
  font-size: 12px;
}

.drawer-links {
  gap: 4px;
}

.drawer-links button {
  min-height: 58px;
  gap: 12px;
  color: var(--text-primary);
}

.drawer-link-icon {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 14px;
}

.drawer-link-icon .ph-duotone {
  font-size: 26px;
}

.drawer-links button > span:nth-child(2) {
  font-size: 15px;
}

.drawer-link-chevron {
  color: var(--text-secondary);
  font-size: 18px;
}

.replay-intro {
  min-height: 50px;
  color: var(--text-primary);
  background: var(--bg-subtle);
  font-size: 14px;
}

.replay-intro > .ph-duotone,
.replay-intro > .ph-bold {
  font-size: 22px;
}

.replay-intro > span {
  font-size: 14px;
}

.drawer-language {
  gap: 12px;
  border-color: var(--border-color);
}

.drawer-language-label {
  color: var(--text-primary);
  font-size: 14px;
}

.drawer-language-options button {
  min-height: 42px;
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-subtle);
  font-size: 13px;
}

.drawer-language-options button.is-active {
  border-color: var(--brand-primary);
  color: #fff;
  background: var(--brand-primary);
}

.drawer-modal {
  border-color: var(--border-color);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.drawer-modal-close,
.drawer-modal-icon {
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

.drawer-modal h2 {
  color: var(--text-primary);
  font-size: 22px;
}

.drawer-modal-copy {
  color: var(--text-secondary);
  font-size: 15px;
}

.developer-brand {
  border-color: var(--border-color);
  background: var(--bg-subtle);
}

.developer-brand strong {
  color: var(--text-primary);
}

.developer-brand small {
  color: var(--text-secondary);
}

.drawer-modal-done {
  min-height: 48px;
  background: linear-gradient(120deg, var(--brand-primary), var(--xurma-primary-dark));
  font-size: 15px;
}

.toast-message {
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  font-size: 14px;
}

[data-theme="dark"] body,
[data-theme="dark"] .app-frame,
[data-theme="dark"] .screen {
  background: var(--bg-app);
  color: var(--text-primary);
}

[data-theme="dark"] .app-frame {
  border-color: var(--border-color);
}

[data-theme="dark"] .small-brand,
[data-theme="dark"] .dashboard-brand,
[data-theme="dark"] .dashboard-wordmark,
[data-theme="dark"] .section-title-row h2,
[data-theme="dark"] .setup-heading h1,
[data-theme="dark"] .onboarding-copy h1,
[data-theme="dark"] .survey-heading h1 {
  color: var(--text-primary);
}

[data-theme="dark"] .small-brand .brand-emblem,
[data-theme="dark"] .dashboard-emblem,
[data-theme="dark"] .back-button,
[data-theme="dark"] .survey-icon {
  border-color: var(--border-color);
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

[data-theme="dark"] .step-kicker,
[data-theme="dark"] .step-kicker span,
[data-theme="dark"] .setup-heading p,
[data-theme="dark"] .onboarding-copy p,
[data-theme="dark"] .survey-heading p,
[data-theme="dark"] .footer-note,
[data-theme="dark"] .secure-caption {
  color: var(--text-secondary);
}

[data-theme="dark"] .language-option,
[data-theme="dark"] .survey-option,
[data-theme="dark"] .action-card,
[data-theme="dark"] .account-dropdown,
[data-theme="dark"] .drawer-modal,
[data-theme="dark"] .developer-brand {
  border-color: var(--border-color);
  background: var(--bg-surface);
}

[data-theme="dark"] .language-option.is-selected,
[data-theme="dark"] .survey-option.is-selected {
  background: var(--bg-subtle);
}

[data-theme="dark"] .language-name,
[data-theme="dark"] .option-label,
[data-theme="dark"] .action-card > span:last-child:not(.action-icon):not(.new-badge),
[data-theme="dark"] .account-option,
[data-theme="dark"] .drawer-links button,
[data-theme="dark"] .replay-intro,
[data-theme="dark"] .drawer-language-label,
[data-theme="dark"] .drawer-modal h2,
[data-theme="dark"] .developer-brand strong {
  color: var(--text-primary);
}

[data-theme="dark"] .language-native,
[data-theme="dark"] .drawer-link-chevron,
[data-theme="dark"] .drawer-modal-copy,
[data-theme="dark"] .developer-brand small,
[data-theme="dark"] .dashboard-footer {
  color: var(--text-secondary);
}

[data-theme="dark"] .onboarding-art {
  border-color: var(--border-color);
  background: var(--bg-surface);
}

[data-theme="dark"] .onboarding-art svg {
  filter: brightness(0.76) saturate(0.72);
}

[data-theme="dark"] .privacy-note {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

[data-theme="dark"] .dashboard-header {
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--bg-surface) 94%, transparent);
}

[data-theme="dark"] .icon-button,
[data-theme="dark"] .pro-crown,
[data-theme="dark"] .drawer-theme-toggle,
[data-theme="dark"] .drawer-settings {
  border-color: var(--border-color);
  color: var(--brand-primary);
  background: var(--bg-surface);
}

[data-theme="dark"] .action-container {
  background: transparent;
}

[data-theme="dark"] .icon-green { color: #8BC49B; background: #1D3025; }
[data-theme="dark"] .icon-plum { color: #D0A7C8; background: #302431; }
[data-theme="dark"] .icon-blue { color: #91B9D2; background: #1E2A31; }
[data-theme="dark"] .icon-rose { color: #E59A98; background: #342323; }
[data-theme="dark"] .icon-amber { color: #E5BA6D; background: #332A1D; }

[data-theme="dark"] .store-promo {
  background: linear-gradient(120deg, #31110E, #73301D);
}

[data-theme="dark"] .promo-button {
  color: var(--brand-maroon);
  background: #F5F1ED;
}

[data-theme="dark"] .pro-banner {
  border-color: color-mix(in srgb, var(--brand-gold) 25%, var(--border-color));
  background: color-mix(in srgb, var(--brand-gold) 8%, var(--bg-surface));
}

[data-theme="dark"] .pro-banner h2,
[data-theme="dark"] .pro-banner > p,
[data-theme="dark"] .feature-chips span {
  color: var(--text-primary);
}

[data-theme="dark"] .feature-chips span {
  border-color: var(--border-color);
  background: var(--bg-subtle);
}

[data-theme="dark"] .bottom-nav {
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent);
  box-shadow: 0 -6px 22px rgb(0 0 0 / 18%);
}

[data-theme="dark"] .scanner-button {
  border-color: var(--bg-surface);
}

[data-theme="dark"] .side-drawer {
  background: var(--bg-surface);
}

[data-theme="dark"] .drawer-account,
[data-theme="dark"] .drawer-language {
  border-color: var(--border-color);
}

[data-theme="dark"] .profile-avatar,
[data-theme="dark"] .drawer-link-icon,
[data-theme="dark"] .replay-intro,
[data-theme="dark"] .drawer-modal-close,
[data-theme="dark"] .drawer-modal-icon {
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

[data-theme="dark"] .account-switcher,
[data-theme="dark"] .drawer-language-options button {
  color: var(--text-primary);
}

[data-theme="dark"] .account-switcher:hover,
[data-theme="dark"] .account-switcher[aria-expanded="true"],
[data-theme="dark"] .account-option:hover,
[data-theme="dark"] .drawer-links button:hover,
[data-theme="dark"] .replay-intro:hover {
  border-color: var(--border-color);
  background: #302825;
}

[data-theme="dark"] .drawer-language-options button {
  border-color: var(--border-color);
  background: var(--bg-subtle);
}

[data-theme="dark"] .drawer-language-options button.is-active {
  border-color: var(--brand-primary);
  color: #fff;
  background: var(--brand-primary);
}

[data-theme="dark"] .developer-brand {
  border-color: var(--border-color);
  background: var(--bg-subtle);
}

[data-theme="dark"] .drawer-backdrop {
  background: rgb(0 0 0 / 62%);
}

[data-theme="dark"] .toast-message {
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-surface);
}

@media (min-width: 500px) {
  body {
    background: var(--bg-app);
  }

  .app-frame {
    width: min(460px, calc(100vw - 48px));
    max-width: 460px;
    border-color: var(--border-color);
    border-radius: 30px;
    background: var(--bg-app);
    box-shadow: var(--card-shadow);
  }
}

@media (max-width: 600px) {
  .dashboard-header {
    height: 72px;
    padding-inline: 16px;
  }

  .dashboard-content {
    padding: 18px 18px 108px;
  }

  .hero-card {
    min-height: 210px;
    padding: 21px 18px;
  }

  .action-card {
    min-height: 122px;
    padding-inline: 5px;
  }

  .action-icon {
    width: 46px;
    height: 46px;
  }

  .action-card > span:last-child:not(.action-icon):not(.new-badge) {
    font-size: 15px;
  }

  .store-illustration {
    width: 58px;
    height: 58px;
  }

  .store-illustration .ph-duotone {
    font-size: 34px;
  }

  .bottom-nav {
    height: calc(74px + env(safe-area-inset-bottom));
  }

  .bottom-tab {
    font-size: 13px;
  }

  .bottom-tab .ph-duotone {
    font-size: 23px;
  }
}

@media (max-width: 380px) {
  .dashboard-content {
    padding-inline: 14px;
  }

  .action-container {
    gap: 7px;
  }

  .action-card > span:last-child:not(.action-icon):not(.new-badge) {
    font-size: 15px;
  }

  .bottom-tab {
    font-size: 12px;
  }
}

.drawer-pro-card {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
}

.drawer-pro-open {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: start;
}

.drawer-pro-open:hover {
  background: transparent;
}

.drawer-pro-toggle {
  display: grid;
  width: 52px;
  height: 56px;
  align-self: center;
  flex: 0 0 52px;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 12px;
  color: #fff;
  background: rgb(255 255 255 / 12%);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.drawer-pro-toggle .ph-bold {
  font-size: 19px;
}

.drawer-pro-toggle[aria-pressed="false"] {
  opacity: 0.78;
}

.module-screen {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-primary);
}

.module-screen [hidden],
.module-modal-backdrop [hidden] {
  display: none !important;
}

.toast-message {
  font-size: 14px;
}

.module-header {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 68px;
  flex: 0 0 auto;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.module-header h1 {
  margin: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-back,
.module-header-action,
.toolbar-action,
.field-action,
.module-fab,
.hero-back-button,
.hero-tool-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border-color);
  color: var(--brand-primary);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.module-back,
.module-header-action {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.module-back .ph-bold,
.module-header-action .ph-duotone {
  font-size: 24px;
}

.csv-trigger {
  border-color: #16A34A;
  color: #16A34A;
  background: color-mix(in srgb, #16A34A 10%, var(--bg-surface));
  border-radius: 50%;
}

.module-header-spacer {
  width: 44px;
  height: 44px;
}

.module-scroll {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--border-color) transparent;
  scrollbar-width: thin;
}

.module-form {
  display: grid;
  width: min(100%, 620px);
  gap: 17px;
  margin-inline: auto;
  padding: 18px 20px 34px;
}

.product-image-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 4px 0 2px;
}

.product-image-preview {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed var(--border-color);
  border-radius: 50%;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  cursor: pointer;
}

.product-image-preview .ph-duotone {
  font-size: 42px;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-action {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
}

.image-action .ph-duotone {
  font-size: 25px;
}

.product-mode-tabs,
.module-tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  background: var(--bg-subtle);
}

.product-mode-tabs button,
.module-tabs button {
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.product-mode-tabs button.is-active,
.module-tabs button.is-active {
  color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.form-field label {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
}

.form-field label b {
  color: var(--brand-primary);
}

.form-field input,
.form-field select,
.form-field textarea,
.module-search input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  outline: 0;
  color: var(--text-primary);
  background: var(--bg-surface);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.form-field textarea {
  min-height: 76px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.module-search:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 14%, transparent);
}

.field-with-actions {
  display: flex;
  min-width: 0;
  gap: 7px;
}

.field-with-actions > input,
.field-with-actions > select {
  flex: 1;
}

.field-action {
  width: 48px;
  height: 48px;
  border-color: var(--brand-primary);
  border-radius: 13px;
  color: #fff;
  background: var(--brand-primary);
}

.field-action .ph-duotone,
.field-action .ph-bold {
  font-size: 23px;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profit-pill {
  justify-self: start;
  margin-top: -9px;
  padding: 6px 12px;
  border: 1px solid color-mix(in srgb, #16A34A 22%, var(--border-color));
  border-radius: 999px;
  color: #16803B;
  background: color-mix(in srgb, #16A34A 9%, var(--bg-surface));
  font-size: 14px;
  font-weight: 700;
}

.accordion-toggle {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  color: var(--text-primary);
  background: var(--bg-subtle);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.accordion-toggle .ph-bold {
  font-size: 20px;
  transition: transform 160ms ease;
}

.accordion-toggle[aria-expanded="true"] .ph-bold {
  transform: rotate(180deg);
}

.advanced-fields {
  display: grid;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-subtle);
}

.module-primary-button,
.module-danger-button,
.module-secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  transition: filter 150ms ease, transform 150ms ease, background 150ms ease;
}

.module-primary-button {
  color: #fff;
  background: var(--brand-primary);
}

.module-primary-button:hover,
.field-action:hover {
  filter: brightness(1.06);
}

.module-danger-button {
  border-color: color-mix(in srgb, #DC2626 25%, var(--border-color));
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 8%, var(--bg-surface));
}

.module-secondary-button {
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.product-form > .module-primary-button {
  width: 100%;
  margin-top: 3px;
}

.module-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 12px;
}

.module-search {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding-inline: 12px 3px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.module-search > .ph-duotone {
  flex: 0 0 auto;
  font-size: 23px;
}

.module-search input {
  min-height: 44px;
  padding: 7px 8px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.module-search input:focus {
  box-shadow: none;
}

.module-search input::placeholder {
  color: var(--text-secondary);
  opacity: 0.85;
}

.toolbar-action {
  width: 48px;
  height: 48px;
  border-color: var(--brand-primary);
  border-radius: 14px;
  color: #fff;
  background: var(--brand-primary);
}

.toolbar-action .ph-duotone,
.toolbar-action .ph-bold {
  font-size: 24px;
}

.module-list {
  display: grid;
  gap: 11px;
  padding: 5px 18px 92px;
}

.customer-list-scroll .module-list {
  gap: 10px;
}

.customer-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--border-color);
  border-radius: 17px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.customer-card-open {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  text-align: start;
}

.customer-card-open strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card-open span {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-phone-button {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 12%, var(--bg-surface));
  text-decoration: none;
}

.customer-phone-button .ph-duotone {
  font-size: 25px;
}

.module-fab {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 20px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-primary) 30%, transparent);
}

.module-fab .ph-duotone,
.module-fab .ph-bold {
  font-size: 29px;
}

.customer-hero {
  flex: 0 0 auto;
  padding: 10px 18px 18px;
  color: #fff;
  background: linear-gradient(125deg, var(--brand-maroon), var(--brand-primary));
}

.customer-hero-toolbar {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 6px;
  min-height: 48px;
}

.customer-hero-toolbar h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  text-align: center;
}

.hero-tools {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.hero-back-button,
.hero-tool-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 12px;
  color: #fff;
  background: rgb(255 255 255 / 12%);
}

.hero-back-button .ph-bold,
.hero-tool-button .ph-duotone {
  font-size: 22px;
}

.customer-hero-content {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding-top: 10px;
}

.customer-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 2px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  color: var(--brand-primary);
  background: #fff;
}

.customer-avatar .ph-duotone {
  font-size: 32px;
}

.customer-hero-content h2 {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-hero-content p,
.customer-code {
  margin: 3px 0 0;
  color: rgb(255 255 255 / 82%);
  font-size: 12px;
}

.customer-code {
  align-self: end;
  white-space: nowrap;
}

.customer-details-scroll {
  padding: 14px 18px 28px;
}

.customer-detail-tabs,
.installment-tabs {
  position: sticky;
  z-index: 1;
  top: 0;
  margin-bottom: 15px;
}

.customer-tab-panel {
  display: grid;
  gap: 14px;
}

.customer-edit-form {
  display: grid;
  gap: 13px;
}

.customer-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 9px;
  margin-top: 5px;
}

.report-filter-row,
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.report-filter-pill {
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-primary);
  background: var(--bg-surface);
  font-size: 14px;
}

.customer-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.customer-stat,
.installment-summary-card {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 13px;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

button.customer-stat {
  appearance: none;
  cursor: pointer;
  font: inherit;
  text-align: start;
}

.customer-stat > span,
.installment-summary-card > span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.customer-stat strong,
.installment-summary-card strong {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 800;
}

.customer-stat[data-stat="sold"] { background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-surface)); }
.customer-stat[data-stat="revenue"] { background: color-mix(in srgb, var(--brand-gold) 12%, var(--bg-surface)); }
.customer-stat[data-stat="profit"] { background: color-mix(in srgb, #16A34A 8%, var(--bg-surface)); }
.customer-stat[data-stat="debt"] { cursor: pointer; background: color-mix(in srgb, #DC2626 7%, var(--bg-surface)); }

.customer-stat[data-stat="profit"] strong,
.installment-summary-card.received strong {
  color: #16A34A;
}

.customer-stat[data-stat="debt"] strong,
.installment-summary-card.remaining strong {
  color: #DC2626;
}

.section-heading-row h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
}

.text-action {
  padding: 7px 0;
  border: 0;
  color: var(--brand-primary);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.invoice-card,
.installment-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.installment-card {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.installment-card:hover,
.installment-card:focus-visible {
  border-color: color-mix(in srgb, var(--brand-primary) 55%, var(--border-color));
  box-shadow: 0 6px 22px rgba(28, 20, 16, 0.1);
}

.invoice-card-top,
.installment-card-top,
.installment-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.installment-card-view {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

.invoice-card strong,
.installment-card strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
}

.invoice-card p,
.installment-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.installment-scroll {
  padding-bottom: 25px;
}

.installment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 14px;
}

.installment-summary-card {
  min-height: 97px;
  padding: 11px;
}

.installment-summary-card strong {
  font-size: 17px;
}

.installment-summary-card.received strong {
  color: #16A34A;
}

.installment-summary-card.remaining strong {
  color: #DC2626;
}

.installment-remaining-highlight {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #DC2626 22%, var(--border-color));
  border-radius: 14px;
  color: var(--text-secondary);
  background: color-mix(in srgb, #DC2626 6%, var(--bg-surface));
  font-size: 13px;
}

.installment-remaining-highlight strong {
  color: #DC2626;
  font-size: 20px;
  font-weight: 800;
}

.installment-collect-customer,
.installment-collect-item {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.installment-collect-item {
  color: var(--text-primary);
  font-weight: 700;
}

.installment-collect-preview {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-subtle);
  font-size: 14px;
  font-weight: 700;
}

.installment-details-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.installment-details-heading h2 {
  margin: 0;
}

.installment-details-heading p,
.installment-details-next-due {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.installment-details-next-due {
  margin: 0;
}

.installment-details-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.installment-details-summary > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: var(--bg-surface);
}

.installment-details-summary span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.installment-details-summary strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.installment-details-summary .is-received strong {
  color: #16A34A;
}

.installment-details-summary .is-remaining strong {
  color: #DC2626;
}

.installment-payment-history {
  display: grid;
  gap: 9px;
}

.installment-payment-history h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
}

.installment-payment-list {
  display: grid;
  gap: 8px;
}

.installment-payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: var(--bg-surface);
}

.installment-payment-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  font-size: 13px;
}

.installment-payment-copy > strong {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.installment-payment-copy > span {
  color: var(--text-secondary);
}

.installment-payment-copy > .installment-payment-amount {
  color: #16A34A;
  font-weight: 800;
}

.installment-payment-copy > .installment-payment-balance {
  color: #DC2626;
  font-weight: 700;
}

.installment-payment-copy small {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.installment-payment-view {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  color: var(--brand-primary);
  background: var(--bg-surface);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.installment-payment-view i {
  font-size: 18px;
}

.installment-details-actions,
.installment-receipt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.installment-details-actions > :last-child,
.installment-receipt-actions > :last-child {
  grid-column: 1 / -1;
}

.installment-receipt-content {
  max-height: 58vh;
  overflow-y: auto;
}

.installment-payment-receipt {
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
}

.installment-receipt-facts {
  display: grid;
  gap: 7px;
}

.installment-receipt-facts p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.installment-receipt-facts p span {
  color: var(--text-secondary);
}

.installment-receipt-facts p strong {
  color: var(--text-primary);
  text-align: left;
}

.installment-receipt-facts .is-paid-now strong {
  color: #16A34A;
}

.installment-receipt-facts .is-balance {
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: color-mix(in srgb, #DC2626 7%, var(--bg-surface));
}

.installment-receipt-facts .is-balance strong {
  color: #DC2626;
  font-size: 16px;
}

.installment-contract-document {
  width: 100%;
}

.installment-tabs {
  margin: 0 18px 12px;
}

.due-total-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 18px 12px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 35%, var(--border-color));
  border-radius: 16px;
  background: color-mix(in srgb, var(--brand-gold) 11%, var(--bg-surface));
}

.due-total-card span {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.due-total-card strong {
  flex: 0 0 auto;
  color: var(--brand-gold);
  font-size: 17px;
  font-weight: 800;
}

.installment-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-subtle);
}

.installment-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary);
  transition: width 180ms ease;
}

.installment-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface));
  font-size: 12px;
  font-weight: 700;
}

.installment-status.is-complete {
  color: #16A34A;
  background: color-mix(in srgb, #16A34A 10%, var(--bg-surface));
}

.installment-collect {
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--brand-primary);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.installment-collect:disabled {
  color: var(--text-secondary);
  background: var(--bg-subtle);
  cursor: not-allowed;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 35px 18px;
  border: 1px dashed var(--border-color);
  border-radius: 18px;
  color: var(--text-secondary);
  text-align: center;
}

.empty-state svg {
  width: 112px;
  height: 88px;
  color: var(--brand-primary);
}

.empty-state strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.module-modal-backdrop {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  overflow-y: auto;
  place-items: center;
  padding: 18px;
  background: rgb(28 20 16 / 48%);
  backdrop-filter: blur(5px);
}

.module-modal-backdrop[hidden] {
  display: none;
}

.module-modal {
  position: relative;
  display: grid;
  width: min(100%, 440px);
  max-height: calc(100% - 8px);
  gap: 14px;
  overflow-y: auto;
  padding: 25px 20px 20px;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.module-modal h2,
.filter-bottom-sheet h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.module-modal > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  cursor: pointer;
}

.modal-close .ph-bold {
  font-size: 21px;
}

.modal-symbol {
  display: grid;
  width: 54px;
  height: 54px;
  justify-self: center;
  place-items: center;
  border-radius: 17px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
}

.modal-symbol .ph-duotone {
  font-size: 31px;
}

.module-modal-form {
  padding-top: 30px;
}

.module-modal-form .module-primary-button {
  width: 100%;
  margin-top: 3px;
}

.file-picker-button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed var(--brand-primary);
  border-radius: 14px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 6%, var(--bg-surface));
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.file-picker-button .ph-duotone {
  font-size: 22px;
}

.selected-file-name,
.form-feedback {
  min-height: 1.5em;
  text-align: center;
}

.form-feedback {
  color: var(--brand-primary) !important;
  font-weight: 700;
}

.modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.modal-actions > button {
  width: 100%;
}

.pro-gate-modal {
  background: linear-gradient(145deg, var(--brand-maroon), var(--brand-primary));
}

.pro-gate-modal h2 {
  color: #fff;
}

.pro-gate-symbol {
  display: grid;
  width: 64px;
  height: 64px;
  justify-self: center;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  color: var(--brand-maroon);
  background: var(--brand-gold);
  font-size: 38px;
  font-weight: 800;
}

.pro-gate-modal .module-primary-button {
  border: 0;
  color: var(--brand-maroon);
  background: #fff;
}

.filter-sheet-backdrop {
  align-items: end;
  padding: 0;
}

.filter-bottom-sheet {
  display: grid;
  width: min(100%, 520px);
  gap: 18px;
  padding: 11px 20px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid var(--border-color);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: 0 -12px 35px rgb(28 20 16 / 14%);
}

.sheet-handle {
  width: 42px;
  height: 5px;
  justify-self: center;
  border-radius: 999px;
  background: var(--border-color);
}

.filter-options {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-options legend {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
}

.filter-options label {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-subtle);
  font-size: 15px;
}

.filter-options input {
  width: 19px;
  height: 19px;
  accent-color: var(--brand-primary);
}

.module-modal-backdrop .module-primary-button,
.module-modal-backdrop .module-danger-button,
.module-modal-backdrop .module-secondary-button,
.module-modal-backdrop .module-modal-form .module-primary-button {
  min-height: 48px;
}

@media (min-width: 500px) {
  .module-screen {
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 380px) {
  .module-header {
    padding-inline: 13px;
  }

  .module-toolbar,
  .module-list {
    padding-inline: 13px;
  }

  .installment-summary {
    gap: 5px;
    padding-inline: 13px;
  }

  .installment-summary-card {
    padding: 9px 7px;
  }

  .installment-summary-card > span {
    font-size: 12px;
  }

  .installment-summary-card strong {
    font-size: 15px;
  }

  .customer-hero-toolbar {
    grid-template-columns: 74px minmax(0, 1fr) 82px;
  }

  .customer-hero-toolbar h1 {
    font-size: 17px;
  }

  .installment-details-summary {
    gap: 5px;
  }

  .installment-details-summary > div {
    padding: 8px 6px;
  }

  .installment-details-summary span {
    font-size: 11px;
  }

  .installment-details-summary strong {
    font-size: 13px;
  }

  .installment-payment-view {
    width: 40px;
    padding: 6px;
    font-size: 0;
  }

  .installment-payment-view i {
    font-size: 20px;
  }

  .customer-details-scroll {
    padding-inline: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-screen *,
  .module-modal-backdrop *,
  .drawer-pro-card * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body,
  .app-frame,
  .screen {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .print-company-header {
    display: flex !important;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid #999;
    color: #111;
    direction: rtl;
    font-family: inherit;
  }

  .print-company-header img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
  }

  .print-company-header > div {
    display: grid;
    gap: 3px;
  }

  .print-company-header strong {
    font-size: 19px;
  }

  .print-company-header span {
    font-size: 12px;
  }

  .module-header,
  .module-toolbar,
  .module-fab,
  .module-tabs,
  .module-modal-backdrop,
  .customer-edit-actions,
  .installment-collect {
    display: none !important;
  }

  .module-scroll {
    overflow: visible !important;
  }
}

.category-card,
.purchase-card,
.supplier-card,
.safe-balance-card,
.safe-transaction-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.category-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.category-card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 9px;
}

.category-card-copy strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.category-card-copy span {
  color: var(--text-secondary);
  font-size: 14px;
}

.category-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.category-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-primary);
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease;
}

.category-icon-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.category-icon-button .ph-duotone {
  font-size: 23px;
}

.category-scroll .module-list {
  padding-bottom: 104px;
}

.module-fab .fab-plus-badge {
  position: absolute;
  top: 0;
  right: -2px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 2px solid var(--bg-app);
  border-radius: 50%;
  color: #fff;
  background: var(--brand-maroon);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.subcategory-sheet {
  max-height: min(82%, 620px);
  overflow-y: auto;
}

.subcategory-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.subcategory-add-form .module-search {
  min-height: 48px;
}

.subcategory-add-form .module-primary-button {
  min-height: 48px;
  padding-inline: 15px;
}

.subcategory-list {
  display: grid;
  max-height: 36vh;
  gap: 8px;
  overflow-y: auto;
}

.subcategory-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 11px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.subcategory-row > span {
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.subcategory-remove {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #DC2626;
  background: var(--bg-surface);
  cursor: pointer;
  font-size: 19px;
}

.purchase-scroll {
  padding-bottom: 18px;
}

.purchase-tabs {
  margin: 0 18px 12px;
}

.purchase-filter-caption {
  display: flex;
  min-height: 21px;
  align-items: center;
  gap: 6px;
  margin: -4px 20px 10px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.purchase-filter-caption .ph-duotone {
  color: var(--brand-primary);
  font-size: 17px;
}

.purchase-toolbar .toolbar-action {
  width: 46px;
  height: 46px;
  border-color: var(--border-color);
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface));
}

.purchase-toolbar .module-search {
  min-height: 46px;
}

.purchase-list {
  padding-top: 0;
}

.purchase-card,
.supplier-card {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 14px 15px;
}

.purchase-card-top {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.purchase-card-top > strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.purchase-card-top > span {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.purchase-supplier-name {
  margin: 0;
  color: var(--brand-primary);
  font-size: 14px;
  font-weight: 700;
}

.purchase-item-title {
  margin: 0;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.45;
}

.purchase-card-detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
  padding-top: 7px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

.purchase-card-detail span:first-child {
  color: var(--brand-primary);
  font-weight: 800;
}

.purchase-note,
.supplier-card > p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.supplier-balance {
  color: #DC2626 !important;
}

.supplier-debt-line {
  font-weight: 700;
}

.purchase-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.safe-scroll {
  padding-bottom: 22px;
}

.safe-balance-card {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 18px;
  padding: 20px;
  border-radius: 18px;
}

.safe-balance-icon {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  border-radius: 17px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 13%, var(--bg-surface));
}

.safe-balance-icon .ph-duotone {
  font-size: 32px;
}

.safe-balance-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.safe-balance-copy > span {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}

.safe-balance-copy > strong {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
}

.safe-history-heading {
  padding: 4px 20px 10px;
}

.safe-history-heading h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 800;
}

.safe-transaction-list {
  padding-top: 0;
}

.safe-transaction-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 13px;
}

.safe-transaction-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 14px;
  font-size: 23px;
}

.safe-transaction-card.is-deposit .safe-transaction-icon {
  color: #16A34A;
  background: color-mix(in srgb, #16A34A 12%, var(--bg-surface));
}

.safe-transaction-card.is-withdraw .safe-transaction-icon {
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 11%, var(--bg-surface));
}

.safe-transaction-content {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.safe-transaction-content strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
}

.safe-transaction-content span {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.safe-transaction-card.is-deposit .safe-transaction-content strong,
.safe-transaction-card.is-deposit .safe-transaction-amount {
  color: #16A34A;
}

.safe-transaction-card.is-withdraw .safe-transaction-content strong,
.safe-transaction-card.is-withdraw .safe-transaction-amount {
  color: #DC2626;
}

.safe-transaction-amount {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  text-align: end;
}

.safe-choice-sheet {
  gap: 10px;
}

.safe-choice-row {
  display: grid;
  min-height: 62px;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  text-align: start;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
}

.safe-choice-row > .ph-duotone {
  font-size: 27px;
}

.safe-choice-row > .ph-bold {
  color: var(--text-secondary);
  font-size: 21px;
}

.safe-choice-row.safe-deposit {
  color: #16A34A;
}

.safe-choice-row.safe-withdraw {
  color: #DC2626;
}

.module-sheet-backdrop {
  z-index: 31;
}

.module-bottom-sheet {
  width: min(100%, 520px);
  max-height: min(92%, 760px);
  gap: 14px;
  overflow-y: auto;
  padding: 11px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  overscroll-behavior: contain;
}

.module-bottom-sheet h2 {
  font-size: 19px;
}

.module-bottom-sheet .module-sheet-fields {
  display: grid;
  gap: 13px;
}

.module-bottom-sheet.module-modal-form {
  padding-top: 11px;
}

.module-bottom-sheet input,
.module-bottom-sheet select,
.module-bottom-sheet textarea {
  min-height: 48px;
  font-size: 16px;
}

.module-bottom-sheet textarea {
  min-height: 76px;
}

.module-bottom-sheet .modal-actions {
  margin-top: 2px;
}

@media (max-width: 380px) {
  .category-card {
    gap: 8px;
    padding-inline: 11px;
  }

  .category-card-actions {
    gap: 5px;
  }

  .category-icon-button {
    width: 39px;
    height: 39px;
  }

  .safe-balance-copy > strong {
    font-size: 24px;
  }

  .safe-transaction-card {
    gap: 8px;
    padding-inline: 10px;
  }

  .safe-transaction-amount {
    font-size: 12px;
  }

  .module-bottom-sheet {
    padding-inline: 15px;
  }

  .subcategory-add-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.inventory-scroll,
.city-scroll {
  padding-bottom: 18px;
}

.inventory-toolbar .toolbar-action {
  width: 46px;
  height: 46px;
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-surface);
}

.inventory-toolbar .module-search {
  min-height: 46px;
}

.inventory-list,
.city-list {
  padding-top: 2px;
  padding-bottom: 100px;
}

.inventory-card,
.waste-record-card,
.delivery-city-card {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.inventory-card {
  display: grid;
  gap: 11px;
  padding: 15px 16px;
}

.inventory-card-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.inventory-card-copy > strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.inventory-subtitle {
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.inventory-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.inventory-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.inventory-pill.is-warning {
  border-color: color-mix(in srgb, #D97706 20%, var(--border-color));
  color: #D97706;
  background: color-mix(in srgb, #D97706 10%, var(--bg-surface));
}

.inventory-pill.is-danger {
  border-color: color-mix(in srgb, #DC2626 20%, var(--border-color));
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 9%, var(--bg-surface));
}

.inventory-pill.is-neutral {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-subtle);
}

.inventory-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 24%, var(--border-color));
  border-radius: 12px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-surface));
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  transition: filter 150ms ease, opacity 150ms ease;
}

.inventory-action .ph-bold,
.inventory-action .ph-duotone {
  font-size: 20px;
}

.inventory-action:hover:not(:disabled) {
  filter: brightness(1.06);
}

.inventory-action:disabled {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-subtle);
  cursor: not-allowed;
  opacity: 0.7;
}

.restock-action {
  justify-self: start;
}

.waste-action {
  justify-self: start;
}

.waste-record-card {
  display: grid;
  gap: 9px;
  padding: 14px 15px;
}

.waste-record-top,
.waste-record-details {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.waste-record-top > strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.waste-record-details {
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 14px;
}

.waste-loss {
  color: #DC2626;
  font-weight: 800;
}

.waste-reason {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.city-toolbar {
  padding-bottom: 4px;
}

.delivery-city-card {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
}

.delivery-city-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 5px;
}

.delivery-city-copy > strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.delivery-city-fee {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 9%, var(--bg-surface));
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.delivery-city-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.city-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 24%, var(--border-color));
  border-radius: 12px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-surface));
  cursor: pointer;
  font-size: 22px;
}

.city-icon-button.city-delete-button {
  border-color: color-mix(in srgb, #DC2626 24%, var(--border-color));
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 8%, var(--bg-surface));
}

@media (max-width: 380px) {
  .inventory-card,
  .waste-record-card {
    padding-inline: 12px;
  }

  .delivery-city-card {
    gap: 8px;
    padding-inline: 10px;
  }

  .delivery-city-actions {
    gap: 5px;
  }

  .city-icon-button {
    width: 38px;
    height: 38px;
  }
}

.store-settings-hero {
  position: relative;
  z-index: 1;
  flex: 0 0 250px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 72%, rgb(217 155 38 / 22%), transparent 34%),
    linear-gradient(135deg, var(--brand-maroon), var(--brand-primary));
}

.store-settings-topbar {
  display: grid;
  min-height: 66px;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 0;
}

.store-settings-topbar h1 {
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-back {
  border-color: rgb(255 255 255 / 28%);
  color: #fff;
  background: rgb(255 255 255 / 12%);
}

.store-logo-block {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-top: 7px;
}

.store-logo-block > strong {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.store-logo-picker {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  overflow: visible;
  place-items: center;
  border: 3px solid rgb(255 255 255 / 88%);
  border-radius: 50%;
  color: #F7E5D1;
  background: linear-gradient(145deg, #7D2D1E, #40150F);
  box-shadow: 0 8px 24px rgb(34 12 8 / 25%);
  cursor: pointer;
}

.store-logo-picker > .ph-duotone {
  font-size: 45px;
}

.store-logo-picker > img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.store-logo-camera {
  position: absolute;
  bottom: -3px;
  left: -5px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--brand-maroon);
  border-radius: 50%;
  color: #fff;
  background: var(--brand-primary);
  font-size: 18px;
}

.store-settings-scroll {
  position: relative;
  z-index: 2;
  margin-top: -22px;
  border-radius: 24px 24px 0 0;
  background: var(--bg-app);
}

.store-settings-form {
  display: grid;
  width: min(100%, 700px);
  gap: 14px;
  margin-inline: auto;
  padding: 20px 16px 36px;
}

.store-settings-card {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.store-settings-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 2px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
}

.store-settings-card h2 .ph-duotone {
  color: var(--brand-primary);
  font-size: 23px;
}

.store-settings-card .form-field {
  gap: 7px;
}

.store-settings-card .form-field > label {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
}

.store-settings-card input:not([type="checkbox"]),
.store-settings-card textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  color: var(--text-primary);
  background: var(--bg-app);
  font: inherit;
  font-size: 16px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.store-settings-card textarea {
  min-height: 86px;
  resize: vertical;
}

.store-settings-card input:focus,
.store-settings-card textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 14%, transparent);
}

.phone-input-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-app);
}

.phone-input-wrap > span {
  display: grid;
  min-height: 48px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 12px;
  border-inline-end: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-subtle);
  direction: ltr;
  font-size: 15px;
  font-weight: 700;
}

.phone-input-wrap input {
  min-width: 0;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  direction: ltr;
  text-align: left;
}

.settings-switch-row {
  position: relative;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
}

.settings-switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.settings-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-subtle);
  transition: background 160ms ease, border-color 160ms ease;
}

.settings-switch::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: 0 1px 4px rgb(0 0 0 / 18%);
  content: "";
  transition: transform 160ms ease;
}

.settings-switch-row input:checked + .settings-switch {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
}

.settings-switch-row input:checked + .settings-switch::after {
  transform: translateX(-20px);
}

.settings-switch-row input:focus-visible + .settings-switch {
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 30%, transparent);
  outline-offset: 2px;
}

.settings-help {
  margin: -7px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.settings-submit {
  min-height: 52px;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 800;
}

.activity-scroll {
  padding: 14px 16px 24px;
}

.activity-search {
  width: min(100%, 720px);
  margin: 0 auto 14px;
}

.activity-list {
  width: min(100%, 720px);
  margin-inline: auto;
  padding-bottom: 20px;
}

.activity-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.activity-icon-badge {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface));
  font-size: 23px;
}

.activity-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 3px;
}

.activity-copy strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
}

.activity-copy p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.activity-time {
  flex: 0 0 auto;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}

.tutorials-scroll {
  padding: 14px 16px 28px;
}

.tutorial-list {
  display: grid;
  width: min(100%, 760px);
  gap: 10px;
  margin-inline: auto;
  padding-bottom: 20px;
}

.tutorial-card {
  display: flex;
  min-width: 0;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  font: inherit;
  text-align: right;
  transition: border-color 150ms ease, transform 150ms ease;
}

.tutorial-card:hover {
  border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border-color));
  transform: translateY(-1px);
}

.tutorial-number-badge {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface));
  font-size: 15px;
  font-weight: 800;
}

.tutorial-card-title {
  min-width: 0;
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.tutorial-play-button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-primary);
  font-size: 21px;
}

.tutorial-detail-sheet {
  max-height: min(80vh, 650px);
}

.tutorial-detail-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tutorial-detail-heading h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 19px;
  line-height: 1.55;
}

.tutorial-steps {
  display: grid;
  gap: 12px;
  margin: 4px 0;
  padding-inline-start: 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.tutorial-steps li::marker {
  color: var(--brand-primary);
  font-weight: 800;
}

.print-company-header {
  display: none;
}

@media (max-width: 420px) {
  .store-settings-form {
    padding-inline: 12px;
  }

  .store-settings-card {
    padding: 14px;
  }

  .activity-card {
    align-items: flex-start;
    gap: 9px;
    padding-inline: 11px;
  }

  .activity-time {
    max-width: 78px;
    white-space: normal;
  }

  .tutorial-card {
    gap: 9px;
    padding-inline: 10px;
  }
}

.bottom-nav[hidden] {
  display: none !important;
}

.inventory-screen-scroll,
.sales-scroll {
  padding-bottom: 90px;
}

.inventory-screen-content,
.sales-content {
  width: min(100%, 900px);
  margin-inline: auto;
  padding: 14px 16px 30px;
}

.inventory-search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inventory-search-actions > .module-search {
  min-height: 48px;
}

.inventory-action-grid {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 44px);
  gap: 6px;
}

.inventory-action-grid .toolbar-action {
  width: 44px;
  height: 44px;
  border-color: var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-surface);
}

.inventory-action-grid .toolbar-action .ph-duotone {
  font-size: 22px;
}

#inventory-date-filter {
  position: relative;
}

#inventory-date-filter span {
  position: absolute;
  inset-inline: 2px;
  bottom: -16px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 9px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 1px 5px;
  scrollbar-width: none;
}

.inventory-category-chips::-webkit-scrollbar {
  display: none;
}

.category-filter-chip {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  background: var(--bg-surface);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.category-filter-chip.is-active {
  border-color: var(--brand-primary);
  color: #fff;
  background: var(--brand-primary);
}

.inventory-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 10px 0 13px;
}

.inventory-kpi-card {
  display: grid;
  min-width: 0;
  min-height: 103px;
  align-content: start;
  justify-items: start;
  gap: 4px;
  padding: 11px 10px;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.inventory-kpi-card > i {
  color: var(--brand-primary);
  font-size: 22px;
}

.inventory-kpi-card > span {
  overflow: hidden;
  width: 100%;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-kpi-card > strong {
  overflow: hidden;
  max-width: 100%;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-products-list {
  width: 100%;
  gap: 10px;
  padding: 0 0 24px;
}

.inventory-product-card {
  display: grid;
  min-width: 0;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.inventory-product-top {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.inventory-product-image {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  overflow: hidden;
  place-items: center;
  border-radius: 13px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 25px;
}

.inventory-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-product-details {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.inventory-product-details > strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-product-top > .inventory-pill {
  flex: 0 0 auto;
}

.inventory-product-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  padding-inline-start: 56px;
  color: var(--text-secondary);
  font-size: 13px;
}

.inventory-product-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.inventory-icon-action {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, var(--border-color));
  border-radius: 12px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 8%, var(--bg-surface));
  cursor: pointer;
  font-size: 21px;
}

.inventory-icon-action.is-danger {
  border-color: color-mix(in srgb, #DC2626 22%, var(--border-color));
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 8%, var(--bg-surface));
}

.inventory-screen .empty-state,
.pos-product-grid .empty-state,
.sales-list .empty-state {
  grid-column: 1 / -1;
}

.pos-screen {
  padding-bottom: 0;
}

.pos-header {
  z-index: 2;
  display: grid;
  min-height: 66px;
  flex: 0 0 auto;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.pos-header .module-back {
  width: 44px;
  height: 44px;
}

.pos-price-mode {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  font-weight: 800;
}

.pos-price-mode .ph-bold {
  color: var(--brand-primary);
  font-size: 18px;
}

.pos-whatsapp {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #22C55E;
  cursor: pointer;
  font-size: 25px;
}

.pos-scroll {
  padding-bottom: 105px;
}

.pos-content {
  width: min(100%, 900px);
  margin-inline: auto;
  padding: 12px 16px 24px;
}

.pos-hardware-strip {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pos-hardware-strip[hidden],
.pos-camera-preview[hidden] {
  display: none !important;
}

.pos-close-scan {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: #DC2626;
  cursor: pointer;
  font-size: 23px;
}

.pos-camera-preview {
  display: grid;
  min-height: 150px;
  justify-items: center;
  align-content: center;
  gap: 8px;
  margin-bottom: 11px;
  border-radius: 17px;
  color: #fff;
  background: #0B0B0D;
}

.camera-viewfinder {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 2px solid #D99B26;
  border-radius: 16px;
  color: #F7D88F;
  font-size: 42px;
}

.pos-camera-preview button {
  padding: 6px 12px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.pos-customer-card {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
}

.pos-customer-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface));
  font-size: 25px;
}

.pos-customer-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.pos-customer-copy small {
  color: var(--text-secondary);
  font-size: 12px;
}

.pos-customer-copy strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-clear-customer {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 10%, var(--bg-surface));
  cursor: pointer;
}

.pos-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
}

.pos-toolbar .module-search {
  min-height: 46px;
}

.pos-tool-button,
.pos-sort {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-color: var(--brand-primary);
  border-radius: 12px;
  color: #fff;
  background: var(--brand-primary);
}

.pos-sort {
  border-color: var(--border-color);
  color: var(--text-primary);
  background: var(--bg-surface);
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding-bottom: 12px;
}

.pos-product-card {
  display: grid;
  min-width: 0;
  justify-items: start;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  font: inherit;
  text-align: start;
}

.pos-product-thumb {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 13px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 24px;
}

.pos-product-card > strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pos-product-card > small {
  color: var(--text-secondary);
  font-size: 12px;
}

.pos-product-card > b {
  color: var(--brand-primary);
  font-size: 14px;
}

.pos-cart-bar {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: 0 -7px 22px rgb(20 15 12 / 10%);
}

.pos-cart-count,
.pos-cart-total {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 7px;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.pos-cart-count {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 3px 4px;
  color: var(--text-primary);
  background: transparent;
  text-align: start;
}

.pos-cart-count small {
  color: var(--text-secondary);
  font-size: 12px;
}

.pos-cart-count strong {
  font-size: 15px;
  font-weight: 800;
}

.pos-cart-total {
  justify-content: center;
  padding: 8px 17px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-primary);
  font-weight: 800;
}

.pos-cart-total .ph-duotone {
  font-size: 22px;
}

.sales-date-banner {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  background: var(--bg-surface);
  cursor: pointer;
  font: inherit;
}

.sales-date-banner > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sales-date-banner .ph-duotone {
  color: var(--brand-primary);
  font-size: 22px;
}

.sales-date-banner > strong {
  padding: 5px 11px;
  border-radius: 999px;
  color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 10%, var(--bg-surface));
  font-size: 13px;
}

.sales-toolbar {
  padding: 12px 0;
}

.sales-toolbar .module-search {
  min-height: 46px;
}

.sales-toolbar .toolbar-action {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-color: var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-surface);
}

.sales-list {
  gap: 10px;
  padding: 0 0 24px;
}

.sales-invoice-card {
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  font: inherit;
  text-align: start;
}

.sales-invoice-top,
.sales-invoice-meta,
.sales-invoice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sales-invoice-top > strong {
  overflow: hidden;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
}

.sales-payment-badge,
.sales-returned-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.sales-payment-badge.is-cash {
  color: #16803C;
  background: color-mix(in srgb, #16A34A 12%, var(--bg-surface));
}

.sales-payment-badge.is-credit {
  color: #B45309;
  background: color-mix(in srgb, #D97706 13%, var(--bg-surface));
}

.sales-returned-badge {
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 10%, var(--bg-surface));
}

.sales-invoice-meta,
.sales-invoice-summary > span {
  color: var(--text-secondary);
  font-size: 13px;
}

.sales-invoice-summary {
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.sales-invoice-summary > strong {
  color: var(--brand-primary);
  font-size: 16px;
  font-weight: 800;
}

.sales-invoice-summary > span {
  text-align: left;
}

.sales-invoice-card.is-returned {
  opacity: 0.8;
}

.pos-customer-sheet,
.pos-checkout-sheet,
.pos-receipt-sheet,
.sales-invoice-sheet {
  display: grid;
  gap: 13px;
}

.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sheet-title-row h2 {
  text-align: right;
}

.pos-customer-list {
  max-height: 45vh;
  overflow-y: auto;
  padding: 0;
}

.pos-customer-option {
  display: flex;
  min-height: 65px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  cursor: pointer;
  font: inherit;
  text-align: start;
}

.pos-customer-option.is-selected {
  border-color: var(--brand-primary);
}

.pos-customer-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 22px;
}

.pos-customer-option-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.pos-customer-option-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-customer-option-copy small {
  color: var(--text-secondary);
  font-size: 12px;
}

.pos-customer-debt {
  padding: 4px 7px;
  border-radius: 999px;
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 9%, var(--bg-surface));
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.pos-checkout-sheet {
  max-height: min(94%, 820px);
}

.pos-checkout-lines {
  display: grid;
  max-height: 34vh;
  gap: 8px;
  overflow-y: auto;
}

.pos-checkout-line {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--border-color);
  border-radius: 13px;
  background: var(--bg-surface);
}

.pos-checkout-line-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.pos-checkout-line-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-checkout-line-copy small {
  color: var(--text-secondary);
  font-size: 12px;
}

.pos-quantity-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.pos-quantity-button,
.pos-remove-item {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  cursor: pointer;
  font: inherit;
  font-size: 19px;
  font-weight: 800;
}

.pos-remove-item {
  color: #DC2626;
  font-size: 18px;
}

.pos-checkout-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.pos-checkout-fields .form-field {
  gap: 5px;
}

.pos-checkout-fields .form-field label {
  color: var(--text-secondary);
  font-size: 14px;
}

.pos-checkout-fields input {
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--bg-app);
  font: inherit;
  font-size: 16px;
}

.pos-checkout-totals {
  display: grid;
  gap: 5px;
}

.pos-total-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.pos-total-row strong {
  color: var(--text-primary);
}

.pos-total-row.is-grand {
  padding-top: 7px;
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
}

.pos-total-row.is-grand strong {
  color: var(--brand-primary);
}

.pos-payment-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 4px;
  border-radius: 13px;
  background: var(--bg-subtle);
}

.pos-payment-toggle button {
  min-height: 43px;
  border: 0;
  border-radius: 10px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.pos-payment-toggle button.is-active {
  color: #fff;
  background: var(--brand-primary);
}

.pos-credit-hint {
  margin: -5px 0 0;
  color: #DC2626;
  font-size: 13px;
}

.pos-complete-sale:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pos-receipt-sheet #pos-receipt-summary {
  max-height: 52vh;
  overflow-y: auto;
}

.pos-receipt-sheet .receipt-document {
  display: grid;
  gap: 7px;
  color: var(--text-primary);
  font-size: 13px;
}

.receipt-document header {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
  text-align: center;
}

.receipt-document header img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
}

.receipt-document h1,
.receipt-document h2,
.receipt-document p {
  margin: 0;
}

.receipt-document h1 {
  font-size: 18px;
}

.receipt-document h2 {
  font-size: 16px;
}

.receipt-document table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.receipt-document th,
.receipt-document td {
  padding: 4px;
  border-bottom: 1px solid var(--border-color);
  text-align: right;
}

.receipt-document .receipt-total {
  padding-top: 6px;
  border-top: 1px solid var(--border-color);
  color: var(--brand-primary);
  font-size: 16px;
}

.receipt-document footer {
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
  color: var(--text-secondary);
  text-align: center;
}

.sales-invoice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.sales-invoice-actions .module-primary-button,
.sales-invoice-actions .module-secondary-button {
  min-height: 44px;
  padding: 7px 9px;
  font-size: 13px;
}

.sales-invoice-actions .module-primary-button {
  grid-column: 1 / -1;
}

#sales-invoice-content {
  display: grid;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 14px;
}

#sales-invoice-content > p {
  margin: 0;
}

.invoice-detail-number {
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
}

.invoice-detail-items {
  display: grid;
  max-height: 35vh;
  gap: 6px;
  overflow-y: auto;
  padding-block: 8px;
  border-block: 1px solid var(--border-color);
}

.invoice-detail-item {
  color: var(--text-secondary);
  font-size: 13px;
}

.invoice-detail-total {
  color: var(--brand-primary);
  font-size: 16px;
}

.inventory-label-print {
  display: none;
}

.barcode-label {
  display: grid;
  min-height: 130px;
  align-content: center;
  justify-items: center;
  gap: 5px;
  padding: 10px;
  border: 1px dashed #777;
  color: #111;
  text-align: center;
}

.barcode-bars {
  display: block;
  width: 80%;
  height: 38px;
  background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px);
}

.barcode-label strong,
.barcode-label b {
  font-size: 13px;
}

.barcode-value {
  font-family: monospace;
  font-size: 12px;
}

@media (min-width: 600px) {
  .inventory-screen-content,
  .sales-content,
  .pos-content {
    padding-inline: 24px;
  }

  .inventory-kpi-card {
    min-height: 112px;
    padding: 14px;
  }

  .inventory-kpi-card > span {
    font-size: 13px;
  }

  .inventory-kpi-card > strong {
    font-size: 17px;
  }

  .pos-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pos-product-card {
    padding: 15px;
  }
}

@media (max-width: 380px) {
  .inventory-screen-content,
  .sales-content,
  .pos-content {
    padding-inline: 11px;
  }

  .inventory-search-actions {
    gap: 7px;
  }

  .inventory-action-grid {
    grid-template-columns: repeat(2, 40px);
    gap: 5px;
  }

  .inventory-action-grid .toolbar-action {
    width: 40px;
    height: 40px;
  }

  .inventory-product-top {
    gap: 7px;
  }

  .inventory-product-top > .inventory-pill {
    padding-inline: 7px;
    font-size: 11px;
  }

  .pos-toolbar {
    gap: 5px;
  }

  .pos-tool-button,
  .pos-sort,
  .sales-toolbar .toolbar-action {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .pos-cart-bar {
    padding-inline: 11px;
  }

  .pos-cart-total {
    padding-inline: 12px;
    font-size: 14px;
  }
}

@media print {
  body[data-print-target] * {
    visibility: hidden !important;
  }

  body[data-print-target] #print-company-header,
  body[data-print-target] #print-company-header *,
  body[data-print-target] #pos-receipt-print,
  body[data-print-target] #pos-receipt-print *,
  body[data-print-target] #sales-invoice-print-area,
  body[data-print-target] #sales-invoice-print-area *,
  body[data-print-target] #inventory-label-print,
  body[data-print-target] #inventory-label-print *,
  body[data-print-target] #installment-contract-print-area,
  body[data-print-target] #installment-contract-print-area *,
  body[data-print-target] #installment-receipt-print-area,
  body[data-print-target] #installment-receipt-print-area * {
    visibility: visible !important;
  }

  body[data-print-target] #print-company-header {
    position: relative;
    display: flex !important;
    margin-bottom: 14px;
  }

  body[data-print-target] #print-company-header[hidden] {
    display: none !important;
  }

  body[data-print-target="pos-receipt-print"] #pos-receipt-print,
  body[data-print-target="sales-invoice-print-area"] #sales-invoice-print-area,
  body[data-print-target="inventory-label-print"] #inventory-label-print {
    position: absolute;
    inset: 100px 0 auto;
    display: block !important;
    color: #111;
    background: #fff;
  }

  body[data-print-target="inventory-label-print"] #inventory-label-print {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  body[data-print-target="installment-contract-print-area"] #installment-contract-print-area,
  body[data-print-target="installment-receipt-print-area"] #installment-receipt-print-area {
    position: absolute;
    inset: 100px 0 auto;
    display: block !important;
    width: min(100%, 720px);
    margin-inline: auto;
    color: #111;
    background: #fff;
  }

  body[data-print-target="installment-receipt-print-area"] .installment-payment-receipt,
  body[data-print-target="installment-contract-print-area"] .installment-contract-document {
    width: 100%;
    border: 0;
    color: #111;
    background: #fff;
    box-shadow: none;
  }

  body[data-print-target] .receipt-document {
    color: #111 !important;
  }

  body[data-print-target] .installment-receipt-facts span,
  body[data-print-target] .installment-receipt-facts strong {
    color: #111 !important;
  }
}

.drawer-module-scroll {
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.drawer-module-content {
  display: grid;
  width: min(100%, 720px);
  gap: 14px;
  margin-inline: auto;
  padding: 18px 18px 30px;
}

.drawer-module-subtitle {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
}

.drive-backup-card,
.backup-local-card,
.drawer-content-card,
.preference-row,
.faq-item,
.language-card {
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.drive-backup-card,
.backup-local-card,
.drawer-content-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.drive-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--bg-subtle);
}

.drive-mark svg {
  width: 35px;
  height: 35px;
}

.drive-backup-copy h2,
.backup-local-card h2,
.terms-card h2 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 800;
}

.drive-backup-copy p,
.backup-local-card > p,
.terms-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.drive-backup-copy small,
.backup-privacy-note {
  color: var(--text-secondary);
  font-size: 12px;
}

.drive-backup-card .module-primary-button,
.backup-local-card .module-primary-button,
.backup-local-card .module-secondary-button,
.feedback-form .module-primary-button {
  width: 100%;
}

.backup-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
}

.backup-privacy-note .ph-duotone {
  flex: 0 0 auto;
  color: var(--brand-primary);
  font-size: 18px;
}

.language-card-list {
  display: grid;
  gap: 10px;
}

.language-card {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 13px;
  padding: 12px 16px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: start;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.language-card:hover {
  transform: translateY(-1px);
}

.language-card.is-active {
  border-color: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 7%, var(--bg-surface));
}

.language-flag {
  font-size: 25px;
  line-height: 1;
}

.language-flag svg {
  display: block;
  width: 36px;
  height: 24px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

.language-card strong {
  flex: 1;
  font-size: 16px;
}

.language-check {
  color: var(--brand-primary);
  font-size: 22px;
  opacity: 0;
  transform: scale(.8);
  transition: opacity 160ms ease, transform 160ms ease;
}

.language-card.is-active .language-check {
  opacity: 1;
  transform: scale(1);
}

.app-preferences {
  gap: 10px;
}

.preference-row {
  position: relative;
  display: grid;
  min-height: 70px;
  grid-template-columns: 42px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 11px;
  padding: 12px;
  cursor: pointer;
}

.preference-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 21px;
}

.preference-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.preference-copy strong {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
}

.preference-copy small {
  color: var(--text-secondary);
  font-size: 12px;
}

.preference-row input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.preference-switch {
  position: relative;
  width: 43px;
  height: 25px;
  border-radius: 99px;
  background: var(--bg-subtle);
  box-shadow: inset 0 0 0 1px var(--border-color);
  transition: background 180ms ease;
}

.preference-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--bg-surface);
  box-shadow: 0 1px 4px rgb(0 0 0 / 18%);
  content: "";
  transition: transform 180ms ease;
}

.preference-row input:checked + .preference-switch {
  background: var(--brand-primary);
  box-shadow: none;
}

.preference-row input:checked + .preference-switch::after {
  transform: translateX(18px);
}

.preference-row input:focus-visible + .preference-switch {
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 45%, transparent);
  outline-offset: 3px;
}

.preference-select-row {
  grid-template-columns: 42px minmax(0, 1fr) minmax(112px, auto);
}

.preference-select-row select,
.feedback-form input,
.feedback-form textarea {
  min-width: 0;
  border: 1px solid var(--border-color);
  border-radius: 11px;
  color: var(--text-primary);
  background: var(--bg-app);
  font: inherit;
  font-size: 16px;
}

.preference-select-row select {
  max-width: 155px;
  padding: 8px 10px;
}

.faq-list {
  align-content: start;
  gap: 9px;
}

.faq-item {
  overflow: hidden;
  padding: 0 15px;
}

.faq-item summary {
  position: relative;
  padding: 15px 25px 15px 0;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  position: absolute;
  top: 50%;
  right: 0;
  color: var(--brand-primary);
  content: "+";
  font-size: 22px;
  transform: translateY(-50%);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 0 15px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.85;
  animation: faq-answer-enter 180ms ease both;
}

@keyframes faq-answer-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-form {
  gap: 10px;
}

.feedback-form label {
  margin-top: 5px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
}

.feedback-form input,
.feedback-form textarea {
  width: 100%;
  padding: 12px;
}

.feedback-form textarea {
  min-height: 140px;
  resize: vertical;
}

.feedback-form input:focus,
.feedback-form textarea:focus,
.preference-select-row select:focus {
  border-color: var(--brand-primary);
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 17%, transparent);
}

.terms-card {
  gap: 11px;
}

.terms-card h3 {
  margin: 8px 0 -7px;
  color: var(--text-primary);
  font-size: 16px;
}

.about-card {
  display: grid;
  max-width: 520px;
  align-content: start;
  justify-items: center;
  gap: 12px;
  margin: 18px auto 30px;
  padding: 24px 20px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.about-app-mark {
  display: grid;
  width: 110px;
  height: 110px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 55%, transparent);
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-maroon), var(--brand-primary));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--brand-maroon) 25%, transparent);
  font-size: 48px;
}

.about-version {
  color: var(--text-secondary);
  font-size: 13px;
}

.about-card h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
}

.about-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.9;
}

.about-card h3 {
  margin: 9px 0 0;
  color: var(--text-primary);
  font-size: 15px;
}

.about-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-primary);
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

.about-social-links,
.developer-social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
}

.about-social-links a,
.developer-social-links a {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 21px;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.about-social-links a:hover,
.developer-social-links a:hover {
  color: #fff;
  background: var(--brand-primary);
  transform: translateY(-2px);
}

.developer-emblem {
  display: grid;
  width: 120px;
  height: 120px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand-gold) 65%, transparent);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #382a25, #100e0d 72%);
  box-shadow: 0 12px 30px rgb(0 0 0 / 22%);
}

.developer-emblem svg {
  width: 72px;
  height: 72px;
}

.hide-product-images .inventory-product-image img,
.hide-product-images .pos-product-thumb img {
  display: none !important;
}

.hide-product-images .inventory-product-image,
.hide-product-images .pos-product-thumb {
  background: var(--bg-subtle);
}

@media (min-width: 700px) {
  .drawer-module-content {
    padding-inline: 26px;
  }

  .drive-backup-card {
    grid-template-columns: minmax(0, 1fr) 52px;
    align-items: center;
  }

  .drive-mark {
    grid-column: 2;
    grid-row: 1;
  }

  .drive-backup-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .drive-backup-card .module-primary-button {
    grid-column: 1 / -1;
  }

  .language-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .drawer-module-content {
    padding-inline: 12px;
  }

  .preference-row {
    grid-template-columns: 36px minmax(0, 1fr) 40px;
    gap: 8px;
    padding-inline: 9px;
  }

  .preference-select-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .preference-select-row select {
    grid-column: 2;
    max-width: none;
  }
}

.debts-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 4px 18px 12px;
}

.debtor-card,
.debt-ledger-card {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.debtor-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.debtor-card-top strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
}

.debtor-amount {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #DC2626;
  background: color-mix(in srgb, #DC2626 11%, var(--bg-surface));
  font-size: 14px;
  font-weight: 800;
}

.debtor-phone,
.debt-ledger-card > span {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.debtor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.debtor-actions > button {
  min-height: 42px;
  flex: 1 1 130px;
  font-size: 14px;
}

.debt-ledger-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
}

.debt-ledger-card > strong {
  color: var(--text-primary);
  font-size: 15px;
}

.debt-ledger-card > time {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: left;
}

.debt-ledger-card > b {
  grid-column: 2;
  grid-row: 2 / span 2;
  color: #DC2626;
  font-size: 15px;
  text-align: left;
  white-space: nowrap;
}

.debt-ledger-card.is-credit > b {
  color: #16A34A;
}

.subscription-screen {
  background: var(--bg-app);
}

.subscription-scroll {
  padding-bottom: 20px;
}

.subscription-hero {
  display: grid;
  justify-items: center;
  gap: 13px;
  padding: 16px max(18px, calc((100% - 760px) / 2)) 27px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgb(217 155 38 / 25%), transparent 31%),
    linear-gradient(140deg, var(--brand-maroon), var(--brand-primary));
  text-align: center;
}

.subscription-topbar {
  display: grid;
  width: 100%;
  max-width: 900px;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
}

.subscription-topbar > div {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.subscription-icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 14px;
  color: #fff;
  background: rgb(255 255 255 / 12%);
  cursor: pointer;
  font-size: 21px;
  text-decoration: none;
}

.subscription-tutorial {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 999px;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.subscription-app-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 23px;
  color: #F7D88E;
  background: rgb(255 255 255 / 12%);
  font-size: 42px;
}

.subscription-hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  line-height: 1.65;
}

.subscription-hero > p {
  max-width: 600px;
  margin: 0;
  color: rgb(255 255 255 / 83%);
  font-size: 15px;
}

.subscription-current-plan {
  padding: 6px 12px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  color: #fff;
  background: rgb(255 255 255 / 10%);
  font-size: 13px;
  font-weight: 700;
}

.subscription-content {
  display: grid;
  width: min(100%, 920px);
  gap: 20px;
  margin-inline: auto;
  padding: 18px 16px 30px;
}

.subscription-plan-list {
  display: grid;
  gap: 12px;
}

.subscription-plan-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 9px;
  padding: 18px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  color: var(--text-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  font: inherit;
  text-align: right;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.subscription-plan-card:hover {
  transform: translateY(-2px);
}

.subscription-plan-card.is-selected {
  border: 2px solid var(--brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 12%, transparent), var(--card-shadow);
}

.subscription-plan-card.is-current:not(.is-selected) {
  border-color: color-mix(in srgb, var(--brand-gold) 75%, var(--border-color));
}

.subscription-plan-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-inline-end: 78px;
}

.subscription-plan-heading strong {
  font-size: 17px;
  font-weight: 800;
}

.subscription-plan-heading > span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.subscription-price {
  color: var(--brand-primary);
  font-size: 25px;
  font-weight: 900;
  direction: ltr;
  text-align: right;
}

.subscription-plan-description {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.subscription-discount {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #5C3B00;
  background: color-mix(in srgb, var(--brand-gold) 28%, var(--bg-surface));
  font-size: 12px;
  font-weight: 800;
}

.subscription-selected-mark {
  position: absolute;
  top: 14px;
  left: 14px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-primary);
}

.subscription-plan-card[data-plan-card="annual"] .subscription-discount {
  left: 50px;
}

.subscription-comparison,
.subscription-faq {
  display: grid;
  gap: 12px;
}

.subscription-comparison h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 800;
}

.subscription-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
}

.subscription-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
  font-size: 14px;
}

.subscription-table-wrap th,
.subscription-table-wrap td {
  min-width: 76px;
  padding: 11px 9px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.subscription-table-wrap th:first-child,
.subscription-table-wrap td:first-child {
  min-width: 190px;
  text-align: right;
}

.subscription-table-wrap th {
  color: var(--text-primary);
  background: var(--bg-subtle);
  font-weight: 800;
}

.subscription-table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.subscription-table-wrap td:not(:first-child) {
  color: #16A34A;
  font-weight: 800;
}

.subscription-table-wrap tbody tr:nth-child(4) td:nth-child(2),
.subscription-table-wrap tbody tr:nth-child(5) td:nth-child(2),
.subscription-table-wrap tbody tr:nth-child(6) td:nth-child(2),
.subscription-table-wrap tbody tr:nth-child(7) td:nth-child(2) {
  color: #DC2626;
}

.subscription-selected-mark[hidden] {
  display: none;
}

.subscription-faq details {
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
}

.subscription-faq summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.subscription-faq p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.subscription-sticky-bar {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px max(16px, calc((100% - 880px) / 2));
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
  box-shadow: 0 -7px 24px rgb(22 16 13 / 8%);
}

.subscription-sticky-bar .module-primary-button {
  min-height: 48px;
}

.subscription-restore {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  color: var(--brand-primary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.online-store-content {
  display: grid;
  gap: 18px;
  padding-bottom: 28px;
}

.backup-demo-actions {
  display: grid;
  gap: 10px;
}

.backup-demo-actions > button {
  min-height: 50px;
  font-size: 15px;
}

.data-action-modal > p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

.online-store-brand-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 18px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.online-store-brand-card > img,
.online-store-fallback-logo {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  object-fit: cover;
}

.online-store-fallback-logo {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-primary), var(--brand-maroon));
  font-size: 40px;
}

.online-store-brand-card h2,
.online-store-brand-card p {
  margin: 0;
}

.online-store-brand-card h2 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 900;
}

.online-store-brand-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

.online-store-socials {
  display: flex;
  gap: 8px;
}

.online-store-socials a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 20px;
}

.online-store-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.online-store-toolbar h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 800;
}

.online-store-toolbar .module-secondary-button {
  width: auto;
  min-height: 42px;
  padding-inline: 12px;
  font-size: 14px;
}

.online-store-product-list {
  display: grid;
  gap: 10px;
}

.online-store-product-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.online-store-product-image {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  place-items: center;
  overflow: hidden;
  border-radius: 13px;
  color: var(--brand-primary);
  background: var(--bg-subtle);
  font-size: 30px;
}

.online-store-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-store-product-details {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 4px;
}

.online-store-product-details strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
}

.online-store-product-details small {
  color: var(--text-secondary);
  font-size: 13px;
}

.online-store-product-price {
  color: var(--brand-primary);
  font-size: 15px;
  font-weight: 800;
}

.online-store-stock {
  color: var(--text-secondary);
}

@media (min-width: 700px) {
  .debts-summary {
    gap: 12px;
    padding-inline: 22px;
  }

  .subscription-plan-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .subscription-plan-card {
    align-content: start;
    padding: 17px 14px;
  }

  .subscription-plan-heading {
    display: grid;
    padding-inline-end: 0;
  }

  .subscription-plan-card[data-plan-card="annual"] .subscription-discount {
    left: 14px;
  }
}

@media (max-width: 380px) {
  .debts-summary {
    gap: 5px;
    padding-inline: 12px;
  }

  .debts-summary .installment-summary-card {
    padding: 8px 6px;
  }

  .debts-summary .installment-summary-card > span {
    font-size: 11px;
  }

  .debts-summary .installment-summary-card strong {
    font-size: 13px;
  }

  .subscription-sticky-bar {
    gap: 4px;
    padding-inline: 10px;
  }

  .subscription-restore {
    font-size: 12px;
  }
}

.reports-scroll {
  padding-bottom: 94px;
}

.reports-content {
  display: grid;
  width: min(100%, 900px);
  gap: 14px;
  margin-inline: auto;
  padding: 16px 18px 30px;
}

.reports-filter-grid,
.reports-custom-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reports-filter-field,
.reports-date-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.reports-filter-field > span,
.reports-date-field > span {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.reports-filter-field select,
.reports-date-field input {
  width: 100%;
  min-width: 0;
  min-height: 51px;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  color: var(--text-primary);
  background: var(--bg-surface);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
}

.reports-filter-field select:focus,
.reports-date-field input:focus {
  border-color: var(--brand-primary);
  outline: 3px solid color-mix(in srgb, var(--brand-primary) 18%, transparent);
}

.reports-payment-switch {
  display: grid;
  min-height: 54px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-surface);
}

.reports-payment-switch button {
  min-width: 0;
  padding: 7px 5px;
  border: 0;
  border-radius: 12px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.reports-payment-switch button.is-active {
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 3px 10px color-mix(in srgb, var(--brand-primary) 23%, transparent);
}

.reports-print-row {
  display: flex;
  justify-content: center;
}

.reports-print-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--brand-primary);
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  font-size: 23px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.reports-print-button:hover {
  color: #fff;
  background: var(--brand-primary);
  transform: translateY(-1px);
}

.reports-summary-card {
  display: grid;
  gap: 0;
  padding: 7px 18px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.reports-summary-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 9px;
}

.reports-summary-row + .reports-summary-row {
  border-top: 1px solid var(--border-color);
}

.reports-summary-row > span {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

.reports-summary-row:nth-child(2) > span {
  color: var(--brand-primary);
}

.reports-summary-row > strong {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.reports-summary-row:last-child > span {
  font-weight: 800;
}

.reports-summary-row:last-child > strong,
.report-breakdown-metric.is-profit strong {
  color: #16A34A;
}

[data-theme="dark"] .reports-summary-row:last-child > strong,
[data-theme="dark"] .report-breakdown-metric.is-profit strong {
  color: #4ADE80;
}

.reports-breakdown-section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.reports-breakdown-section > h2 {
  margin: 3px 2px 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 800;
}

.reports-breakdown-list {
  display: grid;
  gap: 9px;
}

.report-breakdown-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow: var(--card-shadow);
}

.report-breakdown-header strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.report-breakdown-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.report-breakdown-metric {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 3px;
}

.report-breakdown-metric small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.report-breakdown-metric strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (min-width: 680px) {
  .reports-content {
    gap: 17px;
    padding-inline: 25px;
  }

  .reports-breakdown-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .reports-content {
    gap: 11px;
    padding-inline: 11px;
  }

  .reports-filter-grid,
  .reports-custom-dates {
    gap: 7px;
  }

  .reports-filter-field select,
  .reports-date-field input {
    padding-inline: 8px;
    font-size: 14px;
  }

  .reports-summary-card {
    padding-inline: 12px;
  }

  .reports-summary-row > strong {
    font-size: 16px;
  }

  .report-breakdown-card {
    padding-inline: 12px;
  }

  .report-breakdown-metrics {
    gap: 5px;
  }

  .report-breakdown-metric small {
    font-size: 11px;
  }

  .report-breakdown-metric strong {
    font-size: 12px;
  }
}

@media print {
  body[data-print-target="reports"] #screen-reports,
  body[data-print-target="reports"] #screen-reports * {
    visibility: visible !important;
  }

  body[data-print-target="reports"] #screen-reports {
    position: absolute;
    inset: 0;
    display: block !important;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
    color: #111;
    background: #fff;
  }

  body[data-print-target="reports"] .reports-header,
  body[data-print-target="reports"] .reports-filter-grid,
  body[data-print-target="reports"] .reports-custom-dates,
  body[data-print-target="reports"] .reports-payment-switch,
  body[data-print-target="reports"] .reports-print-row {
    display: none !important;
  }

  body[data-print-target="reports"] .reports-scroll,
  body[data-print-target="reports"] .reports-content {
    display: block !important;
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 0;
    color: #111;
    background: #fff;
  }

  body[data-print-target="reports"] .reports-content::before {
    display: block;
    margin-bottom: 12px;
    content: "XURMA SALE · ڕاپۆرت";
    font-size: 20px;
    font-weight: 800;
    text-align: center;
  }

  body[data-print-target="reports"] .reports-summary-card,
  body[data-print-target="reports"] .report-breakdown-card {
    break-inside: avoid;
    border-color: #ccc;
    color: #111;
    background: #fff;
    box-shadow: none;
  }

  body[data-print-target="reports"] .reports-breakdown-section > h2,
  body[data-print-target="reports"] .reports-summary-row > span,
  body[data-print-target="reports"] .reports-summary-row > strong,
  body[data-print-target="reports"] .report-breakdown-header strong,
  body[data-print-target="reports"] .report-breakdown-metric strong {
    color: #111 !important;
  }
}
