/* عقود · AQOD — interface styles (font: Readex Pro). Colours, spacing and motion come from design/*.dc.html. */
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-arabic-400-normal.6eafd6182b4d.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-latin-400-normal.3f7999f83306.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-arabic-500-normal.23c223b860c9.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-latin-500-normal.1983a51eceb5.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-arabic-600-normal.3d610c338aca.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-latin-600-normal.2c9cb7c7523a.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-arabic-700-normal.ce9b54583d4d.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-latin-700-normal.b7a6a27dcf2a.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-arabic-700-normal.ce9b54583d4d.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EEFF; }
@font-face { font-family: "ReadexPro"; src: url("../fonts/readex-pro-latin-700-normal.b7a6a27dcf2a.woff2") format("woff2"); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================================
   Tokens. Brand: navy #0B2A6B and blue #1F5AD6 from the AQOD mark.
   The canvas is a neutral cool grey so the blue only marks action and state.
   ========================================================================== */
:root {
  --night: #0B2A6B; --night-2: #08215A; --blue-d: #1747B8; --blue: #1F5AD6; --blue-m: #7FA6F2; --sky: #9DBCF7;
  --pale: #C9DAFB; --mist: #E9EFFC; --bg: #F5F6F8; --surface: #FFFFFF;
  --line: #E2E6ED; --line-2: #EEF1F5; --line-3: #D3D9E3;
  --ink: #0F1B33; --ink-2: #2A3650; --muted: #5B6678; --faint: #8A94A6;
  --amber: #D9961A; --amber-bg: #FDF3E1; --amber-fg: #8A5300;
  --field: #FFFFFF; --hover: #F7F8FA;
  --r-lg: 12px; --r: 8px; --r-sm: 6px;
  --lift: 0 16px 36px -14px rgba(15,27,51,.22), 0 2px 6px rgba(15,27,51,.05);
  --font: "ReadexPro", system-ui, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  --pad: 32px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-d); } a:hover { color: var(--night); }
h1, h2, h3 { margin: 0; }
b, strong { font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::placeholder { color: #A0A9B8; }
::selection { background: #D3E0FA; }
.num, .en { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.en { font-family: "ReadexPro", sans-serif; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .hidden { display: none !important; }
.pat-d { background-image: url("../brand/aqod-pattern-dark.259ece8f9c55.svg"); background-size: 56px 56px; }
.pat-l { background-image: url("../brand/aqod-pattern-light.6ad510cd45c3.svg"); background-size: 56px 56px; }
.pat-move { animation: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pop { animation: pop .5s cubic-bezier(.3,1.6,.5,1) both; }
.spin { animation: spin .8s linear infinite; }
.shake { animation: shake .4s ease; }

/* ==========================================================================
   App shell: flat navy side list, white page header band, grey canvas
   ========================================================================== */
.shell { min-height: 100vh; display: flex; align-items: stretch; }
.side { position: sticky; top: 0; height: 100vh; flex: none; width: 252px; background: var(--night); color: #C3D2F0; display: flex; flex-direction: column; padding: 0 12px 14px; isolation: isolate; z-index: 40; }
.side .pat { position: absolute; top: 0; right: 0; left: 0; height: 132px; z-index: -1; pointer-events: none; opacity: .55; -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 45%, transparent 100%); }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 8px 20px; margin-bottom: 8px; text-decoration: none; color: #fff; border-bottom: 1px solid rgba(255,255,255,.09); }
.brand img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.brand b { font-size: 20px; font-weight: 700; line-height: 1.2; } .brand .lat { font-size: 10.5px; font-weight: 600; letter-spacing: .22em; color: var(--sky); margin-inline-start: 8px; }
.brand .sub { display: block; font-size: 11.5px; color: #9FB5E3; line-height: 1.35; margin-top: 2px; }
.brand:hover { color: #fff; }
.nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.nav .ind { display: none; }
.nav a { position: relative; height: 40px; padding: 0 12px; border-radius: var(--r); display: flex; align-items: center; gap: 11px; text-decoration: none; color: #C3D2F0; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a svg { flex: none; opacity: .85; }
.nav a.on { color: #fff; font-weight: 600; background: rgba(255,255,255,.11); }
.nav a.on::before { content: ""; position: absolute; inset-inline-start: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sky); }
.nav a.on svg { opacity: 1; }
.nav .badge { margin-inline-start: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: rgba(157,188,247,.22); color: #fff; font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.nav-group { display: block; padding: 18px 12px 6px; font-size: 11.5px; color: #7F97CC; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.09); display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.me .av { width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: var(--night); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; font-size: 14px; }
.me b { color: #fff; font-size: 13.5px; display: block; line-height: 1.35; font-weight: 600; } .me span { font-size: 12px; color: #9FB5E3; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tools a, .tools button { height: 36px; border: 1px solid rgba(255,255,255,.1); border-radius: var(--r); background: transparent; color: #C3D2F0; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; }
.tools a:hover, .tools button:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-collapsed .side { width: 72px; padding-inline: 10px; }
.side-collapsed .side .brand { justify-content: center; padding-inline: 0; }
.side-collapsed .side .brand > span, .side-collapsed .side .nav a > span, .side-collapsed .side .me > span:last-child, .side-collapsed .nav .badge, .side-collapsed .nav-group { display: none; }
.side-collapsed .nav a { justify-content: center; padding: 0; }
.side-collapsed .nav a.on::before { inset-inline-start: -10px; }
.side-collapsed .tools { grid-template-columns: 1fr; }
.side-collapsed .me { justify-content: center; }

.main { flex: 1; min-width: 0; padding: 0 var(--pad) 40px; display: flex; flex-direction: column; gap: 20px; animation: fadeIn .35s ease both; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 20px; flex-wrap: wrap; margin: 0 calc(var(--pad) * -1) 4px; padding: 22px var(--pad) 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: 24px !important; font-weight: 700; line-height: 1.35; letter-spacing: -.005em; }
.page-head p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }
.crumb { font-size: 12.5px; color: var(--muted); } .crumb a { text-decoration: none; color: var(--muted); } .crumb a:hover { color: var(--blue-d); }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 460px; display: block; }
.search > span, .search svg { position: absolute; right: 12px; top: 50% !important; transform: translateY(-50%); color: var(--faint); display: flex; }
.search input { width: 100%; height: 40px; border: 1px solid var(--line-3); border-radius: var(--r); background: var(--field); padding: 0 42px 0 12px; font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:hover { border-color: #B8C2D3; }
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,90,214,.15); }
.stg > * { animation: none; }
.msgs { position: fixed; top: 16px; left: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.msg { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; background: var(--night); color: #fff; box-shadow: var(--lift); animation: toastIn .3s var(--ease) both; }
.msg::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); flex: none; }
.msg.success, .msg.info { animation: toastIn .3s var(--ease) both, toastOut .4s ease 6s forwards; }
.msg.error, .msg.warning { background: #fff; color: var(--amber-fg); border: 1px solid #F1D3A0; }
.msg.error::before, .msg.warning::before { background: var(--amber); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); visibility: hidden; } }

/* ==========================================================================
   Buttons, status pills, panels
   ========================================================================== */
.btn { position: relative; height: 40px; padding: 0 14px; border: 1px solid var(--line-3); border-radius: var(--r); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.btn:hover { background: var(--hover); border-color: #B8C2D3; color: var(--ink); }
.btn:active { background: #EEF1F5; }
.btn .ico { color: inherit; }
.btn.primary { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(11,42,107,.25); }
.btn.primary:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn.primary:active { background: var(--night); }
.btn.dark { border-color: var(--night); background: var(--night); color: #fff; }
.btn.warn { border-color: #EBC67F; color: var(--amber-fg); background: var(--amber-bg); }
.btn.warn:hover { border-color: var(--amber); background: #FBEACB; color: var(--amber-fg); }
.btn.sm { height: 34px; padding: 0 11px; font-size: 13px; }
.btn.lg { height: 46px; font-size: 15px; padding: 0 18px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.outline-blue { border: 1px solid var(--line-3); background: var(--surface); color: var(--blue-d); }
.btn.outline-blue:hover { border-color: var(--blue); background: #F6F8FE; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; white-space: nowrap; background: #EFF1F5; color: #44516A; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #A3ADBF; }
.pill.submitted { background: #E6EEFD; color: var(--blue-d); } .pill.submitted i { background: var(--blue); }
.pill.returned { background: var(--amber-bg); color: var(--amber-fg); } .pill.returned i { background: var(--amber); }
.pill.approved { background: var(--night); color: #fff; } .pill.approved i { background: var(--sky); }
.pill.archived { background: #F1F2F5; color: var(--faint); }
.pill.issued { background: var(--night); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card-h { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); min-height: 60px; }
.card-h .ci { width: 32px; height: 32px; border-radius: var(--r); background: var(--mist); color: var(--blue-d); display: flex; align-items: center; justify-content: center; flex: none; }
.card-h .ci svg { width: 17px; height: 17px; }
.card-h b { font-size: 15px; font-weight: 600; display: block; line-height: 1.4; } .card-h small { font-size: 12.5px; color: var(--muted); }
.card-b { padding: 18px 20px 20px; }
.card:focus-within { border-color: #C9D4E8; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: #EDF0F4; border-radius: var(--r); }
.seg label { cursor: pointer; } .seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; height: 32px; padding: 0 13px; border-radius: 6px; font-size: 13px; color: var(--muted); transition: background .15s, color .15s; white-space: nowrap; }
.seg input:checked + span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(15,27,51,.12), 0 0 0 1px rgba(15,27,51,.04); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }
.seg.full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
.seg.white { background: #EDF0F4; border: 0; }
.seg.white .btn { height: 32px; border: 0 !important; background: transparent; color: var(--muted); font-weight: 500; box-shadow: none; border-radius: 6px; }
.seg.white .btn:hover { color: var(--ink); background: rgba(255,255,255,.6); }
.seg.white .btn.primary { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(15,27,51,.12), 0 0 0 1px rgba(15,27,51,.04); }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span.l, .field > label.l { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .help, .help { font-size: 12px; color: var(--faint); } .field .err { font-size: 12.5px; color: var(--amber-fg); }
.in { width: 100%; height: 40px; border: 1px solid var(--line-3); border-radius: var(--r); background: var(--field); padding: 0 12px; font-size: 14px; transition: border-color .15s, box-shadow .15s; }
.in:hover { border-color: #B8C2D3; } .in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,90,214,.15); }
.in[disabled], .in[readonly] { background: #F4F6F9; color: var(--muted); }
textarea.in { height: auto; padding: 10px 12px; line-height: 1.6; } select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%238A94A6' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 11px center; padding-inline-end: 12px; padding-inline-start: 32px; }
.in.en, .in.num { font-family: "ReadexPro", sans-serif; text-align: right; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.toggle { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-3); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s; }
.toggle:hover { border-color: #B8C2D3; } .toggle input { position: absolute; opacity: 0; }
.toggle .trk { flex: none; position: relative; width: 36px; height: 20px; border-radius: 999px; background: #CBD3E0; transition: background .2s; }
.toggle .trk::after { content: ""; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: right .2s var(--ease); }
.toggle input:checked ~ .trk { background: var(--blue); } .toggle input:checked ~ .trk::after { right: 18px; }
.toggle input:focus-visible ~ .trk { outline: 2px solid var(--blue); outline-offset: 2px; }
.toggle b { font-size: 13.5px; display: block; line-height: 1.4; font-weight: 600; } .toggle small { font-size: 12px; color: var(--faint); }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--blue); }

/* ==========================================================================
   Ledger rows and tables
   ========================================================================== */
.rows { overflow-x: auto; } .rows > div { min-width: 720px; }
.row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 150px 130px 36px; gap: 16px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-2); transition: background .12s; animation: none !important; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--hover); }
.row.head { min-height: 40px; padding-block: 0; background: #FAFBFC; font-size: 12px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
.row.head:hover { background: #FAFBFC; }
.row .go { width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; transition: background .12s, color .12s, border-color .12s; }
.row:hover .go { border-color: var(--line-3); color: var(--ink); }
.row .go:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.row .cell-party { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir { width: 32px; height: 32px; border-radius: var(--r); background: var(--mist); color: var(--blue-d); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.dir.sell { background: var(--night); color: #fff; }
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: start; font-size: 12px; font-weight: 500; color: var(--muted); background: #FAFBFC; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover td { background: var(--hover); }
.empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.empty img { width: 64px; height: 64px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 8px #fff; }

/* ==========================================================================
   Dashboard: navy summary band and the approval pipeline
   ========================================================================== */
.kpis { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--r-lg); background: var(--night); color: #fff; }
.kpis > .pat-d { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .7; -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.35) 40%, transparent 70%); mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.35) 40%, transparent 70%); }
.kc { position: relative; padding: 22px 26px 24px; display: flex; flex-direction: column; gap: 4px; min-height: 148px; }
.kc + .kc { border-inline-start: 1px solid rgba(255,255,255,.12); }
.kc .t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #C3D2F0; }
.kc .t i { width: 26px; height: 26px; border-radius: 7px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; }
.kc .v { font-size: 36px; font-weight: 700; line-height: 1.15; margin-top: 10px; text-align: right; letter-spacing: -.01em; }
.kc .s { font-size: 12.5px; color: #9FB5E3; }
.kc svg.spark { position: absolute; left: 20px; bottom: 18px; width: 42%; height: 56px; opacity: .9; }
.spk { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s .2s cubic-bezier(.4,0,.2,1) forwards; } @keyframes draw { to { stroke-dashoffset: 0; } }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 16px; text-align: start; color: var(--ink); text-decoration: none; transition: background .15s; border-inline-start: 1px solid var(--line-2); }
.tile:first-child { border-inline-start: 0; }
.tile:hover { background: var(--hover); color: var(--ink); }
.tile.on { background: #F6F8FE; box-shadow: inset 0 -2px 0 var(--blue); border-color: var(--line-2) !important; padding: 18px 20px 16px; }
.tile .tt { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.tile .tt i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 8px; }
.tile .tt small { font-weight: 500; color: var(--faint); }
.tile .n { font-size: 30px; font-weight: 700; line-height: 1.15; text-align: right; margin-top: 2px; }
.tile small { font-size: 12px; color: var(--muted); }
.tile .bar { height: 4px; border-radius: 2px; background: #EDF0F4; overflow: hidden; margin-top: 6px; } .tile .bar b { display: block; height: 100%; border-radius: 2px; transition: width .8s var(--ease); }
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; } .cols > .wide { flex: 999 1 560px; min-width: 0; } .cols > .narrow { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.att { display: flex; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); transition: background .12s; } .att:hover { background: var(--hover); color: var(--ink); }
.att .ic { width: 34px; height: 34px; border-radius: var(--r); background: var(--mist); color: var(--blue-d); display: flex; align-items: center; justify-content: center; flex: none; } .att .ic.amber { background: var(--amber-bg); color: var(--amber-fg); }
.split { position: relative; } .menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; width: 240px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--lift); opacity: 0; visibility: hidden; transform: translateY(-4px); transform-origin: top left; transition: opacity .15s, transform .15s, visibility .15s; }
.menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.split:hover .menu, .split:focus-within .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r); text-decoration: none; color: var(--ink); transition: background .12s; } .menu a:hover { background: var(--hover); }
.menu a.soon { opacity: .55; pointer-events: none; } .menu small { display: block; font-size: 12px; color: var(--muted); }
.parties-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pcard { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s, background .15s; }
.pcard:hover { border-color: var(--blue-m); background: #FBFCFE; color: var(--ink); }
.pcard .av { width: 42px; height: 42px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--mist); color: var(--blue-d); } .pcard .av.imp { background: var(--night); color: #fff; }

/* ==========================================================================
   Sign-in and sign-up
   ========================================================================== */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; }
.auth-form { flex: 1 1 480px; min-width: 0; padding: 36px 32px; display: flex; flex-direction: column; }
.auth-form .brand { color: var(--night); align-self: flex-start; padding: 0; margin: 0; border: 0; } .auth-form .brand img { width: 38px; height: 38px; } .auth-form .brand b { font-size: 20px; } .auth-form .brand .lat { color: var(--blue); }
.auth-mid { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; } .auth-box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.auth-box h1 { font-size: 28px; font-weight: 700; line-height: 1.35; } .auth-box > p, .lead { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.7; }
.enter > * { animation: rise .5s var(--ease) both; } .enter > *:nth-child(2) { animation-delay: .05s; } .enter > *:nth-child(3) { animation-delay: .1s; } .enter > *:nth-child(4) { animation-delay: .15s; } .enter > *:nth-child(5) { animation-delay: .2s; } .enter > *:nth-child(6) { animation-delay: .25s; }
.fld { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 12px 0 6px; border-radius: 10px; border: 1px solid var(--line-3); background: #fff; transition: border-color .15s, box-shadow .15s; }
.fld:hover { border-color: #B8C2D3; } .fld:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,90,214,.15); }
.fld.bad { border-color: var(--amber); } .fld .ic { display: flex; color: var(--faint); padding-inline-start: 4px; } .fld:focus-within .ic { color: var(--blue); }
.fld input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 15px; outline: none; }
.eye { width: 34px; height: 34px; border: 0; border-radius: var(--r); background: transparent; color: var(--faint); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; } .eye:hover { background: var(--hover); color: var(--blue); }
.alert { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--amber-bg); color: var(--amber-fg); font-size: 13.5px; border: 1px solid #F1D3A0; }
.lk { position: relative; text-decoration: none; font-weight: 600; } .lk:hover { text-decoration: underline; text-underline-offset: 3px; }
.or { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--faint); } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-foot { margin: 0; font-size: 12.5px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.stepper { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-bottom: 4px; }
.stepper .track { position: absolute; top: 16px; right: 16.66%; left: 16.66%; height: 2px; border-radius: 2px; background: var(--line); } .stepper .track b { position: absolute; right: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 2px; transition: width .4s var(--ease); width: 0; }
.stepper .st { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--faint); }
.stepper .st i { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 600; box-shadow: 0 0 0 5px #fff; background: #fff; border: 1.5px solid var(--line-3); color: var(--faint); transition: all .25s; }
.stepper .st.cur { color: var(--ink); } .stepper .st.cur i { border-color: var(--blue); color: var(--blue); } .stepper .st.done { color: var(--ink); } .stepper .st.done i { background: var(--blue); border-color: var(--blue); color: #fff; }
.step { display: none; flex-direction: column; gap: 16px; } .step.on { display: flex; animation: rise .35s var(--ease) both; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.role { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 10px; border: 1px solid var(--line-3); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; } .role input { position: absolute; opacity: 0; }
.role:has(input:checked) { border-color: var(--blue); background: #F6F8FE; box-shadow: inset 0 0 0 1px var(--blue); } .role .ri { width: 34px; height: 34px; border-radius: var(--r); flex: none; display: flex; align-items: center; justify-content: center; background: var(--mist); color: var(--blue-d); }
.role:has(input:checked) .ri { background: var(--blue); color: #fff; } .role b { display: block; font-size: 14px; } .role small { font-size: 12px; color: var(--muted); }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; } .meter i { height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; margin: 0; padding: 0; } .rules li { list-style: none; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }
.rules li i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-3); flex: none; transition: all .2s; } .rules li.ok { color: var(--blue-d); } .rules li.ok i { background: var(--blue); box-shadow: none; }
.summary { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: 10px; background: #FAFBFC; border: 1px solid var(--line); font-size: 14px; } .summary > span { display: flex; justify-content: space-between; gap: 12px; } .summary .muted { color: var(--muted); }
.done-box { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.done-box .badge-ok { width: 88px; height: 88px; border-radius: 24px; background: var(--blue); display: flex; align-items: center; justify-content: center; box-shadow: 0 18px 36px -18px rgba(31,90,214,.9); }
.dr { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s .3s cubic-bezier(.6,0,.2,1) forwards; } .dr2 { animation-delay: .75s; }
.brand-side { flex: 1.15 1 560px; min-width: 0; position: relative; isolation: isolate; overflow: hidden; background: var(--night); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 56px 40px; min-height: 640px; }
.brand-side .pat-d { position: absolute; inset: 0; z-index: -2; opacity: .8; -webkit-mask-image: radial-gradient(circle at 50% 40%, transparent 0 16%, #000 46%, transparent 84%); mask-image: radial-gradient(circle at 50% 40%, transparent 0 16%, #000 46%, transparent 84%); }
.glow { position: absolute; z-index: -1; top: 10%; left: 50%; width: 520px; height: 520px; margin-left: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(31,90,214,.55) 0%, rgba(31,90,214,0) 65%); }
.orbit { position: relative; width: 340px; height: 340px; flex: none; } .orbit .o2 { position: absolute; inset: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.orbit .o1 { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(255,255,255,.24); animation: spin 90s linear infinite; }
.orbit .bd { position: absolute; width: 46px; height: 46px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; animation: spin 90s linear infinite reverse; }
.orbit .tilebig { position: absolute; top: 50%; left: 50%; width: 160px; height: 160px; margin: -80px 0 0 -80px; border-radius: 40px; background: #fff; box-shadow: 0 36px 64px -30px rgba(3,12,40,.9); display: flex; align-items: center; justify-content: center; }
@keyframes float { 50% { transform: translateY(-8px); } }
.brand-side h2 { font-size: 30px; font-weight: 700; line-height: 1.45; text-align: center; } .brand-side p { margin: 0; font-size: 15px; color: var(--pale); line-height: 1.8; text-align: center; max-width: 480px; }
.flowrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.gc { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); font-size: 13.5px; font-weight: 600; }
.gc.final { background: #fff; color: var(--night); border-color: #fff; } .gc i { width: 8px; height: 8px; border-radius: 50%; background: var(--pale); }
.flowline { stroke-dasharray: 4 6; animation: dash 1.2s linear infinite; } @keyframes dash { to { stroke-dashoffset: -20; } }

/* ==========================================================================
   Contract editor
   ========================================================================== */
.editor { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.editor-form { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.preview { flex: 0 0 476px; width: 476px; max-width: 100%; min-width: 0; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; }
.preview .frame { position: relative; width: 476px; height: 673px; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 24px 48px -28px rgba(15,27,51,.45), 0 0 0 1px var(--line); }
.preview iframe { position: absolute; top: 0; right: 0; width: 794px; height: 1123px; border: 0; transform: scale(.5995); transform-origin: top right; background: #fff; }
.preview .live { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; } .preview .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #DCE6FA; }
.fullscreen .preview-fs { position: fixed; inset: 0; z-index: 90; background: rgba(8,22,58,.82); display: flex; align-items: center; justify-content: center; }
.preview-fs { display: none; } .preview-fs iframe { width: 794px; height: 1123px; border: 0; background: #fff; transform: scale(var(--fs, .8)); transform-origin: center; flex: none; } .fullscreen .preview-fs { display: flex; } .preview-fs button { position: absolute; top: 16px; left: 16px; }
.party-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pty { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: #FAFBFC; }
.pty.first { border-color: #BFD0F3; background: #F6F8FE; } .pty .cap { font-size: 12px; font-weight: 600; color: var(--muted); } .pty.first .cap { color: var(--blue-d); }
.pty .who { display: flex; align-items: center; gap: 10px; } .pty .av { width: 38px; height: 38px; border-radius: var(--r); background: var(--night); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.pty .addr { padding: 10px 12px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); font-size: 11.5px; line-height: 1.6; color: var(--ink-2); } .pty .addr small { display: flex; justify-content: space-between; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.pty select { height: 38px; font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; } .tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); background: var(--mist); color: var(--blue-d); font-size: 11.5px; font-weight: 600; } .tag.no { background: var(--amber-bg); color: var(--amber-fg); }
.irow { display: grid; grid-template-columns: 110px 130px minmax(0, 1fr) 30px; gap: 10px 8px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fff; transition: border-color .15s; } .irow:hover, .irow:focus-within { border-color: var(--line-3); }
.irow .top { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 124px; gap: 8px; align-items: end; } .irow .del { opacity: .45; width: 30px; height: 30px; border: 0; border-radius: var(--r); background: transparent; color: var(--faint); cursor: pointer; transition: opacity .15s, background .15s; } .irow:hover .del { opacity: 1; } .irow .del:hover { background: var(--amber-bg); color: var(--amber-fg); }
.bilingual { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .irow .in { height: 38px; font-size: 13.5px; } .irow .lab { font-size: 12px; font-weight: 500; color: var(--muted); }
.add { margin-top: 4px; height: 38px; padding: 0 14px; border: 1px dashed var(--line-3); border-radius: var(--r); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--blue-d); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: border-color .15s, background .15s; } .add:hover { border-color: var(--blue); background: #F6F8FE; }
.drop { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px dashed var(--line-3); border-radius: 10px; background: #fff; transition: border-color .15s, background .15s; } .drop:hover, .drop.over { border-color: var(--blue); background: #F6F8FE; }
.drop .dic { width: 40px; height: 40px; border-radius: var(--r); background: var(--mist); color: var(--blue-d); display: flex; align-items: center; justify-content: center; flex: none; }
.official { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .official > span { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--r); background: #FAFBFC; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); } .official b { font-size: 14px; color: var(--ink); }
.actionbar { position: sticky; bottom: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px var(--pad); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 calc(var(--pad) * -1) -40px; }
.actionbar .grow { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; } .actionbar .btn { height: 42px; } .actionbar .total { font-size: 13px; color: var(--muted); } .actionbar .total b { font-family: "ReadexPro", sans-serif; font-size: 18px; font-weight: 700; color: var(--ink); direction: ltr; display: inline-block; margin-inline-start: 6px; }
.autosave { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }
.note-box { padding: 12px 16px; border-radius: 10px; background: var(--amber-bg); color: var(--amber-fg); font-size: 14px; border: 1px solid #F1D3A0; }
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.timeline li { position: relative; display: flex; flex-direction: column; padding: 8px 0 8px; padding-inline-start: 20px; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border-bottom: 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-m); }
.timeline small { color: var(--faint); }
.timeline li > a, .timeline li > .num { align-self: flex-start; }

/* ==========================================================================
   Invoices
   ========================================================================== */
.inv-wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; } .inv-side { flex: 1 1 340px; max-width: 380px; display: flex; flex-direction: column; gap: 14px; } .inv-doc { flex: 999 1 620px; min-width: 0; display: flex; justify-content: center; }
.doc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .doc-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s; } .doc-tab:hover { border-color: var(--line-3); color: var(--ink); } .doc-tab.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: #F6F8FE; }
.inv-paper { position: relative; width: 635px; height: 898px; max-width: 100%; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 28px 56px -32px rgba(15,27,51,.45), 0 0 0 1px var(--line); flex: none; } .inv-paper iframe { position: absolute; top: 0; left: 0; width: 794px; height: 1123px; border: 0; transform: scale(.8); transform-origin: top left; }
.srcrow { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 13px; border-bottom: 1px solid var(--line-2); } .srcrow:last-child { border-bottom: 0; } .srcrow i { width: 20px; height: 20px; border-radius: 50%; background: var(--mist); color: var(--blue); display: flex; align-items: center; justify-content: center; flex: none; font-style: normal; font-size: 11px; } .srcrow .k { color: var(--muted); min-width: 92px; } .srcrow b { font-size: 12.5px; }
.ro-box { height: 40px; border: 1px dashed var(--line-3); border-radius: var(--r); background: #FAFBFC; padding: 0 12px; display: flex; align-items: center; font-weight: 600; font-family: "ReadexPro", sans-serif; direction: ltr; }

/* ---------- verify page ---------- */
.verify { max-width: 520px; margin: 40px auto; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- misc ---------- */
.grid3 .span-2 { grid-column: span 2; } .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-card { padding: 22px 24px; display: flex; flex-direction: column; gap: 18px; } .stack { display: flex; flex-direction: column; gap: 16px; }
.img-slot { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--line-3); border-radius: 10px; background: #FAFBFC; flex-wrap: wrap; min-width: 0; } .img-slot img { max-height: 64px; max-width: 160px; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.acct { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.ico { flex: none; }
.eye .ico { display: block; }
.fld .eye.shown { color: var(--blue); }
input[type=file] { max-width: 100%; font-size: 13px; }
input[type=file]::file-selector-button { font: inherit; font-size: 12.5px; font-weight: 600; height: 32px; padding: 0 12px; margin-inline-end: 10px; border: 1px solid var(--line-3); border-radius: var(--r); background: #fff; color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--hover); }

/* Signup email code (step 4) */
.stepper.four { grid-template-columns: repeat(4, 1fr); } .stepper.four .track { right: 12.5%; left: 12.5%; }
.otp-page { display: flex; flex-direction: column; gap: 18px; }
.otp-fld { height: 60px; }
.otp-input { text-align: center; font-size: 28px !important; font-weight: 700; letter-spacing: .55em; padding-inline-start: .55em; color: var(--night); }
.otp-input::placeholder { color: #C9D1DE; letter-spacing: .55em; }
.alert.info { background: var(--mist); color: var(--blue-d); border-color: #CBDAF7; }
.resend-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.resend-row .btn[disabled] { opacity: .55; cursor: not-allowed; }
/* auto-translated English field while the translation is on its way */
.in.translating { background-image: linear-gradient(90deg, transparent, rgba(31,90,214,.08), transparent); background-size: 200% 100%; animation: tr-shimmer 1s linear infinite; }
@keyframes tr-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* searchable catalog picker in the item rows */
.cpick { position: relative; }
.cpick .catalog-pick { padding-inline-start: 36px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' fill='none' stroke='%238A94A6' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 11px center; }
.cpick-list { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; max-height: 320px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--lift); }
.cpick-list li { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 8px 10px; border-radius: var(--r); cursor: pointer; }
.cpick-list li b { font-size: 13.5px; font-weight: 500; } .cpick-list li small { grid-column: 1; color: var(--muted); font-size: 12px; }
.cpick-list li .num { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--blue-d); font-size: 12.5px; direction: ltr; font-weight: 600; }
.cpick-list li.on, .cpick-list li[data-i]:hover { background: #F2F5FC; }
.cpick-list li.none { cursor: default; color: var(--muted); font-size: 13px; }
.cpick-list.up { top: auto; bottom: calc(100% + 4px); }
.card:has(.cpick-list:not([hidden])) { position: relative; z-index: 40; }
/* stamp & signature handles over the live preview */
.marks-layer { position: absolute; inset: 0; pointer-events: none; }
.mark-box { position: absolute; pointer-events: auto; cursor: move; border: 1.5px dashed transparent; border-radius: 6px; touch-action: none; transition: border-color .15s, background-color .15s; }
.mark-box:hover, .mark-box:focus-visible, .mark-box.on { border-color: var(--blue); background: rgba(31, 90, 214, .06); outline: none; }
.mark-box .grip { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 4px; background: var(--blue); box-shadow: 0 0 0 2px #fff; cursor: nwse-resize; opacity: 0; transition: opacity .15s; }
.mark-box:hover .grip, .mark-box:focus-visible .grip, .mark-box.on .grip { opacity: 1; }
.marks-help { margin: 0; line-height: 1.6; }
/* «القوائم» page: underline tabs over a hairline */
.ltabs { display: flex; flex-wrap: wrap; gap: 0 4px; margin: -4px 0 0; border-bottom: 1px solid var(--line); }
.ltabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; transition: color .15s; }
.ltabs a::after { content: ""; position: absolute; right: 8px; left: 8px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; }
.ltabs a b { font-size: 11.5px; font-weight: 600; color: var(--muted); background: #EDF0F4; border-radius: 999px; padding: 0 7px; line-height: 20px; }
.ltabs a:hover { color: var(--ink); }
.ltabs a.on { color: var(--ink); font-weight: 600; } .ltabs a.on::after { background: var(--blue); } .ltabs a.on b { background: var(--blue); color: #fff; }
.lrow { display: grid; gap: 8px; align-items: center; } .lrow .in { height: 38px; font-size: 13.5px; }
.ladd { align-items: end; } .ladd .btn { height: 40px; }
.lhead { padding: 0 2px 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
form.lrow[data-row] { padding: 6px 0; border-top: 1px solid var(--line-2); }
form.lrow.off .in { color: var(--faint); background: #F6F7F9; text-decoration: line-through; text-decoration-color: rgba(91,102,120,.4); }
form.lrow.dirty .lacts .btn:first-child { background: var(--blue); border-color: var(--blue); color: #fff; }
.lacts { display: flex; gap: 6px; } .lacts .btn { height: 34px; }
.lsearch { margin-inline-start: auto; position: relative; display: flex; align-items: center; } .lsearch svg { position: absolute; inset-inline-start: 11px; color: var(--faint); }
.lsearch .in { width: 260px; height: 36px; padding-inline-start: 36px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
form.lrow[hidden] { display: none; }
.lrow .in { padding-inline: 10px; } .lrow select.in { padding-inline-end: 26px; }

/* ==========================================================================
   Responsive, print, reduced motion
   ========================================================================== */
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile:nth-child(3) { border-inline-start: 0; } .tile:nth-child(n+3) { border-top: 1px solid var(--line-2); } .party-pair { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  :root { --pad: 16px; }
  .shell { flex-direction: column; }
  .side { position: sticky; top: 0; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 12px 0; }
  .side .pat { height: 100%; }
  .brand { padding: 4px 0; margin: 0; border: 0; } .brand img { width: 34px; height: 34px; } .brand .sub { display: none; }
  .side-foot { margin: 0; margin-inline-start: auto; padding: 0; border: 0; flex-direction: row; } .me { display: none; }
  .tools { grid-template-columns: repeat(3, 34px); } .tools a, .tools button { height: 34px; }
  .nav { order: 3; width: 100%; flex-direction: row; overflow-x: auto; gap: 2px; padding-bottom: 8px; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
  .nav a { height: 36px; padding: 0 12px; white-space: nowrap; flex: none; font-size: 13.5px; }
  .nav a.on::before { inset-inline-start: 10px; right: 10px; left: 10px; top: auto; bottom: -8px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .nav-group { display: none; }
  .side-collapsed .side { width: 100%; } .side-collapsed .side .nav a > span, .side-collapsed .side .brand > span { display: inline; }
  .main { padding: 0 var(--pad) 28px; gap: 16px; }
  .page-head { padding: 16px var(--pad); } .page-head h1 { font-size: 21px !important; }
  .actionbar { margin: 0 calc(var(--pad) * -1) -28px; }
  .grid2, .grid3 { grid-template-columns: 1fr; } .grid3 .span-2 { grid-column: auto; }
  .kpis { grid-template-columns: 1fr; } .kc + .kc { border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.12); } .kc .v { font-size: 30px; }
  .ltabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .ltabs a { flex: none; }
  .lrow, .ladd { grid-template-columns: 1fr !important; } .lhead { display: none; } .lsearch { width: 100%; } .lsearch .in { width: 100%; }
  .preview, .preview .frame { width: 100%; flex-basis: 100%; }
  .msgs { top: auto; bottom: 16px; left: 16px; }
}
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } .tile { border-inline-start: 0 !important; } .tile + .tile { border-top: 1px solid var(--line-2); } .roles { grid-template-columns: 1fr; } }
@media print { .side, .topbar, .actionbar, .msgs { display: none; } .page-head { margin: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .spk, .dr { stroke-dashoffset: 0; } .stg > *, .enter > * { opacity: 1; }
  .in.translating { background-color: var(--bg); }
}
