@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Tajawal-Regular.ttf") format("truetype");
}
@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/Tajawal-Medium.ttf") format("truetype");
}
@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Tajawal-Bold.ttf") format("truetype");
}
@font-face {
  font-family: Tajawal;
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/Tajawal-ExtraBold.ttf") format("truetype");
}
:root {
  --ink:#1B2B54;
  --muted:#66748a;
  --accent:#1B2B54;
  --accent-soft:#edf1f8;
  --gold:#e9cc7d;
  --bg:#ffffff;
  --line:#e2e7f0;
  --danger:#a13b34;
  --radius:22px;
  --space:32px;
  font-family:Tajawal,"Segoe UI",Tahoma,Arial,sans-serif;
  color:var(--ink);
  background:var(--bg);
  font-size:14px;
  color-scheme:light
}
.home-tools { display:flex; flex-wrap:wrap; gap:12px; }
.sales-toolbar { display:flex; align-items:end; gap:16px; margin-bottom:22px; flex-wrap:wrap; }
.sales-toolbar label { display:grid; gap:9px; font-weight:700; }
.sales-tier-inputs label { display:block; font-weight:700; }
.sales-tier-inputs input { display:block; margin-top:10px; }
.sales-toolbar input,.sales-tier input { border:1px solid var(--ink); border-radius:12px; padding:13px; background:white; color:var(--ink); min-height:48px; width:100%; }
.sales-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.sales-totals>div { background:var(--accent-soft); border:1px solid var(--line); padding:24px; border-radius:var(--radius); display:grid; gap:14px; }
.sales-totals strong { font-size:clamp(20px,3vw,30px); overflow-wrap:anywhere; }
.sales-totals strong small { font-size:13px; font-weight:500; }
.sales-rule { color:var(--muted); line-height:1.9; margin:14px 0 24px; }
.sales-employees { display:grid; gap:12px; }
.sales-employee { display:grid; grid-template-columns:1.1fr 1fr 1.3fr 1fr 24px; align-items:center; gap:18px; width:100%; padding:24px; border:1px solid var(--line); border-radius:18px; background:white; color:var(--ink); text-align:right; }
.sales-employee:hover { border-color:var(--ink); background:#fafbff; }
.sales-person,.sales-employee-amount,.sales-progress,.sales-reward { display:grid; gap:9px; min-width:0; }
.sales-person strong,.sales-employee-amount strong,.sales-reward strong { overflow-wrap:anywhere; }
.sales-employee small { color:var(--muted); line-height:1.5; }
.sales-person small { text-align:right; }
.sales-progress progress { width:100%; height:8px; border:0; border-radius:20px; overflow:hidden; background:var(--accent-soft); accent-color:var(--ink); }
.sales-progress progress::-webkit-progress-bar { background:var(--accent-soft); }
.sales-progress progress::-webkit-progress-value { background:var(--ink); border-radius:20px; }
.sales-plan { margin-bottom:26px; }
.sales-tier { border:1px solid var(--line); border-radius:16px; margin:20px 0; padding:20px; min-width:0; }
.sales-tier legend { font-weight:800; padding:0 8px; }
.sales-tier-inputs { display:grid; grid-template-columns:1fr 1fr auto; gap:16px; align-items:end; }
.sales-tier-inputs label { min-width:0; }
#sales-plan-form>button { margin:6px 0 6px 12px; }
.sales-qualified { margin-top:24px; padding:20px; border-top:1px solid var(--line); background:#f7f9fd; border-radius:14px; }
.sales-qualified h3 { margin-bottom:12px; }
.sales-order-row { display:flex; width:100%; gap:20px; align-items:center; text-align:right; padding:20px; margin:10px 0; background:white; border:1px solid var(--line); border-radius:14px; color:var(--ink); }
.sales-order-row>span:first-child { flex:1; display:grid; gap:9px; min-width:0; }
.sales-order-row strong,.sales-order-row small { overflow-wrap:anywhere; }
.sales-order-row small { color:var(--muted); line-height:1.7; }
.sales-customer { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin:24px 0; }
.sales-customer dt { font-weight:700; margin-bottom:8px; }
.sales-customer dd { margin:0; line-height:1.8; overflow-wrap:anywhere; }
.sales-read-item { margin-top:30px; padding-top:24px; border-top:1px solid var(--line); }
.sales-photos { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.sales-photos img { width:100%; height:220px; object-fit:contain; background:#f8f9fc; border:1px solid var(--line); border-radius:14px; }
.sales-error { padding:16px; background:#fff2ef; border-radius:12px; line-height:1.8; }
.account-search { display:grid; grid-template-columns:2fr 1fr auto; gap:16px; align-items:end; margin:20px 0; }
.account-search label { display:grid; gap:10px; font-weight:700; min-width:0; }
.account-search input,.account-search select { width:100%; min-height:48px; border:1px solid var(--ink); border-radius:12px; padding:12px; background:white; color:var(--ink); }
.account-list-row { display:grid; grid-template-columns:2fr 1fr 18px; gap:20px; width:100%; padding:22px; margin:12px 0; text-align:right; background:white; color:var(--ink); border:1px solid var(--line); border-radius:18px; align-items:center; }
.account-list-row>span { display:grid; gap:10px; min-width:0; }
.account-list-row small { color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
.account-list-row strong { overflow-wrap:anywhere; }
.account-due { color:#9d4335; }.account-paid { color:#1e7150; }
.account-identity,.account-badges,.account-actions { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin:18px 0; }
.account-identity { color:var(--muted); line-height:1.8; }
.account-overview { padding:18px 22px; border:1px solid var(--line); border-radius:16px; margin:20px 0; line-height:1.8; }
.account-overview p:last-of-type { margin-bottom:0; }
.account-section { margin:24px 0; }
.account-ledger { display:grid; gap:14px; }
.account-event,.account-item { border:1px solid var(--line); padding:20px; border-radius:16px; line-height:1.8; min-width:0; }
.account-event-top { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; }
.account-event p { margin:10px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.account-event small { display:block; color:var(--muted); overflow-wrap:anywhere; }
.account-corrected { background:#fafafa; color:var(--muted); }.account-corrected .account-event-top strong:last-child { text-decoration:line-through; }
.account-items { display:grid; gap:16px; margin-bottom:24px; }
.account-item>.secondary { margin:12px; }.account-item details { margin-top:16px; }
.account-form-context { display:flex; flex-wrap:wrap; justify-content:space-between; gap:14px; border:1px solid var(--line); padding:20px; border-radius:16px; margin:20px 0; }
.account-debt-notice { border-right:4px solid #a86a30; }
#account-replacement[hidden] { display:none; }
@media(max-width:760px) {
  .account-search { grid-template-columns:1fr; }
  .account-list-row { grid-template-columns:1fr; gap:16px; padding:18px; }
  .account-list-row>b { display:none; }
  .account-actions>button,.account-actions>a { width:100%; }
  .account-event,.account-item { padding:16px; }
}
@media(max-width:760px) {
  .sales-totals { grid-template-columns:1fr; gap:10px; }
  .sales-totals>div { padding:20px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
  .sales-employee { grid-template-columns:1fr 1fr; gap:18px 14px; padding:20px; }
  .sales-employee>span:last-child { display:none; }
  .sales-tier-inputs { grid-template-columns:1fr; }
  .sales-customer { grid-template-columns:1fr; }
  .sales-photos { grid-template-columns:1fr 1fr; }
  .sales-photos img { height:160px; }
  .sales-order-row { flex-wrap:wrap; gap:12px; padding:16px; }
  .sales-order-row>span:first-child { flex-basis:100%; }
  .sales-order-row>span:last-child { margin-right:auto; }
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,textarea,select {
  font:inherit
}
button,a,input,textarea,select {
  -webkit-tap-highlight-color:transparent
}
button {
  cursor:pointer
}
button:disabled {
  opacity:.52;
  cursor:wait
}
button:focus-visible,a:focus-visible {
  outline:3px solid #d2a94c;
  outline-offset:4px
}
a {
  color:inherit
}
h1,h2,h3,p {
  margin-top:0
}
button {
  border:0
}
button.primary,a.primary {
  background:var(--accent);
  color:white;
  border:1px solid var(--accent);
  padding:14px 23px;
  border-radius:12px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-decoration:none;
  min-height:48px
}
button.primary:hover,a.primary:hover {
  background:#253b70
}
button.secondary {
  background:white;
  border:1px solid var(--line);
  border-radius:12px;
  padding:13px 21px;
  color:var(--ink);
  min-height:48px
}
button.text-button {
  background:none;
  color:var(--accent);
  padding:10px;
  border-radius:9px
}
.topbar {
  height:96px;
  padding:0 max(6vw,24px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  background:#ffffff
}
.brand {
  display:flex;
  align-items:center;
  gap:13px;
  background:none;
  text-align:right;
  color:var(--ink);
  font-size:19px;
  font-weight:bold
}
.brand small {
  display:block;
  font-size:11px;
  font-weight:normal;
  letter-spacing:.3px;
  color:var(--muted);
  margin-top:6px
}
.brand-mark {
  width:44px;
  height:48px;
  display:grid;
  place-items:center;
  background:var(--accent);
  color:var(--gold);
  font-size:34px;
  border-radius:14px 3px 14px 3px
}
.header-end {
  display:flex;
  align-items:center;
  gap:22px;
  color:var(--muted);
  font-size:12px
}
.avatar {
  background:#edf1f8;
  border:1px solid #e2e7f0;
  width:36px;
  height:36px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:var(--accent);
  font-weight:bold
}
#app {
  max-width:1160px;
  margin:auto;
  padding:42px 24px 80px
}
.eyebrow {
  display:block;
  color:var(--muted);
  font-size:11px;
  letter-spacing:1px;
  margin-bottom:14px
}
.hero {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
  margin-bottom:32px
}
.hero h1 {
  font-size:clamp(26px,3.2vw,40px);
  font-weight:600;
  letter-spacing:-1.2px;
  line-height:1.5;
  margin-bottom:10px
}
.hero p {
  color:var(--muted);
  font-size:14px;
  line-height:1.9;
  margin:0
}
.welcome-name {
  color:var(--accent)
}
.hero-date {
  padding:14px;
  border:1px solid var(--line);
  border-radius:50%;
  width:76px;
  height:76px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-size:11px;
  color:var(--muted)
}
.hero-date strong {
  font-size:25px;
  color:var(--accent);
  font-weight:normal;
  margin-bottom:4px
}
.home-grid {
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:20px;
  margin-bottom:42px
}
.new-card {
  background:var(--accent);
  color:white;
  border-radius:var(--radius);
  padding:30px;
  position:relative;
  overflow:hidden;
  min-height:235px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between
}
.new-card:after {
  content:"";
  position:absolute;
  width:185px;
  height:185px;
  left:-50px;
  top:-46px;
  border:1px solid #ffffff20;
  border-radius:40px;
  transform:rotate(-22deg);
  box-shadow:0 0 0 30px #ffffff06,0 0 0 60px #ffffff04
}
.new-card h2 {
  font-size:24px;
  font-weight:normal;
  margin:6px 0 12px
}
.new-card p {
  color:#d6dced;
  font-size:13px;
  line-height:1.9;
  max-width:330px
}
.new-card .primary {
  background:#ffffff;
  color:var(--accent);
  border:0;
  min-width:166px
}
.new-card .mini-label {
  color:var(--gold);
  font-size:11px;
  letter-spacing:1px
}
.overview-card {
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:28px;
  display:flex;
  flex-direction:column;
  justify-content:space-between
}
.overview-card h3 {
  font-weight:normal;
  font-size:16px
}
.stats {
  display:flex;
  gap:40px
}
.stat strong {
  display:block;
  font-weight:normal;
  font-size:42px;
  color:var(--accent);
  direction:ltr;
  text-align:right;
  margin-bottom:9px
}
.stat span {
  font-size:12px;
  color:var(--muted)
}
.overview-foot {
  border-top:1px solid #e2e7f0;
  padding-top:18px;
  margin-top:25px;
  color:var(--muted);
  font-size:11px;
  line-height:1.8
}
.section-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px
}
.section-heading h2 {
  font-size:19px;
  font-weight:normal;
  margin:0
}
.tabs {
  display:flex;
  gap:5px;
  background:#edf1f8;
  border-radius:10px;
  padding:4px
}
.tabs button {
  padding:9px 16px;
  background:transparent;
  color:var(--muted);
  border-radius:7px;
  font-size:12px
}
.tabs .active {
  background:white;
  color:var(--accent);
  box-shadow:0 2px 5px #1B2B5410
}
.draft-list {
  display:grid;
  gap:12px
}
.draft-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px 22px;
  gap:15px
}
.draft-open {
  display:flex;
  align-items:center;
  gap:16px;
  text-align:right;
  background:transparent;
  color:var(--ink);
  flex:1;
  padding:0
}
.draft-icon {
  border:1px solid var(--line);
  background:#f8f9fc;
  border-radius:12px;
  display:grid;
  place-items:center;
  width:44px;
  height:48px;
  color:var(--accent);
  font-size:21px
}
.draft-open strong {
  display:block;
  font-weight:500;
  margin-bottom:8px
}
.draft-open small {
  font-size:11px;
  color:var(--muted)
}
.status-pill {
  display:inline-flex;
  gap:6px;
  align-items:center;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:10px;
  padding:6px 10px;
  border-radius:7px;
  white-space:nowrap
}
.status-pill.pending {
  background:#fbf0d8;
  color:#956d20
}
.empty {
  border:1px dashed #d2dae9;
  background:#f8f9fc;
  border-radius:var(--radius);
  padding:44px;
  text-align:center;
  color:var(--muted)
}
.empty .empty-icon {
  margin:auto auto 16px;
  width:50px;
  height:58px;
  border:1px solid #c1cce1;
  border-radius:9px;
  display:grid;
  place-items:center;
  font-size:28px;
  color:#7e8eaa
}
.empty h3 {
  color:var(--ink);
  font-size:16px;
  font-weight:normal
}
.empty p {
  font-size:12px;
  line-height:1.9;
  margin-bottom:0
}
.page-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:28px
}
.page-top h1 {
  font-size:27px;
  font-weight:500;
  margin:8px 0
}
.page-top .text-button {
  padding-right:0;
  font-size:12px
}
.saved {
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:11px;
  white-space:nowrap
}
.saved:before {
  content:"";
  width:6px;
  height:6px;
  background:#1B2B54;
  border-radius:50%
}
.saved.dirty:before {
  background:var(--gold)
}
.saved.failed {
  color:var(--danger)
}
.workspace {
  display:grid;
  grid-template-columns:1fr 260px;
  gap:24px;
  align-items:start
}
.main-panel {
  background:white;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden
}
.stepper {
  display:flex;
  align-items:center;
  padding:25px 28px;
  border-bottom:1px solid var(--line);
  gap:14px
}
.stepper .step {
  display:flex;
  align-items:center;
  gap:9px;
  background:none;
  color:#66748a;
  padding:0;
  font-size:12px;
  white-space:nowrap
}
.stepper .step span {
  border:1px solid var(--line);
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  font-size:11px
}
.stepper .step.active {
  color:var(--accent);
  font-weight:bold
}
.stepper .step.active span {
  background:var(--accent);
  border-color:var(--accent);
  color:white
}
.stepper .step.done span {
  background:var(--accent-soft);
  color:var(--accent)
}
.step-line {
  height:1px;
  background:var(--line);
  flex:1
}
.form-body {
  padding:30px
}
.form-title {
  display:flex;
  gap:13px;
  align-items:center;
  margin-bottom:28px
}
.form-title .title-icon {
  background:#edf1f8;
  border-radius:12px;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  font-size:21px
}
.form-title h2 {
  font-size:19px;
  font-weight:normal;
  margin-bottom:6px
}
.form-title p {
  margin:0;
  font-size:11px;
  color:var(--muted);
  line-height:1.6
}
.fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px 18px
}
.field {
  display:flex;
  flex-direction:column;
  gap:9px;
  min-width:0
}
.field.wide {
  grid-column:1/-1
}
.field label {
  font-size:12px;
  color:var(--ink);
  display:flex;
  gap:5px;
  align-items:center
}
.field label .optional {
  color:#66748a;
  font-size:10px;
  margin-right:auto
}
.required {
  color:#1B2B54;
  font-size:14px
}
.field input,.field select,.field textarea {
  width:100%;
  border:1px solid #e2e7f0;
  background:#f8f9fc;
  color:var(--ink);
  border-radius:10px;
  padding:13px 14px;
  min-height:46px;
  outline:none;
  transition:border .15s,box-shadow .15s
}
.field input:focus,.field select:focus,.field textarea:focus {
  border-color:#1B2B54;
  box-shadow:0 0 0 3px #1B2B540b;
  background:#fff
}
.field input::placeholder,.field textarea::placeholder {
  color:#7a879c;
  font-size:12px
}
.field input[dir=ltr] {
  text-align:right
}
.field textarea {
  resize:vertical;
  min-height:110px;
  line-height:1.8
}
.field .hint {
  font-size:10px;
  color:var(--muted);
  line-height:1.7
}
.field .error {
  color:var(--danger);
  font-size:11px;
  line-height:1.5
}
.field.invalid input,.field.invalid textarea,.field.invalid select {
  border-color:#c47165
}
.field-divider {
  grid-column:1/-1;
  border-top:1px solid var(--line);
  margin-top:6px;
  padding-top:25px;
  display:flex;
  align-items:center;
  gap:10px
}
.field-divider h3 {
  font-size:15px;
  font-weight:500;
  margin:0
}
.field-divider small {
  color:var(--muted);
  font-size:10px;
  margin-right:auto
}
.aside {
  display:grid;
  gap:16px;
  position:sticky;
  top:24px
}
.summary-card {
  border:1px solid var(--line);
  border-radius:16px;
  padding:23px;
  background:#ffffff
}
.summary-card h3 {
  font-size:15px;
  font-weight:normal;
  margin-bottom:24px
}
.summary-row {
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  padding:10px 0;
  color:var(--muted)
}
.summary-row b {
  font-weight:normal;
  color:var(--ink);
  text-align:left;
  direction:ltr
}
.summary-total {
  border-top:1px solid #e2e7f0;
  margin-top:12px;
  padding-top:20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px
}
.summary-total span {
  font-size:12px
}
.summary-total strong {
  font-size:25px;
  font-weight:normal;
  direction:ltr
}
.currency {
  font-size:10px;
  color:var(--muted);
  margin-top:6px;
  text-align:left
}
.note-card {
  padding:18px 20px;
  font-size:11px;
  line-height:2;
  color:var(--muted);
  border:1px solid var(--line);
  border-radius:14px;
  background:#f8f9fc
}
.note-card strong {
  color:var(--ink);
  font-weight:normal;
  display:block;
  margin-bottom:7px
}
.form-footer {
  border-top:1px solid var(--line);
  padding:20px 28px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  background:#ffffff
}
.form-footer .footer-note {
  color:var(--muted);
  font-size:11px
}
.chips {
  display:flex;
  gap:8px;
  flex-wrap:wrap
}
.chip {
  background:#f8f9fc;
  border:1px solid var(--line);
  padding:10px 17px;
  border-radius:9px;
  color:var(--muted);
  font-size:12px
}
.chip.active {
  background:var(--accent-soft);
  color:var(--accent);
  border-color:#1B2B54
}
.upload-zone {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  border:1.5px dashed #b8c5dc;
  border-radius:13px;
  padding:25px;
  background:#f8f9fc;
  text-align:right;
  cursor:pointer;
  width:100%;
  color:var(--accent)
}
.upload-zone span:first-child {
  font-size:30px;
  font-weight:normal
}
.upload-zone strong {
  font-weight:500;
  font-size:13px;
  display:block;
  margin-bottom:6px
}
.upload-zone small {
  font-size:10px;
  color:var(--muted);
  display:block
}
.photo-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:15px
}
.photo-card {
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:#f8f9fc;
  position:relative
}
.photo-card.chosen {
  border:2px solid var(--accent)
}
.photo-card img {
  display:block;
  width:100%;
  height:125px;
  object-fit:cover;
  background:#e2e7f0
}
.photo-actions {
  display:flex;
  justify-content:space-between;
  gap:5px;
  padding:8px;
  font-size:10px;
  align-items:center
}
.photo-actions button {
  background:none;
  color:var(--accent);
  font-size:10px;
  padding:5px;
  border-radius:5px
}
.photo-actions button.remove {
  color:var(--danger)
}
.photo-badge {
  position:absolute;
  right:7px;
  top:7px;
  background:#ffffffe8;
  padding:5px 7px;
  border-radius:6px;
  font-size:10px
}
.photo-badge.selected {
  background:var(--accent);
  color:#fff
}
.notice {
  padding:14px 16px;
  background:#f8f0de;
  border:1px solid #ebd8ab;
  border-radius:12px;
  font-size:12px;
  color:#82642c;
  line-height:1.9;
  margin-bottom:22px
}
.preview-route {
  display:flex;
  align-items:center;
  gap:9px;
  padding:14px;
  background:var(--accent-soft);
  border-radius:11px;
  margin-bottom:20px;
  font-size:12px;
  line-height:1.8
}
.order-preview {
  white-space:pre-wrap;
  font:12px/2 Tajawal,"Segoe UI",Tahoma,Arial,sans-serif;
  overflow-wrap:anywhere;
  border:1px solid var(--line);
  background:#f8f9fc;
  padding:25px;
  border-radius:12px;
  user-select:text;
  margin:0
}
.success-wrap {
  max-width:640px;
  margin:40px auto;
  text-align:center;
  background:white;
  border:1px solid var(--line);
  padding:48px 35px;
  border-radius:24px
}
.success-check {
  width:74px;
  height:74px;
  border-radius:50%;
  background:var(--accent-soft);
  color:var(--accent);
  display:grid;
  place-items:center;
  font-size:35px;
  margin:0 auto 25px
}
.success-wrap h1 {
  font-size:27px;
  font-weight:500
}
.success-wrap p {
  font-size:13px;
  color:var(--muted);
  line-height:1.9
}
.success-actions {
  display:grid;
  gap:12px;
  margin-top:30px
}
.success-wrap details {
  margin-top:25px;
  text-align:right
}
.success-wrap summary {
  color:var(--muted);
  cursor:pointer;
  font-size:12px;
  margin-bottom:15px
}
.success-wrap .order-preview {
  text-align:right
}
.loading {
  display:grid;
  place-items:center;
  min-height:350px;
  align-content:center;
  gap:20px;
  color:var(--muted)
}
.spinner {
  width:28px;
  height:28px;
  border:2px solid #e2e7f0;
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .9s linear infinite
}
.inline-spinner {
  display:inline-block;
  width:12px;
  height:12px;
  border-width:1px
}
@keyframes spin {
  to {
  transform:rotate(360deg)
}
}
#toast {
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  background:#1B2B54;
  color:#fff;
  padding:15px 22px;
  border-radius:12px;
  font-size:12px;
  line-height:1.7;
  max-width:90vw;
  width:max-content;
  z-index:20;
  box-shadow:0 10px 40px #1B2B5430
}
#preview-banner {
  text-align:center;
  background:#eee1b9;
  padding:9px;
  color:#705a2d;
  font-size:11px
}
dialog {
  border:1px solid var(--line);
  border-radius:20px;
  padding:28px;
  max-width:440px;
  width:90%;
  color:var(--ink)
}
dialog::backdrop {
  background:#1B2B545c;
  backdrop-filter:blur(3px)
}
dialog h2 {
  font-size:20px;
  font-weight:500
}
dialog p {
  font-size:13px;
  line-height:1.9;
  color:var(--muted)
}
.dialog-icon {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  background:#f3e7c5;
  color:#90702d;
  border-radius:50%;
  margin-bottom:18px
}
.dialog-actions {
  display:flex;
  gap:10px;
  margin-top:25px
}
.fatal {
  max-width:550px;
  margin:50px auto;
  background:white;
  border:1px solid var(--line);
  border-radius:20px;
  padding:35px;
  text-align:center
}
.fatal p {
  line-height:2;
  color:var(--muted)
}
[hidden] {
  display:none!important
}
.mobile-remaining {
  display:none
}
.busy-banner {
  padding:12px;
  background:#edf1f8;
  color:var(--accent);
  font-size:12px;
  text-align:center
}
.deleting {
  color:var(--danger)!important
}
@media(max-width:800px) {
  .topbar {
  height:78px;
  padding:0 22px
}
.workspace {
  grid-template-columns:1fr
}
.aside {
  display:none
}
#app {
  padding:26px 18px 40px
}
.home-grid {
  grid-template-columns:1fr 1fr
}
.new-card {
  padding:23px
}
.overview-card {
  padding:23px
}
.stats {
  gap:23px
}
.hero-date {
  display:none
}
.mobile-remaining {
  display:block;
  font-size:11px;
  color:var(--muted);
  line-height:1.8
}
.mobile-remaining strong {
  color:var(--accent);
  font-size:17px
}
.form-footer .footer-note {
  display:none
}
}
@media(max-width:520px) {
  .topbar {
  height:74px;
  padding:0 17px
}
.brand {
  font-size:17px;
  gap:10px
}
.brand-mark {
  width:36px;
  height:40px;
  font-size:29px
}
.brand small {
  font-size:10px
}
.header-end {
  gap:12px
}
#header-date {
  font-size:10px
}
.avatar {
  width:31px;
  height:31px
}
#app {
  padding:25px 14px 30px
}
.hero {
  margin-bottom:24px
}
.hero h1 {
  font-size:27px;
  letter-spacing:-.8px
}
.hero p {
  font-size:12px
}
.eyebrow {
  font-size:10px
}
.home-grid {
  grid-template-columns:1fr;
  gap:13px;
  margin-bottom:30px
}
.new-card {
  min-height:202px;
  padding:24px
}
.new-card h2 {
  font-size:23px
}
.overview-card {
  padding:20px;
  gap:0
}
.overview-card h3 {
  font-size:13px;
  margin-bottom:12px
}
.stats {
  justify-content:space-between;
  gap:20px;
  padding-left:20px
}
.stat {
  display:flex;
  align-items:center;
  gap:13px
}
.stat strong {
  font-size:31px;
  margin-bottom:0
}
.stat span {
  font-size:11px
}
.overview-foot {
  display:none
}
.section-heading h2 {
  font-size:17px
}
.tabs button {
  padding:8px 11px;
  font-size:11px
}
.draft-row {
  padding:15px 13px;
  gap:8px
}
.draft-open {
  gap:11px
}
.draft-open strong {
  font-size:12px
}
.draft-open small {
  font-size:10px
}
.draft-icon {
  width:36px;
  height:41px
}
.draft-row>.text-button {
  font-size:10px;
  padding:7px
}
.empty {
  padding:30px 18px
}
.page-top {
  margin-bottom:20px;
  align-items:flex-end
}
.page-top h1 {
  font-size:23px
}
.saved {
  font-size:10px
}
.stepper {
  padding:20px 16px;
  gap:7px
}
.stepper .step {
  font-size:10px;
  gap:6px
}
.stepper .step span {
  width:24px;
  height:24px;
  font-size:10px
}
.form-body {
  padding:24px 18px
}
.form-title h2 {
  font-size:18px
}
.fields {
  grid-template-columns:1fr;
  gap:20px
}
.field.wide {
  grid-column:auto
}
.field-divider {
  grid-column:auto
}
.field input,.field textarea,.field select {
  font-size:16px;
  min-height:48px
}
.field label {
  font-size:12px
}
.form-footer {
  padding:16px 18px;
  position:sticky;
  bottom:0
}
.form-footer .primary {
  padding:12px 17px;
  font-size:12px
}
.form-footer .secondary {
  padding:12px 15px;
  font-size:12px
}
.chips {
  gap:6px
}
.chip {
  padding:10px 14px
}
.photo-grid {
  gap:8px
}
.photo-card img {
  height:105px
}
.photo-actions {
  padding:5px;
  flex-wrap:wrap;
  justify-content:center
}
.photo-actions button {
  font-size:9px
}
.order-preview {
  padding:16px;
  font-size:11px
}
.success-wrap {
  margin:15px 0;
  padding:32px 22px
}
.success-wrap h1 {
  font-size:24px
}
.status-pill {
  font-size:9px;
  padding:5px 7px
}
.upload-zone {
  padding:21px 12px
}
.upload-zone strong {
  font-size:12px
}
}
@media(prefers-reduced-motion:reduce) {
  * {
  animation:none!important;
  transition:none!important
}
}
.overview-card .stats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  padding-left:0
}
.overview-card .stat {
  display:block
}
.overview-card .stat strong {
  font-size:34px;
  margin-bottom:8px
}
.overview-card .stat span {
  font-size:11px
}
.section-heading {
  flex-wrap:wrap;
  gap:14px
}
.tabs {
  max-width:100%
}
.status-pill.archived {
  background:#ede7da;
  color:#766445
}
.archive-note {
  font-size:12px;
  line-height:1.9;
  color:var(--muted);
  margin:0 0 5px
}
.draft-row .archive-toggle {
  border:1px solid #e2e7f0;
  background:#f8f9fc;
  font-size:11px;
  padding:9px 12px;
  white-space:nowrap
}
.draft-open {
  min-width:0
}
.draft-open strong,.draft-open small {
  overflow-wrap:anywhere
}
.draft-open>span:last-child {
  min-width:0
}
@media(max-width:520px) {
  .draft-row {
  flex-wrap:wrap
}
.draft-row .draft-open {
  flex-basis:60%
}
.draft-row .archive-toggle {
  margin-right:auto
}
.section-heading .tabs button {
  padding:9px 12px
}
.success-wrap>.status-pill.archived {
  margin-bottom:18px
}
}
.next-arrow {
  font-size:32px;
  line-height:1;
  font-weight:bold
}
.form-footer #next {
  min-width:145px;
  font-size:16px;
  gap:18px
}
.choice input[type=radio] {
  appearance:none!important;
  border:1.5px solid #b8c5dc;
  border-radius:5px;
  background:white;
  display:grid;
  place-items:center
}
.choice input[type=radio]:checked {
  background:var(--accent);
  border-color:var(--accent)
}
.choice input[type=radio]:checked:after {
  content:"✓";
  font-size:15px;
  line-height:1;
  color:white;
  font-weight:bold
}
.bag-options {
  background:#f8f9fc;
  border:1px solid #e2e7f0;
  border-radius:16px;
  padding:22px
}
.bag-options h3 {
  font-size:17px;
  margin:0 0 24px
}
.measurements h4 {
  font-size:13px;
  margin:0 0 5px;
  font-weight:500
}
.measurement-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.choice-field {
  border:0;
  padding:0;
  margin:0;
  min-width:0
}
.choice-field legend {
  font-size:13px;
  padding:0;
  margin-bottom:12px
}
.choice-field legend .optional {
  font-size:11px;
  color:var(--muted);
  margin-right:10px
}
.choice-options {
  display:flex;
  flex-wrap:wrap;
  gap:9px
}
.choice {
  background:white;
  border:1px solid #e2e7f0;
  border-radius:10px;
  padding:12px 13px;
  cursor:pointer;
  min-height:48px;
  flex:1;
  white-space:nowrap
}
.choice input[type=radio] {
  appearance:auto;
  width:20px;
  height:20px;
  min-height:0;
  padding:0;
  margin:0 0 0 4px;
  accent-color:var(--accent);
  flex-shrink:0
}
.choice:has(input:checked) {
  border:2px solid var(--accent);
  background:#edf1f8;
  padding:11px 12px;
  font-weight:bold
}
.clear-extra {
  align-self:flex-start;
  font-size:11px!important;
  padding:5px 0!important
}
.error-summary {
  border:2px solid #bf4236;
  background:#fff1ef;
  color:#952f26;
  border-radius:13px;
  padding:18px;
  margin-bottom:25px;
  scroll-margin-top:20px
}
.error-summary strong {
  display:block;
  font-size:14px;
  line-height:1.8;
  margin-bottom:10px
}
.error-summary>div {
  display:flex;
  flex-wrap:wrap;
  gap:8px
}
.error-link {
  border:1px solid #e6a69e;
  background:white;
  color:#952f26;
  border-radius:7px;
  padding:8px 11px;
  font-size:12px;
  text-decoration:underline
}
.field.invalid>input,.field.invalid>textarea,.field.invalid>select {
  border:2px solid #bf4236;
  background:#fff4f2;
  box-shadow:0 0 0 3px #bf423612
}
.field.invalid>label,.field.invalid>legend {
  color:#a1352b;
  font-weight:bold
}
.field.invalid .choice {
  border-color:#bf4236;
  background:#fff4f2
}
.field .error {
  font-size:12px;
  font-weight:bold;
  background:#fff1ef;
  padding:8px 10px;
  border-radius:6px
}
.field.invalid .upload-zone {
  border:2px dashed #bf4236;
  background:#fff4f2
}
.photo-card.chosen {
  border:3px solid var(--accent);
  box-shadow:0 0 0 3px #d9e1f1;
  background:#edf1f8
}
.photo-badge.selected {
  font-size:12px;
  font-weight:bold;
  padding:8px 10px;
  box-shadow:0 2px 8px #1B2B5430
}
.photo-actions {
  flex-wrap:wrap
}
.photo-actions .select-photo {
  border:1px solid #b8c5dc;
  background:white;
  flex:1;
  min-height:38px;
  padding:7px;
  font-size:11px
}
.photo-card.chosen .select-photo {
  background:var(--accent);
  color:white;
  font-weight:bold;
  border-color:var(--accent)
}
@media(max-width:520px) {
  .bag-options {
  padding:18px 12px
}
.measurement-grid {
  gap:8px
}
.measurement-grid .field input {
  padding:12px 8px
}
.choice-options {
  flex-direction:column
}
.choice {
  width:100%;
  font-size:13px
}
.form-footer #next {
  font-size:15px;
  min-width:140px
}
.form-footer .next-arrow {
  font-size:32px
}
.photo-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px
}
.photo-badge.selected {
  font-size:11px;
  padding:7px
}
.photo-actions .select-photo {
  font-size:10px;
  width:100%;
  flex-basis:100%
}
}

/* Atlas identity: white workspace, navy accents and the original vector logo. */
.home-tools { margin: -12px 0 30px; }
.home-tools button { width: 100%; display: flex; justify-content: space-between; gap: 15px; font-weight: 700; }
.home-tools span { font-size: 12px; font-weight: 400; color: var(--muted); }
.inventory-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 24px; }
.inventory-overview strong { font-size: 30px; display: block; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.inventory-overview span { color: var(--muted); font-size: 12px; }
.inventory-toolbar, .inventory-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 22px; }
.stock-search { display: flex; flex-direction: column; gap: 8px; flex: 1; font-size: 12px; min-width: 180px; }
.stock-search input { min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #f8f9fc; color: var(--ink); width: 100%; }
.stock-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; }
.stock-table { width: 100%; border-collapse: collapse; min-width: 660px; background: white; text-align: right; }
.stock-table th { background: var(--accent-soft); font-size: 12px; padding: 18px 14px; }
.stock-table td { padding: 16px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.stock-table .stock-code { margin: 0; }
.stock-table button { padding: 10px; font-size: 12px; white-space: nowrap; }
.stock-color { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.color-swatch { display: inline-block; width: 28px; height: 28px; border-radius: 50%; border: 1px solid #adb4c5; vertical-align: middle; flex-shrink: 0; }
.stock-identity { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; font-size: 14px; }
.handle-color-picker { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #f8f9fc; }
#color-wheel { width: 224px; height: 224px; max-width: 100%; touch-action: none; cursor: crosshair; }
.color-controls { flex: 1; min-width: 160px; display: grid; gap: 10px; }
.color-controls input[type=range] { padding: 0; border: 0; accent-color: var(--accent); width: 100%; }
.color-sample { display: block; height: 42px; border-radius: 12px; border: 1px solid #adb4c5; }
.model-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.model-choice { border: 1px solid var(--line); border-radius: 16px; background: white; padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.model-choice.chosen { border: 2px solid var(--accent); background: var(--accent-soft); padding: 15px 7px; }
.model-color { width: 42px; height: 42px; border: 1px solid #adb4c5; border-radius: 50%; }
.model-choice strong { font-size: 15px; }.model-choice span,.model-choice small { font-size: 11px; }
.model-check { color: var(--accent); font-weight: 700; }
@media(max-width:520px) { .model-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.handle-color-picker { padding: 12px; gap: 14px; justify-content: center; }.color-controls { width: 100%; }.stock-table th,.stock-table td { padding: 14px 10px; } }
.inventory-unit { font-size: 12px; color: var(--muted); line-height: 1.9; margin-bottom: 22px; }
.inventory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.inventory-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 24px; min-width: 0; overflow-wrap: anywhere; }
.stock-code { display: inline-block; background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 5px 10px; border-radius: 8px; margin-bottom: 12px; }
.inventory-card h2 { font-size: 19px; margin-bottom: 10px; }
.inventory-card p, .inventory-card small { color: var(--muted); font-size: 12px; line-height: 1.8; }
.stock-available { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 18px 0 8px; }
.stock-available strong { font-size: 32px; font-variant-numeric: tabular-nums; }
.stock-available span { font-size: 12px; color: var(--muted); }
.inventory-card button { width: 100%; margin-top: 20px; padding: 12px 8px; font-size: 12px; }
.inventory-form { max-width: 820px; }
.inventory-form .field:last-child { grid-column: 1 / -1; }
.stock-notice { background: var(--accent-soft); color: var(--accent); border-color: var(--line); }
.stock-history { display: grid; gap: 12px; margin-bottom: 20px; }
.stock-movement { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: white; overflow-wrap: anywhere; }
.stock-movement>div { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.stock-movement strong { font-size: 14px; }
.stock-movement p { margin: 10px 0; color: var(--muted); font-size: 13px; }
.stock-movement small { display: block; color: var(--muted); font-size: 11px; line-height: 2; }
.stock-delta { color: var(--accent); font-weight: 700; font-size: 17px; }
.stock-delta.negative { color: var(--danger); }
.rope-quote, .rope-review { background: var(--accent-soft); color: var(--accent); padding: 14px; border-radius: 11px; font-size: 12px; line-height: 1.9; }
.rope-quote.insufficient { background: #fff1ef; color: var(--danger); font-weight: 700; }
.rope-review { margin-bottom: 20px; }
.handle-model-image { width: 100%; height: 72px; object-fit: contain; background: #fff; border-radius: 9px; }
.stock-thumbnail { width: 90px; height: 40px; object-fit: contain; border: 1px solid var(--line); border-radius: 7px; background: white; }
.handle-preview-image { display: block; width: 100%; max-height: 220px; object-fit: contain; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.handle-preview-image[hidden] { display: none; }
.rope-review .handle-preview-image { margin-top: 12px; max-height: 110px; }
.rope-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.page-top h1 { overflow-wrap: anywhere; }
@media(max-width:800px) { .inventory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) {
  .inventory-grid { grid-template-columns: minmax(0,1fr); }
  .inventory-overview { gap: 12px; padding: 18px 14px; }
  .inventory-overview strong { font-size: 24px; }
  .inventory-overview span { font-size: 11px; }
  .stock-search { flex-basis: 100%; }
  .stock-search input { font-size: 16px; }
  .home-tools span { max-width: 50%; text-align: left; }
  .inventory-toolbar button, .inventory-actions button { flex: 1; font-size: 12px; padding: 12px; }
}
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 9px 16px;
  background: var(--accent-soft);
  border: 1px solid #bcc9e0;
  border-radius: 11px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  transition: background .18s, border-color .18s;
}
.back-button span { font-size: 25px; line-height: 1; }
.back-button:hover { background: #e1e8f5; border-color: var(--accent); }
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #d6a5a0;
  border-radius: 11px;
  background: #fff1ef;
  color: #a13b34;
  font-weight: 700;
}
.danger-button:hover { background: #ffe3df; border-color: #a13b34; }
.draft-row .permanent-delete { font-size: 12px; white-space: nowrap; }
@media(max-width:640px) {
  .header-end:has(#app-back:not([hidden])) #header-date { display: none; }
  .header-end { gap: 10px; }
  #app-back { padding: 8px 11px; font-size: 13px; }
  .page-top { flex-wrap: wrap; }
  .draft-row { flex-wrap: wrap; }
  .draft-row .permanent-delete { margin-right: auto; }
}
:root { line-height: 1.6; }
button, a { touch-action: manipulation; }
button.primary, a.primary {
  box-shadow: 0 4px 0 #13203e;
  transition: box-shadow .16s, background .16s;
}
button.primary:hover, a.primary:hover { box-shadow: 0 6px 0 #13203e; }
button.primary:active, a.primary:active { box-shadow: 0 1px 0 #13203e; }
button.secondary, button.text-button, .chip { transition: background .18s, border-color .18s; }
button.secondary:hover, .text-button:hover { background: var(--accent-soft); }
.brand { font-weight: 800; }
.brand-mark { box-shadow: 4px 4px 0 var(--accent-soft); }
.hero h1 { font-weight: 800; line-height: 1.35; }
.hero-date { border-radius: 13px; width: 90px; height: 72px; }
.hero-date strong { font-weight: 500; }
.home-grid { grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); }
.new-card {
  min-height: 248px;
  padding: 29px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  isolation: isolate;
}
.new-card::after { display: none; }
.new-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 12% 0%, #5575b660, transparent 62%);
  z-index: -1;
}
.new-card-copy { width: 65%; position: relative; z-index: 2; }
.new-card h2 { font-size: 28px; font-weight: 700; line-height: 1.35; margin: 10px 0 23px; }
.new-card p { font-size: 12px; margin-bottom: 21px; }
.new-card .primary { background: white; color: var(--accent); box-shadow: none; padding: 10px 15px; gap: 20px; min-height: 44px; min-width: 0; font-size: 13px; }
.new-card .primary:hover { background: #edf1f8; }
.create-arrow { font-size: 24px; line-height: 1; transition: transform .25s; }
.new-card:hover .create-arrow { transform: translateX(-5px); }
.paper-art {
  position: absolute;
  left: 26px;
  top: 45px;
  width: 111px;
  height: 147px;
  transform: rotate(-9deg);
  transition: transform .35s;
  pointer-events: none;
}
.paper-sheet { position: absolute; inset: 0; background: white; border-radius: 3px; box-shadow: 0 12px 18px #101d4129; }
.paper-sheet.back { transform: translate(-15px,10px) rotate(-9deg); background: #a8b6d6; }
.paper-sheet.mid { transform: translate(-7px,5px) rotate(-4deg); background: #d3dcee; }
.paper-sheet.front { padding: 16px 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 29px; direction: ltr; }
.paper-sheet img { display: block; width: 100%; height: auto; flex-shrink: 0; }
.paper-colorbar { height: 9px; display: flex; gap: 2px; width: 65%; flex-shrink: 0; }
.paper-colorbar i { flex: 1; background: #569dc3; }
.paper-colorbar i:nth-child(2) { background: #b66491; }
.paper-colorbar i:nth-child(3) { background: #e4c767; }
.paper-colorbar i:nth-child(4) { background: var(--accent); }
.new-card:hover .paper-art, .new-card:focus-within .paper-art { transform: rotate(-4deg) translateY(-4px); }
.overview-card { padding: 26px; }
.overview-card h3 { font-size: 15px; font-weight: 500; }
.overview-card .stat strong { font-size: 37px; font-weight: 500; font-variant-numeric: tabular-nums; }
.overview-foot { padding-top: 13px; margin-top: 20px; }
.tabs { border: 1px solid var(--line); border-radius: 12px; }
.tabs button { transition: color .2s, background .2s; }
.tabs .active { box-shadow: 0 3px 8px #1B2B5412; font-weight: 700; }
.draft-row { transition: transform .18s, border-color .18s; }
.draft-row:hover { transform: translateY(-2px); border-color: var(--accent); }
.draft-open strong { font-weight: 700; }
.draft-icon { flex-shrink: 0; }
.draft-open, .new-card-copy, .overview-card, .main-panel { min-width: 0; }
.workspace { grid-template-columns: minmax(0,1fr) 260px; }
.main-panel { box-shadow: 0 18px 36px #1B2B540b; }
.stepper { padding: 23px var(--space); }
.stepper .step { min-height: 33px; color: var(--muted); }
.stepper .step span { border-radius: 10px; flex-shrink: 0; width: 29px; height: 29px; }
.stepper .step.active span { box-shadow: 0 3px 0 #13203e; }
.stepper .step.done span { border-color: var(--accent); }
.form-body { padding: var(--space); }
.form-title { gap: 12px; margin-bottom: 25px; }
.form-title .title-icon { background: none; color: var(--accent); font-size: 31px; font-weight: 400; opacity: .65; direction: ltr; letter-spacing: -2px; width: auto; height: auto; }
.form-title h2 { font-weight: 700; margin: 0; }
.form-title p { margin-top: 6px; }
.fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field label { font-weight: 500; }
 .field input, .field textarea, .field select { min-height: 49px; border-radius: 12px; transition: background .18s, border-color .18s, box-shadow .18s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #edf1f8, 0 4px 13px #1B2B5412; }
.field input[dir=ltr], [data-remaining], [data-total], [data-received], [data-delivery] { font-variant-numeric: tabular-nums; }
.field-divider h3, .bag-options h3 { font-weight: 700; }
.choice { transition: background .18s, border-color .18s; }
.choice:has(input:focus-visible) { outline: 3px solid #bcc9e4; outline-offset: 3px; }
.summary-card { position: relative; padding: 23px; border-radius: 15px; box-shadow: 0 6px 18px #1B2B5408; }
.summary-card h3 { font-weight: 700; }
.summary-total { border-top: 1px dashed #b8c5dc; background: var(--accent); color: white; margin: 14px -23px -23px; padding: 20px 23px 23px; border-radius: 0 0 14px 14px; }
.summary-total::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 10px; background: radial-gradient(circle at 5px 5px, white 4px, transparent 4.5px) 0 0 / 10px 10px; }
.summary-total strong { display: block; font-size: 28px; font-weight: 500; text-align: left; }
.summary-total .currency { color: #d6dced; }
.note-card { background: white; }
.note-card strong { font-weight: 700; }
.form-footer { padding: 20px var(--space); }
.chip { min-height: 44px; }
.chip.active { font-weight: 700; }
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone strong { margin: 0; }
.photo-card, .photo-badge, .photo-actions button { transition: border-color .18s, background .18s; }
.photo-badge { color: var(--ink); }
.photo-badge.selected { color: white; }
.success-wrap h1, .page-top h1 { font-weight: 700; }
.success-check { border-radius: 24px; }
dialog { box-shadow: 0 20px 60px #1B2B5430; }
dialog::backdrop { background: #1B2B545c; }
@media(max-width:1024px) and (min-width:641px) {
  .new-card { padding: 24px; }
  .new-card-copy { width: 68%; }
  .new-card h2 { font-size: 25px; }
  .paper-art { width: 84px; height: 120px; left: 14px; top: 54px; }
}
@media(max-width:800px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .aside { display: none; }
}
@media(max-width:640px) {
  .home-grid { grid-template-columns: minmax(0,1fr); gap: 13px; }
  .new-card { min-height: 228px; padding: 27px; }
  .new-card-copy { width: 64%; }
  .paper-art { left: 24px; top: 40px; width: 96px; height: 139px; }
  .overview-card { padding: 20px; }
  .hero h1 { font-size: 29px; }
  .form-body { padding: 24px 19px; }
  .form-footer { padding: 16px 19px; }
  .stepper { padding: 20px 16px; gap: 7px; }
  .stepper .step { font-size: 11px; gap: 6px; }
  .fields { grid-template-columns: minmax(0,1fr); gap: 20px; }
  .field.wide, .field-divider { grid-column: auto; }
  .field input, .field textarea, .field select { font-size: 16px; min-height: 50px; }
  .overview-card .stat strong { font-size: 31px; }
}
@media(max-width:370px) {
  .new-card { padding: 23px; }
  .new-card-copy { width: 67%; }
  .new-card h2 { font-size: 24px; }
  .new-card .primary { font-size: 12px; gap: 12px; padding: 10px 11px; }
  .paper-art { left: 16px; top: 45px; width: 85px; height: 121px; }
  .stepper { padding: 17px 11px; gap: 5px; }
  .stepper .step { white-space: normal; gap: 5px; }
  .stepper .step span { width: 25px; height: 25px; }
  .page-top h1 { font-size: 21px; }
  #header-date { display: none; }
  .form-footer { flex-wrap: wrap; }
  .form-footer #next { min-width: 125px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Clear order controls and compact handle selection. */
.workspace .field input:not([type=radio]):not([type=file]),
.workspace .field textarea, .workspace .field select {
  border: 1.5px solid #1B2B54; background: #fff;
}
.workspace .field.invalid > input, .workspace .field.invalid > textarea,
.workspace .field.invalid > select { border-color: var(--danger); }
.workspace .choice, .workspace .upload-zone { border-color: #1B2B54; }
.model-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.model-choice, .model-choice.chosen { padding: 8px 6px; gap: 4px; border-radius: 10px; border-width: 1.5px; }
.model-choice .handle-model-image { height: 42px; border-radius: 5px; background: #fff; }
.model-choice .model-color { width: 32px; height: 32px; }
.model-choice .model-number { font-size: 14px; line-height: 1.3; }
.model-choice .model-empty { color: #a9362d; background: #fff0ed; padding: 3px 4px; border-radius: 4px; font-size: 10px; line-height: 1.3; }
.model-choice.out-of-stock { border-style: dashed; }
@media(max-width:736px) { .model-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }

.model-grid { max-height: 238px; overflow-y: auto; overscroll-behavior-y: contain; padding: 3px; scrollbar-width: thin; }
.item-cards{display:grid;gap:10px;margin-bottom:22px}.item-card{display:flex;align-items:center;gap:8px;border:1.5px solid #dce1ec;border-radius:14px;background:#fff;padding:5px 12px}.item-card.active{border-color:#1B2B54;background:#f5f7fc}.item-open{display:flex;align-items:center;text-align:right;gap:12px;flex:1;min-width:0;background:transparent;color:#1B2B54;border:0;padding:12px 0}.item-open>span:nth-child(2){flex:1;min-width:0}.item-open strong,.item-open small{display:block;overflow-wrap:anywhere}.item-open small{margin-top:5px;color:#66738d}.item-number{display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:50%;background:#1B2B54;color:#fff}.item-editor{border:1.5px solid #1B2B54;border-radius:16px;padding:20px}.add-item-button{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;padding:18px;margin-top:20px;background:#17864d;color:#fff;border:0;border-radius:12px;font:700 20px Tajawal,sans-serif;cursor:pointer}.add-item-button:hover{background:#116c3d}.add-item-button span{font-size:32px;line-height:1}.financial-items{display:grid;gap:12px;padding:18px;border:1.5px solid #1B2B54;border-radius:14px;margin-bottom:24px}.financial-items>div{display:flex;justify-content:space-between;gap:12px}.financial-total{border-top:1px solid #dce1ec;padding-top:14px;font-size:20px;font-weight:700}.review-items{display:grid;gap:18px;margin-bottom:24px}.review-item{padding:16px;border:1.5px solid #1B2B54;border-radius:14px}.review-item h3{margin:0 0 12px}.stepper{gap:6px}.step{min-width:0}.step-line{min-width:8px}.item-open:focus-visible,.add-item-button:focus-visible{outline:3px solid #92acd9;outline-offset:3px}@media(max-width:736px){.item-editor{padding:12px}.stepper{flex-wrap:wrap}.step{font-size:12px}.step-line{display:none}.item-card{padding:5px 8px}.item-open{gap:8px}.item-open strong{font-size:14px}.item-card .deleting{font-size:12px;padding:8px 4px}.financial-items{padding:12px}.financial-items>div{flex-wrap:wrap}.form-body{min-width:0}.review-item{padding:12px}}
