/* Dealer portal: account, addresses, users, quotes, returns, support, offline page; shared system pages (errors, closed portal) */

/* ---------------------------------------------------------------- portal shell: keep the footer at the bottom of short pages */
body.dealer[data-layout="dealer"] { min-height: 100dvh; display: flex; flex-direction: column; }
body.dealer[data-layout="dealer"] > #app-main { flex: 1 0 auto; }

/* staff viewing the portal as the dealer: align the notice with the page column */
.dealer #app-banners { padding: 0 28px; }
.dealer #app-banners > .banner { max-width: 1264px !important; margin: 14px auto 0 !important; }
@media (max-width: 1024px) {
  .dealer #app-banners { padding: 0 16px; }
  .dealer #app-banners > .banner { margin-top: 10px !important; flex-wrap: wrap; row-gap: 8px; }
  .dealer #app-banners > .banner > span { flex: 1 1 calc(100% - 40px); min-width: 0; }
  .dealer #app-banners > .banner > form { margin-left: 30px !important; }
}

/* ---------------------------------------------------------------- shared pieces */
.da-alert { margin-bottom: 18px; }
.da-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.da-grid.is-even { grid-template-columns: minmax(0, 1fr) 380px; }
.da-col { display: grid; gap: 18px; min-width: 0; }
.da-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.da-head .ti-md { width: 40px; height: 40px; border-radius: 12px; }
.da-head .ti-md .icon { width: 19px; height: 19px; }
.da-head-tx { flex: 1; min-width: 0; }
.da-head h2 { font-size: 16.5px; font-weight: 750; line-height: 1.3; }
.da-head p { margin-top: 2px; font-size: 13px; font-weight: 550; color: var(--muted); }
.da-head > .lnk, .da-head > .btn, .da-head > .chip, .da-head > small { flex: none; }
.da-head > small { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.da-body { padding: 0 20px 20px; }
.da-body.form { gap: 14px; }
.da-muted { color: var(--muted); font-size: 13.5px; font-weight: 550; }
.da-wrap { white-space: normal !important; overflow-wrap: anywhere; }
.da-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.45; }
.da-note > .icon { margin-top: 1px; flex: none; color: var(--muted); }
.da-note.is-warn { background: var(--tape-soft); border-color: transparent; color: var(--tape-ink); }
.da-note.is-warn > .icon { color: #b57400; }
.da-note.is-ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
.da-note.is-ok > .icon { color: var(--success); }
.da-note.is-bad { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.da-note.is-bad > .icon { color: var(--danger); }
.da-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.da-go { width: 18px; height: 18px; color: var(--faint); flex: none; }
:root[data-theme="dark"] .da-note.is-warn > .icon { color: var(--tape); }

/* rows inside cards (lists, contacts, saved lists) */
.da-rows { list-style: none; margin: 0; padding: 0 20px 8px; }
.da-rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.da-rows-flush { padding-bottom: 0; }
.da-rows-flush > li:first-child { border-top: 0; }
.da-rows > li > .da-rows-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; margin: -12px -20px; padding: 12px 20px; color: var(--ink); text-decoration: none !important; }
.da-rows > li > .da-rows-link:hover { background: var(--surface-2); color: var(--ink); }
.da-rows > li > .da-rows-link:hover .da-go { color: var(--ink-2); }
.da-rows .ti-md { width: 38px; height: 38px; border-radius: 11px; }
.da-rows-tx { flex: 1; min-width: 0; line-height: 1.35; }
.da-rows-tx b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-rows-tx small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-rows form { flex: none; }

/* ---------------------------------------------------------------- account hub */
.da-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.da-hub-item {
  position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: border-color 0.15s, transform 0.15s;
}
.da-hub-item:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); color: var(--ink); transform: translateY(-2px); }
.da-hub-item:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.da-hub-item .ti { width: 46px; height: 46px; border-radius: 14px; }
.da-hub-item .ti .icon { width: 22px; height: 22px; }
.da-hub-tx { flex: 1; min-width: 0; }
.da-hub-tx b { display: block; font-size: 15px; font-weight: 750; line-height: 1.3; }
.da-hub-tx small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--muted); }
.da-hub-item .tag { position: absolute; top: 10px; right: 10px; }
.da-hub-item .da-go { display: none; }

/* company facts */
.da-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; margin: 0; padding: 0 20px 20px; }
.da-facts > div { min-width: 0; }
.da-facts .span-2 { grid-column: 1 / -1; }
.da-facts dt { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.da-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }

/* default address preview */
.da-addr { padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); }
.da-addr-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.da-addr-h b { font-weight: 750; }
.da-addr p { margin-top: 4px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); }
.da-addr small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* supplier and sales rep */
.da-rep { display: flex; align-items: center; gap: 14px; margin: 0 20px 6px; padding: 14px; border-radius: 16px; background: var(--sky-soft); flex-wrap: wrap; }
.da-rep-av { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--sky); font-weight: 800; }
.da-rep-tx { flex: 1; min-width: 120px; line-height: 1.3; }
.da-rep-tx b { display: block; font-size: 15px; font-weight: 750; }
.da-rep-tx small { font-size: 12.5px; font-weight: 600; color: var(--sky); }
.da-rep-acts { display: flex; gap: 8px; }
.da-rep + .da-rows > li:first-child { border-top: 0; }

/* preferences, theme and sign-out */
.da-switches { display: grid; gap: 14px; }
.da-switches .switch { align-items: flex-start; }
.da-switches .switch .track { margin-top: 1px; }
.da-switches .switch small { display: block; font-size: 12.5px; font-weight: 550; color: var(--muted); }
.da-switches .switch input:disabled ~ span { opacity: 0.6; cursor: not-allowed; }
.da-theme .segmented { flex: none; }
.da-theme .segmented button { height: 30px; padding: 0 11px; font-size: 13px; }
:root[data-theme="light"] .da-theme [data-theme-set="light"],
:root[data-theme="dark"] .da-theme [data-theme-set="dark"],
:root:not([data-theme]) .da-theme [data-theme-set="auto"] { background: var(--ink); color: var(--surface); }
.da-logout { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* ---------------------------------------------------------------- record lists (quotes, returns, tickets) */
.da-tabs { margin-bottom: 16px; }
.da-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.da-bar .ord-tabs { flex: 1 1 auto; }
.da-listcard { overflow: hidden; }
.da-listcard .pager { background: var(--surface-2); }
.da-list { display: flex; flex-direction: column; }
.da-li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 150px 76px; align-items: center; gap: 4px 16px; padding: 14px 20px;
  border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none !important; transition: background 0.12s;
}
.da-li:first-child { border-top: 0; }
.da-li:hover { background: var(--surface-2); color: var(--ink); }
.da-li:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: -3px; }
.da-li > .ti { width: 44px; height: 44px; border-radius: 13px; }
.da-li > .ti .icon { width: 20px; height: 20px; }
.da-li-main { min-width: 0; line-height: 1.35; }
.da-li-main b { display: block; font-size: 15px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-li-main small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-li-main small + small { margin-top: 0; }
.da-li-chip { display: flex; justify-content: flex-end; }
.da-li-amt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.da-li-amt small { margin-left: 4px; font-size: 11.5px; font-weight: 650; color: var(--faint); }
.da-li-amt em { font-style: normal; font-size: 13px; font-weight: 650; color: var(--faint); }
.da-li-end { text-align: right; font-size: 12.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
.da-li > .da-go { justify-self: end; }
.da-li-cta { justify-self: end; pointer-events: none; }
.da-li.is-hot { background: color-mix(in srgb, var(--brand) 3%, var(--surface)); }
.da-li.is-hot:hover { background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.da-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--brand); vertical-align: 2px; }

/* ---------------------------------------------------------------- quote, return and ticket pages */
.ord-det .da-first { margin-top: 0; }
.da-plus { color: var(--success) !important; }
.da-pending { font-size: 13px; font-weight: 650; color: var(--faint); }
.da-gap { margin-top: 16px; }
.da-answer { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.da-answer h2 { font-size: 16.5px; font-weight: 750; }
.da-answer > p { margin-top: -8px; font-size: 13px; font-weight: 550; color: var(--muted); }
.da-answer-form { display: flex; flex-direction: column; gap: 12px; }
.da-answer .fin-opt .ti { width: 32px; height: 32px; border-radius: 10px; }

/* return request lines and timeline */
.ord-ln.da-retln li { grid-template-columns: 38px minmax(0, 1fr) auto; }
.da-retln .stepper { height: 38px; }
.da-retln .stepper input { width: 56px; }
.da-retln.is-invalid { border-radius: 12px; box-shadow: 0 0 0 1.5px var(--danger); }
.da-ret-max { color: var(--ink-2) !important; }
.da-hint { margin: -2px 0 10px; font-size: 13px; font-weight: 550; color: var(--muted); }
.ord-tl li.is-stop.da-tl-rej .ord-dot { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.ord-tl li.is-stop.da-tl-rej b { color: var(--danger); }
.da-head-count { font-size: 12.5px; font-weight: 650; color: var(--muted); }

/* upload field (dropzone behaviour from the shared script) */
.dropzone.da-drop {
  position: relative; flex-direction: row; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; text-align: left;
  font-size: 13.5px; font-weight: 650; color: var(--ink-2);
}
.dropzone.da-drop:hover, .dropzone.da-drop.is-over { background: color-mix(in srgb, var(--brand) 4%, var(--surface)); color: var(--ink-2); }
.dropzone.da-drop:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.da-drop input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.da-drop .ti-md { width: 38px; height: 38px; border-radius: 11px; }
.da-drop-tx { min-width: 0; overflow-wrap: anywhere; }
.da-drop-tx small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.is-invalid .dropzone.da-drop { border-color: var(--danger); }

/* return photos */
.da-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.da-thumb { aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; display: block; transition: border-color 0.15s; }
.da-thumb:hover { border-color: var(--brand); }
.da-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* order picker in the return dialog */
.modal-body .da-pick { margin: 10px -20px -20px; padding: 0 20px 6px; }
.modal-body .da-pick > li > .da-rows-link { margin: -12px -20px; padding: 12px 20px; }

/* support conversation */
.da-title-wrap { overflow-wrap: anywhere; }
.da-chat { display: flex; flex-direction: column; overflow: hidden; }
.da-thread { display: flex; flex-direction: column; gap: 18px; padding: 22px; }
.da-msg { display: flex; align-items: flex-start; gap: 12px; max-width: 86%; }
.da-msg.is-mine { flex-direction: row-reverse; align-self: flex-end; }
.da-msg-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--sky-soft); color: var(--sky); font-size: 12.5px; font-weight: 800; }
.da-msg.is-mine .da-msg-av { background: var(--violet-soft); color: var(--violet); }
.da-msg-box { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.da-msg.is-mine .da-msg-box { align-items: flex-end; }
.da-msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.da-msg.is-mine .da-msg-head { flex-direction: row-reverse; }
.da-msg-head b { font-weight: 750; }
.da-msg-org { font-size: 12px; font-weight: 650; color: var(--sky); }
.da-msg-head time { font-size: 12px; font-weight: 650; color: var(--faint); font-variant-numeric: tabular-nums; }
.da-bubble { padding: 12px 14px; border-radius: 16px; border-top-left-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-2); }
.da-msg.is-mine .da-bubble { border-top-left-radius: 16px; border-top-right-radius: 6px; background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 16%, var(--line-2)); }
.da-msg-body { font-size: 14.5px; font-weight: 500; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.da-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.da-file {
  display: inline-flex; align-items: center; gap: 6px; max-width: 280px; height: 32px; padding: 0 10px; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); font-size: 12.5px; font-weight: 650; color: var(--ink-2); text-decoration: none !important;
}
.da-file:hover { border-color: var(--line-strong); color: var(--ink); }
.da-file .icon { color: var(--muted); }
.da-file small { color: var(--faint); font-weight: 600; white-space: nowrap; }
.da-reply { display: grid; gap: 10px; padding: 16px 22px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.da-reply .textarea { min-height: 84px; background: var(--surface); }
.da-reply-foot { display: flex; align-items: center; gap: 10px; }
.da-reply-foot .btn-primary { margin-left: auto; }
.da-reply-hint { font-size: 12px; font-weight: 600; color: var(--faint); }
.da-attach { cursor: pointer; }
.da-attach:focus-within { box-shadow: var(--ring); }
.da-steps { list-style: none; margin: 0; padding: 0 20px 14px; counter-reset: da-step; display: grid; gap: 12px; }
.da-steps li { position: relative; padding-left: 38px; line-height: 1.35; }
.da-steps li::before {
  counter-increment: da-step; content: counter(da-step); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 800;
}
.da-steps b { display: block; font-size: 14px; font-weight: 700; }
.da-steps small { display: block; font-size: 12.5px; font-weight: 550; color: var(--muted); }

/* ---------------------------------------------------------------- delivery addresses */
.da-lead { margin-bottom: 18px; }
.da-form-card { margin-bottom: 18px; scroll-margin-top: 140px; }
.da-adrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 0 20px 20px; }
.da-adr {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s;
}
.da-adr.is-default { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.da-adr.is-editing { border-style: dashed; }
.da-adr-top { display: flex; align-items: flex-start; gap: 12px; }
.da-adr-top .ti-md { width: 36px; height: 36px; border-radius: 11px; }
.da-adr-top .chip { margin-left: auto; flex: none; }
.da-adr-tx { min-width: 0; line-height: 1.35; }
.da-adr-tx b { display: block; font-weight: 750; overflow-wrap: anywhere; }
.da-adr-tx small { display: block; margin-top: 2px; font-size: 13px; font-weight: 550; color: var(--muted); overflow-wrap: anywhere; }
.da-adr-who { display: flex; align-items: center; gap: 6px; margin-left: 48px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.da-adr-who .icon { color: var(--faint); flex: none; }
.da-adr-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.da-adr-acts form { display: contents; }
.da-adr-acts .da-adr-def { margin-right: auto; }
.da-del:hover { --btn-bg: var(--danger-soft); color: var(--danger); }
.da-adr-new {
  flex-direction: row; align-items: center; justify-content: center; gap: 8px; min-height: 120px; border-style: dashed; color: var(--brand-text);
  font-weight: 700; text-decoration: none !important;
}
.da-adr-new:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); color: var(--brand-text); }

/* ---------------------------------------------------------------- portal users */
.da-users { list-style: none; margin: 0; padding: 0; }
.da-users > li { display: grid; grid-template-columns: minmax(0, 1fr) 170px 210px 120px 40px; align-items: center; gap: 12px 16px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.da-users > li.is-off .da-user { opacity: 0.6; }
.da-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.da-user .avatar { width: 40px; height: 40px; font-size: 13px; }
.da-user .avatar.is-owner { background: var(--brand-soft); color: var(--brand-text); }
.da-user-tx { min-width: 0; line-height: 1.35; }
.da-user-tx b { display: block; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-user-tx small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-me { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 4px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.da-user-state { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.da-user-state small { font-size: 12px; font-weight: 600; color: var(--muted); }
.da-user-seen { font-size: 13.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.da-user-seen small { display: block; font-size: 12px; font-weight: 600; color: var(--faint); }
.da-user-acts { display: flex; justify-content: flex-end; }
.da-after { margin-top: 14px; }
.da-roles { display: grid; gap: 10px; }
.da-role {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--surface); cursor: pointer; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.da-role:hover { border-color: color-mix(in srgb, var(--line-strong) 70%, var(--faint)); }
.da-role input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.da-role:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.da-role:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.da-role:has(input:checked) .ck-rd { border-color: var(--brand); }
.da-role:has(input:checked) .ck-rd::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.da-role .ck-rd { margin-top: 0; }
.da-role .ti-md { width: 36px; height: 36px; border-radius: 11px; }
.da-role-tx { min-width: 0; line-height: 1.35; }
.da-role-tx b { display: block; font-weight: 750; }
.da-role-tx small { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 550; color: var(--muted); }

@media (max-width: 1100px) {
  .da-grid, .da-grid.is-even { grid-template-columns: minmax(0, 1fr); }
  .da-users > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 20px 14px 72px; }
  .da-user { flex: 1 1 calc(100% + 10px); margin-left: -52px; }
  .da-user-acts { order: 1; }
  .da-user-role { order: 2; }
  .da-user-state { order: 3; flex-direction: row; align-items: center; gap: 8px; }
  .da-user-state small { display: none; }
  .da-user-seen { order: 4; margin-left: auto; font-size: 12.5px; color: var(--muted); }
  .da-user-seen small { display: inline; margin-right: 4px; font-size: inherit; }
}
@media (max-width: 720px) {
  .da-hub { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; }
  .da-hub-item { gap: 12px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; }
  .da-hub-item:first-child { border-top: 0; }
  .da-hub-item:hover { transform: none; background: var(--surface-2); }
  .da-hub-item:focus-visible { outline-offset: -3px; }
  .da-hub-item .ti { width: 38px; height: 38px; border-radius: 11px; }
  .da-hub-item .ti .icon { width: 18px; height: 18px; }
  .da-hub-tx b { font-size: 14.5px; }
  .da-hub-item .tag { position: static; }
  .da-hub-item .da-go { display: block; }
  .da-head { padding: 16px; }
  .da-body { padding: 0 16px 16px; }
  .da-rows { padding: 0 16px 6px; }
  .da-rows > li > .da-rows-link { margin: -12px -16px; padding: 12px 16px; }
  .da-facts { gap: 12px 16px; padding: 0 16px 16px; }
  .da-rep { margin: 0 16px 6px; }
  .da-logout { padding: 14px 16px; }
  .da-adrs { grid-template-columns: minmax(0, 1fr); padding: 0 16px 16px; }
  .da-li { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; }
  .da-li > .ti { grid-row: span 2; }
  .da-li-main { grid-column: 2; grid-row: 1 / span 2; }
  .da-li-amt, .da-li-end { grid-column: 3; grid-row: 1; }
  .da-li-chip { grid-column: 3; grid-row: 2; }
  .da-li.is-stacked .da-li-main { grid-row: 1; }
  .da-li.is-stacked .da-li-chip { grid-column: 2 / -1; justify-content: flex-start; }
  .da-li.is-stacked .da-li-main small { white-space: normal; }
  .da-li > .da-go, .da-li-cta { display: none; }
  .da-li-main b { font-size: 14.5px; }
  .da-users > li { padding: 14px 16px 14px 68px; }
  .da-user-seen { flex-basis: 100%; margin-left: 0; }
  .da-adr-new { min-height: 64px; }
  .da-thread { padding: 18px 16px; gap: 16px; }
  .da-msg { max-width: 100%; }
  .da-msg-av { width: 30px; height: 30px; font-size: 11.5px; }
  .da-reply { padding: 14px 16px 16px; }
  .da-reply-hint { display: none; }
  .da-steps { padding: 0 16px 12px; }
  .da-theme { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- system pages: errors, closed portal, unknown address, offline */
.sys { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.sys-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 28px; }
.sys-brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--ink); text-decoration: none !important; }
.sys-brand:hover { color: var(--ink); }
.sys-brand .tenant-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 15px; }
.sys-brand img.sys-logo { max-height: 44px; max-width: 190px; object-fit: contain; }
.sys-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--brand); color: var(--brand-ink); }
.sys-brand-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sys-brand-tx b { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sys-brand-tx small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sys-help { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); text-decoration: none !important; white-space: nowrap; }
.sys-help .icon { width: 17px; height: 17px; color: var(--brand-text); }
.sys-help:hover { color: var(--ink); }
.sys-main { flex: 1; display: grid; place-items: center; padding: 24px 20px 48px; }
.sys-card {
  position: relative; width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 44px 40px 40px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.sys-card.is-inline { margin: 40px auto; box-shadow: none; }
.sys-card .ti-lg { width: 60px; height: 60px; border-radius: 18px; margin-bottom: 6px; }
.sys-card .ti-lg .icon { width: 28px; height: 28px; }
.sys-code { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: var(--surface-3); color: var(--ink-2); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sys-title { margin-top: 4px; font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; overflow-wrap: anywhere; }
.sys-text { max-width: 44ch; color: var(--muted); font-size: 15px; font-weight: 550; line-height: 1.55; overflow-wrap: anywhere; }
.sys-acts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.sys-acts form { display: contents; }
.sys-list { width: 100%; list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.sys-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.sys-list li .ti { width: 32px; height: 32px; border-radius: 10px; }
.sys-list b { color: var(--ink); font-weight: 700; }
.sys-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; width: 100%; max-width: 1320px; margin: 0 auto; padding: 18px 28px 24px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.sys-foot a { color: var(--muted); }
.sys-foot a:hover { color: var(--ink); }
.sys-foot b { color: var(--ink-2); font-weight: 800; }
@media (max-width: 640px) {
  .sys-top { padding: 16px; }
  .sys-help span { display: none; }
  .sys-help { width: 40px; height: 40px; justify-content: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
  .sys-main { place-items: start center; padding: 8px 16px 32px; }
  .sys-card { padding: 32px 20px 24px; border-radius: 20px; }
  .sys-card.is-inline { margin: 16px auto; }
  .sys-title { font-size: 25px; }
  .sys-acts { width: 100%; flex-direction: column; }
  .sys-acts .btn { width: 100%; }
  .sys-foot { padding: 16px; justify-content: center; text-align: center; }
}
.sys-card.dp-offline-card { max-width: 500px; }

/* ---------------------------------------------------------------- install prompt on the home page */
.bp-install .ti-md { width: 40px; height: 40px; border-radius: 12px; }
.bp-install .grow strong { display: block; font-size: 14.5px; font-weight: 750; line-height: 1.3; }
.bp-install .grow .small { margin-top: 2px; font-size: 12.5px; font-weight: 600; }
.bp-install .icon-btn { width: 34px; height: 34px; border-radius: 10px; color: var(--muted); flex: none; }
#dp-ios-install .bp-steps-list li { font-size: 14px; line-height: 1.4; }
@media (max-width: 640px) {
  .bp-home .bp-install { display: grid; grid-template-columns: 40px minmax(0, 1fr) 34px; align-items: center; gap: 10px 12px; padding: 12px; }
  .bp-home .bp-install .ti-md { align-self: start; }
  .bp-install [data-install] { grid-column: 2; grid-row: 2; justify-self: start; }
  .bp-install .icon-btn { grid-column: 3; grid-row: 1; align-self: start; }
}
.dealer #sifre { scroll-margin-top: 150px; }
