:root {
  --ink: #0e1a28;
  --ink-2: #1a3148;
  --copper: #c17a3a;
  --copper-deep: #8a4f1f;
  --copper-soft: #ecd7be;
  --paper: #efe6d8;
  --card: #fffaf3;
  --line: #e1d3c1;
  --muted: #6d6258;
  --ok: #2f6b4f;
  --shadow: 0 22px 48px rgba(18, 32, 51, 0.10);
  --shadow-soft: 0 10px 28px rgba(18, 32, 51, 0.06);
  font-family: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; color: var(--ink);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(1100px 520px at 100% -8%, rgba(193,122,58,.10), transparent 52%),
    radial-gradient(900px 420px at -8% 108%, rgba(18,32,51,.07), transparent 48%),
    var(--paper);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.login-wrap {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.login-brand {
  background: linear-gradient(165deg, #122033 0%, #1d3b58 55%, #8a5628 140%);
  color: #f7efe4;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand h1 { font-weight: 600; letter-spacing: 0.04em; margin: 28px 0 8px; }
.login-brand p { max-width: 28rem; color: #d8cbbd; line-height: 1.6; }
.login-langs a { color: #e0a15a; font-weight: 600; }
.login-home { color: #e0a15a; font-weight: 600; }
.login-gap { height: 18px; }
.login-go { width: 100%; }
.login-body input { font-size: 16px; }
.nav-open, .side-mask { display: none; }
.mark {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(135deg, #e0a15a, #9a5a24);
  display: grid; place-items: center; font-weight: 700;
}
.login-card { display: grid; place-items: center; padding: 40px; }
.login-body .login-brand { animation: dash-rise .7s cubic-bezier(.22,.8,.2,1) both; }
.login-body .login-card { animation: dash-rise .7s cubic-bezier(.22,.8,.2,1) .08s both; }
.login-body .panel { overflow: hidden; }
.login-go {
  position: relative;
  gap: 10px;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.login-go:active { transform: scale(.98); }
.login-go-spin {
  display: none;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  animation: s2-spin .7s linear infinite;
}
.panel.is-wait .login-go-spin { display: block; }
.panel.is-wait .login-go { pointer-events: none; filter: brightness(.96); }
.panel.is-shake { animation: login-shake .48s ease; }
.login-veil {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(14, 26, 40, .42);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
}
.login-veil[hidden] { display: none; }
.login-veil-card, .dash-welcome-card {
  display: grid; place-items: center; gap: 14px;
  text-align: center; color: #f7efe4;
  animation: dash-pop .55s cubic-bezier(.18,.8,.22,1.12) both;
}
.login-veil-card p, .dash-welcome-card h2 { margin: 0; font-size: 1.45rem; }
.login-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(180deg, #d49a58, #a35e24);
  box-shadow: 0 16px 32px rgba(163, 94, 36, .35);
  position: relative;
}
.login-check::after {
  content: "";
  position: absolute; left: 22px; top: 16px;
  width: 16px; height: 28px;
  border: 3px solid #fff;
  border-top: 0; border-left: 0;
  transform: rotate(45deg) scale(0);
  animation: login-tick .35s ease .2s forwards;
}
.login-body.is-in .login-wrap { animation: login-out .55s ease forwards; }
.dash-welcome {
  position: fixed; inset: 0; z-index: 90;
  background: linear-gradient(165deg, #122033 0%, #1d3b58 55%, #8a5628 140%);
  display: grid; place-items: center;
}
.dash-welcome[hidden] { display: none; }
.dash-welcome.is-out { animation: login-out .5s ease forwards; }
.dash-welcome-card .dash-kicker { color: #e0a15a; }
@keyframes login-shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes login-tick {
  to { transform: rotate(45deg) scale(1); }
}
@keyframes login-out {
  to { opacity: 0; transform: scale(1.02); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .login-body .login-brand,
  .login-body .login-card,
  .panel.is-shake,
  .login-go-spin,
  .login-check::after,
  .login-veil-card,
  .dash-welcome-card,
  .login-body.is-in .login-wrap,
  .dash-welcome.is-out {
    animation: none !important;
  }
  .panel.is-wait .login-go-spin { display: none; }
}
.panel {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.72);
}
.panel h2 { margin: 0 0 6px; font-size: 1.5rem; }
.hint { color: var(--muted); margin: 0 0 24px; font-size: 0.95rem; }
label { display: block; font-size: 0.82rem; color: var(--muted); margin: 14px 0 6px; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffdf9;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #c17a3a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(193,122,58,.16);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0; border-radius: 12px; padding: 12px 18px; cursor: pointer;
  background: var(--ink); color: #fff; font-weight: 600;
  line-height: 1; white-space: nowrap; text-align: center;
  box-shadow: 0 10px 22px rgba(14, 26, 40, 0.14);
}
.btn.copper {
  background: linear-gradient(180deg, #d49a58, #a35e24);
  box-shadow: 0 10px 22px rgba(163, 94, 36, .28);
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.small { padding: 8px 12px; font-size: 0.85rem; }
.error { color: #9b2c2c; background: #fdecec; padding: 10px 12px; border-radius: 10px; }
.ok-note { color: #1f6b43; background: #e9f6ee; padding: 10px 12px; border-radius: 10px; }

.shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: #514b7d;
  color: #f4f0ff;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  box-shadow: 5px 0 18px rgba(35, 27, 63, .12);
}
.side-profile {
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,.55) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(255,255,255,.34) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 66%, rgba(255,255,255,.22) 0 1px, transparent 2px),
    linear-gradient(145deg, #221d3e, #51446e 62%, #2b294e);
}
.profile-avatar {
  width: 54px; height: 54px; flex: 0 0 54px;
  border-radius: 50%; background: #fff; position: relative;
  box-shadow: 0 3px 14px rgba(0,0,0,.22);
}
.profile-avatar::before {
  content: ""; position: absolute; width: 19px; height: 19px;
  left: 17px; top: 10px; border-radius: 50%; background: #686868;
}
.profile-avatar::after {
  content: ""; position: absolute; width: 34px; height: 17px;
  left: 10px; bottom: 8px; border-radius: 20px 20px 9px 9px; background: #686868;
}
.profile-copy { min-width: 0; }
.profile-copy strong { display: block; color: #fff; font-size: 1rem; overflow-wrap: anywhere; }
.profile-copy span { display: block; margin-top: 3px; color: #e8e1f2; font-size: .77rem; }
.side-out {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; margin: 0; padding: 4px 10px;
  border-radius: 999px; font-size: .72rem; font-weight: 700;
  color: #fff; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  white-space: nowrap;
}
.side-out:hover { background: #fff; color: #221d3e; }
.nav {
  padding: 10px 0 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  scroll-padding-bottom: 12px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 10px 26px;
  border-radius: 0;
  color: #c8c1dd;
  margin: 0;
}
.nav a i, .nav-fold summary i {
  width: 24px; flex: 0 0 24px; text-align: center;
  color: #aaa0ca; font-style: normal; font-size: 1.15rem;
}
.nav a.active, .nav a:hover {
  background: rgba(47, 40, 83, .36);
  color: #fff;
  box-shadow: inset 4px 0 0 #2fc5b5;
}
.nav a.active i, .nav a:hover i { color: #2fc5b5; }
.nav a.nav-sub, .nav a.nav-sub2 {
  position: relative;
  min-height: 39px;
  margin: 0;
  padding: 8px 20px 8px 62px;
  color: #c9c1dd;
  font-size: .79rem;
}
.nav a.nav-sub::before, .nav a.nav-sub2::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 0;
  width: 14px;
  height: 50%;
  border-left: 1px solid rgba(231,225,246,.55);
  border-bottom: 1px solid rgba(231,225,246,.55);
}
.nav a.nav-sub::after, .nav a.nav-sub2::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 50%;
  bottom: -50%;
  border-left: 1px solid rgba(231,225,246,.55);
}
.nav a.nav-sub:last-child::after, .nav a.nav-sub2:last-child::after { display: none; }
.nav a.nav-sub.active, .nav a.nav-sub2.active {
  background: rgba(40, 33, 76, .4);
  color: #fff;
  box-shadow: none;
}
.nav-fold {
  margin: 0;
  border-radius: 0;
  overflow-anchor: none;
}
.nav-fold summary {
  overflow-anchor: none;
}
.nav-fold[open] > :not(summary) {
  animation: nav-drop .22s ease both;
}
@keyframes nav-drop {
  from { transform: translateY(-10px); opacity: .4; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-fold[open] > :not(summary) { animation: none; }
}
.nav-fold summary {
  list-style: none;
  cursor: pointer;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 26px;
  border-radius: 0;
  color: #f2effa;
  font-size: .9rem;
  font-weight: 600;
}
.nav-fold summary span { flex: 1; }
.nav-fold summary::after {
  content: "⌄";
  color: #aaa0ca;
  font-size: .95rem;
  transition: transform .15s;
}
.nav-fold[open] summary::after { transform: rotate(180deg); }
.nav-fold[open] { background: rgba(42, 35, 78, .22); }
.nav-fold summary::-webkit-details-marker { display: none; }
.nav-fold summary::before { display: none; }
.nav-fold summary:hover { background: rgba(42, 35, 78, .32); }
.nav-fold.nav-branch {
  background: transparent;
  position: relative;
}
.nav-fold.nav-branch[open] { background: rgba(42, 35, 78, .16); }
.nav-fold.old-tree > .nav-branch > summary,
a.nav-branch {
  position: relative;
  min-height: 39px;
  padding: 8px 16px 8px 48px;
  font-size: .82rem;
  font-weight: 600;
  color: #c9c1dd;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
a.nav-branch span, .nav-fold.old-tree > .nav-branch > summary span { flex: 1; }
a.nav-branch.is-on, a.nav-branch:hover,
.nav-fold.old-tree > .nav-branch > summary:hover {
  background: rgba(40, 33, 76, .4);
  color: #fff;
  box-shadow: none;
}
a.nav-branch.is-on { color: #fff; font-weight: 700; }
.nav-fold.old-tree > .nav-branch[open] > summary { color: #fff; }
.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  flex: 0 0 7px;
}
.nav-dot.on,
.nav-fold.old-tree[open] > summary > .nav-dot,
.nav-fold.nav-branch[open] > summary > .nav-dot,
a.nav-branch.is-on > .nav-dot {
  background: #3dcf6a;
}
.nav-fold.old-tree > .nav-branch > summary::before,
a.nav-branch::before {
  content: "";
  display: block;
  position: absolute;
  left: 35px;
  top: 0;
  width: 14px;
  height: 50%;
  border-left: 1px solid rgba(231,225,246,.55);
  border-bottom: 1px solid rgba(231,225,246,.55);
}
a.nav-branch::after {
  content: "⌄";
  color: #aaa0ca;
  font-size: .95rem;
  flex: 0 0 auto;
}
.nav-fold.old-tree > .nav-branch:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 19px;
  bottom: 0;
  border-left: 1px solid rgba(231,225,246,.55);
  pointer-events: none;
}
/* First-level children of any main folder (Reports, Add account, …)
   sit on the same indent as Sale Setup / Sale Entries — not the main row. */
.nav-fold.old-tree > a.nav-sub,
.nav-fold.old-tree > a.nav-sub2 {
  padding: 8px 16px 8px 48px;
  min-height: 39px;
  font-size: .82rem;
  font-weight: 600;
  gap: 10px;
}
.nav-fold.old-tree > a.nav-sub i,
.nav-fold.old-tree > a.nav-sub2 i {
  width: 24px;
  flex: 0 0 24px;
  font-size: 1.15rem;
}
.nav-fold.nav-branch a.nav-sub,
.nav-fold.nav-branch a.nav-sub2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 72px;
}
.nav-fold.nav-branch a.nav-sub i,
.nav-fold.nav-branch a.nav-sub2 i {
  width: 14px;
  flex: 0 0 14px;
  font-size: .72rem;
  color: #aaa0ca;
}
.nav-fold.nav-branch a.nav-sub::before,
.nav-fold.nav-branch a.nav-sub2::before,
.nav-fold.nav-branch a.nav-sub::after,
.nav-fold.nav-branch a.nav-sub2::after {
  left: 52px;
}
html[dir="rtl"] .nav a.active { box-shadow: inset -4px 0 0 #2fc5b5; }
html[dir="rtl"] .nav a.nav-sub, html[dir="rtl"] .nav a.nav-sub2 {
  padding: 8px 62px 8px 20px;
}
html[dir="rtl"] .nav-fold.old-tree > a.nav-sub,
html[dir="rtl"] .nav-fold.old-tree > a.nav-sub2 {
  padding: 8px 48px 8px 16px;
}
html[dir="rtl"] .nav a.nav-sub::before, html[dir="rtl"] .nav a.nav-sub2::before {
  left: auto; right: 35px; border-left: 0; border-right: 1px solid rgba(231,225,246,.55);
}
html[dir="rtl"] .nav a.nav-sub::after, html[dir="rtl"] .nav a.nav-sub2::after {
  left: auto; right: 35px; border-left: 0; border-right: 1px solid rgba(231,225,246,.55);
}
html[dir="rtl"] .nav-fold.old-tree > .nav-branch > summary,
html[dir="rtl"] a.nav-branch {
  padding: 8px 48px 8px 16px;
}
html[dir="rtl"] .nav-fold.old-tree > .nav-branch > summary::before,
html[dir="rtl"] a.nav-branch::before {
  left: auto;
  right: 35px;
  border-left: 0;
  border-right: 1px solid rgba(231,225,246,.55);
}
html[dir="rtl"] .nav-fold.old-tree > .nav-branch:not(:last-child)::after {
  left: auto;
  right: 35px;
}
html[dir="rtl"] .nav-fold.nav-branch a.nav-sub,
html[dir="rtl"] .nav-fold.nav-branch a.nav-sub2 {
  padding: 8px 78px 8px 20px;
}
html[dir="rtl"] .nav-fold.nav-branch a.nav-sub::before,
html[dir="rtl"] .nav-fold.nav-branch a.nav-sub2::before,
html[dir="rtl"] .nav-fold.nav-branch a.nav-sub::after,
html[dir="rtl"] .nav-fold.nav-branch a.nav-sub2::after {
  left: auto;
  right: 52px;
}
html[dir="rtl"] .login-wrap { direction: rtl; }
.side .who {
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px 10px;
  background: rgba(36, 29, 67, .25);
  color: #d5cde7;
  font-size: .74rem;
}
.side .who a { color: #fff; }
.side .who .side-out:hover { background: #fff; color: #221d3e; }
.who-lang { margin: 0; }
.main { min-width: 0; padding: 30px 36px 56px; }
.top {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.top h2 { margin: 0; font-size: 1.55rem; letter-spacing: -0.02em; overflow-wrap: anywhere; max-width: 42rem; }
.top .actions { display: flex; gap: 8px; flex-shrink: 0; }
.hero {
  background: linear-gradient(135deg, #122033, #2a4a68);
  color: #fff;
  border-radius: 22px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.hero .num { font-size: 3rem; font-weight: 600; letter-spacing: -0.03em; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.72);
}
.card .lbl { color: var(--muted); font-size: 0.8rem; }
.card .val { font-size: 1.35rem; margin-top: 6px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 16px; }
.chart { height: 180px; display: flex; align-items: flex-end; gap: 8px; padding-top: 20px; }
.bar { flex: 1; background: linear-gradient(180deg, var(--copper-soft), var(--copper)); border-radius: 8px 8px 2px 2px; min-height: 4px; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 0.72rem; color: var(--muted); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 12px 10px; border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 10px; border-bottom: 1px solid #f0e8dc; font-size: 0.92rem; }
.table-wrap { overflow-x: auto; }
.table tr.is-total td {
  background: #c17a3a;
  color: #fff;
  font-weight: 600;
  border: 0;
}
.table tr.is-total a { color: #fff; }
.table tr.is-group td {
  background: #122033;
  color: #f7efe4;
  font-weight: 600;
  border: 0;
}
.table tr.is-sub td {
  background: #f7efe4;
  font-weight: 600;
}
.row-form { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 18px; }
.row-form.report-filters {
  grid-template-columns: minmax(210px, 1.5fr) repeat(2, minmax(130px, 0.85fr)) minmax(170px, 1.1fr) auto;
  margin-bottom: 0;
}
.search { display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--shadow); }
.search input { min-width: 260px; border: 0; background: transparent; padding: 10px 12px; }
.search .btn { padding: 10px 16px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.muted { color: var(--muted); }

.form-card { margin-bottom: 18px; overflow: visible; }
.form-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: -4px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.form-head h3 { margin: 0; font-size: 1.02rem; font-weight: 600; }
.form-head .sub { font-size: 0.82rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.field label { margin: 0 0 6px; font-weight: 500; color: var(--ink-2); }
.sar {
  display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; overflow: hidden;
}
.sar span {
  display: grid; place-items: center; padding: 0 12px; background: #f7f1ea;
  color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em;
  border-inline-end: 1px solid var(--line); white-space: nowrap;
}
.sar input { border: 0; border-radius: 0; }
.form-actions {
  display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.form-actions .btn { width: auto; min-width: 140px; }

.table-card { padding: 0; overflow: hidden; }
.table-card .catalog-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px 12px;
}
.table-card .catalog-head h3 { margin: 0; font-size: 1.02rem; }
.count-pill {
  background: var(--ink); color: #f7efe4; border-radius: 999px;
  padding: 4px 10px; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.table-card .table { margin: 0; }
.table-card .table th {
  background: #f7f1ea; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; font-size: 0.7rem; padding: 12px 14px;
}
.table-card .table td { padding: 12px 14px; vertical-align: middle; }
.table-card .table tbody tr:hover { background: #faf6f0; }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .name-cell { font-weight: 500; }
.table .mono { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.88rem; }
.row-links { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.link-btn {
  display: inline-block; padding: 6px 10px; border-radius: 8px; font-size: 0.8rem;
  font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.link-btn:hover { border-color: var(--copper); color: var(--copper); }
.table-card .pager { padding: 12px 18px 16px; margin: 0; border-top: 1px solid var(--line); }
.sheet-card .catalog-head { gap: 10px; }
.sheet-status {
  margin-inline-start: auto;
  font-size: .78rem;
  font-weight: 600;
  color: #2f7d4a;
}
.sheet-status.error { color: #b42318; }
.table.sheet { min-width: 980px; }
.table.sheet th { border-inline-end: 1px solid #eadfce; }
.table.sheet td.sheet-cell {
  padding: 0;
  border-inline-end: 1px solid #eadfce;
  background: #fff;
}
.table.sheet tbody tr:hover td.sheet-cell { background: #fffdf8; }
.sheet-input {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  box-shadow: none;
}
.sheet-input.num { text-align: end; font-variant-numeric: tabular-nums; }
.sheet-input:focus {
  outline: 2px solid #2b6cb0;
  outline-offset: -2px;
  background: #fff;
  position: relative;
  z-index: 1;
}
select.sheet-input { cursor: pointer; appearance: auto; }
.sheet-cell.is-saving .sheet-input { background: #fff8e1; }
.sheet-cell.is-saved .sheet-input { background: #eaf7ee; }
.sheet-cell.is-error .sheet-input { background: #fdecea; outline: 2px solid #c0392b; outline-offset: -2px; }
html[dir="rtl"] .sheet-input.num { text-align: start; }
html[dir="rtl"] .table th, html[dir="rtl"] .table td { text-align: right; }
html[dir="rtl"] .table .num, html[dir="rtl"] .row-links { text-align: left; justify-content: flex-start; }
.coa-tools {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 18px 12px;
}
.coa-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.chip.active, .chip:hover { background: var(--ink); color: #f7efe4; border-color: var(--ink); }
.kind-pill {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.02em;
}
.kind-asset { background: #e8f1ea; color: #2f6b4f; }
.kind-liability { background: #fdecec; color: #8a3232; }
.kind-expense { background: #f7efe4; color: #8a5628; }
.kind-income { background: #e8eef6; color: #1b334c; }
.table a.ac-link { color: #1a5fb4; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.table a.ac-link:hover { color: var(--copper); }
.party-pick { display: grid; grid-template-columns: 140px minmax(220px, 1fr); gap: 8px; align-items: stretch; }
.party-pick .ac-name { min-width: 0; }
.form-grid.ledger-filters { grid-template-columns: 1fr 1fr 0.8fr 0.9fr auto; align-items: end; }
.form-grid.ledger-filters .party-field { grid-column: 1 / -1; min-width: 0; }
.combo { position: relative; }
.combo .combo-q {
  width: 100%;
  padding-inline-end: 40px;
}
.combo-caret {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-inline-end: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.combo-list {
  position: absolute;
  z-index: 20;
  left: 0; right: 0; top: calc(100% + 4px);
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.combo-list button {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.combo-list button .mono { color: var(--muted); margin-inline-end: 8px; }
.combo-list button:hover,
.combo-list button.is-on { background: #f7efe4; }
.combo-empty { padding: 10px 12px; color: var(--muted); font-size: 0.9rem; }
.parent-field,
.charge-field { grid-column: 1 / -1; }
.bill-lines { margin-top: 4px; }
@media print {
  .side, .nav-open, .side-mask, .no-print, .coa-filters, .actions, .who { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .main { padding: 0; }
}

.xl-body {
  margin: 0;
  background: #e8edf2;
  color: #1f2d3d;
  min-height: 100vh;
  font-family: "Times New Roman", Times, serif;
}
.xl-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 18px;
  background: #122033;
  color: #f7efe4;
}
.xl-bar strong { display: block; font-size: 0.92rem; }
.xl-bar .sub { color: #cbbba8; font-size: 0.78rem; }
.xl-bar .actions { display: flex; gap: 8px; }
.xl-bar .btn { padding: 8px 14px; }
.xl-bar .btn.ghost { color: #f7efe4; border-color: #3a5168; }
.xl-wrap { padding: 18px 18px 48px; }
.xl-sheet {
  background: #fff;
  overflow: auto;
  max-height: calc(100vh - 92px);
}
.prs-ledger { min-width: 1080px; }
.prs-head {
  padding: 10px 12px 8px;
  font-size: 15px;
  line-height: 1.45;
  color: #111;
}
.xl-grid { width: 100%; border-collapse: collapse; min-width: 1080px; font-size: 14px; }
.xl-grid th, .xl-grid td {
  border: 0;
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.xl-grid td:nth-child(4) { white-space: normal; min-width: 220px; }
.xl-grid thead th {
  position: sticky; top: 0;
  background: #7b3f98;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  z-index: 2;
  padding: 6px 8px;
}
.prs-grid tbody tr:nth-child(odd) td { background: #fff8dc; }
.prs-grid tbody tr:nth-child(even) td { background: #fff; }
.xl-grid .num { text-align: right; }
.prs-grid tr.prs-flag td { font-weight: 700; }
.xl-empty { padding: 28px 20px; color: #6d6258; }
@media print {
  .xl-body { background: #fff; }
  .xl-bar { display: none !important; }
  .xl-wrap { padding: 0; }
  .xl-sheet { box-shadow: none; border: 0; max-height: none; overflow: visible; }
}
.ar { font-family: "IBM Plex Sans Arabic", sans-serif; }
.invoice { max-width: 800px; margin: 24px auto; background: #fff; padding: 32px; border: 1px solid var(--line); }
.tb-body {
  margin: 0;
  background: #e8edf2;
  color: #111;
  min-height: 100vh;
  font-family: "Times New Roman", Times, serif;
}
.tb-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 18px;
  background: #122033;
  color: #f7efe4;
}
.tb-bar strong { display: block; font-size: 0.92rem; }
.tb-bar .sub { color: #cbbba8; font-size: 0.78rem; }
.tb-bar .actions { display: flex; gap: 8px; }
.tb-bar .btn { padding: 8px 14px; }
.tb-bar .btn.ghost { color: #f7efe4; border-color: #3a5168; }
.tb-dates { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tb-dates label { margin: 0; color: #f7efe4; font-size: 0.82rem; display: flex; align-items: center; gap: 6px; }
.tb-dates input { width: auto; padding: 6px 8px; border-radius: 8px; }
.tb-wrap { padding: 18px 18px 48px; }
.tb-sheet { background: #fff; overflow: auto; max-height: calc(100vh - 92px); }
.tb-title { padding: 12px 10px 8px; font-size: 16px; }
.tb-grid {
  width: 1200px;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 auto 24px;
}
.tb-grid th, .tb-grid td {
  border: 1px solid #000;
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.tb-grid thead th {
  background: #9966ff;
  color: #fff;
  font-weight: 700;
  text-align: center;
}
.tb-grid thead tr:first-child th { position: sticky; top: 0; z-index: 2; }
.tb-grid thead tr:nth-child(2) th { position: sticky; top: 28px; z-index: 2; }
.tb-grid .num { text-align: right; white-space: nowrap; }
.tb-code a { color: #00c; }
.tb-lv1 td { background: #f9bfc9; font-weight: 700; font-size: 17px; }
.tb-lv2 td { background: #ffffcc; }
.tb-lv3 td { background: #aaf4b4; }
.tb-odd td { background: #fff; }
.tb-even td { background: #e5e5e5; }
body.ledger-only {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(193, 122, 58, 0.28), transparent 55%),
    linear-gradient(180deg, #122033 0 168px, #efe6da 168px);
  padding: 28px 20px 56px;
}
.ledger-card {
  max-width: 1180px;
  margin: 0 auto;
  background: #fffdf9;
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(18, 32, 51, 0.22);
  overflow: hidden;
}
.ledger-brand {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  padding: 26px 28px 22px;
  background: linear-gradient(135deg, #122033 0%, #1c3a56 58%, #8d5a2b 140%);
  color: #f7efe4;
}
.ledger-kicker {
  display: inline-block;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  color: #e0a15a;
  margin-bottom: 6px;
}
.ledger-brand h1 { margin: 0 0 8px; font-size: 26px; font-weight: 600; }
.ledger-party { margin: 0; font-size: 16px; }
.ledger-brand .muted { color: #d8cbbd; }
.ledger-period {
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 210px;
}
.ledger-period span { font-size: 11px; color: #d8cbbd; }
.ledger-period strong { font-size: 15px; }
.ledger-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
  padding: 16px 22px;
  background: #f7efe4;
  border-bottom: 1px solid var(--line);
}
.ledger-actions { display: flex; gap: 8px; }
.ledger-actions .btn {
  min-width: 108px;
  text-align: center;
  color: #fff;
}
.ledger-dates {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0;
}
.ledger-dates label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); margin: 0; }
.ledger-dates input[type="date"] {
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.ledger-table-wrap { padding: 8px 12px 20px; overflow-x: auto; }
.ledger-table { width: 100%; border-collapse: collapse; }
.ledger-table th {
  background: #122033;
  color: #f7efe4;
  font-weight: 500;
  padding: 11px 10px;
  position: sticky;
  top: 0;
}
.ledger-table td { padding: 10px; border-bottom: 1px solid #f0e6d8; }
.ledger-table tbody tr:nth-child(even):not(.is-open):not(.is-total) td { background: #fbf6ef; }
.ledger-table tr.is-open td { background: #ecd7be; font-weight: 600; }
.ledger-table tr.is-total td { background: #c17a3a; color: #fff; font-weight: 600; border: 0; }
.report-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.report-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 24px 26px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.72);
  min-height: 168px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.report-card:hover {
  border-color: var(--copper);
  transform: translateY(-3px);
  box-shadow: 0 22px 36px rgba(18, 32, 51, 0.14);
}
.report-no {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--copper);
  font-weight: 600;
  margin-bottom: 10px;
}
.report-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.report-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
@media (max-width: 980px) {
  .report-grid { grid-template-columns: 1fr; }
}
@media print {
  .tb-body { background: #fff; }
  .tb-bar { display: none !important; }
  .tb-wrap { padding: 0; }
  .tb-sheet { max-height: none; overflow: visible; }
  .no-print { display: none !important; }
  body.ledger-only { background: #fff; padding: 0; }
  .ledger-card { box-shadow: none; border-radius: 0; }
  .ledger-brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 980px) {
  .login-wrap, .kpis, .kpis.wide, .grid-2, .row-form, .form-grid, .form-grid.ledger-filters { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .search input { min-width: 0; }
  .login-wrap {
    min-height: 100svh;
    align-content: start;
  }
  .login-brand {
    padding: 14px 18px 12px;
    padding-top: max(14px, env(safe-area-inset-top));
    gap: 0;
    justify-content: flex-start;
  }
  .login-brand-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
  }
  .login-brand .mark {
    width: 40px; height: 40px; border-radius: 12px; font-size: 1rem;
  }
  .login-brand-copy { min-width: 0; }
  .login-brand h1 {
    margin: 0;
    font-size: 1.12rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .login-ar { margin: 4px 0 0; font-size: .82rem; }
  .login-blurb, .login-vat { display: none; }
  .login-langs {
    grid-column: 1 / -1;
    margin: 10px 0 0;
    font-size: .88rem;
  }
  .login-card {
    padding: 16px 16px max(22px, env(safe-area-inset-bottom));
    align-items: start;
  }
  .login-body .panel {
    width: 100%;
    max-width: none;
    padding: 22px 18px;
    border-radius: 18px;
  }
  .panel h2 { font-size: 1.28rem; }
  .hint { margin-bottom: 16px; }
  .login-go { min-height: 46px; }

  .shell { grid-template-columns: 1fr; }
  .nav-open {
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 35;
    width: 100%;
    min-height: calc(52px + env(safe-area-inset-top));
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    border: 0;
    background: #221d3e;
    color: #f4f0ff;
    font: inherit;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
  }
  .nav-open-bars {
    display: grid; gap: 4px; width: 18px; flex: 0 0 18px;
  }
  .nav-open-bars i {
    display: block; height: 2px; border-radius: 2px; background: #fff;
  }
  .side-mask {
    display: none;
    position: fixed; inset: 0; z-index: 40;
    background: rgba(14, 26, 40, .46);
    border: 0; padding: 0; width: 100%;
  }
  .side {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(300px, 88vw);
    height: 100dvh;
    z-index: 50;
    transform: translateX(-110%);
    transition: transform .22s ease;
    box-shadow: none;
  }
  html[dir="rtl"] .side {
    left: auto; right: 0;
    transform: translateX(110%);
  }
  body.nav-on { overflow: hidden; }
  body.nav-on .side {
    transform: none;
    box-shadow: 18px 0 40px rgba(18, 32, 51, .28);
  }
  html[dir="rtl"] body.nav-on .side { box-shadow: -18px 0 40px rgba(18, 32, 51, .28); }
  body.nav-on .side-mask { display: block; }
  body.nav-on .nav-open-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.nav-on .nav-open-bars i:nth-child(2) { opacity: 0; }
  body.nav-on .nav-open-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-open-bars i { transition: transform .18s ease, opacity .18s ease; }
  .main {
    padding: 16px 14px max(36px, env(safe-area-inset-bottom));
  }
  .hero .num, .dash-hero .num { font-size: clamp(1.8rem, 8vw, 2.6rem); }
}
@media (max-width: 980px) and (orientation: landscape) {
  .login-wrap { grid-template-columns: .72fr 1.18fr; }
  .login-card { padding: 14px 16px; align-items: center; }
}

.callout {
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.45;
}
.callout.warn { background: #f7efe4; color: #8a5628; border: 1px solid #ecd7be; }
.callout.ok { background: #e8f1ea; color: #2f6b4f; border: 1px solid #cfe0d4; }
.check {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 10px 0; font-size: 0.92rem; color: var(--ink);
}
.check input { width: auto; margin-top: 3px; }
.ok-msg { color: #2f6b4f; background: #e8f1ea; padding: 10px 12px; border-radius: 10px; }
.form-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.form-head h3 { margin: 0; font-size: 1.05rem; }
.pill {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}
.pill-local { background: #f7efe4; color: #8a5628; }
.pill-pending { background: #e8eef6; color: #1b334c; }
.pill-reported, .pill-cleared { background: #e8f1ea; color: #2f6b4f; }
.pill-failed { background: #fdecec; color: #8a3232; }
.pill-open { background: #e8eef6; color: #1b334c; }
.pill-converted { background: #e8f1ea; color: #2f6b4f; }
.page-tabs {
  display: flex;
  gap: 8px;
  margin: -8px 0 20px;
  flex-wrap: wrap;
}
.page-tabs a {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  font-size: 0.9rem;
}
.page-tabs a.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.doc-page { display: flex; flex-direction: column; gap: 16px; }
.doc-titlebar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  background: transparent; color: var(--ink);
  padding: 2px 2px 16px; border-radius: 0;
  margin-bottom: 0; border-bottom: 1px solid var(--line);
}
.doc-titlebar h2 {
  margin: 0; color: var(--ink); font-size: 1.55rem; letter-spacing: -0.02em; max-width: none;
}
.doc-tabs { display: flex; gap: 8px; }
.doc-tabs a {
  background: #fff; color: var(--ink-2); padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: 0.86rem; border: 1px solid var(--line);
}
.doc-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: none; }
.doc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  overflow: visible; box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.72);
}
.doc-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px;
  background: linear-gradient(180deg, #fbf6ee, #f3eadc); border-bottom: 1px solid var(--line);
}
.doc-toolbar .btn.tool {
  width: auto; min-width: 108px; border-radius: 999px; padding: 8px 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-toolbar .cancel { background: #c45c7a; color: #fff; }
.doc-toolbar .save { background: #6aae6a; color: #fff; }
.doc-toolbar .save-new { background: #4f9a5c; color: #fff; }
.doc-toolbar .save-list { background: #3f8f55; color: #fff; }
.doc-toolbar .save-print { background: #2f7cc8; color: #fff; }
.doc-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; padding: 14px 16px 8px;
}
.doc-meta .full { grid-column: 1 / -1; }
.doc-meta label { margin: 0 0 4px; }
.party-row { display: flex; gap: 8px; align-items: stretch; }
.party-row .combo { flex: 1; min-width: 0; }
.plus-btn {
  width: 42px; flex: 0 0 42px; border: 0; border-radius: 10px;
  background: #2f7cc8; color: #fff; font-size: 1.2rem; font-weight: 700; cursor: pointer;
  display: grid; place-items: center;
}
.entry-wrap { overflow: visible; padding: 0 8px 8px; }
.entry-table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.entry-table th {
  background: #122033; color: #f7efe4; font-size: 0.72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 12px 8px; text-align: start; white-space: nowrap;
}
.entry-table td { padding: 6px 4px; vertical-align: top; border-bottom: 1px solid #f0e8dc; }
.entry-table .sr { width: 36px; text-align: center; color: var(--muted); padding-top: 14px; }
.entry-table input { padding: 7px 8px; border-radius: 8px; }
.entry-table .ro { background: #f3eee7; color: var(--muted); }
.entry-table .item-cell { position: relative; min-width: 220px; }
.entry-table .item-col { min-width: 220px; }
.item-pick-row { display: flex; align-items: stretch; gap: 4px; }
.item-pick-row .ln-name { flex: 1; min-width: 0; background: #fff; }
.item-plus {
  flex: 0 0 28px; width: 28px; height: 28px; margin: 0; padding: 0;
  border: 1px solid #9aa7b5; border-radius: 4px; background: #fff;
  color: #122033; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer;
}
th .item-plus { background: #269cea; color: #fff; border-color: #269cea; vertical-align: middle; }
.item-plus:hover { filter: brightness(0.96); }
.item-picker {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 32, .42);
  display: grid; place-items: center; padding: 18px;
  backdrop-filter: blur(2px);
}
.item-picker[hidden] { display: none; }
.item-picker-card {
  width: min(1240px, 100%); max-height: min(88vh, 860px);
  background: #fff; border-radius: 8px;
  box-shadow: 0 28px 80px rgba(12, 18, 28, .32), 0 0 0 1px rgba(0,0,0,.04);
  display: flex; flex-direction: column; overflow: hidden;
}
.item-picker-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px 10px; background: #fff; color: #3a3f46;
  border-bottom: 1px solid #eef0f3;
}
.item-picker-head h3 {
  margin: 0; font-size: 1.12rem; font-weight: 500; letter-spacing: .01em; color: #4a515b;
}
.item-picker-x {
  border: 0; background: transparent; color: #b0b6be; font-size: 26px;
  line-height: 1; cursor: pointer; width: 32px; height: 32px; border-radius: 6px;
}
.item-picker-x:hover { color: #5c6370; background: #f3f4f6; }
.item-picker-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px 14px; flex-wrap: wrap;
}
.item-picker-find { position: relative; flex: 0 1 280px; min-width: 200px; }
.item-picker-find svg {
  position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #9aa3ae; pointer-events: none;
}
.item-picker-find input {
  width: 100%; height: 38px; border: 1px solid #d5dbe3; border-radius: 4px;
  padding-inline-start: 34px; padding-inline-end: 12px; background: #fff; color: #2b3139;
}
.item-picker-find input:focus { outline: none; border-color: #8aa4c2; box-shadow: 0 0 0 3px rgba(82, 130, 180, .12); }
.item-picker-showing {
  display: flex; align-items: center; gap: 8px; color: #5b6470; font-size: .92rem; white-space: nowrap;
}
.item-picker-showing select {
  height: 34px; min-width: 58px; padding: 0 8px; border: 1px solid #d5dbe3;
  border-radius: 4px; background: #fff; color: #2b3139;
}
.item-picker-table { overflow: auto; flex: 1; padding: 0 0 0; }
.item-picker-table table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.item-picker-table th {
  position: sticky; top: 0; z-index: 1;
  background: #3e3e3e; color: #fff; text-align: start;
  padding: 11px 12px; font-size: .78rem; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap; border: 0;
}
.item-picker-table th[data-sort] { cursor: pointer; user-select: none; }
.item-picker-table th[data-sort]:hover { background: #4a4a4a; }
.item-picker-table th .sa {
  display: inline-flex; flex-direction: column; gap: 1px;
  margin-inline-start: 5px; vertical-align: middle; opacity: .4;
}
.item-picker-table th .sa i {
  display: block; width: 0; height: 0;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
}
.item-picker-table th .sa i:first-child { border-bottom: 4px solid #fff; }
.item-picker-table th .sa i:last-child { border-top: 4px solid #fff; }
.item-picker-table th.sort-asc .sa,
.item-picker-table th.sort-desc .sa { opacity: 1; }
.item-picker-table th.sort-asc .sa i:last-child { opacity: .28; }
.item-picker-table th.sort-desc .sa i:first-child { opacity: .28; }
.item-picker-table td {
  padding: 11px 12px; border-bottom: 1px solid #eceff2; color: #2f3540;
  font-size: .86rem; white-space: nowrap; background: #fff;
}
.item-picker-table tbody tr:nth-child(even) td { background: #f6f7f8; }
.item-picker-table tbody tr:hover td { background: #eef5fb; }
.item-picker-table td.pick-name { white-space: normal; min-width: 220px; font-weight: 500; }
.item-picker-table .pick-col { width: 46px; text-align: center; }
.item-picker-table .pick-num { font-variant-numeric: tabular-nums; }
.pick-go, .pick-eye {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; padding: 0; border: 0; border-radius: 4px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.12); text-decoration: none; vertical-align: middle;
}
.pick-go { background: #7cb342; color: #fff; }
.pick-go:hover { background: #689f38; }
.pick-eye { background: #42a5f5; color: #fff; }
.pick-eye:hover { background: #1e88e5; }
.item-picker-table tr.is-picked td { background: #eaf6dc; }
.item-picker-pages {
  display: flex; justify-content: flex-end; align-items: center; gap: 4px;
  padding: 10px 16px; border-top: 1px solid #eef0f3; background: #fafbfc;
}
.item-picker-pages button {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid #dde2e8;
  background: #fff; color: #4a515b; border-radius: 4px; cursor: pointer; font-size: .82rem;
}
.item-picker-pages button:hover:not(:disabled) { background: #f3f5f7; }
.item-picker-pages button.on { background: #3e3e3e; color: #fff; border-color: #3e3e3e; }
.item-picker-pages button:disabled { opacity: .4; cursor: default; }
.item-entry-tabs {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 16px;
  border-bottom: 1px solid #e6ebf0;
}
.item-entry-tabs button {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  padding: 10px 18px; color: #6b7280; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.item-entry-tabs button.on {
  color: #1b334c; border-bottom-color: #c17a3a;
}
.item-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item-entry-grid .field.full { grid-column: 1 / -1; }
.item-create {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(15, 23, 32, .42);
  display: grid; place-items: center; padding: 18px;
  backdrop-filter: blur(2px);
}
.item-create[hidden] { display: none; }
.item-create-card {
  width: min(860px, 100%); max-height: min(90vh, 820px);
  background: #fff; border-radius: 8px; overflow: auto;
  box-shadow: 0 28px 80px rgba(12, 18, 28, .32), 0 0 0 1px rgba(0,0,0,.04);
}
.item-create-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px 10px; border-bottom: 1px solid #eef0f3; color: #3a3f46;
}
.item-create-head h3 { margin: 0; font-size: 1.12rem; font-weight: 500; color: #4a515b; }
.item-create-form, #item-create-form { padding: 16px 20px 18px; }
.item-create-err {
  margin: 0 0 12px; padding: 8px 10px; border-radius: 6px;
  background: #fdecec; color: #8a3232; font-size: .9rem;
}
.item-create-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef0f3;
}
.entry-table .ln-suggest { min-width: 280px; }
.entry-table .vat-percent {
  text-align: center; vertical-align: middle; color: var(--ink-2); white-space: nowrap;
}
.doc-totals {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 22px;
  margin: 10px 16px 16px; padding: 14px 18px; border-radius: 14px;
  background: linear-gradient(125deg, #122033 0%, #1d3b58 58%, #8a4f1f 160%);
  color: #f7efe4; font-size: 0.92rem; box-shadow: 0 14px 28px rgba(18,32,51,.16);
}
.quote-total-row th { background: #122033; color: #e0a15a; font-weight: 700; text-align: center; }
.quote-bottom { padding: 2px 16px 10px; }
.quote-add-more {
  width: auto; background: #269cea !important; color: #fff !important;
  border-color: #269cea !important; border-radius: 4px; padding: 8px 16px;
}
.quote-notes { padding: 0 12px 16px; }
.quote-notes .cke { border: 1px solid #c5c5c5; }
@media (max-width: 980px) {
  .doc-meta { grid-template-columns: 1fr; }
}
html[dir="rtl"] .entry-table th,
html[dir="rtl"] .entry-table td { text-align: right; }

.customer-doc {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.72); overflow: hidden;
}
.customer-section, .customer-footer { padding: 18px; }
.customer-top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px;
  border-bottom: 1px solid var(--line);
}
.customer-top .full { grid-column: 1 / -1; }
.customer-section .field label, .customer-footer .field label,
.customer-lang .field label { margin: 0 0 5px; color: var(--ink-2); }
.account-code { display: grid; grid-template-columns: 70px 70px 80px 1fr; gap: 4px; }
.account-code input { text-align: center; }
.rate-pills { display: flex; gap: 8px; }
.rate-pills label { margin: 0; cursor: pointer; }
.rate-pills input { position: absolute; opacity: 0; pointer-events: none; }
.rate-pills span {
  display: block; min-width: 32px; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 6px; text-align: center; background: #fff;
}
.rate-pills input:checked + span { background: #4f9a5c; border-color: #4f9a5c; color: #fff; }
.customer-bilingual {
  direction: ltr;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 18px; border-bottom: 1px solid var(--line);
}
html[dir="rtl"] .customer-bilingual { direction: ltr; }
.customer-lang { display: grid; gap: 10px; align-content: start; }
.customer-lang h3 { margin: 0; font-size: 1rem; }
.lang-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.customer-lang[dir="rtl"] input.is-fetched {
  direction: rtl; text-align: right;
}
.customer-lang input.is-fetched {
  animation: fetch-flash .45s ease;
}
@keyframes fetch-flash {
  from { box-shadow: 0 0 0 3px rgba(193,122,58,.35); background: #fff6e8; }
  to { box-shadow: none; }
}
.customer-footer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
@media (max-width: 980px) {
  .customer-top, .customer-bilingual, .customer-footer { grid-template-columns: 1fr; }
  .customer-top .full { grid-column: auto; }
  .account-code { grid-template-columns: repeat(3, 58px) minmax(80px, 1fr); }
}

.dn-titlebar,
.pi-titlebar,
.s2-titlebar {
  background: transparent;
  border-radius: 0;
}
.dn-titlebar h2,
.pi-titlebar h2,
.s2-titlebar h2 { color: var(--ink); }
.dn-meta { gap: 10px 26px; padding-bottom: 16px; }
.dn-meta select { width: 100%; }
.dn-fetch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.dn-fetch-row .btn, .dn-bottom-actions .btn {
  width: auto; background: #269cea; color: #fff; border-color: #269cea;
}
.dn-entry-table { min-width: 850px; }
.dn-entry-table th {
  background: #122033;
  color: #f7efe4;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.dn-entry-table td { border: 1px solid #e5e5e5; }
.dn-entry-table .ln-bar { min-width: 120px; }
.dn-entry-table .ln-desc { min-width: 170px; }
.dn-entry-table .ln-unit { min-width: 100px; padding: 7px 8px; }
.dn-entry-table .ln-qty { min-width: 90px; }
.dn-import-head { text-align: center !important; width: 74px; }
.dn-import {
  border: 0; border-radius: 4px; padding: 6px 12px;
  background: #269cea; color: #fff; cursor: pointer;
}
.dn-remove {
  border: 0; border-radius: 5px; width: 30px; height: 30px;
  background: #ff2f91; color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
}
.dn-total-row th { background: #122033; color: #e0a15a; font-weight: 700; }
.dn-bottom-actions { padding: 2px 16px 16px; }
.dn-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.dn-actions form { display: inline; margin: 0; }
@media (max-width: 980px) {
  .dn-fetch-row { grid-template-columns: 1fr; }
}

.pi-titlebar { background: transparent; border-radius: 0; }
.pi-titlebar h2 { color: var(--ink); }
.pi-meta { gap: 10px 26px; padding-bottom: 18px; }
.pi-meta select { width: 100%; }
.pi-action-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.pi-fetch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.pi-blue { width: auto !important; background: #269cea !important; border-color: #269cea !important; color: #fff !important; }
.pi-entry-table { min-width: 1080px; }
.pi-entry-table th { background: #122033; color: #f7efe4; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.pi-entry-table td { border: 1px solid #e5e5e5; }
.pi-entry-table .ln-bar { min-width: 120px; }
.pi-entry-table .ln-desc { min-width: 140px; }
.pi-entry-table .ln-unit { min-width: 86px; }
.pi-entry-table .ln-qty, .pi-entry-table .ln-price,
.pi-entry-table .ln-disc, .pi-entry-table .ln-disc-amt,
.pi-entry-table .ln-vat { min-width: 72px; }
.pi-total-row th { background: #122033; color: #e0a15a; font-weight: 700; }
.pi-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 3px 16px 16px;
}
.pi-grand { font-weight: 700; color: #183c65; }
@media (max-width: 980px) {
  .pi-action-field, .pi-fetch-row { grid-template-columns: 1fr; }
}

.s2-titlebar { background: transparent; border-radius: 0; }
.s2-titlebar h2 { color: var(--ink); }
.s2-toolbar {
  display: flex; flex-wrap: nowrap; gap: 8px; padding: 12px 16px;
  background: linear-gradient(180deg, #fbf6ee, #f3eadc);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.s2-toolbar .btn {
  flex: 1 1 auto; width: auto; min-width: 0; padding: 10px 12px;
  border-radius: 999px; font-size: clamp(.62rem, .82vw, .8rem);
  white-space: nowrap; box-shadow: none;
}
.s2-save-list { background: #77ad63; color: #fff; border-color: #77ad63; }
.s2-blue { width: auto !important; background: #269cea !important; color: #fff !important; border-color: #269cea !important; }
.s2-zatca { background: #20bcae; color: #fff; border-color: #20bcae; }
.s2-zatca.is-wait { background: #0e7a70; border-color: #0e7a70; }
.s2-busy {
  display: flex; align-items: center; gap: 10px;
  margin: 0; padding: 12px 16px;
  background: #143c48; color: #e8fffb; font-weight: 600; font-size: .95rem;
}
.s2-busy[hidden] { display: none !important; }
.s2-busy-spin {
  width: 18px; height: 18px; flex: 0 0 18px;
  border: 2px solid #7ad4c8; border-top-color: #fff; border-radius: 50%;
  animation: s2-spin .7s linear infinite;
}
@keyframes s2-spin { to { transform: rotate(360deg); } }
.doc-card.is-busy { cursor: wait; }
.doc-card.is-busy .s2-toolbar .btn { pointer-events: none; opacity: .75; }
.s2-meta { gap: 10px 26px; padding-bottom: 16px; }
.s2-fetch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.s2-fetch-row .btn { width: auto; }
.sale-quote-field { min-width: 280px; }
@media (max-width: 980px) {
  .s2-fetch-row { grid-template-columns: 1fr; }
}
.s2-meta select { width: 100%; }
.s2-action-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.required { color: #ff3b8d; font-size: 1rem; }
.s2-entry-table { min-width: 1500px; }
.s2-entry-wrap { max-width: 100%; overflow-x: auto; overflow-y: visible; }
.s2-entry-wrap .s2-entry-table { width: 1500px; }
.s2-entry-table th { background: #122033; color: #f7efe4; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.s2-entry-table td { border: 1px solid #e5e5e5; }
.s2-entry-table .ln-bar { min-width: 115px; }
.s2-entry-table .ln-desc { min-width: 150px; }
.s2-entry-table .ln-unit { min-width: 85px; }
.s2-entry-table .ln-qty, .s2-entry-table .ln-price, .s2-entry-table .ln-disc,
.s2-entry-table .ln-disc-amt, .s2-entry-table .ln-vat, .s2-entry-table .ln-total { min-width: 72px; }
.s2-entry-table .ln-disc-type { min-width: 130px; padding: 7px 5px; }
.s2-total-row th { background: #122033; color: #e0a15a; font-weight: 700; }
.s2-lower { display: grid; grid-template-columns: 1fr 235px; gap: 24px; padding: 10px 16px 20px; }
.s2-payment-box { display: grid; gap: 8px; }
.s2-payment-box label { margin-bottom: 4px; }
.s2-payment-box strong { color: #173d65; text-align: right; margin-top: 4px; }
.s2-switch { display: inline-block; position: relative; width: 34px; height: 20px; margin: 3px 0 0; }
.s2-switch input { position: absolute; opacity: 0; }
.s2-switch span { position: absolute; inset: 0; border-radius: 20px; background: #b9c1c7; cursor: pointer; }
.s2-switch span::after { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .15s; }
.s2-switch input:checked + span { background: #269cea; }
.s2-switch input:checked + span::after { transform: translateX(14px); }
@media (max-width: 980px) {
  .s2-action-field { grid-template-columns: 1fr; }
  .s2-lower { grid-template-columns: 1fr; }
}

.sale-report-hero {
  background: linear-gradient(118deg, #0b2a4a 0%, #163a62 58%, #8a5628 160%);
  color: #f7efe4;
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  box-shadow: var(--shadow);
}
.sale-report-hero .kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e0a15a;
  font-weight: 700;
}
.sale-report-hero h2 { margin: 6px 0 12px; color: #fff; font-size: 1.55rem; max-width: none; }
.sale-report-hero .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sale-report-hero .chip {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.82rem;
  color: #d8cbbd;
}
.sale-report-hero .chip b { color: #fff; font-weight: 600; }
.sale-report-hero .actions {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}
.sale-report-hero .actions .btn {
  min-height: 42px;
  padding: 0 18px;
  color: #fff;
}
.sale-report-hero .actions .btn.ghost {
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
}
.sale-report-sheet {
  overflow: hidden;
  padding: 0;
}
.sale-report-sheet .table { margin: 0; }
.sale-report-sheet thead th {
  background: #0b2a4a;
  color: #f7efe4;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 10px;
  border: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.sale-report-sheet tbody td {
  padding: 10px;
  border-bottom: 1px solid #eadfcf;
}
.sale-report-sheet tbody tr:nth-child(even):not(.is-total):not(.is-group):not(.is-sub) td {
  background: #faf6f0;
}
.sale-report-sheet tbody tr:hover:not(.is-total):not(.is-group):not(.is-sub) td {
  background: #f3e6d4;
}

/* Purchase dashboard */
.kpis.wide { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.wh-chip {
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
  margin-top: 8px; padding: 5px 9px; border-radius: 9px;
  background: #f6efe5; border: 1px solid var(--line);
  font-size: 0.74rem; color: var(--muted);
}
.wh-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-chip b { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.pd-clock {
  align-self: center; padding: 8px 14px; border-radius: 12px;
  background: var(--ink-2); color: #f7efe4;
  font-variant-numeric: tabular-nums; letter-spacing: 0.06em; font-weight: 600;
}
.pd-axis {
  display: flex; gap: 8px; margin-top: 8px;
  font-size: 0.68rem; color: var(--muted);
}
.pd-axis span { flex: 1; text-align: center; }
.pd-toggle {
  width: 22px; height: 22px; line-height: 1; padding: 0; cursor: pointer;
  border-radius: 7px; border: 1px solid var(--line);
  background: var(--copper-soft); color: var(--ink-2); font-weight: 600;
}
.table th.is-sortable { cursor: pointer; user-select: none; }
.table th.is-sortable:hover { color: var(--copper); }
.table th[data-dir=asc]::after { content: " \2191"; }
.table th[data-dir=desc]::after { content: " \2193"; }
.pd-detail > td { background: #faf6f0; }
.pd-detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 18px; font-size: 0.86rem;
}
.pd-detail-grid .lbl { display: block; color: var(--muted); font-size: 0.72rem; }
.pd-detail-wide { grid-column: 1 / -1; }
.pd-detail-links { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.dash-tiles.pdash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-tiles.pdash-tiles .dash-tile,
.dash-tiles.pdash-tiles .dash-tile:nth-child(n+5) { grid-column: auto; }
.dash-tiles.pdash-tiles .dash-tile .val { margin-top: 12px; }
.dash-tile .wh-chip {
  background: rgba(255,255,255,.16); border-color: transparent; color: #fff;
}
.dash-tile .wh-chip b { color: #fff; }
.pdash-wh { margin-top: 16px; }
.pdash-toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px;
}
.pdash-toolbar .items-search { margin-inline-start: auto; max-width: 420px; }
.pdash-toolbar select { width: auto; }
.pdash-table .table { min-width: 1100px; }
.pd-row.is-open td { background: #fff8ef; }
.pd-toggle[aria-expanded="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 1100px) {
  .dash-tiles.pdash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdash-toolbar .items-search { margin-inline-start: 0; max-width: none; width: 100%; }
}

.dash-cash { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.dash-cash > div {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  font-size: 0.95rem;
}
.dash-cash span { color: var(--muted); }
.dash-cash b { font-variant-numeric: tabular-nums; }
.dash-cash .is-total {
  margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600;
}
.dash-cash .is-total span { color: var(--ink-2); }

/* Home dashboard */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.dash-kicker {
  margin: 0 0 4px;
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dash-top h2 { margin: 0; font-size: 1.55rem; max-width: 36rem; }
.dash-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dash-chip {
  display: inline-flex; align-items: center;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  color: var(--muted); font-size: 0.82rem; font-weight: 600;
}
.dash-clock {
  background: var(--ink-2); color: #f7efe4; border-color: transparent;
  font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
}

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
.dash-home > .dash-top,
.dash-home > .dash-hero,
.dash-home > .dash-hint,
.dash-home > .dash-mid,
.dash-home > .dash-panel {
  animation: dash-rise .7s cubic-bezier(.22,.8,.2,1) both;
}
.dash-home > .dash-hero { animation-delay: .06s; }
.dash-home > .dash-tiles .dash-tile { animation: dash-rise .62s cubic-bezier(.22,.8,.2,1) both; }
.dash-home > .dash-tiles .dash-tile:nth-child(1) { animation-delay: .1s; }
.dash-home > .dash-tiles .dash-tile:nth-child(2) { animation-delay: .16s; }
.dash-home > .dash-tiles .dash-tile:nth-child(3) { animation-delay: .22s; }
.dash-home > .dash-tiles .dash-tile:nth-child(4) { animation-delay: .28s; }
.dash-home > .dash-tiles .dash-tile:nth-child(5) { animation-delay: .34s; }
.dash-home > .dash-tiles .dash-tile:nth-child(6) { animation-delay: .4s; }
.dash-home > .dash-tiles .dash-tile:nth-child(7) { animation-delay: .46s; }
.dash-home > .dash-hint { animation-delay: .42s; }
.dash-home > .dash-mid { animation-delay: .5s; }
.dash-home > .dash-mid + .dash-mid { animation-delay: .58s; }
.dash-home > .dash-panel { animation-delay: .66s; }
.dash-home .dash-hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.14) 50%, transparent 72%);
  transform: translateX(-120%);
  animation: dash-sheen 1.8s ease .35s;
  pointer-events: none;
}
html[dir="rtl"] .dash-home .dash-hero::before { animation-name: dash-sheen-rtl; }
.dash-home .dash-ring-wrap {
  animation: dash-pop .7s cubic-bezier(.18,.8,.22,1.15) .2s both;
}
.dash-home .dash-clock {
  animation: dash-clock-soft 1.8s ease-in-out infinite;
}
.dash-home .dash-svg .area {
  opacity: 0;
  animation: dash-fade .8s ease .7s forwards;
}
.dash-home .dash-svg .dot {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: dash-dot .45s ease forwards;
}
.dash-home .dash-svg .dot:nth-child(n) { animation-delay: .85s; }
.dash-home .dash-split .cash,
.dash-home .dash-split .bank { width: var(--w); animation: dash-w .9s cubic-bezier(.22,.8,.2,1) .55s both; }
.dash-home .dash-rank .copy i {
  width: var(--w);
  transform: scaleX(0);
  transform-origin: left;
  animation: dash-scale .75s cubic-bezier(.22,.8,.2,1) forwards;
}
html[dir="rtl"] .dash-home .dash-rank .copy i { transform-origin: right; }
.dash-home .dash-rank:nth-child(1) .copy i { animation-delay: .58s; }
.dash-home .dash-rank:nth-child(2) .copy i { animation-delay: .66s; }
.dash-home .dash-rank:nth-child(3) .copy i { animation-delay: .74s; }
.dash-home .dash-rank:nth-child(4) .copy i { animation-delay: .82s; }
.dash-home .dash-rank:nth-child(5) .copy i { animation-delay: .9s; }
.dash-home .dash-table tbody tr {
  animation: dash-row .45s ease both;
}
.dash-home .dash-table tbody tr:nth-child(1) { animation-delay: .62s; }
.dash-home .dash-table tbody tr:nth-child(2) { animation-delay: .68s; }
.dash-home .dash-table tbody tr:nth-child(3) { animation-delay: .74s; }
.dash-home .dash-table tbody tr:nth-child(4) { animation-delay: .8s; }
.dash-home .dash-table tbody tr:nth-child(5) { animation-delay: .86s; }
.dash-home .dash-table tbody tr:nth-child(6) { animation-delay: .92s; }
@keyframes dash-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes dash-sheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@keyframes dash-sheen-rtl {
  from { transform: translateX(120%); }
  to { transform: translateX(-120%); }
}
@keyframes dash-pop {
  from { opacity: 0; transform: scale(.82); }
  to { opacity: 1; transform: none; }
}
@keyframes dash-fade { to { opacity: 1; } }
@keyframes dash-dot {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes dash-w {
  from { width: 0; }
  to { width: var(--w); }
}
@keyframes dash-scale {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes dash-row {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes dash-clock-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,161,90,0); }
  50% { box-shadow: 0 0 0 4px rgba(224,161,90,.18); }
}
@media (prefers-reduced-motion: reduce) {
  .dash-home > .dash-top,
  .dash-home > .dash-hero,
  .dash-home > .dash-hint,
  .dash-home > .dash-mid,
  .dash-home > .dash-panel,
  .dash-home > .dash-tiles .dash-tile,
  .dash-home .dash-hero::before,
  .dash-home .dash-ring-wrap,
  .dash-home .dash-clock,
  .dash-home .dash-svg .area,
  .dash-home .dash-svg .dot,
  .dash-home .dash-split .cash,
  .dash-home .dash-split .bank,
  .dash-home .dash-rank .copy i,
  .dash-home .dash-table tbody tr {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
    width: var(--w, auto);
  }
  .dash-home .dash-ring { --p: var(--target); }
}
.dash-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 120%, rgba(193,122,58,.55), transparent 42%),
    linear-gradient(125deg, #122033 0%, #1d3b58 55%, #514b7d 130%);
  color: #fff;
  border-radius: 24px;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 168px;
  box-shadow: 0 22px 48px rgba(18, 32, 51, 0.18);
}
.dash-hero::after {
  content: "◉";
  position: absolute; right: 36px; top: 10px;
  font-size: 7rem; opacity: .08; pointer-events: none;
}
html[dir="rtl"] .dash-hero::after { right: auto; left: 36px; }
.dash-hero-copy { position: relative; z-index: 1; }
.dash-hero .lbl {
  color: #e0a15a; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.dash-hero .num {
  margin-top: 6px;
  font-size: 3.1rem; font-weight: 700; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums; line-height: 1.05;
}
.dash-hero .num span { font-size: 1rem; font-weight: 600; opacity: .75; margin-inline-start: 4px; }
.dash-hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dash-hero-pills span {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: 5px 11px; font-size: 0.82rem; color: #d8cbbd;
}
.dash-ring-wrap { position: relative; z-index: 1; flex-shrink: 0; }
.dash-ring {
  --p: 0;
  width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(#e0a15a calc(var(--p) * 1%), rgba(255,255,255,.12) 0);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 10px rgba(18,32,51,.25);
}
.dash-ring-hole {
  width: 78px; height: 78px; border-radius: 50%;
  background: #15263a;
  display: grid; place-items: center; text-align: center;
}
.dash-ring-hole b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.dash-ring-hole small { color: #d8cbbd; font-size: 0.62rem; letter-spacing: .04em; text-transform: uppercase; }
.dash-tiles {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.dash-tile { grid-column: span 3; }
.dash-tile {
  position: relative; overflow: hidden;
  border-radius: 20px; padding: 18px 18px 16px;
  color: #fff; min-height: 118px;
  box-shadow: 0 16px 32px rgba(18, 32, 51, 0.12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.dash-tile:hover { transform: translateY(-3px); box-shadow: 0 22px 36px rgba(18, 32, 51, 0.18); }
.dash-tile .mark {
  position: absolute; inset-inline-end: 14px; top: 12px;
  width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.18); font-size: 1rem;
}
.dash-tile .lbl {
  color: rgba(255,255,255,.86); font-size: 0.78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.dash-tile .val {
  margin-top: 18px; font-size: 1.55rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
}
.dash-tile .sub { margin-top: 4px; font-size: 0.78rem; opacity: .85; }
.dash-tile.c-teal { background: linear-gradient(160deg, #2dd4bf, #0f766e); }
.dash-tile.c-gold { background: linear-gradient(160deg, #fbbf24, #d97706); }
.dash-tile.c-blue { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.dash-tile.c-indigo { background: linear-gradient(160deg, #818cf8, #4f46e5); }
.dash-tile.c-rose { background: linear-gradient(160deg, #fb7185, #e11d48); }
.dash-tile.c-green { background: linear-gradient(160deg, #34d399, #059669); }
.dash-tile.c-copper { background: linear-gradient(160deg, #e0a15a, #9a5a24); }
.dash-tile:nth-child(n+5) { grid-column: span 4; }
.dash-hint { margin: 0; }
.dash-mid { display: grid; grid-template-columns: 1.45fr 0.9fr; gap: 16px; }
.dash-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px 16px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,.72);
  overflow: hidden;
}
.dash-panel header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}
.dash-panel header h3 { margin: 0; font-size: 1.05rem; }
.dash-panel header .lbl { margin: 0; color: var(--muted); font-size: 0.78rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.dash-panel header strong { display: block; margin-top: 4px; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.dash-panel header strong span { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.dash-svg { margin: 0 -6px; }
.dash-svg svg { width: 100%; height: 220px; display: block; overflow: visible; }
.dash-svg .grid { stroke: #eadfce; stroke-width: 1; }
.dash-svg .line { stroke: #c17a3a; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.dash-svg .dot { fill: #fff; stroke: #c17a3a; stroke-width: 3; }
.dash-axis {
  display: flex; gap: 4px; margin-top: 4px;
  font-size: 0.68rem; color: var(--muted);
}
.dash-axis span { flex: 1; text-align: center; white-space: nowrap; }
.dash-split {
  display: flex; height: 14px; border-radius: 999px; overflow: hidden;
  background: #efe6d8; margin: 8px 0 16px;
}
.dash-split i { display: block; height: 100%; min-width: 0; }
.dash-split .cash { background: linear-gradient(90deg, #34d399, #059669); }
.dash-split .bank { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.dash-cash-card .dash-cash > div { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; }
.dash-cash-card .dash-cash span { color: var(--muted); }
.dash-cash-card .hint { margin: 14px 0 0; }
.swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.swatch.cash { background: #059669; }
.swatch.bank { background: #2563eb; }
.dash-count { margin: 0 0 10px; color: var(--muted); font-size: 0.84rem; }
.dash-ranks { display: flex; flex-direction: column; gap: 10px; }
.dash-rank {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px; align-items: center;
}
.dash-rank .n {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center;
  background: #f4efe8; color: var(--ink-2); font-size: 0.82rem;
}
.dash-rank:nth-child(1) .n { background: #e0a15a; color: #fff; }
.dash-rank:nth-child(2) .n { background: #c9d4e4; color: #1b334c; }
.dash-rank:nth-child(3) .n { background: #e8cbb0; color: #6a3d18; }
.dash-rank .copy { min-width: 0; }
.dash-rank .copy strong { display: block; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-rank .copy span { display: block; color: var(--muted); font-size: 0.75rem; margin: 2px 0 5px; }
.dash-rank .copy i {
  display: block; height: 6px; border-radius: 99px;
  background: linear-gradient(90deg, #e0a15a, #c17a3a);
  max-width: 100%;
}
.dash-rank em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-table thead th {
  background: #122033; color: #f7efe4; border: 0;
  letter-spacing: .04em; text-transform: uppercase; font-size: 0.72rem;
}
.dash-table tbody tr:hover td { background: #f7efe4; }
.dash-table tr.is-out td { background: #fdecec; }
.pill {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.pill.ok { background: #e8f1ea; color: #2f6b4f; }
.pill.warn { background: #f7efe4; color: #8a5628; }
.pill.bad { background: #fdecec; color: #8a3232; }
@media (max-width: 1100px) {
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-tile, .dash-tile:nth-child(n+5) { grid-column: auto; }
  .dash-mid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .dash-tiles { grid-template-columns: 1fr 1fr; }
  .dash-hero { flex-direction: column; align-items: flex-start; padding: 20px 18px; }
  .dash-hero::after { font-size: 4.5rem; right: 16px; }
}

.items-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
}
.items-head-copy { min-width: 0; }
.items-head .items-new-btn {
  justify-self: end;
  align-self: center;
  width: auto;
  min-width: 132px;
}
.items-hint { grid-column: 1 / -1; margin: 0; max-width: 52rem; }
.items-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.items-tiles .dash-tile,
.items-tiles .dash-tile:nth-child(n+5) { grid-column: auto; }
.items-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-bottom: 12px;
}
.items-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.items-search { margin-inline-start: auto; max-width: 360px; }
.items-search input { min-width: 0; }
.items-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.items-pager select { width: auto; }
.btn.is-off { pointer-events: none; opacity: .38; }
.items-page.is-loading .sheet { opacity: .55; }
.item-sheet-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-gutter: stable;
  outline: none;
}
.item-sheet-wrap:focus-visible {
  box-shadow: inset 0 0 0 2px #2b6cb0;
}
.item-sheet-wrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.item-sheet-wrap.is-dragging * { cursor: grabbing; }
.cell-sub {
  display: block; padding: 0 12px 8px; margin-top: -4px;
  color: var(--muted); font-size: 0.72rem;
}
.stock-cell .pill { margin: 0 10px 8px; }
.margin-cell { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.item-create-panel .form-actions { margin-top: 8px; }
.items-page .table.sheet { min-width: 1320px; }
.items-page .table.sheet th:nth-child(1),
.items-page .table.sheet td:nth-child(1) { min-width: 148px; }
.items-page .table.sheet th:nth-child(2),
.items-page .table.sheet td:nth-child(2) { min-width: 240px; }
.item-create-card.item-create-full {
  width: min(920px, 100%);
  max-height: min(94vh, 920px);
}
.item-create-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.item-create-grid .field.full { grid-column: 1 / -1; }
@media (max-width: 980px) {
  .item-create-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .items-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .items-search { margin-inline-start: 0; max-width: none; width: 100%; }
}

.acct-page { display: flex; flex-direction: column; gap: 16px; }
.acct-switch { margin: 0; }
.acct-form { overflow: visible; }
.acct-form header h3 { margin: 0; }
.proof-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8a4f1f;
  font-weight: 600;
}
.proof-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.proof-add-btn {
  display: inline-flex;
  cursor: pointer;
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 600;
}
.proof-add-btn input { display: none; }
.proof-view {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(14, 26, 40, .55);
  display: grid;
  place-items: center;
  padding: 24px;
}
.proof-view[hidden] { display: none; }
.proof-view-card {
  position: relative;
  width: min(920px, 100%);
  max-height: 90vh;
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.proof-view-card img,
.proof-view-card iframe {
  display: block;
  width: 100%;
  height: min(86vh, 820px);
  border: 0;
  object-fit: contain;
  background: #111;
}
.proof-view-x {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #111;
  font-size: 1.3rem;
  cursor: pointer;
}
.party-page { display: flex; flex-direction: column; gap: 16px; }
.dash-tiles.party-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dash-tiles.party-tiles .dash-tile,
.dash-tiles.party-tiles .dash-tile:nth-child(n+5) { grid-column: auto; }
#supplier-table { width: max(100%, 1280px); }
#supplier-table th, #supplier-table td { white-space: nowrap; }
#supplier-table td:nth-child(1), #supplier-table th:nth-child(1) { min-width: 148px; }
#supplier-table td:nth-child(2), #supplier-table th:nth-child(2) { min-width: 220px; }
#supplier-table td:nth-child(3), #supplier-table th:nth-child(3) { min-width: 140px; }
#supplier-table td:nth-child(4),
#supplier-table td:nth-child(5),
#supplier-table td:nth-child(6),
#supplier-table td:nth-child(7),
#supplier-table th:nth-child(4),
#supplier-table th:nth-child(5),
#supplier-table th:nth-child(6),
#supplier-table th:nth-child(7) { min-width: 100px; }
#supplier-table td:nth-child(8), #supplier-table th:nth-child(8) { min-width: 120px; }
#customer-table td:nth-child(1), #customer-table th:nth-child(1) { min-width: 148px; }
#customer-table td:nth-child(2), #customer-table th:nth-child(2) { min-width: 220px; }
#customer-table td:nth-child(3), #customer-table th:nth-child(3) { min-width: 140px; }
#customer-table td:nth-child(4),
#customer-table td:nth-child(5),
#customer-table td:nth-child(6),
#customer-table th:nth-child(4),
#customer-table th:nth-child(5),
#customer-table th:nth-child(6) { min-width: 100px; }
#customer-table td:nth-child(7), #customer-table th:nth-child(7),
#customer-table td:nth-child(8), #customer-table th:nth-child(8) { min-width: 120px; }
.party-page .dash-panel { overflow: hidden; }
@media (max-width: 1100px) {
  .dash-tiles.party-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.lux-page { display: flex; flex-direction: column; gap: 16px; }
.lux-page .dash-panel header h3 { font-size: 1.08rem; }
.inv-page .inv-form { overflow: visible; }
.inv-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  margin-bottom: 16px;
  align-items: end;
}
.inv-meta .customer-field,
.inv-meta .sale-quote-field,
.inv-meta .inv-find { grid-column: span 1; }
.inv-meta .sale-quote-field .dn-fetch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.inv-meta .inv-save { justify-self: start; }
.inv-suggest { display: flex; flex-wrap: wrap; gap: 8px; min-height: 0; margin: 0 0 12px; }
.inv-suggest .btn { box-shadow: none; }
.inv-lines { width: 100%; }
.inv-lines input { padding: 8px 10px; }
.inv-totals {
  display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 28px;
  margin-top: 16px; padding: 16px 20px; border-radius: 16px;
  background: linear-gradient(125deg, #122033 0%, #1d3b58 55%, #8a4f1f 150%);
  color: #f7efe4;
}
.inv-totals div { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.inv-totals span {
  font-size: 0.68rem; letter-spacing: .12em; text-transform: uppercase;
  color: #d8cbbd; font-weight: 700;
}
.inv-totals b { font-size: 1.2rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.inv-totals .grand b { color: #e0a15a; font-size: 1.4rem; }
#invoice-table { width: max(100%, 1100px); }
#invoice-table th, #invoice-table td, #customer-table th, #customer-table td,
#stock-table th, #stock-table td { white-space: nowrap; }
#customer-table { width: max(100%, 1180px); }
.settings-page .dash-panel { max-width: 760px; overflow: visible; }
.settings-page .form-grid { margin-top: 4px; }
.settings-page .form-grid .field.full { grid-column: 1 / -1; }
.acct-kpis.dash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.acct-kpis .dash-tile, .acct-kpis .dash-tile:nth-child(n+5) { grid-column: auto; }
.payroll-page .row-form { margin-bottom: 0; }
input.doc-no-changed {
  outline: 2px solid #c4a574;
  background: #fff8ee;
}
@media (max-width: 980px) {
  .inv-meta { grid-template-columns: 1fr; }
  .inv-meta .customer-field, .inv-meta .sale-quote-field, .inv-meta .inv-find { grid-column: auto; }
  .acct-kpis.dash-tiles { grid-template-columns: 1fr 1fr; }
}

.s2-page { gap: 0; }
.s2-chrome {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: visible;
  box-shadow: var(--shadow-soft);
}
.s2-chrome .doc-titlebar {
  align-items: center;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 0;
  border-radius: 21px 21px 0 0;
  background: linear-gradient(118deg, #122033 0%, #1a3a58 62%, #8a5628 160%);
  color: #f7efe4;
}
.s2-chrome .doc-titlebar h2 {
  color: #fff;
  font-size: 1.45rem;
  letter-spacing: -.02em;
  max-width: none;
}
.s2-chrome .doc-tabs a {
  background: rgba(255,255,255,.1);
  color: #f7efe4;
  border-color: rgba(255,255,255,.2);
}
.s2-chrome .doc-tabs a.on {
  background: #e0a15a;
  color: #122033;
  border-color: #e0a15a;
  box-shadow: 0 6px 14px rgba(224,161,90,.28);
}
.s2-chrome .doc-card,
.s2-chrome > .card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.s2-chrome .s2-toolbar,
.s2-chrome .doc-toolbar {
  background: linear-gradient(180deg, #f7efe4, #efe4d4);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  gap: 10px;
}
.s2-chrome .s2-toolbar .btn,
.s2-chrome .doc-toolbar .btn {
  box-shadow: 0 6px 14px rgba(18, 32, 51, .12);
  font-weight: 700;
  transition: transform .12s ease, filter .12s ease;
}
.s2-chrome .s2-toolbar .btn:hover,
.s2-chrome .doc-toolbar .btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.s2-page .s2-save-list { background: linear-gradient(180deg, #86b872, #6a9e58); border-color: #6a9e58; }
.s2-page .s2-blue { background: linear-gradient(180deg, #3eaaee, #1f8ad4) !important; border-color: #1f8ad4 !important; }
.s2-page .s2-zatca { background: linear-gradient(180deg, #32c8ba, #1aa99c); border-color: #1aa99c; }
.s2-page #invoice-no { font-weight: 700; letter-spacing: .02em; background: #fff7ee; }
.s2-page .s2-payment-box strong { font-size: 1.05rem; }
