/* =====================================================================
   NexNFC — admin dashboard
   ---------------------------------------------------------------------
   The cards' own type: Tusker Grotesk for titles and the numbers that
   matter, Poppins for everything else (IBM Plex Sans Arabic / Zokak
   carry Arabic names). Nexera blue is the only brand colour; navy ink,
   a light rail, pill-shaped actions like the logo's rounded strokes.
   The one loud element per page is the number or the card itself.
   ===================================================================== */

@font-face { font-family: "Tusker Grotesk"; src: url("../fonts/TuskerGrotesk-3700Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Zokak"; src: url("../fonts/Zokak-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0E1A33;
  --ink-2: #48546E;
  --ink-3: #7A849A;
  --line: #E1E5ED;
  --line-2: #EDF0F5;
  --canvas: #F5F7FA;
  --surface: #FFFFFF;
  --sunk: #F0F3F7;

  --blue: #1968DA;
  --blue-deep: #0F4AA3;
  --blue-wash: #E8F0FC;
  --green: #12805C;
  --green-wash: #E2F3EC;
  --amber: #8F5B00;
  --amber-wash: #FCF0D9;
  --red: #C2362F;
  --red-wash: #FBE7E5;

  /* chart series — validated set (views, saves, leads) */
  --s-views: #2A78D6;
  --s-saves: #EB6834;
  --s-leads: #1BAF7A;

  --r-panel: 18px;
  --r-input: 12px;
  --r-pill: 999px;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 20px;

  --display: "Tusker Grotesk", "Zokak", "Poppins", sans-serif;
  --text: "Poppins", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --rail: 248px;
  --focus: 0 0 0 3px rgba(25, 104, 218, .32);
  font-family: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: var(--fs-md); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: .005em; }
h2 { font-size: var(--fs-lg); font-weight: 600; }
h3 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0 0 .75em; }
code { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ===================================================================== shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(to right, var(--surface) calc(var(--rail) - 1px), var(--line) calc(var(--rail) - 1px), var(--line) var(--rail), transparent var(--rail)); }

.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 22px 14px 18px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.rail .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; color: var(--ink); }
.rail .brand img { height: 30px; width: auto; }
.rail .brand b { font-family: var(--display); font-size: 26px; line-height: 1; letter-spacing: .01em; }

.nav { display: grid; gap: 2px; }
.nav-group { padding: 18px 12px 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  min-height: 40px; padding: 0 12px;
  border-radius: var(--r-pill);
  color: var(--ink-2); font-size: var(--fs-md); font-weight: 500;
}
.nav a:hover { background: var(--sunk); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--blue-wash); color: var(--blue-deep); }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .count {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-grid; place-items: center;
  border-radius: var(--r-pill); background: var(--blue); color: #fff;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}

.rail-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid var(--line-2); }
.who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.who > div { min-width: 0; }
.who-name { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-role { font-size: var(--fs-xs); color: var(--ink-3); }
.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); }
.linklike:hover { color: var(--ink); text-decoration: underline; }

.topbar { display: none; }

.main { min-width: 0; padding: 34px 44px 72px; }
.main > .page { max-width: 1320px; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head > div:first-child { min-width: 0; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }
.crumbs { font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ===================================================================== surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; }
.panel-head h2 { font-size: var(--fs-md); }
.panel-head + .panel-body { padding-top: 4px; }
.panel-body { padding: 20px 22px; }
.panel + .panel, .stack > .panel + .panel { margin-top: 18px; }
.grid > .panel + .panel { margin-top: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 380px; }
.split > *, .grid > * { min-width: 0; }
.stack { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.stack > .panel + .panel { margin-top: 0; }
.sticky { position: sticky; top: 24px; }
.mt { margin-top: 18px; }

/* ===================================================================== buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink);
  font-family: inherit; font-weight: 500; font-size: var(--fs-md); line-height: 1;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn:hover { border-color: #BCC5D3; text-decoration: none; color: var(--ink); background: #FBFCFD; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #1C2C4D; border-color: #1C2C4D; color: #fff; }
.btn-danger { color: var(--red); border-color: #EDC6C2; }
.btn-danger:hover { background: var(--red-wash); border-color: var(--red); color: var(--red); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--sunk); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 13px; font-size: var(--fs-sm); }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; padding: 0; }

/* ===================================================================== forms */
.form-section { padding: 24px 24px; border-top: 1px solid var(--line-2); }
.form-section:first-child { border-top: 0; }
.form-section > h2 { margin-bottom: 4px; }
.form-section > .hint { margin-bottom: 18px; max-width: 64ch; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fields > * { min-width: 0; }
.fields .full { grid-column: 1 / -1; }
.field label, .label { display: block; font-size: var(--fs-sm); font-weight: 500; margin-bottom: 7px; color: var(--ink-2); }
.field .opt { color: var(--ink-3); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-input);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-md);
}
.select { padding-right: 34px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237A849A' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.textarea { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: #BCC5D3; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--red); }
.error-text { color: var(--red); font-size: var(--fs-xs); margin-top: 6px; }
.hint { color: var(--ink-3); font-size: var(--fs-sm); }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line-2); background: #FAFBFC; border-radius: 0 0 var(--r-panel) var(--r-panel); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: var(--fs-md); color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--blue); margin: 0; }

/* switch */
.switch { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { flex: none; position: relative; width: 44px; height: 26px; margin-top: 1px; border-radius: var(--r-pill); background: #CBD3DF; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(14, 26, 51, .25); transition: transform .15s; }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--focus); }
.switch b { display: block; font-weight: 500; }
.switch span.hint { display: block; margin-top: 2px; }

/* file picker */
.file-pick { display: flex; align-items: center; gap: 14px; }
.file-pick .thumb { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--sunk); border: 1px solid var(--line); flex: none; }
.file-pick .thumb.wide { width: 104px; border-radius: 12px; }
.file-pick .thumb.logo { border-radius: 14px; object-fit: contain; padding: 6px; background: #fff; }
.file-pick input[type=file] { font-size: var(--fs-sm); color: var(--ink-3); max-width: 100%; min-width: 0; flex: 1; }

/* segmented links (date range, status tabs) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--sunk); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: none; font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg a:hover, .seg button:hover { color: var(--ink); text-decoration: none; }
.seg [aria-current] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(14, 26, 51, .12); }
.seg .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* tabs (person page) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a { position: relative; padding: 12px 14px; font-size: var(--fs-md); font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.tabs a[aria-current] { color: var(--ink); }

/* theme swatches — miniature cards */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 12px; }
.theme-opt { position: relative; margin: 0; cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt .sw { display: block; height: 78px; border-radius: 14px; border: 2px solid transparent; position: relative; overflow: hidden; background: #000; }
.theme-opt .sw::before { content: ""; position: absolute; left: 12px; right: 12px; top: 10px; bottom: 10px; border-radius: 8px; background: var(--sw-card); box-shadow: inset 0 0 0 1px var(--sw-edge, transparent); }
.theme-opt .sw::after { content: ""; position: absolute; left: 21px; width: 28px; height: 8px; bottom: 19px; border-radius: 2px; background: var(--sw-btn, var(--sw-accent, var(--blue))); }
.theme-opt .sw > i { position: absolute; left: 21px; top: 18px; width: 24px; height: 12px; border-radius: 2px; background: var(--sw-name); }
.theme-opt .name { display: block; font-size: var(--fs-sm); margin-top: 7px; color: var(--ink-2); text-align: center; }
.theme-opt input:checked + .sw { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.theme-opt input:focus-visible + .sw { box-shadow: var(--focus); }
.sw-inherit  { background: repeating-linear-gradient(135deg, #F3F5F8 0 8px, #E8ECF2 8px 16px) !important; --sw-card: transparent; --sw-btn: transparent; --sw-name: transparent; }
.sw-classic  { --sw-card: #000; --sw-edge: rgba(255,255,255,.22); --sw-name: #fff; }
.sw-minimal  { --sw-card: #fff; --sw-name: #121214; }
.sw-midnight { --sw-card: #251230; --sw-name: #c35d97; --sw-btn: #c75b97; }
.sw-gradient { --sw-card: var(--sw-accent, var(--blue)); --sw-name: #fff; --sw-btn: #fff; }
.color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-row input[type=color] { width: 48px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-input); background: #fff; cursor: pointer; }

/* card layout picker: a tiny sketch of each layout */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.layout-opt { position: relative; margin: 0; cursor: pointer; min-width: 0; }
.layout-opt input { position: absolute; opacity: 0; pointer-events: none; }
.layout-opt .name { display: block; margin-top: 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.layout-opt .hint { display: block; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.35; }
.lay { position: relative; display: block; aspect-ratio: 5 / 7; border-radius: 14px; background: #0E1016; border: 2px solid transparent; overflow: hidden; transition: border-color .15s; }
.layout-opt:hover .lay { border-color: #9AA6B8; }
.layout-opt input:checked + .lay { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.layout-opt input:focus-visible + .lay { box-shadow: var(--focus); }
.lay i { position: absolute; display: none; }
.lay .l-band { left: 0; right: 0; top: 0; height: 30%; background: #34507F; }
.lay .l-photo { width: 22%; aspect-ratio: 1; border-radius: 50%; background: #8C97AB; }
.lay .l-name { height: 12%; width: 40%; border-radius: 2px; background: #fff; }
.lay .l-line { height: 3%; width: 60%; border-radius: 2px; background: #3A3F4C; }
.lay .l-tiles { left: 12%; right: 12%; top: 38%; height: 30%;
  background: linear-gradient(#262A35, #262A35) 0 0 / 47% 46% no-repeat, linear-gradient(#262A35, #262A35) 100% 0 / 47% 46% no-repeat,
              linear-gradient(#262A35, #262A35) 0 100% / 47% 46% no-repeat, linear-gradient(#262A35, #262A35) 100% 100% / 47% 46% no-repeat; }
.lay .l-qr { width: 24%; aspect-ratio: 1; border-radius: 3px; background: #fff repeating-conic-gradient(#0E1016 0 25%, #fff 0 50%) 0 0 / 34% 34%; box-shadow: 0 0 0 2px #fff; }
.lay .l-btn { left: 12%; bottom: 8%; width: 36%; height: 7%; border-radius: 2px; background: var(--blue); }
.lay-default .l-name { display: block; left: 12%; top: 10%; }
.lay-default .l-photo { display: block; right: 12%; top: 9%; }
.lay-default .l-line { display: block; left: 12%; top: 40%; }
.lay-default .l-line.s { top: 48%; width: 46%; }
.lay-default .l-btn { display: block; }
.lay-staff .l-band { display: block; }
.lay-staff .l-photo { display: block; left: 10%; top: 21%; width: 24%; box-shadow: 0 0 0 2px #0E1016; }
.lay-staff .l-name { display: block; left: 12%; top: 44%; height: 10%; }
.lay-staff .l-line { display: block; left: 12%; top: 62%; }
.lay-staff .l-line.s { top: 70%; width: 46%; }
.lay-staff .l-btn { display: block; }
.lay-centered .l-photo { display: block; left: 32%; top: 9%; width: 36%; }
.lay-centered .l-name { display: block; left: 30%; top: 42%; }
.lay-centered .l-line { display: block; left: 20%; top: 60%; }
.lay-centered .l-line.s { left: 27%; top: 68%; width: 46%; }
.lay-centered .l-btn { display: block; left: 12%; right: 12%; width: auto; }
.lay-tiles .l-photo { display: block; left: 12%; top: 10%; width: 18%; }
.lay-tiles .l-name { display: block; left: 36%; top: 11%; width: 36%; height: 10%; }
.lay-tiles .l-tiles { display: block; }
.lay-tiles .l-btn { display: block; }
.lay-badge .l-band { display: block; height: 22%; }
.lay-badge .l-photo { display: block; left: 37%; top: 11%; width: 26%; box-shadow: 0 0 0 2px #0E1016; }
.lay-badge .l-name { display: block; left: 30%; top: 40%; height: 8%; }
.lay-badge .l-qr { display: block; left: 38%; top: 55%; }
.lay-badge .l-btn { display: block; left: 12%; right: 12%; width: auto; }
.lay-management { background: #251230; }
.lay-management .l-name { display: block; left: 10%; top: 10%; width: 34%; background: #C35D97; }
.lay-management .l-photo { display: block; right: 10%; top: 9%; width: 26%; aspect-ratio: 154 / 196; border-radius: 0; background: #7A6A86; }
.lay-management .l-line { display: block; left: 10%; top: 44%; width: 54%; background: #785486; }
.lay-management .l-line.s { top: 54%; }
.lay-management .l-btn { display: block; left: 10%; background: #C75B97; }
.lay-inherit { background: repeating-linear-gradient(135deg, #F3F5F8 0 8px, #E8ECF2 8px 16px); }
.lay-inherit::after { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); }

/* ===================================================================== tables */
.toolbar { display: flex; gap: 10px; align-items: center; padding: 16px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.toolbar .input, .toolbar .select { height: 38px; width: auto; min-width: 200px; font-size: var(--fs-sm); }
.toolbar .grow { flex: 1; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { width: 100%; padding-left: 38px; }
.table-wrap { overflow-x: auto; position: relative; }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.table th { text-align: left; font-weight: 500; font-size: var(--fs-sm); color: var(--ink-3); padding: 12px 22px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 13px 22px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #FAFBFD; }
.table .right { text-align: right; }
.table .tight { width: 1%; white-space: nowrap; }
.table .sel { width: 1%; padding-right: 0; }
.person { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.person a { color: var(--ink); font-weight: 500; }
.person .sub { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.35; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--sunk); flex: none; }
.avatar-lg { width: 72px; height: 72px; }
.avatar-sm { width: 28px; height: 28px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; background: var(--sunk); color: var(--ink-2); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-live, .chip-won, .chip-delivered { background: var(--green-wash); color: var(--green); }
.chip-off, .chip-lost, .chip-cancelled { background: var(--red-wash); color: var(--red); }
.chip-warn, .chip-requested { background: var(--amber-wash); color: var(--amber); }
.chip-new, .chip-printing, .chip-shipped { background: var(--blue-wash); color: var(--blue-deep); }
.chip-contacted { background: #EFEAFB; color: #5B3FC4; }
.chip-plain::before { display: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); font-size: var(--fs-xs); white-space: nowrap; }

.empty { padding: 56px 24px; text-align: center; }
.empty h3 { margin-bottom: 6px; font-size: var(--fs-lg); }
.empty p { color: var(--ink-3); margin: 0 auto 18px; max-width: 46ch; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line-2); font-size: var(--fs-sm); color: var(--ink-3); }
.pager .actions { gap: 6px; }

/* selection bar (bulk actions on a table) */
.selbar { position: sticky; bottom: 18px; z-index: 15; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px auto 0; max-width: 640px; padding: 10px 10px 10px 20px; border-radius: var(--r-pill); background: var(--ink); color: #fff; box-shadow: 0 16px 40px rgba(14, 26, 51, .28); }
.selbar .btn { background: #fff; border-color: #fff; color: var(--ink); }

/* row menu */
details.menu { position: relative; display: inline-block; }
details.menu summary { list-style: none; cursor: pointer; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu .menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 200px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 14px 34px rgba(14, 26, 51, .14);
}
.menu-list a, .menu-list button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px;
  background: none; border: 0; font: inherit; font-size: var(--fs-sm); color: var(--ink); cursor: pointer;
}
.menu-list a:hover, .menu-list button:hover { background: var(--sunk); text-decoration: none; }
.menu-list .danger { color: var(--red); }
.menu-list form { margin: 0; }
.menu-list hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 0; }

/* ===================================================================== numbers */
.funnel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.funnel > div { position: relative; padding: 4px 26px 4px 0; }
.funnel > div + div { padding-left: 26px; border-left: 1px solid var(--line-2); }
.funnel > div + div::before {
  content: ""; position: absolute; left: -7px; top: 22px; width: 12px; height: 12px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); background: var(--surface); transform: rotate(45deg);
}
.big { font-family: var(--display); font-weight: 700; font-size: 60px; line-height: .95; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.big-label { margin-top: 8px; font-size: var(--fs-md); color: var(--ink-2); }
.key { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 3px; vertical-align: 0; }
.key-views { background: var(--s-views); }
.key-saves { background: var(--s-saves); }
.key-leads { background: var(--s-leads); }
.delta { display: inline-block; margin-left: 6px; font-size: var(--fs-xs); font-weight: 600; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.rate { margin-top: 4px; font-size: var(--fs-sm); color: var(--ink-3); }

.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chart-box { position: relative; height: 260px; margin-top: 18px; }
.chart-box.short { height: 200px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-2); }

.facts { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line-2); }
.fact { flex: 1 1 140px; padding: 16px 22px; border-left: 1px solid var(--line-2); }
.fact:first-child { border-left: 0; }
.fact dt { font-size: var(--fs-sm); color: var(--ink-3); }
.fact dd { margin: 4px 0 0; font-family: var(--display); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.fact dd.text { font-family: var(--text); font-size: var(--fs-lg); font-weight: 600; line-height: 1.4; }

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(84px, 120px) 1fr 48px; align-items: center; gap: 12px; font-size: var(--fs-sm); }
.bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; border-radius: 5px; background: var(--sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--s-views); border-radius: 0 4px 4px 0; min-width: 4px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line-2); }
.panel-head + .list-plain li:first-child { border-top: 0; }
.quota { height: 8px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin-top: 10px; }
.quota > i { display: block; height: 100%; background: var(--blue); }
.quota.full > i { background: var(--amber); }

/* ===================================================================== dashboard */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0; overflow: hidden; }
.hero-main { padding: 26px 28px 22px; min-width: 0; }
.hero-side { position: relative; display: grid; align-content: space-between; gap: 22px; padding: 26px 28px; background: var(--ink); color: #C7D0E0; overflow: hidden; }
/* the logo's diagonal stroke, once */
.hero-side::before { content: ""; position: absolute; right: -70px; top: -40px; width: 120px; height: 360px; border-radius: 60px; background: linear-gradient(180deg, rgba(25,104,218,.55), rgba(25,104,218,0)); transform: rotate(-38deg); pointer-events: none; }
.hero-side > * { position: relative; }
.hero-side h2 { color: #fff; font-size: var(--fs-md); }
.hero-side .hint { color: #93A1BB; }
.hero-side .stat { font-family: var(--display); font-size: 44px; line-height: 1; color: #fff; }
.hero-side a { color: #fff; }
.plate {
  position: relative; width: 100%; max-width: 284px; aspect-ratio: 1.586; padding: 18px 20px;
  border-radius: 16px; background: var(--plate-bg, #000); color: var(--plate-ink, #fff);
  box-shadow: 0 22px 40px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255,255,255,.12);
  display: flex; flex-direction: column; justify-content: space-between;
}
.plate .p-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plate .p-logo { height: 34px; width: auto; max-width: 120px; object-fit: contain; }
.plate .p-name { font-family: var(--display); font-size: 30px; line-height: .95; overflow-wrap: anywhere; }
.plate .p-sub { font-size: 11.5px; opacity: .75; margin-top: 4px; }
.plate .p-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.plate .p-bottom .p-name { font-size: 24px; }
.plate svg { width: 26px; height: 26px; opacity: .9; }

.lead-list li { align-items: flex-start; }
.lead-list .who-l { min-width: 0; }
.lead-list .who-l a { color: var(--ink); font-weight: 500; }
.lead-list .who-l .sub { color: var(--ink-3); font-size: var(--fs-sm); }

/* update banner */
.alert { padding: 14px 16px; border-radius: 14px; font-size: var(--fs-md); margin-bottom: 18px; }
.alert-error { background: var(--red-wash); color: #8E2621; }
.alert-info { background: var(--blue-wash); color: var(--blue-deep); }
.alert-warn { background: var(--amber-wash); color: #6B4500; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.update-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.update-banner > div { flex: 1 1 320px; min-width: 0; }
.update-banner form { margin: 0; }

/* ===================================================================== leads */
.lead-row td { vertical-align: top; }
.lead-row .contact a { display: block; color: var(--ink); white-space: nowrap; }
.lead-row .contact a.wa { color: var(--blue); }
.lead-row .msg { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-sm); white-space: pre-line; max-width: 46ch; }
.status-form { margin: 0; }
.status-form .select { height: 34px; width: 132px; padding-left: 12px; font-size: var(--fs-sm); border-radius: var(--r-pill); }
.note-box { display: grid; gap: 8px; margin-top: 10px; max-width: 420px; }
.note-box .textarea { min-height: 70px; font-size: var(--fs-sm); }
.note { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--sunk); font-size: var(--fs-sm); color: var(--ink-2); white-space: pre-line; }

/* ===================================================================== orders */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; display: block; margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: block; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.choice b { display: block; font-weight: 600; }
.choice small { display: block; margin-top: 2px; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.4; }
.choice input:checked + span { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
.choice input:focus-visible + span { box-shadow: var(--focus); }
.pick-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; }
.pick-list label { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line-2); cursor: pointer; }
.pick-list label:first-child { border-top: 0; }
.pick-list label:hover { background: #FAFBFD; }
.pick-list input { width: 17px; height: 17px; accent-color: var(--blue); flex: none; }
.hires { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.hires h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--ink); }
.hires .hint { margin: 0; }
.hire-list { display: grid; gap: 12px; margin: 14px 0; }
.hire-list:empty { margin: 8px 0 0; }
.hire-row { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 8px; margin: 0; min-width: 0; background: #FAFBFD; }
.hire-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; }
.hire-fields .field { margin: 0; grid-column: span 2; min-width: 0; }
.hire-fields .field:nth-child(-n+2) { grid-column: span 3; }
.hire-remove { display: flex; margin: 8px 0 0 auto; color: var(--ink-3); }
@media (max-width: 660px) { .hire-fields { grid-template-columns: 1fr; } .hire-fields .field, .hire-fields .field:nth-child(-n+2) { grid-column: auto; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 18px 28px; color: var(--ink-3); font-size: var(--fs-sm); }
.timeline li::before { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.timeline li::after { content: ""; position: absolute; left: 5px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done { color: var(--ink); }
.timeline li.done::before { border-color: var(--blue); background: var(--blue); }
.timeline li.done::after { background: var(--blue); }
.timeline li.now::before { box-shadow: 0 0 0 4px var(--blue-wash); }
.timeline b { display: block; font-weight: 600; font-size: var(--fs-md); }

/* ===================================================================== NFC link block */
.link-block { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.link-row { display: flex; gap: 8px; }
.link-row code {
  flex: 1; min-width: 0; padding: 9px 13px; border-radius: var(--r-input);
  background: var(--sunk); border: 1px solid var(--line-2);
  font-size: var(--fs-xs); color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qr-box { display: flex; gap: 16px; align-items: center; }
.qr-box .qr { position: relative; width: 116px; height: 116px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; flex: none; }
.qr-box .qr img:not(.qr-logo), .qr-box .qr canvas { width: 100% !important; height: 100% !important; }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 24%; height: 24%; padding: 2%; border-radius: 18%; background: #fff; object-fit: contain; transform: translate(-50%, -50%); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; font-size: var(--fs-md); margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-word; }

/* ===================================================================== signatures + backgrounds */
.sig-stage { padding: 28px; border-radius: 14px; background: #fff; border: 1px dashed var(--line); overflow-x: auto; }
.sig-options { display: grid; gap: 14px; }
.bg-stage { border-radius: 14px; overflow: hidden; background: var(--sunk); aspect-ratio: 16 / 9; }
.bg-stage canvas { display: block; width: 100%; height: auto; }

/* ===================================================================== flash */
.flash-stack { position: fixed; right: 22px; top: 22px; z-index: 100; display: grid; gap: 10px; max-width: 420px; }
.flash {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 16px; border-radius: 14px; font-size: var(--fs-md);
  background: var(--ink); color: #fff;
  box-shadow: 0 16px 38px rgba(14, 26, 51, .24);
}
.flash::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: #6FB0FF; }
.flash-success::before { background: #4ED39B; }
.flash-error { background: #fff; color: #8E2621; border: 1px solid #EDC6C2; }
.flash-error::before { background: var(--red); }
.flash p { margin: 0; flex: 1; }
.flash button { background: none; border: 0; font-size: 20px; line-height: 1; color: inherit; opacity: .7; cursor: pointer; padding: 0 2px; }
@media (prefers-reduced-motion: no-preference) {
  .flash { animation: flash-in .22s ease-out; }
  @keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
}

/* ===================================================================== import */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; margin-bottom: 20px; }
.step { padding: 12px 16px 12px 0; border-bottom: 2px solid var(--line); font-size: var(--fs-md); color: var(--ink-3); counter-increment: step; }
.step::before { content: counter(step) ". "; font-weight: 600; }
.step.on { border-bottom-color: var(--blue); color: var(--ink); font-weight: 500; }
.step.done { border-bottom-color: #9FBDEB; color: var(--ink-2); }
.dropzone { display: block; border: 2px dashed #BCC5D3; border-radius: var(--r-panel); padding: 36px 20px; text-align: center; background: #FAFBFC; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-wash); }
.dropzone input { display: block; margin: 12px auto 0; font-size: var(--fs-sm); }
.cols { display: flex; flex-wrap: wrap; gap: 6px; }
.cols code { font-size: var(--fs-xs); padding: 3px 9px; border-radius: 7px; background: var(--sunk); color: var(--ink-2); }
.cols code.req { background: var(--blue-wash); color: var(--blue-deep); }

/* ===================================================================== auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.auth-art {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px 52px; background: var(--ink); color: #B9C4D8;
}
.auth-art::before { content: ""; position: absolute; right: -120px; top: -80px; width: 220px; height: 720px; border-radius: 110px; background: linear-gradient(180deg, rgba(25,104,218,.6), rgba(25,104,218,0)); transform: rotate(-38deg); }
.auth-art > * { position: relative; }
.auth-art .brand { display: inline-flex; }
.auth-art .brand img { height: 34px; width: auto; }
.auth-art h2 { font-family: var(--display); font-weight: 700; font-size: 64px; line-height: .95; color: #fff; max-width: 9ch; margin-bottom: 18px; }
.auth-art p { max-width: 40ch; margin: 0; font-size: var(--fs-lg); }
.auth-cards { position: relative; height: 210px; }
.auth-cards .plate { position: absolute; max-width: 270px; }
.auth-cards .plate:nth-child(1) { left: 0; top: 20px; transform: rotate(-6deg); --plate-bg: #251230; --plate-ink: #C35D97; }
.auth-cards .plate:nth-child(2) { left: 150px; top: 0; transform: rotate(5deg); --plate-bg: #1968DA; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form h1 { margin-bottom: 10px; }
.auth-form .lead { color: var(--ink-2); margin-bottom: 28px; }
.auth-form .field { margin-bottom: 18px; }
.auth-form .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; font-size: var(--fs-sm); }
.otp-input { letter-spacing: .4em; font-size: var(--fs-xl); text-align: center; height: 56px; }
.otp-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-top: 10px; }
.otp-actions form { margin: 0; }

/* Guides: PDF guides with a cover, English and Arabic */
.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.guides > .guide { overflow: hidden; margin: 0; }
.guide-cover { display: block; background: var(--ink); border-bottom: 1px solid var(--line); }
.guide-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.guide-body { padding: 18px 22px 20px; }
.guide-body h2 { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: .01em; margin-bottom: 8px; }
.guide-body > p { margin-bottom: 6px; }
.guide-files { margin-top: 14px; border-top: 1px solid var(--line-2); }
.guide-file { display: flex; align-items: center; gap: 10px; padding: 12px 0 0; }
.guide-file .guide-lang { font-weight: 600; min-width: 64px; }
.guide-file .num { margin-inline-end: auto; white-space: nowrap; }

/* ===================================================================
   Live card preview (phone)
   =================================================================== */
.preview-wrap { display: grid; gap: 12px; justify-items: center; }
.screen { position: relative; }
.pv-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .2s; }
.phone.has-frame:not([data-level="management"]) .pv-frame { opacity: 1; pointer-events: auto; }
.phone.has-frame:not([data-level="management"]) .pv-card,
.phone.has-frame:not([data-level="management"]) .pv-extra { visibility: hidden; }
.preview-label .for-exec { display: none; }
.preview-wrap:has(.phone[data-level="management"]) .preview-label .for-exec { display: inline; }
.preview-wrap:has(.phone[data-level="management"]) .preview-label .for-card { display: none; }
.preview-label { max-width: 272px; font-size: var(--fs-sm); color: var(--ink-3); text-align: center; }
.phone {
  --accent: #1868DB; --accent-ink: #fff;
  --pv-card: #000; --pv-edge: rgba(255,255,255,.17); --pv-name: #fff; --pv-title: #fff; --pv-text: #b9b9bd;
  --pv-rule: #2f2f33; --pv-node: var(--accent); --pv-icon: #e9e9ec; --pv-btn: var(--accent); --pv-btn-ink: var(--accent-ink);
  --u: 2.32px;
  width: 272px; height: 580px; border-radius: 38px; padding: 10px;
  background: #121A2B; box-shadow: 0 26px 54px rgba(14, 26, 51, .26), inset 0 0 0 2px #26324A;
}
.phone[data-theme="minimal"]  { --pv-card: #fff; --pv-edge: transparent; --pv-name: #121214; --pv-title: #121214; --pv-text: #5d5d63; --pv-rule: #e3e3e6; --pv-icon: #26262a; }
.phone[data-theme="midnight"],
.phone[data-level="management"] { --pv-card: #251230; --pv-edge: transparent; --pv-name: #c35d97; --pv-title: #c4bbc8; --pv-text: #c4bbc8; --pv-rule: #785486; --pv-node: #884a9d; --pv-icon: #c75b97; --pv-btn: #c75b97; --pv-btn-ink: #fff; }
.phone[data-theme="gradient"]:not([data-level="management"]) { --pv-card: var(--accent); --pv-edge: transparent; --pv-name: var(--accent-ink); --pv-title: var(--accent-ink);
  --pv-text: color-mix(in srgb, var(--accent-ink) 74%, var(--accent)); --pv-rule: color-mix(in srgb, var(--accent-ink) 26%, var(--accent));
  --pv-node: var(--accent-ink); --pv-icon: var(--accent-ink); --pv-btn: var(--accent-ink); --pv-btn-ink: var(--accent); }
.screen { height: 100%; border-radius: 30px; overflow: hidden; background: #000; display: flex; flex-direction: column; align-items: center; padding: 14px 10px 8px; }
.pv-card {
  flex: 1; width: 100%; display: flex; flex-direction: column; overflow: hidden;
  padding: calc(var(--u) * 6.2) calc(var(--u) * 6.4) calc(var(--u) * 4.2);
  border-radius: calc(var(--u) * 5.5); background: var(--pv-card); box-shadow: inset 0 0 0 1px var(--pv-edge);
  color: var(--pv-text); font-family: "Poppins", "IBM Plex Sans Arabic", "Zokak", sans-serif; transition: background .2s;
}
.pv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pv-name { min-width: 0; font: 700 calc(var(--u) * 15.2)/1.08 "Tusker Grotesk", "Zokak", sans-serif; color: var(--pv-name); overflow-wrap: break-word; }
.pv-name span { display: block; }
.pv-photo { flex: 0 0 calc(var(--u) * 22); width: calc(var(--u) * 22); aspect-ratio: 154 / 196; object-fit: cover; margin-top: 3px; }
.phone.no-photo .pv-photo { display: none; }
.pv-role { margin-top: calc(var(--u) * 3.6); font-size: calc(var(--u) * 4.6); font-weight: 600; line-height: 1.3; color: var(--pv-title); }
.pv-role.is-empty { display: none; }
.pv-card .m-bio { margin: 6px 0 0; font-size: calc(var(--u) * 3.6); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pv-card .m-bio[hidden] { display: none; }
.pv-rule { position: relative; display: block; height: 1px; background: var(--pv-rule); margin: calc(var(--u) * 6) 0 calc(var(--u) * 3); }
.pv-rule::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: calc(var(--u) * 2); height: calc(var(--u) * 2); border-radius: 50%; background: var(--pv-node); transform: translateY(-50%); }
.pv-rows .m-row { font-size: calc(var(--u) * 4.1); line-height: calc(var(--u) * 9.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-card[dir="rtl"] .pv-rows .m-row { text-align: right; }
.pv-rows .m-row span { unicode-bidi: plaintext; }
.pv-rows .m-row.is-empty { display: none; }
.pv-rows:not(:has(.m-row:not(.is-empty))) + .pv-rule { display: none; }
.pv-social { display: flex; gap: calc(var(--u) * 7); padding-top: 4px; }
.pv-social b { width: calc(var(--u) * 5); height: calc(var(--u) * 5); border-radius: 30%; background: var(--pv-icon); opacity: .9; }
.pv-keep { display: none; }
.pv-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pv-save { flex: none; width: calc(var(--u) * 35.4); height: calc(var(--u) * 9.12); display: grid; place-items: center; border-radius: calc(var(--u) * 2.2);
  background: var(--pv-btn); color: var(--pv-btn-ink); font-size: calc(var(--u) * 4.5); font-weight: 500; white-space: nowrap; }
.pv-logo { min-width: 0; text-align: end; }
.pv-logo img { max-height: calc(var(--u) * 9.5); max-width: 100%; object-fit: contain; display: inline-block; }
.pv-logo b { font: 700 calc(var(--u) * 7.4)/1 "Tusker Grotesk", "Zokak", sans-serif; color: var(--pv-name); overflow-wrap: anywhere; }
.pv-logo[data-empty] img, .pv-logo:not([data-empty]) b { display: none; }
.pv-extra { display: flex; gap: 22px; padding-top: 8px; font: 500 10.5px "Poppins", sans-serif; color: rgba(255,255,255,.62); }
.phone[data-level="management"] .pv-photo { flex-basis: calc(var(--u) * 28); width: calc(var(--u) * 28); border-radius: 0; }
.phone[data-level="management"] .pv-rule::before { inset-inline-start: auto; right: 37%; }
.phone[data-level="management"] .pv-social b { border-radius: 4px; background: var(--pv-btn); }
.phone[data-level="management"] .pv-keep { display: block; margin-top: auto; text-align: right; font: italic 600 18px/1.2 "Poppins", sans-serif; color: var(--pv-name); }
.phone[data-level="management"] .pv-bottom { margin-top: 8px; }
.phone[data-level="management"] .pv-extra { visibility: hidden; }

/* ===================================================================== responsive */
@media (max-width: 1240px) {
  .split, .split-wide { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .preview-wrap { order: -1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .rail { position: fixed; inset: 0 auto 0 0; width: 272px; height: 100%; z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(14,26,51,.2); }
  body.nav-open .rail { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(14,26,51,.4); z-index: 40; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
  .topbar .brand img { height: 22px; display: block; }
  .topbar button { background: none; border: 0; color: var(--ink); padding: 6px; cursor: pointer; }
  .main { padding: 22px 18px 60px; }
  h1 { font-size: 38px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .funnel { grid-template-columns: 1fr; gap: 18px; }
  .funnel > div + div { padding-left: 0; border-left: 0; padding-top: 18px; border-top: 1px solid var(--line-2); }
  .funnel > div + div::before { display: none; }
  .big { font-size: 48px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .toolbar .input, .toolbar .select { min-width: 0; width: 100%; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* "Remove photo / cover" under a picture picker */
.pic-remove { margin-top: 8px; font-size: var(--fs-sm); }

/* Arabic version of a card: folded until used */
.ar-block > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.ar-block > summary::-webkit-details-marker { display: none; }
.ar-block > summary h2 { margin: 0; }
.ar-block > summary h2 .opt { font-weight: 400; color: var(--ink-3); font-size: .8em; }
.ar-block > summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -3px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s;
}
.ar-block[open] > summary::after { transform: rotate(225deg); margin-top: 3px; }
.ar-block > .hint { margin: 4px 0 18px; max-width: 64ch; }
.ar-block .input[dir="rtl"], .ar-block .textarea[dir="rtl"] { font-family: "IBM Plex Sans Arabic", "Poppins", sans-serif; }

/* ===================================================================== links, files and videos on a card */
.btn-icon { width: 32px; padding: 0; justify-content: center; }
.btn-icon:disabled { opacity: .35; cursor: default; }
.link-list { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: 14px; }
.link-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; }
.link-item + .link-item { border-top: 1px solid var(--line-2); }
.link-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-wash); color: var(--blue); }
.link-icon svg { width: 19px; height: 19px; }
.link-thumb { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--sunk); }
.link-main { display: grid; min-width: 0; flex: 1 1 auto; }
.link-name { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-meta { font-size: var(--fs-sm); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-actions { display: flex; gap: 4px; flex: none; }
.link-actions form { margin: 0; }
.link-edit { width: 280px; padding: 14px !important; }
.link-edit .label { margin: 0; }
.link-edit .btn { width: auto; }
.link-edit button.danger { padding: 9px 4px; }
.company-links { margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--sunk); }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chip-list li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-pill); background: var(--surface); font-size: var(--fs-sm); color: var(--ink-2); }
.chip-list svg { width: 14px; height: 14px; color: var(--ink-3); }
.link-add { padding-top: 4px; }
.link-add .seg { margin-bottom: 16px; flex-wrap: wrap; }
.seg label { display: inline-flex; cursor: pointer; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.seg label span svg { width: 15px; height: 15px; }
.seg label input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(14, 26, 51, .12); }
.seg label input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
[data-show-for][hidden], [data-label-for][hidden] { display: none !important; }

/* ===================================================================== campaigns */
.campaign-new { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.campaign-new .field { margin: 0; }
.campaign-list { display: grid; gap: 14px; margin-top: 18px; }
.campaign { display: flex; gap: 22px; padding: 20px 22px; }
.campaign.is-fresh { box-shadow: 0 0 0 2px var(--blue); }
.campaign-qr { flex: none; width: 132px; height: 132px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.campaign-qr canvas, .campaign-qr img { display: block; width: 100% !important; height: 100% !important; }
.campaign-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 14px; }
.campaign-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.campaign-head h2 { margin: 0; overflow-wrap: anywhere; }
.campaign-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.campaign-stats dt { font-size: var(--fs-sm); color: var(--ink-3); }
.campaign-stats dd { margin: 2px 0 0; font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.campaign-foot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.campaign-foot .link-row { flex: 1 1 260px; min-width: 0; }
@media (max-width: 720px) {
  .campaign-new { grid-template-columns: 1fr; }
  .campaign { flex-direction: column; }
  .campaign-stats { grid-template-columns: 1fr 1fr; }
}

/* lost card / new owner */
.steps-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.steps-list li::marker { color: var(--blue); font-weight: 600; }
.chip-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.chip-history li { position: relative; padding-left: 18px; font-size: var(--fs-sm); color: var(--ink-2); }
.chip-history li::before { content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.chip-history .when { display: block; color: var(--ink-3); font-size: 12px; }

/* ===================================================================== scan a business card */
.split.scan { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.scan-pick {
  display: grid; place-items: center; min-height: 220px; overflow: hidden; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: 16px; background: var(--sunk); text-align: center;
}
.scan-pick:hover { border-color: var(--blue); }
.scan-pick:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.scan-pick img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #0E1A33; }
.scan-pick img:not([hidden]) + .scan-empty { display: none; }
.scan-empty { display: grid; justify-items: center; gap: 6px; padding: 28px; color: var(--ink-2); }
.scan-empty svg { width: 34px; height: 34px; color: var(--blue); }
.scan-status { margin: 12px 0 6px; font-size: var(--fs-sm); color: var(--ink-2); }
.scan-bar { width: 100%; height: 6px; accent-color: var(--blue); }
.scan-raw { margin-top: 14px; }
.scan-raw summary { cursor: pointer; font-size: var(--fs-sm); color: var(--ink-3); }
.scan-raw textarea { margin-top: 8px; font-size: 13px; }
.scan.is-reading .scan-pick { opacity: .85; }
.field.is-auto .input, .field.is-auto .textarea { background: #FFF9E6; border-color: #EBCB7A; }
@media (max-width: 900px) { .split.scan { grid-template-columns: 1fr; } }
.split.scan > .panel { margin-top: 0; }
.campaign-list .panel + .panel { margin-top: 0; }

/* row menus float above the page (positioned by admin.js) */
details.menu .menu-list.is-floating { position: fixed; right: auto; z-index: 60; overflow-y: auto; overscroll-behavior: contain; }

/* ===================================================================== card designer (Card design → Your design) */
.designer[hidden] { display: none; }
.dz-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 20px; }
.dz-presets .label { margin: 0; }
.dz-preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
.dz-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 1180px) { .dz-cols { grid-template-columns: minmax(0, 1fr); } }

.dz-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dz-block {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 8px 12px 8px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: box-shadow .15s, border-color .15s, opacity .15s;
}
.dz-block.is-off { background: var(--canvas); }
.dz-block.is-off .dz-text { opacity: .55; }
.dz-block.is-dragging { position: relative; z-index: 2; border-color: var(--blue); box-shadow: 0 10px 28px rgba(14, 26, 51, .16); }
.dz-blocks.is-sorting { cursor: grabbing; }
.dz-blocks.is-sorting .dz-block:not(.is-dragging) { transition: transform .12s; }
.dz-grip {
  display: grid; place-items: center; width: 30px; height: 40px; padding: 0; border: 0; border-radius: 9px;
  background: none; color: var(--ink-3); cursor: grab; touch-action: none;
}
.dz-grip:hover { background: var(--sunk); color: var(--ink); }
.dz-grip svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.dz-text { display: grid; min-width: 0; }
.dz-text b { font-weight: 500; font-size: var(--fs-md); line-height: 1.3; }
.dz-text small { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-move { display: flex; gap: 2px; }
.dz-move .btn { border-color: transparent; background: none; }
.dz-move .btn:hover:not(:disabled) { background: var(--sunk); }
.dz-switch { align-items: center; }
.dz-switch input:disabled + .track { opacity: .5; cursor: not-allowed; }
.dz-tip { margin: 12px 0 0; }

.dz-style { display: grid; gap: 16px; }
.dz-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.dz-group legend { padding: 0; }
.dz-seg { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 12px; background: var(--sunk); }
.dz-seg label { flex: 1 1 0; min-width: max-content; margin: 0; cursor: pointer; }
.dz-seg input { position: absolute; opacity: 0; pointer-events: none; }
.dz-seg span {
  display: grid; place-items: center; height: 34px; padding: 0 12px; border-radius: 9px;
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background .12s, color .12s;
}
.dz-seg label:hover span { color: var(--ink); }
.dz-seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(14, 26, 51, .14); }
.dz-seg input:focus-visible + span { box-shadow: var(--focus); }
/* each typeface choice shows itself */
.dz-seg-font label:nth-child(1) span { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.dz-seg-font label:nth-child(3) span { font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.lay-custom { background: #0E1016; }
.lay-custom .l-photo { display: block; left: 12%; top: 10%; width: 20%; border-radius: 30%; }
.lay-custom .l-name { display: block; left: 38%; top: 13%; width: 34%; height: 9%; }
.lay-custom .l-line { display: block; left: 12%; top: 40%; width: 76%; height: 8%; border-radius: 4px; background: #262B36; }
.lay-custom .l-line.s { top: 52%; width: 76%; }
.lay-custom .l-btn { display: block; left: 12%; right: 12%; width: auto; border-radius: 6px; }
.lay-custom::after { content: ""; position: absolute; right: 9%; top: 64%; width: 16%; aspect-ratio: 1; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 60% no-repeat; }

/* ===================================================================== polish */
/* initials instead of the stock picture */
.avatar-initials {
  display: inline-grid; place-items: center;
  font-family: var(--text); font-weight: 600; font-size: 13px; letter-spacing: .02em; line-height: 1;
  user-select: none;
}
.avatar-sm.avatar-initials { font-size: 10.5px; }
.avatar-lg.avatar-initials { font-size: 24px; }
.tint-0 { background: var(--blue-wash); color: var(--blue-deep); }
.tint-1 { background: var(--green-wash); color: var(--green); }
.tint-2 { background: var(--amber-wash); color: var(--amber); }
.tint-3 { background: #EFEAFB; color: #5B3FC4; }
.tint-4 { background: #E6EEF3; color: #2F5A73; }

/* filter tabs scroll sideways instead of being cut off */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }

@media (max-width: 720px) {
  /* tables become stacked rows: name and actions on top, details underneath */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody { display: block; }
  .table-stack tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack tr::after { content: ""; order: 3; flex-basis: 100%; height: 0; }
  .table.table-stack td { display: block; width: auto; padding: 0; border: 0; text-align: start; }
  .table-stack td.sel { order: 0; }
  .table-stack td.cell-main { order: 1; flex: 1 1 0; min-width: 0; }
  .table-stack td.tight { order: 2; }
  .table-stack td[data-label] { order: 4; font-size: var(--fs-sm); }
  .table-stack td[data-label]:not([data-label=""])::before { content: attr(data-label) " "; color: var(--ink-3); }
  .table-stack td.contact { flex-basis: 100%; }
  .table-stack .person { min-width: 0; }
  .table-stack .person .sub { overflow: hidden; text-overflow: ellipsis; }
  .table-stack .lead-row .contact a { white-space: normal; overflow-wrap: anywhere; }
  /* layout pictures stay small on phones */
  .layout-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
  .layout-opt .hint { display: none; }
  .dz-move { display: none; }
  .dz-block { padding-inline-end: 10px; }
}
/* show / hide password */
.reveal { position: relative; display: block; }
.reveal .input { padding-right: 64px; }
.reveal-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
  font: inherit; font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.reveal-btn:hover { background: var(--sunk); color: var(--ink); }
.link-blue { color: var(--blue); font-size: inherit; }
.link-blue:hover { color: var(--blue-deep); }

/* parent company line: "A Nexera company" */
.parent { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }
.parent img { height: 13px; width: auto; display: block; }
.rail-foot .parent { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.auth-art .parent { color: #8E9AB3; font-size: var(--fs-sm); }
.auth-art .parent img { height: 16px; opacity: .9; }

/* ===================================================================== language switch */
.lang-switch {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface);
  color: var(--ink-2); font-size: var(--fs-sm); font-weight: 500; text-decoration: none;
}
.lang-switch:hover { color: var(--ink); border-color: #BCC5D3; text-decoration: none; }
.lang-switch svg { width: 15px; height: 15px; flex: none; }
.lang-switch span:lang(ar) { font-family: "IBM Plex Sans Arabic", var(--text); }
.rail-foot .lang-switch { margin-bottom: 12px; }
.auth-form { position: relative; }
.auth-lang { position: absolute; top: 22px; inset-inline-end: 24px; }

/* Activity log */
.activity td { vertical-align: top; }
.activity .activity-action { font-weight: 500; }
.activity .activity-action.is-failure { color: var(--red); }
.activity details summary { cursor: pointer; color: var(--blue); }

/* ===================================================================== Arabic (right to left) */
[lang="ar"] body { --text: "IBM Plex Sans Arabic", "Poppins", system-ui, sans-serif; font-family: var(--text); }
[lang="ar"] h1 { font-size: 36px; line-height: 1.25; letter-spacing: 0; }
[lang="ar"] .auth-art h2 { font-size: 52px; line-height: 1.2; }
[lang="ar"] .nav-group, [lang="ar"] .label, [lang="ar"] .table th { letter-spacing: 0; }
[dir="rtl"] .right, [dir="rtl"] .table .right { text-align: left; }
[dir="rtl"] .hire-remove { margin: 8px auto 0 0; }
[dir="rtl"] .shell { background: linear-gradient(to left, var(--surface) calc(var(--rail) - 1px), var(--line) calc(var(--rail) - 1px), var(--line) var(--rail), transparent var(--rail)); }
[dir="rtl"] .rail { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .nav .count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .select { padding-right: 14px; padding-left: 34px; background-position: left 14px center; }
[dir="rtl"] .status-form .select { padding-right: 12px; padding-left: 30px; }
[dir="rtl"] .switch .track::after { left: auto; right: 3px; }
[dir="rtl"] .switch input:checked + .track::after { transform: translateX(-18px); }
[dir="rtl"] .search svg { left: auto; right: 13px; }
[dir="rtl"] .search .input { padding-left: 14px; padding-right: 38px; }
[dir="rtl"] .table th { text-align: right; }
[dir="rtl"] .table .sel { padding-right: 22px; padding-left: 0; }
[dir="rtl"] .menu-list { right: auto; left: 0; }
[dir="rtl"] .menu-list a, [dir="rtl"] .menu-list button { text-align: right; }
[dir="rtl"] .funnel > div + div { padding-left: 0; border-left: 0; padding-right: 26px; border-right: 1px solid var(--line-2); }
[dir="rtl"] .funnel > div + div::before { left: auto; right: -7px; transform: rotate(-135deg); }
[dir="rtl"] .key { margin-right: 0; margin-left: 7px; }
[dir="rtl"] .delta { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .fact { border-left: 0; border-right: 1px solid var(--line-2); }
[dir="rtl"] .fact:first-child { border-right: 0; }
[dir="rtl"] .alert ul, [dir="rtl"] .steps-list { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .timeline li { padding: 0 28px 18px 0; }
[dir="rtl"] .timeline li::before { left: auto; right: 0; }
[dir="rtl"] .timeline li::after { left: auto; right: 5px; }
[dir="rtl"] .chip-history li { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .chip-history li::before { left: auto; right: 0; }
[dir="rtl"] .flash-stack { right: auto; left: 22px; }
[dir="rtl"] .reveal .input { padding-right: 14px; padding-left: 64px; }
[dir="rtl"] .reveal-btn { right: auto; left: 6px; }
[dir="rtl"] .dz-block { padding: 8px 6px 8px 12px; }
@media (max-width: 960px) {
  [dir="rtl"] .shell { background: none; }
  [dir="rtl"] .rail { inset: 0 0 0 auto; transform: translateX(100%); }
  [dir="rtl"] body.nav-open .rail { transform: none; }
  [dir="rtl"] .funnel > div + div { padding-right: 0; border-right: 0; }
}
@media (max-width: 720px) {
  [dir="rtl"] .dz-block { padding-inline-end: 10px; }
}
/* the layout sketches and the phone preview picture a card: they keep the card's own direction */
[dir="rtl"] .lay, [dir="rtl"] .theme-opt .sw, [dir="rtl"] .phone { direction: ltr; }
[dir="rtl"] .otp-input, [dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="url"], [dir="rtl"] input[inputmode="url"], [dir="rtl"] input[inputmode="tel"] { direction: ltr; text-align: right; }
[dir="rtl"] .otp-input { text-align: center; }
