/* LiVAR DCR — Dark Orange Theme (single CSS)
   Accent: #FF5500 | Base: near-black | Text: white */

/* ----------------------------- Design Tokens ------------------------------ */
:root{
  --bg0:#05070a;
  --bg1:#07090c;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.04);
  --stroke:rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.14);
  --text:#f3f5f7;
  --muted:rgba(255,255,255,.72);
  --muted2:rgba(255,255,255,.55);
  --accent:#ff5500;
  --accent2:#ff7a33;
  --danger:#ff3b3b;
  --ok:#28d17c;
  --shadow:0 18px 60px rgba(0,0,0,.55);
  --shadow2:0 10px 28px rgba(0,0,0,.42);
  --r:16px;
  --r2:12px;
  --pad:14px;
  --pad2:18px;
}

/* Subtle background pattern (thin lines + icons) */
:root{
  --pattern-svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260' viewBox='0 0 260 260'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='.06'/%3E%3Cstop offset='1' stop-color='%23ffffff' stop-opacity='.02'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='260' height='260' fill='none'/%3E%3Cpath d='M0 40H260M0 130H260M0 220H260' stroke='url(%23g)' stroke-width='1'/%3E%3Cpath d='M40 0V260M130 0V260M220 0V260' stroke='url(%23g)' stroke-width='1'/%3E%3C!-- envelope icon --%3E%3Cg opacity='.10'%3E%3Crect x='22' y='164' rx='12' ry='12' width='84' height='56' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M26 170l38 24 38-24' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M26 216l26-22' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M102 216l-26-22' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/g%3E%3C!-- document icon --%3E%3Cg opacity='.10'%3E%3Cpath d='M176 38h44l18 18v72a12 12 0 0 1-12 12h-50a12 12 0 0 1-12-12V50a12 12 0 0 1 12-12z' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M220 38v20h20' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M178 78h46M178 96h46M178 114h34' stroke='%23ffffff' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
}

/* ----------------------------- Reset / Base ------------------------------ */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 18% 0%, rgba(255,85,0,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(255,122,51,.10), transparent 60%),
    var(--pattern-svg),
    linear-gradient(180deg,var(--bg0),var(--bg1));
  background-repeat:no-repeat,no-repeat,repeat,repeat;
  background-size:cover,cover,260px 260px,auto;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans",sans-serif;
  letter-spacing:.1px;
}
a{color:inherit}
a:hover{color:var(--accent2)}
img{max-width:100%;height:auto}
code{background:rgba(255,255,255,.06);padding:2px 6px;border-radius:8px;border:1px solid rgba(255,255,255,.10);font-size:12px}
pre{white-space:pre-wrap}
::selection{background:rgba(255,85,0,.35)}

/* Scrollbar */
*::-webkit-scrollbar{height:10px;width:10px}
*::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:999px}
*::-webkit-scrollbar-track{background:rgba(0,0,0,.18)}

/* ----------------------------- Layout helpers ------------------------------ */
.container{max-width:1180px;margin:0 auto;padding:18px 14px}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.spacer{flex:1}
.small{font-size:12px;color:var(--muted)}
.muted{color:var(--muted)}
hr{border:0;border-top:1px solid rgba(255,255,255,.08);margin:14px 0}

/* Compatibility helper (used outside cards) */
.desc{margin:0 0 12px 0;color:var(--muted);font-size:13px;line-height:1.5}

/* Cards */
.card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.18);
  backdrop-filter:blur(16px) saturate(1.2);
  -webkit-backdrop-filter:blur(16px) saturate(1.2);
  border-radius:var(--r);
  padding:var(--pad2);
  box-shadow:var(--shadow2);
}
.card:before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,0) 38%);
  opacity:.35;
  pointer-events:none;
}
.card > *{position:relative;z-index:1;}
.card.soft{background:rgba(0,0,0,.12);backdrop-filter:blur(12px) saturate(1.15);-webkit-backdrop-filter:blur(12px) saturate(1.15);box-shadow:none}
.card h1,.card h2,.card h3{margin:0 0 10px 0}
.card .desc{margin:0 0 12px 0;color:var(--muted);font-size:13px;line-height:1.5}

/* ----------------------------- Topbar (one-line, compact) ------------------------------ */
/* Global: prevent any accidental horizontal scrolling */
html, body{overflow-x:hidden;}

.topbar{
  position:sticky;top:0;z-index:999;
  background:rgba(0,0,0,.42);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.10);
}
.topbar .inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  max-width:1400px;
  margin:0 auto;
  flex-wrap:nowrap;
  overflow-x:hidden;
  min-width:0;
}
/* Topbar header row (brand left, quick actions right) */
.toprow{
  display:flex;
  align-items:center;
  gap:12px;
  flex:0 0 auto;
}
.quick-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}
.icon-btn{
  width:36px;height:36px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--text);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.icon-btn:hover{background:rgba(255,255,255,.07)}
.icon-btn svg{
  width:18px;height:18px;
  fill:none;
  stroke:var(--accent);
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Mobile language pill (flag + label, select overlay) */
.lang-pill{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  height:36px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(233,238,242,.92);
  font-weight:900;
  font-size:12px;
  letter-spacing:.2px;
  white-space:nowrap;
  user-select:none;
}
.lang-pill:hover{background:rgba(255,255,255,.06)}
.lang-pill__ico{
  width:18px;height:18px;
  fill:none;
  stroke:var(--accent);
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.lang-pill__select{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
}
.hide-mobile{}

.brand{
  display:flex;align-items:center;gap:10px;flex:0 0 auto;
  white-space:nowrap;
}
.brand .dot{width:9px;height:9px;border-radius:50%;background:var(--accent)}
.brand .name{font-weight:800;letter-spacing:.4px}
.brand .tag{font-size:11px;color:var(--muted);margin-top:1px}
.brand .flag{margin-left:6px;font-size:14px;line-height:1}
.dnav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  flex:1 1 auto;
  flex-wrap:nowrap; /* keep all items in ONE line */
  min-width:0;
  overflow:hidden; /* never create horizontal scrolling */
}
.dnav__item{
  display:inline-flex;
  align-items:center;
  gap:clamp(6px, .7vw, 8px);
  padding:clamp(7px, .8vw, 9px) clamp(8px, .9vw, 11px);
  border-radius:999px;
  border:1px solid transparent;
  color:rgba(255,255,255,.86);
  text-decoration:none;
  font-size:clamp(11.5px, .95vw, 13px);
  max-width:100%;
  min-width:0;
  flex:0 1 auto; /* allow shrinking instead of wrapping */
}
.dnav__item:hover{
  background:rgba(255,255,255,.04);
  border-color:rgba(255,255,255,.08);
}
.dnav__item.active{
  border-color:rgba(255,85,0,.45);
  background:rgba(255,85,0,.10);
  box-shadow:0 0 0 3px rgba(255,85,0,.10) inset;
}
.dnav__ico{
  width:clamp(16px, 1.2vw, 18px);
  height:clamp(16px, 1.2vw, 18px);
  fill:none;
  stroke:var(--accent);
  stroke-width:2.4;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
}
.dnav__txt{
  font-weight:850;
  letter-spacing:.15px;
  white-space:nowrap;
  max-width:140px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.userbox{
  display:flex;align-items:center;gap:10px;flex:0 0 auto;
  white-space:nowrap;
}
.userlink{
  display:flex;
  align-items:center;
  gap:10px;
  color:inherit;
  text-decoration:none;
  min-width:0;
}
.userlink--avatar{gap:0;padding:4px;border-radius:999px;}
.userlink--avatar:hover{background:rgba(255,255,255,.04);}
.userlink--avatar:focus-visible{outline:2px solid rgba(255,85,0,.55);outline-offset:2px;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.userlink:hover .meta .name{text-decoration:underline;}
.avatar{
  width:30px;height:30px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 30% 30%, rgba(255,85,0,.75), rgba(0,0,0,.55));
  border:1px solid rgba(255,255,255,.10);
}
.avatar svg{
  width:16px;height:16px;
  fill:none;
  stroke:rgba(255,255,255,.92);
  stroke-width:2.2;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.95;
}
.userlink--avatar:hover .avatar{
  border-color:rgba(255,85,0,.45);
  box-shadow:0 0 0 3px rgba(255,85,0,.12);
}
.badge{
  display:inline-flex;align-items:center;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,85,0,.40);
  background:rgba(255,85,0,.10);
  font-size:11px;font-weight:800;
}
.userbox .meta{line-height:1.15;min-width:0}
.userbox .meta .name{font-weight:800;font-size:13px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.userbox .meta .email{font-size:11px;color:var(--muted);max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Language select in topbar (override global form sizing) */
.lang-select{
  width:auto;
  padding:8px 34px 8px 10px;
  border-radius:10px;
  font-size:12px;
}

/* Mobile: keep one line, allow horizontal scroll */
@media (max-width:920px){
  .topbar .inner{padding:10px 10px;gap:10px}
  .dnav__item{font-size:12px;padding:8px 10px}
  .brand .tag{display:none}
}

@media (max-width: 1280px){
  .topbar .inner{gap:10px;padding:10px 12px}
  .dnav{gap:4px}
  .userbox{gap:8px}
  .userbox .meta .name{max-width:180px}
  .userbox .meta .email{max-width:180px}
}

/* Desktop/tablet: icon-first nav to avoid any horizontal overflow */
@media (max-width: 1100px){
  .dnav__txt{display:none}
  .dnav__item{padding:9px;width:40px;justify-content:center}
  .userbox .meta .email{display:none}
}
@media (max-width: 860px){
  .userbox .meta{display:none}
}

/* ----------------------------- Forms ------------------------------ */
label{display:block;margin:10px 0 6px 0;color:var(--muted);font-size:12px}
input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:var(--r2);
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.26);
  color:var(--text);
  outline:none;
}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus{
  border-color:rgba(255,85,0,.55);
  box-shadow:0 0 0 3px rgba(255,85,0,.14);
}
input::placeholder,textarea::placeholder{color:rgba(255,255,255,.35)}
select{
  appearance:none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.55) 50%),
    linear-gradient(135deg, rgba(255,255,255,.55) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
}
.checkbox{
  display:flex;align-items:center;gap:8px;
  user-select:none;
}
.checkbox input{width:auto}

/* ----------------------------- Buttons ------------------------------ */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--text);
  text-decoration:none;
  cursor:pointer;
  font-weight:650;
  font-size:13px;
}
.btn:hover{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.07)}
.btn:active{transform:translateY(1px)}
.btn-primary{
  border:0;
  color:#111;
  background:linear-gradient(180deg, rgba(255,85,0,.95), rgba(255,85,0,.78));
  box-shadow:0 12px 30px rgba(255,85,0,.16);
}
.btn-primary:hover{filter:saturate(1.05) brightness(1.02)}
.btn-ghost{
  background:transparent;
  border:1px solid rgba(255,255,255,.12);
}
.btn-danger{
  border:1px solid rgba(255,59,59,.40);
  background:rgba(255,59,59,.10);
}
.btn-small{padding:8px 10px;font-size:12px}

/* ----------------------------- Notices / Alerts ------------------------------ */
.notice{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  font-size:13px;
}
.notice.ok{
  border-color:rgba(40,209,124,.35);
  background:rgba(40,209,124,.10);
}
.notice.err{
  border-color:rgba(255,59,59,.35);
  background:rgba(255,59,59,.10);
}

/* ----------------------------- Tables ------------------------------ */
.table{width:100%;border-collapse:collapse}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  font-size:13px;
}
.table th{color:var(--muted);font-weight:700}
.table tr:hover td{background:rgba(255,255,255,.03)}

/* ----------------------------- Details (Edit dropdown) ------------------------------ */
details{border-radius:12px}
details > summary{
  list-style:none;
  cursor:pointer;
}
details > summary::-webkit-details-marker{display:none}
details[open] > summary{filter:saturate(1.05)}
details form{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid rgba(255,255,255,.08);
}

/* ----------------------------- Customers (List) inline actions ------------------------------ */
.customers-table{table-layout:fixed}
.customers-table th,.customers-table td{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  vertical-align:middle;
}
.customers-table td.customer-actions{overflow:visible}
.customers-table details.customer-edit{display:inline-flex;align-items:center;gap:10px}
.customers-table details.customer-edit > summary{display:inline-flex;align-items:center}
.customers-table .customer-actions-inline{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}
.customers-table .customer-actions-inline form{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:0;
  border:0;
}
.customers-table td.customer-actions details form{
  margin-top:0;
  padding-top:0;
  border-top:0;
}
.customers-table .customer-actions-inline input[type="password"]{
  width:160px;
  max-width:20vw;
  height:32px;
  padding:6px 10px;
}
.customers-table .customer-actions-inline .btn{white-space:nowrap}

/* ----------------------------- Customers (Cards / accordion) ------------------------------ */
.customer-cards{display:flex;flex-direction:column;gap:12px}
.customer-card{border:1px solid rgba(255,255,255,.10);background:rgba(0,0,0,.18);border-radius:16px;overflow:hidden}
.customer-card > summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px}
.customer-card > summary:focus{outline:none}
.customer-card__left{min-width:0}
.customer-card__name{font-weight:900;font-size:14px;letter-spacing:.2px;max-width:48vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-card__sub{font-size:12px;margin-top:2px}
.customer-card__right{display:flex;align-items:center;gap:10px;flex-shrink:0;min-width:0}
.customer-card__meta{font-size:11px;color:var(--muted);max-width:22vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer-card__chev{width:16px;height:16px;fill:none;stroke:rgba(255,255,255,.80);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease}
.customer-card[open] > summary{background:rgba(255,255,255,.03)}
.customer-card[open] .customer-card__chev{transform:rotate(90deg)}
.customer-card__body{padding:14px 16px 16px;border-top:1px solid rgba(255,255,255,.08)}
.customer-card__grid{display:grid;grid-template-columns:1.3fr 1fr .8fr;gap:12px}
.customer-card__panel{border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(0,0,0,.18);padding:12px;min-width:0}
.customer-card__panel h4{margin:0 0 10px 0;font-size:13px}
.customer-card__panel--danger{border-color:rgba(255,85,0,.22)}
.customer-card__panel form{margin-top:0;padding-top:0;border-top:0}

@media (max-width: 980px){
  .customer-card__grid{grid-template-columns:1fr}
  .customer-card__name{max-width:62vw}
  .customer-card__meta{display:none}
}

/* ----------------------------- Rich text toolbar (mini "word-like") ------------------------------ */
.rte{
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,.22);
}
.rte-toolbar{
  display:flex;flex-wrap:wrap;align-items:center;gap:8px;
  padding:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}
.rte-toolbar .group{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.rte-toolbar .group{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
.rte-toolbar .group-placeholders{
  flex-basis:100%;
  padding-top:8px;margin-top:6px;
  border-top:1px solid rgba(255,255,255,.06);
  overflow-x:auto;scrollbar-width:none;
}
.rte-toolbar .group-placeholders::-webkit-scrollbar{height:0}
.rte-toolbar .group-placeholders .rte-btn{
  height:36px;min-height:36px;
  padding:0 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-size:12px;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  user-select:none;
  white-space:nowrap;
}
.rte-btn--icon{width:36px;padding:0}
.rte-btn svg{width:16px;height:16px;display:block;pointer-events:none}

.rte-btn{
  padding:7px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  color:var(--text);
  font-size:12px;
  cursor:pointer;
}
.rte-btn:hover{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.rte-btn.active{
  border-color:rgba(255,85,0,.45);
  background:rgba(255,85,0,.10);
}
.rte-editor{
  padding:12px 12px;
  min-height:220px;
  outline:none;
  line-height:1.65;
}
.rte-editor:empty:before{
  content:attr(data-placeholder);
  color:rgba(255,255,255,.35);
}

/* Font select inside toolbar */
.rte select{
  width:auto;
  height:36px;
  padding:0 34px 0 10px;
  border-radius:10px;
  font-size:12px;
  line-height:1;
}

/* Color picker inside toolbar */
.rte input[type="color"].rte-color{
  width:36px;height:36px;padding:0;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  cursor:pointer;
}
.rte input[type="color"].rte-color::-webkit-color-swatch-wrapper{padding:6px}
.rte input[type="color"].rte-color::-webkit-color-swatch{border:0;border-radius:8px}

/* ----------------------------- Page sections (Admin) ------------------------------ */
.section-title{
  display:flex;align-items:flex-end;justify-content:space-between;
  gap:10px;margin-bottom:10px
}
.section-title h2{margin:0}
.section-title .right{display:flex;gap:10px;align-items:center}

/* Documents toolbar (search + actions) */
.doc-toolbar{flex-wrap:wrap;justify-content:flex-end}
.doc-search{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.doc-search__input{width:260px;max-width:52vw;padding:10px 12px;border-radius:999px}
.row-actions{display:flex;gap:8px;justify-content:flex-end;align-items:center}
.row-actions form{margin:0}

@media (max-width: 720px){
  .doc-search{width:100%;flex-wrap:wrap}
  .doc-search__input{width:100%;max-width:100%}
}


/* ----------------------------- Create Document wizard layout ------------------------------ */
.wizard{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.wizard .steps{
  display:flex;gap:10px;flex-wrap:wrap;
  color:var(--muted);font-size:12px
}
.wizard .steps .pill{
  padding:7px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04)
}

/* ----------------------------- Verify page / Public pages ------------------------------ */
.public-wrap{max-width:980px;margin:0 auto;padding:22px 14px}
.public-hero{
  padding:18px;border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.35);
  box-shadow:var(--shadow2)
}
.public-hero h1{margin:0 0 6px;font-size:20px}
.kv{
  display:grid;grid-template-columns:160px 1fr;
  gap:10px;
  margin-top:12px
}
.kv .k{color:var(--muted);font-size:12px}
.kv .v{font-size:13px}

/* ----------------------------- Letterhead calibration helpers ------------------------------ */
.cal-toolbar{position:sticky;top:64px;z-index:50}
@media (max-width:920px){
  .cal-toolbar{top:56px}
}

/* ----------------------------- Print hints (optional) ------------------------------ */
@media print{
  body{background:#fff;color:#000}
  .topbar{display:none}
  .card{box-shadow:none}
}

/* ----------------------------- Template Editor extras ------------------------------ */
.emoji-panel{border-top:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.25)}
.emoji-head{display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid rgba(255,255,255,.08)}
.emoji-head input{flex:1}
.emoji-body{max-height:240px;overflow:auto;padding:10px;display:flex;flex-wrap:wrap;gap:6px}
.emoji-item{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:10px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);cursor:pointer;font-size:18px;user-select:none}
.emoji-item:hover{border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.06)}
.rte-code{background:rgba(0,0,0,.30);color:var(--text);border:0;border-top:1px solid rgba(255,255,255,.08);padding:12px 12px;outline:none;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;line-height:1.55}

/* RTE status bar (word count) */
.rte-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
}

/* Fullscreen editor (desktop-only) */
@media (min-width: 900px){
  body.rte-fs{ overflow:hidden; }
  .rte.is-fullscreen{
    position:fixed;
    left:18px; right:18px;
    top:74px; bottom:18px;
    z-index:9999;
    box-shadow:0 40px 90px rgba(0,0,0,.65);
  }
  .rte.is-fullscreen .rte-editor{ min-height:calc(100vh - 220px); }
}

/* =========================================================
   Mobile UI (<=560px)
   Goal: provide a distinct mobile experience without a hamburger menu.
   ========================================================= */

.only-mobile{display:none}
.only-desktop{display:block}

@media (max-width: 560px){
  /* Hard stop for accidental horizontal scrolling on mobile */
  html, body{overflow-x:hidden !important;}
  .topbar, .topbar .inner, .container, .screen{overflow-x:hidden;}
  /* Keep the sticky header narrow like the mobile screen */
  .topbar .inner{display:flex;max-width:420px;flex-direction:column;align-items:stretch;gap:10px;}
  .toprow{width:100%;justify-content:space-between;}
  .toprow .brand{justify-content:flex-start;text-align:left;}
  .brand .name{font-size:15px;}
  .brand .tag{font-size:12px;}
  .dnav{display:none !important;}
  .hide-mobile{display:none !important;}
  .userbox{width:100%;justify-content:center;gap:8px;flex-wrap:wrap;}
  .userbox .meta{display:none;}
  .lang-select{max-width:120px;font-size:12px;padding:6px 10px;}
  .btn.btn-small{font-size:12px;padding:8px 10px;}

  :root{
    --bg0:#0b0f12;
    --bg1:#0f1417;
    --stroke:rgba(255,255,255,.06);
    --stroke2:rgba(255,255,255,.10);
    --text:#e9eef2;
    --muted:rgba(233,238,242,.56);

    --accent:#f17216;
    --accent2:#ff8a2a;

    --r18:18px;
    --shadow:0 18px 40px rgba(0,0,0,.55);
  }

  .only-mobile{display:block}
  .only-mobile.quick-actions{display:flex}
  .only-desktop{display:none}

  body{
    background:
      radial-gradient(900px 520px at 30% 8%, rgba(241,114,22,.16), transparent 60%),
      radial-gradient(720px 520px at 78% 34%, rgba(80,140,255,.10), transparent 62%),
      linear-gradient(180deg, var(--bg1), var(--bg0) 62%, #080b0e);
  }

  /* Grid overlay for mobile only. */
  html.bg-grid::before{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:.35;
    background:
      repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 34px),
      repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 34px);
    -webkit-mask-image: radial-gradient(closest-side at 50% 22%, rgba(0,0,0,1), rgba(0,0,0,.2) 55%, rgba(0,0,0,0) 78%);
    mask-image: radial-gradient(closest-side at 50% 22%, rgba(0,0,0,1), rgba(0,0,0,.2) 55%, rgba(0,0,0,0) 78%);
  }

  /* Mobile shell */
  .screen{
    width:100%;
    max-width:420px;
    min-height:100svh;
    margin:0 auto;
    padding:18px 16px 26px;
    display:flex;
    flex-direction:column;
    gap:16px;
  }

  /* If a page explicitly hides mobile nav (print/calibrate), remove extra bottom padding */
  body.mnav-hidden .screen{padding-bottom:26px}
  body.mnav-hidden .mnav{display:none !important}

  /* Brand (mobile header style) */
  .brand__dot{
    width:10px;height:10px;border-radius:50%;
    background:var(--accent);
    box-shadow:0 0 0 6px rgba(241,114,22,.10);
  }
  .brand__title{font-weight:800;letter-spacing:.4px}
  .brand__sub{color:var(--muted);font-size:12.5px;margin-top:-6px;text-align:center}

  /* Breadcrumb / page titles (optional) */
  .breadcrumb{display:flex;align-items:center;gap:8px;color:rgba(233,238,242,.72);font-size:12.5px}
  .breadcrumb .home-ico{width:15px;height:15px;stroke:var(--accent);fill:none;stroke-width:2.2}
  .breadcrumb .sep{opacity:.6}
  .page-title{font-size:28px;font-weight:900;margin:2px 0 0}
  .page-sub{color:var(--muted);font-size:12.5px;margin-top:2px}

  /* User chip (optional footer) */
  .user-chip{
    margin-top:auto;
    padding:10px 12px;
    display:flex;
    align-items:center;
    gap:10px;
    border-radius:999px;
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border:1px solid var(--stroke);
  }
  .avatar{
    width:34px;height:34px;border-radius:50%;
    background:var(--accent);
    display:grid;place-items:center;
    color:#151515;
    font-weight:900;
  }
  .user-meta{display:flex;flex-direction:column;gap:2px}
  .user-name{font-weight:800;font-size:13px}
  .user-mail{font-size:12px;color:var(--muted)}

  /* Accordion cards (projects-like) */
  .list{display:flex;flex-direction:column;gap:12px}
  .project{border-radius:var(--r18);border:1px solid var(--stroke);background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));overflow:hidden}
  .project__head{padding:14px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer}
  .project__left{display:flex;align-items:baseline;gap:10px;min-width:0}
  .project__idx{color:rgba(233,238,242,.72);font-weight:800;font-size:12px}
  .project__name{font-weight:900;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .project__status{margin-left:8px;font-size:12px;color:rgba(233,238,242,.65)}
  .chev{width:18px;height:18px;stroke:rgba(233,238,242,.75);fill:none;stroke-width:2.4;transition:transform .18s ease}
  .project.open .chev{transform:rotate(180deg)}
  .project__content{padding:0 14px;max-height:0;opacity:0;overflow:hidden;transition:max-height .22s ease, opacity .18s ease, padding .18s ease}
  .project.open .project__content{padding:10px 14px 14px;opacity:1}

  .meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;padding-bottom:12px;border-bottom:1px solid rgba(255,255,255,.05)}
  .meta{display:flex;flex-direction:column;gap:4px}
  .meta .k{font-size:11.5px;color:rgba(233,238,242,.58)}
  .meta .v{font-size:13px;font-weight:800}
  .actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
  .btn-outline{flex:1 1 140px;min-width:0;background:transparent;border:1px solid rgba(241,114,22,.55);color:var(--accent)}
  .btn-danger{flex:1 1 140px;min-width:0;background:transparent;border:1px solid rgba(255,59,59,.55);color:var(--danger)}

  /* Toast */
  .toast{
    position:fixed;
    left:50%;
    bottom:18px;
    transform:translateX(-50%);
    width:min(420px, calc(100% - 24px));
    padding:12px 14px;
    border-radius:14px;
    border:1px solid var(--stroke);
    background:rgba(15,20,23,.92);
    backdrop-filter:blur(10px);
    color:rgba(233,238,242,.9);
    box-shadow:var(--shadow);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease, transform .18s ease;
    z-index:120;
  }
  .toast.show{
    opacity:1;
    transform:translateX(-50%) translateY(-4px);
  }

  /* Compact top bar without the desktop navigation. */
  .topbar{position:sticky;top:0;z-index:60}
  .topbar .inner{padding:10px 12px;border-radius:16px}
  .topbar .brand .tag{display:none}
  .topbar .dnav{display:none}
  .userbox .badge{display:none}
  .lang-select{height:34px;padding:0 10px;font-size:12px}
  .quick-actions .lang-select{max-width:86px}

  /* Typography */
  h2{font-size:18px}
  .desc{font-size:12.5px}
  label{font-size:12px}
  input,select,textarea{font-size:13px}

  /* Cards */
  .card{
    border-radius:var(--r18);
    border:1px solid var(--stroke);
    box-shadow:0 12px 30px rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
  }

  /* Buttons bigger for touch */
  .btn{padding:12px 14px;font-size:13px;border-radius:999px}
  .btn-small{padding:10px 12px;font-size:12.5px}
  .btn-primary{box-shadow:0 10px 20px rgba(241,114,22,.22)}

  /* Forms/layout: stack */
  .grid{grid-template-columns:1fr !important}
  .grid > *{grid-column:1 / -1 !important}
  .grid [style*="grid-column"]{grid-column:1 / -1 !important}

  .row{flex-wrap:wrap}
  .row > *{flex:1 1 220px}
  .row .spacer{display:none}

  /* Tables become stacked cards; JavaScript only adds data-label attributes. */
  .table.m-stack thead{display:none}
  .table.m-stack tbody{display:block}
  .table.m-stack tr{
    display:block;
    margin:0 0 12px;
    padding:10px 12px;
    border:1px solid var(--stroke);
    border-radius:var(--r18);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
    overflow:hidden;
  }
  .table.m-stack td{
    display:flex;
    justify-content:space-between;
    gap:12px;
    border:0;
    padding:8px 0;
    align-items:flex-start;
  }
  .table.m-stack td::before{
    content:attr(data-label);
    color:rgba(233,238,242,.58);
    font-size:11.5px;
    font-weight:800;
    flex:0 0 42%;
  }
  .table.m-stack td:last-child{padding-top:12px}
  .table.m-stack td:last-child::before{content:""}
  .table.m-stack td:last-child > *{margin-left:auto}
  .table.m-stack details{width:100%}
  .table.m-stack details summary{padding:10px 0}
  .table.m-stack details pre{white-space:pre-wrap;word-break:break-word}

  /* Mobile bottom navigation without a hamburger menu. */
  .mnav{
    /* Mobile nav is rendered under the LiVAR DCR brand (inside the sticky topbar) */
    position:relative;
    left:auto;
    bottom:auto;
    transform:none;
    width:min(420px, calc(100% - 24px));
    margin:10px auto 12px;
    padding:10px 10px;
    display:flex;
    justify-content:center;
    flex-wrap:nowrap;
    gap:6px;
    border-radius:var(--r18);
    background:rgba(15,20,23,.86);
    border:1px solid var(--stroke);
    backdrop-filter:blur(10px);
    box-shadow:0 10px 22px rgba(0,0,0,.35);
    z-index:70;
  }
  .mnav__item{
    flex:1;
    min-width:0; /* allow items to shrink so the whole menu stays on ONE line */
    text-decoration:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    padding:8px 6px;
    border-radius:14px;
    color:var(--text);
    font-weight:900;
    font-size:10.2px;
    letter-spacing:.1px;
    white-space:nowrap;
    overflow:hidden;
  }
  .mnav__item > span{
    text-decoration:none;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .mnav__ico{
    width:22px;
    height:22px;
    fill:none;
    stroke:var(--accent);
    stroke-width:2.2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  .mnav__item.active{
    color:var(--text);
    background:rgba(241,114,22,.10);
    border:1px solid rgba(241,114,22,.20);
  }
  .mnav__item:active{transform:translateY(1px)}

  /* Media */
  img{max-width:100%;height:auto}
}

@media (min-width: 561px){
  .mnav{display:none}
}

@media (max-width: 560px){
  /* Mobile dashboard-style menu cards */
  .grid-menu{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:8px}
  .menu-item{
    padding:18px 16px 16px;
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:130px;
    position:relative;
    overflow:hidden;
    cursor:pointer;
  }
  .menu-item:active{transform:translateY(1px)}
  .menu-item::after{
    content:"";
    position:absolute;
    inset:-60px -60px auto auto;
    width:160px;height:160px;
    border-radius:50%;
    background: radial-gradient(circle at 30% 30%, rgba(241,114,22,.16), transparent 62%);
    opacity:.7;
    pointer-events:none;
  }
  .icon-box{
    width:50px;height:50px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background: rgba(241,114,22,.10);
    border:1px solid rgba(241,114,22,.28);
  }
  .icon{
    width:22px;height:22px;
    fill:none;
    stroke:var(--accent);
    stroke-width:2.2;
    stroke-linecap:round;
    stroke-linejoin:round;
  }
  .menu-title{font-weight:900;font-size:15px;margin-top:2px}
  .menu-sub{color:var(--muted);font-size:12px;margin-top:-6px}
}

@media (max-width: 360px){
  .screen{padding-left:14px;padding-right:14px}
  .page-title{font-size:24px}
  .btn{font-size:12px;padding:10px 12px}
  .meta-grid{grid-template-columns:1fr}
  .mnav__item{font-size:9.8px}
  .mnav__ico{width:20px;height:20px}
}

/* -------------------------- Admin Dashboard Quick Menu -------------------------- */
.admin-launch{margin-top:2px}
.admin-launch__nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(8px, 1.2vw, 14px);
  flex-wrap:nowrap;
  width:100%;
}
.admin-launch__item{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:clamp(9px, 1vw, 12px) clamp(12px, 1.2vw, 16px);
  border:1px solid var(--stroke);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:var(--text);
  text-decoration:none;
  font-weight:650;
  font-size:clamp(12px, .95vw, 14px);
  line-height:1;
  white-space:nowrap;
  min-width:0;
  user-select:none;
}
.admin-launch__item:hover{background:rgba(255,85,0,.10);border-color:rgba(255,85,0,.35)}
.admin-launch__item:active{transform:translateY(1px)}
.admin-launch__item.is-active{background:rgba(255,85,0,.14);border-color:rgba(255,85,0,.45)}
.admin-launch__ico{
  width:18px;height:18px;
  fill:none;
  stroke:var(--accent);
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex:0 0 auto;
}
.admin-launch__item--danger{border-color:rgba(255,59,59,.30)}
.admin-launch__item--danger:hover{background:rgba(255,59,59,.10);border-color:rgba(255,59,59,.45)}
.admin-launch__item--danger .admin-launch__ico{stroke:var(--danger)}

@media (max-width: 980px){
  .admin-launch__item{gap:8px;padding:10px 12px;font-size:12px}
  .admin-launch__ico{width:17px;height:17px}
}

@media (max-width: 720px){
  .admin-launch__nav{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:10px;
    justify-items:stretch;
  }
  .admin-launch__item{width:100%;justify-content:center}
}


/* ----------------------------- Media (Attachments manager) ------------------------------ */
@media (min-width: 721px){
  .media-table{table-layout:fixed}
  .media-table td{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    vertical-align:middle;
  }
  .media-table td:last-child{overflow:visible}
}


/* Media page: prevent horizontal overflow and slightly smaller typography */
.media-page{max-width:100%;overflow-x:hidden;font-size:13px}
.media-page h3{font-size:16px}
.media-page .desc{font-size:12.5px}
.media-page input,.media-page select,.media-page textarea{font-size:12.5px}
.media-page .table{width:100%;max-width:100%}
.media-page .media-table th{font-size:12px;white-space:nowrap}
.media-page .media-table td{font-size:12.5px}
.media-page .media-table .row-actions{flex-wrap:wrap}

/* On smaller desktops, switch Media table to stacked cards to avoid any horizontal scroll */
@media (max-width: 1180px){
  .media-page .media-table.m-stack thead{display:none}
  .media-page .media-table.m-stack tbody{display:block}
  .media-page .media-table.m-stack tr{
    display:block;
    margin:0 0 12px;
    padding:10px 12px;
    border:1px solid var(--stroke);
    border-radius:var(--r18);
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
    overflow:hidden;
  }
  .media-page .media-table.m-stack td{
    display:flex;
    justify-content:space-between;
    gap:12px;
    border:0;
    padding:8px 0;
    align-items:flex-start;
  }
  .media-page .media-table.m-stack td::before{
    content:attr(data-label);
    color:rgba(233,238,242,.58);
    font-size:11.5px;
    font-weight:800;
    flex:0 0 42%;
  }
  .media-page .media-table.m-stack td:last-child{padding-top:12px}
  .media-page .media-table.m-stack td:last-child::before{content:""}
  .media-page .media-table.m-stack td:last-child > *{margin-left:auto}
}



/* ================================
   Media Manager v2 (clean + no overflow)
   ================================ */
.media-page{max-width:100%;overflow-x:hidden}
.media-page .media-head{display:flex;align-items:flex-end;gap:16px;margin:0 0 12px 0}
.media-page .media-title{font-size:16px;font-weight:900;letter-spacing:.2px;margin:0}
.media-page .media-subtitle{font-size:12.5px;color:rgba(233,238,242,.60);margin-top:2px}
.media-page .media-meta{margin-left:auto;font-size:12.5px;color:rgba(233,238,242,.60);white-space:nowrap}

.media-page .media-filters{
  display:grid;
  grid-template-columns:minmax(240px, 2.2fr) repeat(4, minmax(120px, 1fr)) minmax(120px,.9fr) auto;
  gap:10px;
  align-items:center;
  margin:10px 0 14px 0;
}
.media-page .media-filters input,
.media-page .media-filters select{
  width:100%;
  min-width:0;
}
.media-page .media-filter-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:nowrap;
}
@media (max-width: 1100px){
  .media-page .media-filters{grid-template-columns:1fr 1fr}
  .media-page .media-filter-actions{grid-column:1 / -1;justify-content:flex-start}
}
@media (max-width: 680px){
  .media-page .media-filters{grid-template-columns:1fr}
  .media-page .media-filter-actions{grid-column:1 / -1}
}

.media-page .media-table{table-layout:fixed;width:100%;max-width:100%}
.media-page .media-table th{white-space:nowrap;font-size:12px}
.media-page .media-table td{vertical-align:top}
.media-page .media-table td, .media-page .media-table th{overflow:hidden}

.media-page .media-file{display:flex;gap:12px;align-items:flex-start;min-width:0}
.media-page .file-ico{
  width:38px;height:38px;border-radius:12px;
  background:rgba(241,114,22,.12);
  border:1px solid rgba(241,114,22,.28);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;font-size:11px;letter-spacing:.6px;
  color:rgba(241,114,22,.95);
  flex:0 0 auto;
  text-transform:uppercase;
}
.media-page .file-meta{min-width:0}
.media-page .file-name-row{display:flex;align-items:center;gap:8px;min-width:0}
.media-page .file-name{
  font-weight:900;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
  display:block;
}
.media-page .file-stored{
  font-size:12px;
  color:rgba(233,238,242,.58);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:2px;
}
.media-page .badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.media-page .badge{
  display:inline-flex;align-items:center;
  padding:3px 9px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.03);
  font-size:11px;
  font-weight:800;
  line-height:1.1;
  max-width:100%;
}
.media-page .badge-muted{color:rgba(233,238,242,.62);background:rgba(255,255,255,.02)}
.media-page .badge-danger{
  border-color:rgba(255,59,59,.35);
  background:rgba(255,59,59,.12);
  color:rgba(255,140,140,.95);
}

.media-page .doc-link{
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  display:block;
}
.media-page .doc-subject{
  font-size:12px;
  color:rgba(233,238,242,.58);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:3px;
}

.media-page .owner-block{display:flex;flex-direction:column;gap:6px}
.media-page .owner-line{display:flex;gap:10px;min-width:0}
.media-page .owner-k{flex:0 0 68px;font-size:11px;color:rgba(233,238,242,.58);font-weight:900}
.media-page .owner-v{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.media-page .mono{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:12px;
  white-space:nowrap;
}

.media-page .media-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media (max-width: 900px){
  .media-page .media-actions{justify-content:flex-start}
}

/* ========================================================================== */
/* Digital Secretariat — client portal v1.4                                  */
/* ========================================================================== */
body.client-portal{
  --client-bg:#f4f6f8;
  --client-surface:#ffffff;
  --client-text:#17212b;
  --client-muted:#687480;
  --client-line:#dfe4e8;
  --client-navy:#17324d;
  --client-blue:#245b87;
  --client-green:#167a54;
  --client-amber:#a85c00;
  color:var(--client-text);
  background:var(--client-bg);
}
body.client-portal .topbar{
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--client-line);
  box-shadow:0 3px 18px rgba(23,50,77,.06);
  backdrop-filter:blur(14px);
}
body.client-portal .brand .name{color:var(--client-navy)}
body.client-portal .brand .tag,
body.client-portal .userbox .meta .email{color:var(--client-muted)}
body.client-portal .userbox .meta .name{color:var(--client-text)}
body.client-portal .dnav__item{color:#465462}
body.client-portal .dnav__item:hover{background:#f1f4f6;border-color:#e1e6ea;color:var(--client-navy)}
body.client-portal .dnav__item.active{background:#eaf1f7;border-color:#cad9e6;box-shadow:none;color:var(--client-navy)}
body.client-portal .dnav__ico{stroke:var(--client-blue)}
body.client-portal .icon-btn,
body.client-portal .lang-select{
  border-color:var(--client-line);
  background:#fff;
  color:var(--client-text);
}
body.client-portal .icon-btn svg{stroke:var(--client-blue)}
body.client-portal .container{max-width:1320px;padding-top:28px;padding-bottom:48px}
body.client-portal .notice{background:#fff;color:var(--client-text);border-color:var(--client-line);box-shadow:0 6px 18px rgba(23,50,77,.05)}
body.client-portal .notice.ok{border-color:#b9dfcf;background:#f2fbf7}
body.client-portal .notice.err{border-color:#efc5c5;background:#fff7f7}
body.client-portal .card{background:#fff;color:var(--client-text);border-color:var(--client-line);box-shadow:0 8px 24px rgba(23,50,77,.07);backdrop-filter:none}
body.client-portal .card:before{display:none}
body.client-portal input,
body.client-portal select,
body.client-portal textarea{
  background:#fff;
  color:var(--client-text);
  border-color:#cfd7de;
}
body.client-portal input:focus,
body.client-portal select:focus,
body.client-portal textarea:focus{
  border-color:#7ba4c6;
  box-shadow:0 0 0 3px rgba(36,91,135,.12);
}
body.client-portal .btn{
  border-color:#cfd7de;
  background:#fff;
  color:var(--client-navy);
  box-shadow:none;
}
body.client-portal .btn:hover{background:#f2f5f7;border-color:#b8c5cf;color:var(--client-navy)}
body.client-portal .btn-primary{
  background:var(--client-navy);
  border-color:var(--client-navy);
  color:#fff;
}
body.client-portal .btn-primary:hover{background:#0f2941;border-color:#0f2941;color:#fff}
body.client-portal .btn-ghost{background:transparent}
body.client-portal code{background:#f1f4f6;border-color:#dbe2e7;color:#334250}
body.client-portal hr{border-color:var(--client-line)}

.client-cartable{max-width:1120px;margin:0 auto}
.client-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}
.client-eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:11px;font-weight:900;color:var(--client-blue);margin-bottom:8px}
.client-page-head h1{font-size:34px;line-height:1.1;letter-spacing:-.03em;margin:0;color:var(--client-navy)}
.client-page-head p{margin:9px 0 0;color:var(--client-muted);font-size:14px}
.client-head-counts{display:flex;align-items:center;gap:8px}
.client-head-counts>div{min-width:84px;padding:12px 15px;background:#fff;border:1px solid var(--client-line);border-radius:14px;text-align:center}
.client-head-counts strong{display:block;font-size:20px;color:var(--client-navy)}
.client-head-counts span{display:block;margin-top:2px;color:var(--client-muted);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.cartable-tabs{display:flex;gap:6px;margin-bottom:18px;padding:5px;background:#e9edf0;border:1px solid #dce2e6;border-radius:14px;width:max-content}
.cartable-tab{display:flex;align-items:center;gap:10px;padding:9px 15px;border-radius:10px;text-decoration:none;color:#53616e;font-size:13px;font-weight:800}
.cartable-tab b{min-width:22px;height:22px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:rgba(23,50,77,.08);font-size:11px}
.cartable-tab.active{background:#fff;color:var(--client-navy);box-shadow:0 2px 7px rgba(23,50,77,.08)}
.cartable-list{display:flex;flex-direction:column;gap:11px}
.cartable-card{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:16px;
  align-items:center;
  padding:18px;
  border:1px solid var(--client-line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 5px 18px rgba(23,50,77,.045);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.cartable-card:hover{transform:translateY(-1px);border-color:#bacbd8;box-shadow:0 10px 25px rgba(23,50,77,.08)}
.cartable-card__icon{width:48px;height:48px;border-radius:13px;display:grid;place-items:center;background:#eef3f7;color:var(--client-blue)}
.cartable-card__icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.cartable-card__main{min-width:0}
.cartable-card__topline{display:flex;align-items:center;gap:9px;margin-bottom:7px}
.record-state{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:#fff4e5;color:var(--client-amber);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}
.record-state.is-final{background:#eaf7f1;color:var(--client-green)}
.record-ref{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--client-muted);font-size:11px;font-weight:700}
.cartable-card h2{margin:0;color:var(--client-text);font-size:16px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cartable-card__meta{display:flex;flex-wrap:wrap;gap:7px 16px;margin-top:7px;color:var(--client-muted);font-size:12px}
.cartable-card__meta span+span:before{content:"•";margin-right:16px;color:#b0bac2}
.cartable-card__action{display:flex;align-items:center;gap:12px}
.record-action{font-size:11px;font-weight:800;white-space:nowrap}
.record-action.is-required{color:#a64d00}
.record-action.is-waiting{color:var(--client-blue)}
.record-action.is-final{color:var(--client-green)}
.cartable-card__action .btn{white-space:nowrap;text-decoration:none}
.cartable-empty{padding:70px 24px;text-align:center;border:1px dashed #cbd5dc;border-radius:18px;background:#fff}
.cartable-empty__icon{width:58px;height:58px;margin:0 auto 14px;border-radius:17px;background:#eef3f7;display:grid;place-items:center;color:var(--client-blue)}
.cartable-empty__icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}
.cartable-empty h2{font-size:19px;color:var(--client-navy);margin:0}
.cartable-empty p{color:var(--client-muted);font-size:13px;margin:7px 0 0}

.client-record-page{max-width:1240px;margin:0 auto}
.record-back-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.record-back{text-decoration:none;color:var(--client-blue);font-size:13px;font-weight:800}
.record-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:22px 24px;background:#fff;border:1px solid var(--client-line);border-radius:17px;margin-bottom:16px}
.record-header__line{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.record-header h1{font-size:26px;line-height:1.25;color:var(--client-navy);letter-spacing:-.025em;margin:0}
.record-header p{font-size:13px;color:var(--client-muted);margin:7px 0 0}
.record-integrity{display:flex;flex-direction:column;align-items:flex-end;gap:7px;padding:10px 12px;border:1px solid #c5dfd4;border-radius:12px;background:#f2faf6}
.record-integrity span{color:var(--client-green);font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.record-integrity code{font-size:11px}
.record-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start}
.record-main{display:flex;flex-direction:column;gap:16px;min-width:0}
.record-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#fff;border:1px solid var(--client-line);border-radius:15px;overflow:hidden}
.record-summary>div{padding:14px 16px;border-right:1px solid var(--client-line);min-width:0}
.record-summary>div:last-child{border-right:0}
.record-summary span{display:block;color:var(--client-muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}
.record-summary strong{display:block;color:var(--client-text);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.record-paper{background:#fff;color:#111;border:1px solid #d7dde2;border-radius:15px;padding:clamp(24px,4vw,52px);min-height:420px;line-height:1.72;box-shadow:0 8px 24px rgba(23,50,77,.06);overflow-wrap:anywhere}
.record-paper table{max-width:100%}
.record-section{background:#fff;border:1px solid var(--client-line);border-radius:15px;padding:20px}
.record-section__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}
.record-section__head h2{font-size:16px;color:var(--client-navy);margin:0}
.record-section__head p{font-size:12px;color:var(--client-muted);margin:4px 0 0}
.record-section__head>span{min-width:26px;height:26px;padding:0 7px;display:grid;place-items:center;border-radius:999px;background:#edf2f5;color:var(--client-muted);font-size:11px;font-weight:800}
.attachment-list{display:flex;flex-direction:column;gap:8px}
.attachment-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:11px 12px;border:1px solid #e1e6ea;border-radius:11px;text-decoration:none;color:var(--client-text)}
.attachment-item:hover{background:#f8fafb;border-color:#c7d3dc;color:var(--client-text)}
.attachment-item__icon{width:38px;height:38px;border-radius:9px;display:grid;place-items:center;background:#eef3f7;color:var(--client-blue);font-size:9px;font-weight:900}
.attachment-item__name{font-size:13px;font-weight:800;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.attachment-item__size{font-size:11px;color:var(--client-muted)}
.attachment-item__download{font-size:11px;color:var(--client-blue);font-weight:800}
.correspondence-timeline{display:flex;flex-direction:column;gap:13px}
.correspondence-item{display:flex;align-items:flex-start;gap:11px}
.correspondence-avatar{width:36px;height:36px;flex:0 0 36px;border-radius:11px;display:grid;place-items:center;background:#e8f0f6;color:var(--client-blue);font-size:9px;font-weight:900}
.correspondence-item.is-customer .correspondence-avatar{background:#eef0f2;color:#596673}
.correspondence-body{flex:1;min-width:0;border:1px solid #e0e5e9;border-radius:12px;padding:11px 13px;background:#fbfcfd}
.correspondence-item.is-admin .correspondence-body{border-left:3px solid var(--client-blue)}
.correspondence-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.correspondence-meta strong{font-size:12px;color:var(--client-text)}
.correspondence-meta span{font-size:10px;color:var(--client-muted)}
.correspondence-text{font-size:13px;line-height:1.6;color:#35424e;overflow-wrap:anywhere}
.correspondence-empty{padding:20px;border:1px dashed #d5dce1;border-radius:12px;text-align:center;color:var(--client-muted);font-size:12px}
.comment-form{margin-top:16px;padding-top:16px;border-top:1px solid var(--client-line)}
.comment-form label{display:block;font-size:12px;font-weight:900;color:var(--client-navy);margin-bottom:7px}
.comment-form textarea{width:100%;resize:vertical;min-height:105px;line-height:1.5}
.comment-form__foot{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:9px}
.comment-form__foot span{font-size:10px;color:var(--client-muted)}
.record-lock-note{padding:12px;border-radius:10px;background:#f1f4f6;color:var(--client-muted);font-size:12px}
.signature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.signature-card{min-height:150px;border:1px dashed #d2dae0;border-radius:12px;padding:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#fbfcfd}
.signature-card>span{align-self:flex-start;color:var(--client-muted);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
.signature-card img{max-width:100%;max-height:58px;margin:13px 0 7px}
.signature-card strong{font-size:11px;color:var(--client-green)}
.signature-card small{display:block;color:var(--client-muted);font-size:9px;margin-top:3px}
.signature-card.is-signed{border-style:solid;border-color:#c9dfd5;background:#f8fcfa}
.signature-placeholder{margin:auto;color:#9aa5ad;font-size:12px}
.record-certificate{border-color:#c5dfd4;background:#fbfefc}
.record-certificate dl{margin:0;display:flex;flex-direction:column;gap:10px}
.record-certificate dl>div{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;align-items:start}
.record-certificate dt{font-size:11px;color:var(--client-muted);font-weight:800}
.record-certificate dd{margin:0;font-size:12px;color:var(--client-text);min-width:0;overflow-wrap:anywhere}
.record-certificate code{white-space:normal;word-break:break-all}
.record-actions{position:sticky;top:92px}
.record-actions__card{background:#fff;border:1px solid var(--client-line);border-radius:15px;padding:18px;box-shadow:0 7px 22px rgba(23,50,77,.06)}
.record-actions__card h2{font-size:16px;color:var(--client-navy);margin:0 0 16px}
.record-steps{list-style:none;padding:0;margin:0 0 18px;display:flex;flex-direction:column;gap:0}
.record-steps li{display:flex;gap:11px;position:relative;padding:0 0 18px}
.record-steps li:last-child{padding-bottom:0}
.record-steps li:not(:last-child):after{content:"";position:absolute;left:13px;top:28px;bottom:2px;width:1px;background:#dce2e6}
.record-steps li>span{width:27px;height:27px;flex:0 0 27px;border-radius:999px;display:grid;place-items:center;border:1px solid #cdd6dc;background:#fff;color:#89949d;font-size:10px;font-weight:900;z-index:1}
.record-steps li.is-done>span{background:var(--client-green);border-color:var(--client-green);color:#fff}
.record-steps li.is-done:not(:last-child):after{background:#acd5c4}
.record-steps strong{display:block;color:var(--client-text);font-size:12px;line-height:1.2;margin-top:1px}
.record-steps small{display:block;color:var(--client-muted);font-size:10px;margin-top:3px;line-height:1.35}
.record-primary-action,.record-secondary-action{width:100%;justify-content:center}
.record-secondary-action{margin-top:8px}
.record-action-help{font-size:10px;line-height:1.5;color:var(--client-muted);margin:12px 0 0}
.record-complete-note{padding:13px;border-radius:11px;background:#f1f8f5;border:1px solid #c9dfd5}
.record-complete-note strong{display:block;color:var(--client-green);font-size:12px}
.record-complete-note span{display:block;color:var(--client-muted);font-size:10px;line-height:1.45;margin-top:4px}
.signature-modal{display:none;position:fixed;inset:0;z-index:99999;align-items:center;justify-content:center;padding:20px;background:rgba(16,28,39,.62);backdrop-filter:blur(7px)}
.signature-modal.open{display:flex}
body.modal-open{overflow:hidden}
.signature-modal__panel{width:min(720px,100%);max-height:94vh;overflow:auto;background:#fff;color:var(--client-text);border-radius:17px;padding:22px;box-shadow:0 24px 70px rgba(0,0,0,.25)}
.signature-modal__head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.signature-modal__head span{display:block;color:var(--client-blue);font-size:10px;text-transform:uppercase;font-weight:900;letter-spacing:.07em;margin-bottom:4px}
.signature-modal__head h2{font-size:20px;color:var(--client-navy);margin:0}
.signature-consent{padding:12px 13px;border:1px solid #d9e1e7;border-radius:11px;background:#f7f9fa;margin-bottom:13px}
.signature-consent label{display:flex;align-items:flex-start;gap:9px;font-size:12px;line-height:1.5;color:#374653;cursor:pointer}
.signature-consent input{width:17px;height:17px;flex:0 0 17px;margin-top:1px}
.signature-password{display:block;font-size:11px;font-weight:900;color:var(--client-navy);margin-bottom:13px}
.signature-password input{display:block;width:100%;margin-top:6px}
.signature-canvas-wrap{height:230px;border:1px solid #cfd7de;border-radius:12px;overflow:hidden;background:#fff}
.signature-canvas-wrap canvas{display:block;width:100%;height:100%;touch-action:none}
.signature-tools{display:flex;align-items:center;gap:10px;margin-top:11px}
.signature-pens{display:flex;gap:5px;flex:1}
.pen-choice{border:1px solid #d5dce1;border-radius:9px;background:#fff;padding:7px 9px;display:flex;align-items:center;gap:6px;color:#53616e;font-size:10px;font-weight:800;cursor:pointer}
.pen-choice i{width:9px;height:9px;border-radius:999px}
.pen-choice.active{border-color:#7f9db6;background:#edf3f7;color:var(--client-navy)}
.signature-status{min-height:18px;margin-top:9px;font-size:11px;color:var(--client-muted)}
.signature-status.error{color:#a22828}.signature-status.success{color:var(--client-green)}

@media (max-width:900px){
  .record-layout{grid-template-columns:1fr}
  .record-actions{position:static;order:-1}
  .record-actions__card{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.7fr);gap:18px;align-items:start}
  .record-actions__card h2{grid-column:1/-1;margin-bottom:0}
  .record-steps{margin-bottom:0}
  .record-primary-action{margin-top:0}
  .record-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
  .record-summary>div:nth-child(2){border-right:0}
  .record-summary>div:nth-child(-n+2){border-bottom:1px solid var(--client-line)}
}
@media (max-width:680px){
  body.client-portal .container{padding:16px 12px 86px}
  body.client-portal .mnav{background:rgba(255,255,255,.97);border-color:var(--client-line)}
  body.client-portal .mnav__item{color:#53616e}
  body.client-portal .mnav__item.active{background:#eaf1f7;border-color:#cad9e6;color:var(--client-navy)}
  body.client-portal .mnav__ico{stroke:var(--client-blue)}
  .client-page-head{align-items:flex-start;flex-direction:column;gap:15px}
  .client-page-head h1{font-size:28px}
  .client-head-counts{width:100%}.client-head-counts>div{flex:1}
  .cartable-tabs{width:100%}.cartable-tab{flex:1;justify-content:center}
  .cartable-card{grid-template-columns:42px minmax(0,1fr);padding:14px;gap:12px}
  .cartable-card__icon{width:42px;height:42px}
  .cartable-card__action{grid-column:1/-1;justify-content:space-between;border-top:1px solid #edf0f2;padding-top:11px}
  .record-back-row{gap:10px}.record-back-row .btn{padding:8px 10px;font-size:11px}
  .record-header{padding:17px;flex-direction:column}
  .record-header h1{font-size:21px}.record-integrity{align-items:flex-start;width:100%}
  .record-summary{grid-template-columns:1fr 1fr}
  .record-paper{padding:22px 17px;min-height:300px;border-radius:12px}
  .record-section{padding:16px}
  .record-actions__card{display:block}.record-actions__card h2{margin-bottom:16px}.record-steps{margin-bottom:17px}
  .signature-grid{grid-template-columns:1fr}
  .attachment-item{grid-template-columns:38px minmax(0,1fr) auto}
  .attachment-item__size{display:none}.attachment-item__download{grid-column:2/4}
  .correspondence-meta{align-items:flex-start;flex-direction:column;gap:2px}
  .comment-form__foot{align-items:flex-start;flex-direction:column}.comment-form__foot .btn{width:100%;justify-content:center}
  .record-certificate dl>div{grid-template-columns:1fr;gap:3px}
  .signature-modal{padding:10px}.signature-modal__panel{padding:16px;border-radius:14px}
  .signature-modal__head h2{font-size:17px}.signature-canvas-wrap{height:190px}
  .signature-tools{flex-wrap:wrap}.signature-pens{order:3;width:100%;flex-basis:100%}.signature-tools>.btn-primary{margin-left:auto}
}

/* Admin secretariat correspondence */
.admin-correspondence__list{display:flex;flex-direction:column;gap:10px}
.admin-correspondence__item{border:1px solid rgba(255,255,255,.11);border-radius:12px;padding:12px 14px;background:rgba(255,255,255,.025)}
.admin-correspondence__item.is-admin{border-left:3px solid var(--accent)}
.admin-correspondence__item.is-customer{border-left:3px solid rgba(90,165,255,.75)}
.admin-correspondence__meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}
.admin-correspondence__meta strong{font-size:12px}
.admin-correspondence__meta span{font-size:10px;color:var(--muted)}
.admin-correspondence__text{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.admin-correspondence__form{margin-top:16px;padding-top:16px;border-top:1px solid rgba(255,255,255,.09)}
.admin-correspondence__form label{display:block;font-size:12px;font-weight:900;margin-bottom:7px}
.admin-correspondence__form textarea{width:100%;resize:vertical}
@media(max-width:680px){.admin-correspondence__meta{align-items:flex-start;flex-direction:column;gap:3px}}

/* ========================================================================== */
/* LiVAR DCR 2.0 — Rebuild Design System                                      */
/* Source language: LiVAR interactive map administration interface             */
/* ========================================================================== */
body.dcr-v2{
  --v2-bg:#07090c;--v2-bg2:#0a0e13;--v2-panel:#0e1319;--v2-panel2:#111820;
  --v2-line:rgba(255,255,255,.09);--v2-line2:rgba(255,255,255,.15);
  --v2-text:#f4f6f8;--v2-muted:#8d98a6;--v2-accent:#ff6500;--v2-accent2:#ff8a3d;
  --v2-green:#2ac985;--v2-red:#ff5d68;--v2-shadow:0 24px 70px rgba(0,0,0,.35);
  margin:0;background:#07090c;color:var(--v2-text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  font-size:14px;line-height:1.5;letter-spacing:0;min-height:100vh;
}
body.dcr-v2:before{content:"";position:fixed;inset:0;pointer-events:none;background:radial-gradient(circle at 75% -10%,rgba(255,101,0,.12),transparent 34%),linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px);background-size:auto,42px 42px,42px 42px;opacity:.65}
.dcr-v2 *{box-sizing:border-box}.dcr-v2 a{text-decoration:none}.dcr-shell{position:relative;display:flex;min-height:100vh}.dcr-sidebar{position:fixed;z-index:80;inset:0 auto 0 0;width:244px;padding:20px 14px 14px;border-right:1px solid var(--v2-line);background:rgba(8,11,15,.96);backdrop-filter:blur(18px);display:flex;flex-direction:column}.dcr-main{width:100%;min-width:0;margin-left:244px}.client-portal .dcr-main,.public-portal .dcr-main{margin-left:0}.dcr-brand{display:flex;align-items:center;gap:11px;color:var(--v2-text);min-width:0}.dcr-brandmark{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(145deg,var(--v2-accent),#b84500);box-shadow:0 8px 25px rgba(255,101,0,.22);font-size:17px;font-weight:950;color:#fff}.dcr-brand strong{display:block;font-size:13px;letter-spacing:.05em}.dcr-brand small{display:block;color:var(--v2-muted);font-size:9px;margin-top:1px}.dcr-side-label{margin:27px 10px 8px;color:#5f6a77;font-size:9px;font-weight:900;letter-spacing:.16em;text-transform:uppercase}.dcr-side-nav{display:grid;gap:4px}.dcr-side-nav a{display:flex;align-items:center;gap:11px;padding:10px 11px;border:1px solid transparent;border-radius:10px;color:#9ba5b1;font-size:11px;font-weight:750;transition:.16s ease}.dcr-side-nav a span{width:20px;color:#687483;font-size:15px;text-align:center}.dcr-side-nav a:hover{color:#fff;background:rgba(255,255,255,.035)}.dcr-side-nav a.active{color:#fff;border-color:rgba(255,101,0,.2);background:linear-gradient(90deg,rgba(255,101,0,.14),rgba(255,101,0,.03));box-shadow:inset 3px 0 0 var(--v2-accent)}.dcr-side-nav a.active span{color:var(--v2-accent)}.dcr-sidebar-foot{margin-top:auto;padding-top:14px;border-top:1px solid var(--v2-line)}.dcr-user-mini{display:flex;align-items:center;gap:9px;min-width:0}.dcr-user-mini>div{min-width:0}.dcr-user-mini strong,.dcr-user-mini small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dcr-user-mini strong{font-size:10px}.dcr-user-mini small{font-size:8px;color:var(--v2-muted);margin-top:2px}.dcr-avatar{width:31px;height:31px;flex:0 0 31px;border-radius:50%;background:radial-gradient(circle at 30% 25%,#ffb07a,var(--v2-accent) 47%,#6c2500);box-shadow:0 0 0 3px rgba(255,101,0,.08)}.dcr-logout{display:block;margin-top:11px;padding:8px 10px;border:1px solid var(--v2-line);border-radius:9px;color:#7f8a97;text-align:center;font-size:9px;font-weight:800}.dcr-logout:hover{color:#fff;border-color:rgba(255,101,0,.3)}
.dcr-topbar{position:sticky;top:0;z-index:60;height:66px;padding:0 24px;display:flex;align-items:center;gap:20px;border-bottom:1px solid var(--v2-line);background:rgba(8,11,15,.86);backdrop-filter:blur(16px)}.dcr-brand--top{margin-right:20px}.dcr-top-title strong,.dcr-top-title small{display:block}.dcr-top-title strong{font-size:12px}.dcr-top-title small{font-size:8px;color:var(--v2-muted)}.dcr-menu-toggle{display:none;border:0;background:transparent;color:#fff;font-size:20px}.dcr-top-actions{margin-left:auto;display:flex;align-items:center;gap:11px}.dcr-top-actions select,.dcr-lang-form select{width:auto;min-width:62px;height:32px;margin:0;padding:0 25px 0 10px;border-radius:9px;background:#0d1218;color:#d9dee5;border:1px solid var(--v2-line);font-size:9px;font-weight:800}.dcr-user-top{padding-left:10px;border-left:1px solid var(--v2-line)}.dcr-icon-link{width:32px;height:32px;border:1px solid var(--v2-line);border-radius:9px;display:grid;place-items:center;color:#8b96a3}.dcr-client-nav{display:flex;align-self:stretch;gap:5px}.dcr-client-nav a{position:relative;display:flex;align-items:center;padding:0 13px;color:#8994a0;font-size:10px;font-weight:850}.dcr-client-nav a:after{content:"";position:absolute;left:12px;right:12px;bottom:0;height:2px;background:transparent}.dcr-client-nav a.active{color:#fff}.dcr-client-nav a.active:after{background:var(--v2-accent)}
.dcr-content{position:relative;max-width:1500px;margin:0 auto;padding:25px}.dcr-v2 .container{max-width:none;padding:0}.dcr-v2 .screen{padding:0}.dcr-v2 .grid{gap:16px}.dcr-v2 .card{border:1px solid var(--v2-line);border-radius:14px;background:linear-gradient(180deg,rgba(17,24,32,.96),rgba(11,16,22,.96));box-shadow:0 14px 40px rgba(0,0,0,.18);backdrop-filter:none;padding:20px;overflow:hidden}.dcr-v2 .card:before{display:none}.dcr-v2 .card.soft{background:#0b1016;border-color:var(--v2-line)}.dcr-v2 .section-title{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:16px}.dcr-v2 .section-title h2,.dcr-v2 h1,.dcr-v2 h2,.dcr-v2 h3{color:#f7f8fa;letter-spacing:-.025em}.dcr-v2 .section-title h2{font-size:22px;margin:0}.dcr-v2 .desc,.dcr-v2 .muted,.dcr-v2 .small{color:var(--v2-muted)!important}.dcr-v2 .desc{font-size:10px;line-height:1.6}.dcr-v2 .btn{min-height:36px;padding:8px 13px;border-radius:9px;border:1px solid var(--v2-line2);background:#121820;color:#d7dde4;font-size:10px;font-weight:850;box-shadow:none;transition:.16s ease}.dcr-v2 .btn:hover{transform:translateY(-1px);border-color:rgba(255,101,0,.35);color:#fff}.dcr-v2 .btn-primary{background:linear-gradient(180deg,#ff741e,var(--v2-accent));border-color:#ff7a28;color:#160b04;box-shadow:0 8px 20px rgba(255,101,0,.14)}.dcr-v2 .btn-danger{background:rgba(255,93,104,.08);border-color:rgba(255,93,104,.24);color:#ffabb1}.dcr-v2 .btn-ghost{background:transparent}.dcr-v2 label{display:block;margin:0 0 6px;color:#aab3be;font-size:9px;font-weight:850;letter-spacing:.03em}.dcr-v2 input,.dcr-v2 select,.dcr-v2 textarea{width:100%;min-height:41px;padding:9px 11px;border:1px solid var(--v2-line2);border-radius:9px;background:#090d12;color:#eef1f4;font:inherit;font-size:11px;outline:none;box-shadow:none}.dcr-v2 textarea{min-height:110px;resize:vertical}.dcr-v2 input:focus,.dcr-v2 select:focus,.dcr-v2 textarea:focus{border-color:rgba(255,101,0,.65);box-shadow:0 0 0 3px rgba(255,101,0,.09)}.dcr-v2 input::placeholder,.dcr-v2 textarea::placeholder{color:#505b67}.dcr-v2 .notice{margin-bottom:15px;padding:11px 13px;border:1px solid rgba(42,201,133,.18);border-radius:10px;background:rgba(42,201,133,.07);color:#c5f8df;font-size:10px}.dcr-v2 .notice.err{border-color:rgba(255,93,104,.25);background:rgba(255,93,104,.07);color:#ffc6ca}.dcr-v2 .badge{padding:5px 8px;border-radius:7px;border:1px solid rgba(255,101,0,.2);background:rgba(255,101,0,.08);color:#ffad78;font-size:8px;text-transform:uppercase;letter-spacing:.08em}.dcr-v2 .table{width:100%;border-collapse:separate;border-spacing:0;overflow:hidden;border:1px solid var(--v2-line);border-radius:11px;background:#0a0f14}.dcr-v2 .table th{padding:11px 12px;border-bottom:1px solid var(--v2-line);background:#0e141b;color:#727e8b;font-size:8px;text-transform:uppercase;letter-spacing:.09em;text-align:left}.dcr-v2 .table td{padding:11px 12px;border-bottom:1px solid rgba(255,255,255,.055);color:#cbd2d9;font-size:10px}.dcr-v2 .table tbody tr:hover td{background:rgba(255,101,0,.025)}.dcr-v2 .table tbody tr:last-child td{border-bottom:0}.dcr-v2 .row-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}.dcr-v2 .row-actions form{margin:0}.dcr-v2 .kv{display:grid;grid-template-columns:minmax(110px,.3fr) 1fr;gap:0}.dcr-v2 .kv .k,.dcr-v2 .kv .v{padding:9px 0;border-bottom:1px solid var(--v2-line);font-size:10px}.dcr-v2 .kv .k{color:#6f7b88}.dcr-v2 .kv .v{color:#d9dee4}
.public-shell{position:relative;min-height:100vh;display:flex;flex-direction:column}.public-head{height:70px;padding:0 26px;display:flex;align-items:center;border-bottom:1px solid var(--v2-line);background:rgba(8,11,15,.88);backdrop-filter:blur(16px)}.public-head .dcr-top-actions{margin-left:auto}.public-content{flex:1;display:grid;place-items:center;padding:38px 20px}.public-foot{padding:20px;text-align:center;color:#596471;font-size:8px;letter-spacing:.08em}.auth-stage{width:min(960px,100%);display:grid;grid-template-columns:minmax(0,1fr) 410px;overflow:hidden;border:1px solid var(--v2-line2);border-radius:20px;background:#0b1016;box-shadow:var(--v2-shadow)}.auth-visual{position:relative;padding:45px;background:radial-gradient(circle at 0 0,rgba(255,101,0,.19),transparent 45%),linear-gradient(145deg,#121922,#090d12);min-height:520px;display:flex;flex-direction:column;justify-content:flex-end}.auth-visual:after{content:"DCR";position:absolute;right:25px;top:8px;color:rgba(255,255,255,.025);font-size:160px;font-weight:950;line-height:1}.auth-visual .eyebrow{color:var(--v2-accent);font-size:9px;font-weight:900;letter-spacing:.16em;text-transform:uppercase}.auth-visual h1{max-width:510px;margin:12px 0 12px;font-size:38px;line-height:1.05}.auth-visual p{max-width:500px;margin:0;color:#8f9aa6;font-size:11px;line-height:1.75}.auth-points{display:grid;gap:9px;margin-top:27px}.auth-points span{display:flex;align-items:center;gap:9px;color:#aeb7c1;font-size:9px}.auth-points i{width:6px;height:6px;border-radius:50%;background:var(--v2-accent);box-shadow:0 0 12px rgba(255,101,0,.5)}.auth-form-panel{padding:42px 35px;background:#0d1218;display:flex;flex-direction:column;justify-content:center}.auth-form-panel h2{margin:0 0 7px;font-size:22px}.auth-form-panel>p{margin:0 0 25px;color:var(--v2-muted);font-size:10px;line-height:1.6}.auth-fields{display:grid;gap:15px}.auth-submit{width:100%;margin-top:19px}.auth-security{margin-top:18px;padding-top:16px;border-top:1px solid var(--v2-line);color:#687482;font-size:8px;line-height:1.6}.password-shell{max-width:780px;margin:18px auto}.password-head{margin-bottom:19px}.password-head .eyebrow,.client-eyebrow{color:var(--v2-accent);font-size:8px;font-weight:900;letter-spacing:.16em;text-transform:uppercase}.password-head h1{margin:7px 0 6px;font-size:26px}.password-head p{margin:0;color:var(--v2-muted);font-size:10px}.password-grid{display:grid;grid-template-columns:220px 1fr;gap:16px}.password-profile{padding:20px;border:1px solid var(--v2-line);border-radius:13px;background:#0b1016}.password-profile .dcr-avatar{width:45px;height:45px;margin-bottom:15px}.password-profile h3{margin:0;font-size:13px}.password-profile p{margin:4px 0 0;color:var(--v2-muted);font-size:9px}.password-form{padding:23px;border:1px solid var(--v2-line);border-radius:13px;background:#0e141b}.password-fields{display:grid;gap:14px}.password-help{margin:5px 0 0;color:#66727f;font-size:8px}.password-actions{display:flex;gap:8px;margin-top:20px;flex-wrap:wrap}
.client-cartable{max-width:1180px;margin:0 auto}.client-page-head{padding:24px 0 20px;display:flex;align-items:flex-end;gap:20px;border-bottom:1px solid var(--v2-line)}.client-page-head h1{margin:6px 0 4px;font-size:28px}.client-page-head p{margin:0;color:var(--v2-muted);font-size:10px}.client-head-counts{margin-left:auto;display:flex;gap:8px}.client-head-counts div{min-width:88px;padding:10px 14px;border:1px solid var(--v2-line);border-radius:10px;background:#0c1117}.client-head-counts strong,.client-head-counts span{display:block}.client-head-counts strong{font-size:16px}.client-head-counts span{font-size:8px;color:var(--v2-muted)}.cartable-tabs{display:flex;gap:5px;margin:18px 0}.cartable-tab{display:flex;align-items:center;gap:9px;padding:8px 11px;border:1px solid var(--v2-line);border-radius:9px;color:#818c99;font-size:9px;font-weight:850}.cartable-tab b{min-width:20px;padding:2px 5px;border-radius:6px;background:#141b23;color:#aab4bf;text-align:center;font-size:8px}.cartable-tab.active{border-color:rgba(255,101,0,.26);background:rgba(255,101,0,.08);color:#fff}.cartable-list{display:grid;gap:10px}.cartable-card{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:15px;align-items:center;padding:15px;border:1px solid var(--v2-line);border-radius:13px;background:linear-gradient(180deg,#10161d,#0b1016);transition:.16s}.cartable-card:hover{transform:translateY(-1px);border-color:rgba(255,101,0,.28);box-shadow:0 12px 30px rgba(0,0,0,.18)}.cartable-card__icon{width:46px;height:46px;border-radius:11px;display:grid;place-items:center;background:rgba(255,101,0,.08);color:var(--v2-accent)}.cartable-card__icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8}.cartable-card__topline{display:flex;gap:8px;align-items:center}.record-state,.record-ref,.record-action{font-size:8px;font-weight:850}.record-state{padding:4px 7px;border-radius:6px;background:rgba(255,101,0,.08);color:#ffad78}.record-state.is-final{background:rgba(42,201,133,.08);color:#8ee6bc}.record-ref{color:#64707d}.cartable-card h2{margin:7px 0 5px;font-size:13px}.cartable-card__meta{display:flex;gap:12px;color:#6e7a87;font-size:8px}.cartable-card__action{display:flex;align-items:center;gap:10px}.record-action{color:#818d99}.record-action.is-required{color:#ffad78}.record-action.is-final{color:#8ee6bc}.cartable-empty{padding:70px 20px;text-align:center;border:1px dashed var(--v2-line2);border-radius:15px;background:#0a0f14}.cartable-empty__icon{width:54px;height:54px;margin:0 auto 14px;border-radius:14px;display:grid;place-items:center;background:rgba(255,101,0,.08);color:var(--v2-accent)}.cartable-empty__icon svg{width:25px;fill:none;stroke:currentColor;stroke-width:1.7}.cartable-empty h2{font-size:15px}.cartable-empty p{color:var(--v2-muted);font-size:9px}
.dcr-sidebar-backdrop{display:none}.only-mobile{display:none!important}
@media(max-width:900px){.dcr-sidebar{transform:translateX(-100%);transition:.2s ease}.dcr-main{margin-left:0}.sidebar-open .dcr-sidebar{transform:translateX(0)}.sidebar-open .dcr-sidebar-backdrop{display:block;position:fixed;z-index:70;inset:0;background:rgba(0,0,0,.65)}.dcr-menu-toggle{display:block}.dcr-content{padding:18px}.auth-stage{grid-template-columns:1fr;max-width:470px}.auth-visual{display:none}.auth-form-panel{padding:32px 24px}.password-grid{grid-template-columns:1fr}.password-profile{display:flex;align-items:center;gap:12px}.password-profile .dcr-avatar{margin:0}.cartable-card{grid-template-columns:40px minmax(0,1fr)}.cartable-card__action{grid-column:2;justify-content:space-between}.dcr-client-nav{order:3;position:absolute;left:0;right:0;top:65px;height:43px;padding:0 14px;background:#090d12;border-bottom:1px solid var(--v2-line)}.client-portal .dcr-content{padding-top:61px}.dcr-user-top>div{display:none}}
@media(max-width:600px){.dcr-topbar{padding:0 14px}.dcr-brand--top small{display:none}.dcr-top-actions{gap:7px}.dcr-content{padding:14px}.client-page-head{align-items:flex-start;flex-direction:column}.client-head-counts{margin:0;width:100%}.client-head-counts div{flex:1}.cartable-card{padding:12px;gap:11px}.cartable-card__action{align-items:flex-start;flex-direction:column}.cartable-card__action .btn{width:100%}.dcr-v2 .table{display:block;overflow-x:auto;white-space:nowrap}.password-form{padding:18px}.password-actions .btn{flex:1}.public-head{padding:0 14px}.auth-form-panel{padding:27px 18px}}

/* ========================================================================== 
   LiVAR DCR 2.0.1 — Customer Mobile Readability Update
   Scope: customer portal only. Desktop and admin layouts remain unchanged.
   Mobile rhythm and touch sizing follow the LiVAR site mobile design system.
   ========================================================================== */
@media (max-width: 900px){
  body.client-portal{
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
    font-size:16px;
    line-height:1.55;
  }
  body.client-portal .topbar .inner{
    min-height:66px;
    padding:10px 14px;
    gap:10px;
  }
  body.client-portal .brand .name{font-size:16px;line-height:1.15}
  body.client-portal .brand .tag{font-size:12px;line-height:1.25;margin-top:3px}
  body.client-portal .quick-actions{gap:10px}
  body.client-portal .lang-pill,
  body.client-portal .icon-btn{min-height:42px}
  body.client-portal .lang-pill{padding:0 13px;font-size:13px}
  body.client-portal .icon-btn{width:42px;height:42px}

  body.client-portal .container{
    width:100%;
    max-width:640px;
    padding:18px 14px 104px;
  }
  body.client-portal .client-cartable,
  body.client-portal .client-record-page{width:100%;max-width:none}

  body.client-portal .client-page-head{
    gap:18px;
    margin-bottom:18px;
  }
  body.client-portal .client-eyebrow{
    font-size:12px;
    letter-spacing:.14em;
  }
  body.client-portal .client-page-head h1{
    font-size:clamp(30px,8vw,38px);
    line-height:1.08;
    letter-spacing:-.035em;
  }
  body.client-portal .client-page-head p{
    margin-top:10px;
    font-size:16px;
    line-height:1.55;
  }
  body.client-portal .client-head-counts{gap:10px}
  body.client-portal .client-head-counts>div{
    min-height:76px;
    padding:13px 12px;
    border-radius:16px;
  }
  body.client-portal .client-head-counts strong{font-size:26px;line-height:1}
  body.client-portal .client-head-counts span{font-size:12px;margin-top:7px}

  body.client-portal .cartable-tabs{
    min-height:56px;
    margin-bottom:18px;
    padding:6px;
    border-radius:16px;
  }
  body.client-portal .cartable-tab{
    min-height:44px;
    padding:10px 14px;
    border-radius:12px;
    font-size:15px;
  }
  body.client-portal .cartable-tab b{
    min-width:26px;
    height:26px;
    font-size:12px;
  }

  body.client-portal .cartable-list{gap:14px}
  body.client-portal .cartable-card{
    grid-template-columns:48px minmax(0,1fr);
    gap:13px;
    padding:16px;
    border-radius:18px;
    box-shadow:0 10px 28px rgba(23,50,77,.08);
  }
  body.client-portal .cartable-card__icon{
    width:48px;
    height:48px;
    border-radius:14px;
  }
  body.client-portal .cartable-card__icon svg{width:25px;height:25px}
  body.client-portal .cartable-card__topline{
    align-items:flex-start;
    flex-wrap:wrap;
    gap:7px 9px;
    margin-bottom:8px;
  }
  body.client-portal .record-state{
    padding:5px 9px;
    font-size:11px;
    line-height:1.2;
  }
  body.client-portal .record-ref{
    font-size:12px;
    line-height:1.35;
    overflow-wrap:anywhere;
  }
  body.client-portal .cartable-card h2{
    font-size:18px;
    line-height:1.4;
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
  }
  body.client-portal .cartable-card__meta{
    gap:6px 12px;
    margin-top:9px;
    font-size:14px;
    line-height:1.45;
  }
  body.client-portal .cartable-card__meta span+span:before{margin-right:12px}
  body.client-portal .cartable-card__action{
    grid-column:1/-1;
    align-items:stretch;
    flex-direction:column;
    gap:10px;
    padding-top:14px;
  }
  body.client-portal .record-action{
    font-size:13px;
    line-height:1.4;
    text-align:left;
  }
  body.client-portal .cartable-card__action .btn{
    width:100%;
    min-height:48px;
    justify-content:center;
    font-size:15px;
    border-radius:13px;
  }

  body.client-portal .cartable-empty{
    padding:48px 20px;
    border-radius:18px;
  }
  body.client-portal .cartable-empty__icon{width:64px;height:64px;border-radius:18px}
  body.client-portal .cartable-empty h2{font-size:22px;line-height:1.25}
  body.client-portal .cartable-empty p{font-size:15px;line-height:1.55;margin-top:10px}

  body.client-portal .record-back{font-size:15px;min-height:42px;display:inline-flex;align-items:center}
  body.client-portal .record-header{
    padding:18px;
    border-radius:18px;
    gap:14px;
  }
  body.client-portal .record-header h1{font-size:25px;line-height:1.3}
  body.client-portal .record-header p{font-size:15px;line-height:1.5}
  body.client-portal .record-integrity span{font-size:12px}
  body.client-portal .record-summary{border-radius:16px}
  body.client-portal .record-summary>div{padding:15px 14px}
  body.client-portal .record-summary span{font-size:11px;margin-bottom:7px}
  body.client-portal .record-summary strong{font-size:14px;line-height:1.4}
  body.client-portal .record-section{padding:18px;border-radius:16px}
  body.client-portal .record-section__head h2{font-size:19px;line-height:1.3}
  body.client-portal .record-section__head p{font-size:14px;line-height:1.5}
  body.client-portal .record-section__head>span{min-width:30px;height:30px;font-size:12px}

  body.client-portal .attachment-item{
    grid-template-columns:46px minmax(0,1fr);
    gap:12px;
    padding:13px;
    border-radius:13px;
  }
  body.client-portal .attachment-item__icon{width:42px;height:42px;font-size:10px}
  body.client-portal .attachment-item__size,
  body.client-portal .attachment-item__download{font-size:13px}
  body.client-portal .attachment-item__download{grid-column:2}

  body.client-portal .correspondence-avatar{width:42px;height:42px;flex-basis:42px;font-size:10px}
  body.client-portal .correspondence-meta strong{font-size:14px}
  body.client-portal .correspondence-meta span{font-size:12px}
  body.client-portal .correspondence-body{font-size:15px;line-height:1.6}
  body.client-portal .correspondence-empty{font-size:14px;line-height:1.5;padding:18px}
  body.client-portal .comment-form label{font-size:14px;margin-bottom:9px}
  body.client-portal .comment-form textarea{min-height:130px;font-size:16px;line-height:1.55}
  body.client-portal .comment-form__foot{align-items:stretch;flex-direction:column;gap:10px}
  body.client-portal .comment-form__foot span{font-size:12px;line-height:1.4}
  body.client-portal .comment-form__foot .btn{width:100%;min-height:48px;font-size:15px}
  body.client-portal .record-lock-note{font-size:14px;line-height:1.55;padding:14px}

  body.client-portal .signature-card>span{font-size:11px}
  body.client-portal .signature-card strong{font-size:13px}
  body.client-portal .signature-card small{font-size:11px;line-height:1.4}
  body.client-portal .record-certificate dt{font-size:12px}
  body.client-portal .record-certificate dd{font-size:14px;line-height:1.45}
  body.client-portal .record-actions__card{padding:18px;border-radius:16px}
  body.client-portal .record-actions__card h2{font-size:19px}
  body.client-portal .record-steps strong{font-size:14px;line-height:1.35}
  body.client-portal .record-steps small{font-size:12px;line-height:1.5}
  body.client-portal .record-action-help{font-size:12px;line-height:1.55}
  body.client-portal .record-complete-note strong{font-size:14px}
  body.client-portal .record-complete-note span{font-size:12px;line-height:1.5}

  body.client-portal input,
  body.client-portal select,
  body.client-portal textarea{
    font-size:16px;
  }
  body.client-portal .btn,
  body.client-portal button{
    min-height:46px;
  }

  body.client-portal .signature-modal{padding:12px}
  body.client-portal .signature-modal__panel{
    width:100%;
    max-height:calc(100dvh - 24px);
    padding:18px;
    border-radius:18px;
  }
  body.client-portal .signature-modal__head span{font-size:11px}
  body.client-portal .signature-modal__head h2{font-size:23px;line-height:1.25}
  body.client-portal .signature-password{font-size:13px}
  body.client-portal .signature-status{font-size:13px;line-height:1.45}

  body.client-portal .mnav{
    min-height:74px;
    padding:8px max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    gap:7px;
    box-shadow:0 -12px 36px rgba(23,50,77,.13);
  }
  body.client-portal .mnav__item{
    min-height:54px;
    padding:7px 10px;
    border-radius:14px;
    font-size:12px;
    line-height:1.15;
  }
  body.client-portal .mnav__ico{width:22px;height:22px}
}

@media (max-width: 420px){
  body.client-portal .container{padding-left:12px;padding-right:12px}
  body.client-portal .topbar .inner{padding-left:12px;padding-right:12px}
  body.client-portal .brand .name{font-size:15px}
  body.client-portal .brand .tag{font-size:11px}
  body.client-portal .client-page-head h1{font-size:30px}
  body.client-portal .client-page-head p{font-size:15px}
  body.client-portal .cartable-card{padding:15px}
  body.client-portal .cartable-card h2{font-size:17px}
  body.client-portal .cartable-card__meta{font-size:13px}
  body.client-portal .record-header h1{font-size:23px}
}

/* LiVAR DCR 2.0.2 — Customer mobile cartable stability and theme alignment */
@media (max-width:900px){
body.client-portal{background:#070a0f!important;color:#f5f7fa!important}
body.client-portal .dcr-topbar{background:#0b1017!important;border-color:rgba(255,255,255,.1)!important}
body.client-portal .client-page-head h1,body.client-portal .cartable-empty h2{color:#fff!important}
body.client-portal .client-page-head p,body.client-portal .cartable-empty p,body.client-portal .client-head-counts span{color:#98a3b3!important}
body.client-portal .client-eyebrow{color:#ff6a00!important}
body.client-portal .client-head-counts>div,body.client-portal .cartable-card,body.client-portal .cartable-empty,body.client-portal .record-header,body.client-portal .record-section,body.client-portal .record-actions__card{background:#0d131b!important;border-color:rgba(255,255,255,.1)!important;color:#f5f7fa!important}
body.client-portal .cartable-tabs{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important;padding:6px!important;background:#0b1017!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:16px!important;box-shadow:none!important}
body.client-portal .cartable-tab{display:flex!important;align-items:center!important;justify-content:space-between!important;min-width:0!important;min-height:46px!important;padding:10px 14px!important;border:1px solid transparent!important;border-radius:12px!important;background:transparent!important;color:#c9d0d9!important;font-size:15px!important;font-weight:800!important;line-height:1.2!important;text-decoration:none!important}
body.client-portal .cartable-tab:hover,body.client-portal .cartable-tab:focus-visible{background:rgba(255,255,255,.06)!important;color:#fff!important}
body.client-portal .cartable-tab.active{background:#ff6a00!important;border-color:#ff6a00!important;color:#fff!important;box-shadow:0 8px 24px rgba(255,106,0,.28)!important}
body.client-portal .cartable-tab b{display:inline-grid!important;place-items:center!important;flex:0 0 auto!important;min-width:26px!important;height:26px!important;padding:0 7px!important;border-radius:999px!important;background:rgba(255,255,255,.1)!important;color:inherit!important;font-size:12px!important;line-height:1!important}
body.client-portal .cartable-tab.active b{background:rgba(0,0,0,.22)!important}
body.client-portal .cartable-empty{min-height:300px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;padding:40px 20px!important}
body.client-portal .cartable-empty__icon{display:grid!important;place-items:center!important;width:64px!important;height:64px!important;margin:0 auto 18px!important;border-radius:18px!important;background:rgba(255,106,0,.14)!important;color:#ff6a00!important}
body.client-portal .cartable-empty__icon svg{width:30px!important;height:30px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.client-portal .cartable-empty h2{margin:0!important;font-size:22px!important}
body.client-portal .cartable-empty p{max-width:310px!important;margin:10px auto 0!important;text-align:center!important}
}


/* DCR 2.0.3 — customer password actions: mobile-only usability fix */
@media (max-width: 600px) {
  body.client-portal .password-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.09);
  }

  body.client-portal .password-actions .btn {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 13px 16px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
    touch-action: manipulation;
  }

  body.client-portal .password-actions .btn-primary {
    min-height: 54px;
    background: linear-gradient(180deg, #ff7826 0%, #ff6500 100%);
    border-color: #ff7a28;
    color: #160b04;
    box-shadow: 0 10px 24px rgba(255,101,0,.22);
  }

  body.client-portal .password-actions .btn-ghost {
    background: #121820;
    border-color: rgba(255,255,255,.13);
    color: #eef2f6;
  }

  body.client-portal .password-actions .btn-ghost:last-child {
    background: rgba(255,93,104,.07);
    border-color: rgba(255,93,104,.22);
    color: #ffb4ba;
  }

  body.client-portal .password-actions .btn:focus-visible {
    outline: 3px solid rgba(255,101,0,.28);
    outline-offset: 2px;
  }
}

/* DCR 2.0.4 — hide customer avatar on mobile only */
@media (max-width: 600px) {
  body.client-portal .dcr-avatar {
    display: none !important;
  }
}


/* DCR 2.0.5 — fixed English language indicator */
.dcr-language-static{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:64px;
  height:36px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.025));
  color:#f4f6f8;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 6px 18px rgba(0,0,0,.12);
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  user-select:none;
  cursor:default;
}
.dcr-language-static svg{
  width:17px;
  height:17px;
  flex:0 0 17px;
  fill:none;
  stroke:var(--v2-accent,#ff6500);
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.dcr-language-static span{line-height:1}
@media(max-width:600px){
  .dcr-language-static{min-width:52px;height:34px;padding:0 9px;gap:6px;border-radius:9px;font-size:11px}
  .dcr-language-static svg{width:16px;height:16px;flex-basis:16px}
}

/* DCR 2.1.2 — mobile document top actions */
@media (max-width: 600px) {
  body.client-portal .client-record-page {
    padding-top: 14px;
  }

  body.client-portal .record-back-row {
    position: relative;
    z-index: 4;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100%;
    margin: 0 0 16px !important;
    padding: 12px !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 16px !important;
    background: #0d131b !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.18) !important;
  }

  body.client-portal .record-back-row .record-back,
  body.client-portal .record-back-row .btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 850 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    white-space: normal !important;
    text-decoration: none !important;
  }

  body.client-portal .record-back-row .record-back {
    border: 1px solid rgba(255,106,0,.30) !important;
    background: rgba(255,106,0,.10) !important;
    color: #ff9a55 !important;
  }

  body.client-portal .record-back-row .record-back:hover,
  body.client-portal .record-back-row .record-back:focus-visible {
    border-color: #ff6a00 !important;
    background: rgba(255,106,0,.18) !important;
    color: #fff !important;
  }

  body.client-portal .record-back-row .btn.btn-ghost {
    border: 1px solid rgba(255,255,255,.16) !important;
    background: #151d27 !important;
    color: #f6f8fa !important;
  }

  body.client-portal .record-back-row .btn.btn-ghost:hover,
  body.client-portal .record-back-row .btn.btn-ghost:focus-visible {
    border-color: rgba(255,106,0,.55) !important;
    background: #1a2430 !important;
    color: #fff !important;
  }
}

/* DCR 2.1.6 — Customer signature modal readability patch */
.signature-modal__heading{min-width:0;max-width:520px}
.signature-modal__eyebrow{display:inline-flex!important;align-items:center;min-height:24px;padding:0 10px;border-radius:999px;background:#eaf3fb;color:#14558a!important;font-size:10px!important;line-height:1;font-weight:900!important;letter-spacing:.08em!important;margin:0 0 8px!important}
.signature-modal__heading h2{font-size:24px!important;line-height:1.15!important;letter-spacing:-.025em;margin:0!important;color:#102f4d!important}
.signature-modal__heading p{margin:8px 0 0;color:#687887;font-size:12px;line-height:1.55;max-width:500px}
.signature-modal__close{flex:0 0 auto;min-width:78px;height:42px;padding:0 12px;border:1px solid #cbd7e1;border-radius:11px;background:#fff;color:#173c5e;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:850;cursor:pointer}
.signature-modal__close:hover{background:#f3f7fa;border-color:#9fb3c4}
.signature-modal__close:focus-visible{outline:3px solid rgba(255,101,0,.24);outline-offset:2px}
.signature-modal__close svg{width:15px;height:15px;display:block}
.signature-consent{padding:14px 15px;background:#f8fafc;border-color:#d6e0e8}
.signature-consent label{font-size:12px!important;line-height:1.55!important;color:#344b5e!important;font-weight:700}
.signature-consent input{accent-color:#ff6500}
.signature-password{font-size:12px!important;color:#173c5e!important}
.signature-password input{min-height:48px;font-size:16px;font-weight:650;color:#142f47;background:#fff}
.signature-canvas-wrap{position:relative;background:#fff;border:1.5px solid #c7d4de;box-shadow:inset 0 1px 0 rgba(20,58,88,.03)}
.signature-canvas-wrap:before{content:"Sign here";position:absolute;left:16px;top:14px;color:#a1adb8;font-size:11px;font-weight:800;pointer-events:none;z-index:0}
.signature-canvas-wrap canvas{position:relative;z-index:1}
.signature-tools{align-items:stretch}
.signature-pens{gap:8px;align-items:stretch}
.pen-choice{min-height:44px;padding:0 12px;border-radius:11px;gap:8px;color:#41566a;font-size:11px;font-weight:850;transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease}
.pen-choice:hover{transform:translateY(-1px);border-color:#a8bac8;background:#f8fafc}
.pen-choice.active{border-color:#ff6500;background:#fff4ec;color:#173c5e;box-shadow:0 0 0 2px rgba(255,101,0,.10)}
.pen-choice__icon{width:16px;height:16px;display:block;flex:0 0 16px;color:currentColor}
.pen-choice__swatch{width:8px!important;height:8px!important;border-radius:999px;display:block;flex:0 0 8px;margin-left:2px;box-shadow:0 0 0 2px rgba(15,35,52,.08)}
.signature-tools>.btn{min-height:44px}

@media (max-width:680px){
  .signature-modal{padding:8px;align-items:flex-end}
  .signature-modal__panel{width:100%;max-height:94dvh;border-radius:20px 20px 12px 12px;padding:18px 16px calc(18px + env(safe-area-inset-bottom));}
  .signature-modal__head{gap:10px;margin-bottom:15px}
  .signature-modal__heading h2{font-size:22px!important;line-height:1.17!important}
  .signature-modal__heading p{font-size:12px;line-height:1.5}
  .signature-modal__close{min-width:44px;width:44px;height:44px;padding:0;border-radius:12px}
  .signature-modal__close span{display:none}
  .signature-modal__close svg{width:18px;height:18px}
  .signature-consent{padding:13px}
  .signature-consent label{font-size:12px!important}
  .signature-canvas-wrap{height:210px}
  .signature-tools{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px}
  .signature-tools>.btn-ghost{grid-column:1/2;grid-row:1}
  .signature-tools>.btn-primary{grid-column:2/3;grid-row:1;margin:0!important;justify-content:center}
  .signature-pens{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:1fr 1fr;width:100%;order:initial;flex-basis:auto}
  .pen-choice{justify-content:center;min-height:46px;font-size:12px}
  .signature-status{font-size:12px;line-height:1.4}
}


/* DCR 2.1.7 — signature consent checkbox layout fix */
.signature-consent > label{
  display:grid !important;
  grid-template-columns:18px minmax(0,1fr) !important;
  align-items:start !important;
  column-gap:11px !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  text-align:left !important;
  cursor:pointer !important;
}
.signature-consent #signatureConsent,
.signature-consent input[type="checkbox"]{
  appearance:auto !important;
  -webkit-appearance:checkbox !important;
  display:block !important;
  width:18px !important;
  min-width:18px !important;
  max-width:18px !important;
  height:18px !important;
  min-height:18px !important;
  max-height:18px !important;
  margin:2px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:4px !important;
  box-shadow:none !important;
  background:transparent !important;
  accent-color:#ff6500 !important;
  cursor:pointer !important;
}
.signature-consent > label:hover #signatureConsent,
.signature-consent > label:focus-within #signatureConsent{
  outline:2px solid rgba(255,101,0,.22) !important;
  outline-offset:2px !important;
}
@media (max-width:680px){
  .signature-consent{padding:13px 14px !important}
  .signature-consent > label{
    grid-template-columns:18px minmax(0,1fr) !important;
    column-gap:10px !important;
    font-size:12px !important;
    line-height:1.5 !important;
  }
}

/* DCR 2.4.12 — client PDF review gate */
.record-pdf-review{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:18px;
  align-items:center;
  background:#fff;
  border:1px solid #d7dde2;
  border-radius:15px;
  padding:20px;
  box-shadow:0 8px 24px rgba(23,50,77,.06);
}
.record-pdf-review__icon{
  width:58px;
  height:68px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#fff1eb;
  color:#e84f12;
  border:1px solid #ffd6c5;
  font-size:15px;
  font-weight:800;
  letter-spacing:.08em;
}
.record-pdf-review__body{min-width:0}
.record-pdf-review__eyebrow{
  display:block;
  margin-bottom:4px;
  color:#697887;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.record-pdf-review h2{margin:0 0 6px;color:var(--client-navy);font-size:19px;line-height:1.3}
.record-pdf-review p{margin:0;color:#5f6d79;font-size:14px;line-height:1.55}
.record-pdf-review__state{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;color:#8a3e20}
.record-pdf-review__state strong{font-size:13px}
.record-pdf-review__state small{color:#74818d;font-size:12px}
.record-pdf-review__dot{width:9px;height:9px;border-radius:50%;background:#e87943;box-shadow:0 0 0 4px rgba(232,121,67,.13)}
.record-pdf-review.is-reviewed{border-color:#b8dbc6;background:#fbfffc}
.record-pdf-review.is-reviewed .record-pdf-review__dot{background:#228b50;box-shadow:0 0 0 4px rgba(34,139,80,.13)}
.record-pdf-review.is-reviewed .record-pdf-review__state{color:#1f7144}
.record-pdf-review__actions{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:190px}
.record-pdf-review__actions .btn{justify-content:center}
.record-pdf-review__actions>span{font-size:11px;color:#7b8791;text-align:center;line-height:1.4}
.record-text-fallback{margin-top:14px;border:1px solid #d7dde2;border-radius:13px;background:#fff;overflow:hidden}
.record-text-fallback>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 17px;color:var(--client-navy);font-weight:700}
.record-text-fallback>summary::-webkit-details-marker{display:none}
.record-text-fallback>summary:after{content:'+';font-size:22px;font-weight:400;color:#7a8792}
.record-text-fallback[open]>summary:after{content:'−'}
.record-text-fallback>summary small{margin-left:auto;color:#7a8792;font-weight:400;font-size:12px}
.record-text-fallback .record-paper{border:0;border-top:1px solid #e3e7ea;border-radius:0;box-shadow:none;min-height:0;margin:0}
.record-actions button[disabled]{opacity:.46;cursor:not-allowed;filter:grayscale(.25)}

@media (max-width:780px){
  .record-pdf-review{grid-template-columns:auto minmax(0,1fr)}
  .record-pdf-review__actions{grid-column:1/-1;min-width:0}
  .record-text-fallback>summary{align-items:flex-start;flex-wrap:wrap}
  .record-text-fallback>summary small{width:100%;margin-left:0}
}

body.client-portal .record-pdf-review,
body.client-portal .record-text-fallback{background:#0d131b!important;border-color:rgba(255,255,255,.1)!important;color:#f5f7fa!important}
body.client-portal .record-pdf-review h2,
body.client-portal .record-text-fallback>summary{color:#f5f7fa!important}
body.client-portal .record-pdf-review p,
body.client-portal .record-pdf-review__eyebrow,
body.client-portal .record-pdf-review__state small,
body.client-portal .record-pdf-review__actions>span,
body.client-portal .record-text-fallback>summary small{color:#aeb8c2!important}
body.client-portal .record-pdf-review.is-reviewed{background:#0d1813!important;border-color:rgba(76,190,125,.35)!important}
body.client-portal .record-text-fallback .record-paper{border-top-color:rgba(255,255,255,.1)!important}

/* DCR 2.4.13 — client document desktop workspace
   Desktop only. Mobile/tablet rules at 900px and below remain untouched. */
@media (min-width: 901px) {
  body.client-portal .dcr-content {
    width: 100% !important;
    max-width: 1520px !important;
    margin: 0 auto !important;
    padding: 30px clamp(24px, 3vw, 48px) 72px !important;
  }

  body.client-portal .client-record-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
  }

  body.client-portal .record-back-row {
    min-height: 44px;
    margin-bottom: 18px;
  }

  body.client-portal .record-back-row .record-back {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 4px;
    color: #ff9a55;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .01em;
  }

  body.client-portal .record-back-row .record-back:hover,
  body.client-portal .record-back-row .record-back:focus-visible {
    color: #fff;
  }

  body.client-portal .record-back-row .btn {
    min-height: 42px;
    padding: 10px 16px;
    border-color: rgba(255,255,255,.14);
    background: #111923;
    color: #f4f7fa;
  }

  body.client-portal .record-header,
  body.client-portal .record-summary,
  body.client-portal .record-section,
  body.client-portal .record-actions__card,
  body.client-portal .record-pdf-review,
  body.client-portal .record-text-fallback {
    border-color: #d9e0e5 !important;
    background: #fff !important;
    color: #243746 !important;
    box-shadow: 0 14px 38px rgba(0,0,0,.16) !important;
  }

  body.client-portal .record-header {
    gap: 30px;
    padding: 28px 30px;
    margin-bottom: 22px;
    border-radius: 20px;
  }

  body.client-portal .record-header__line {
    flex-wrap: wrap;
    row-gap: 8px;
    margin-bottom: 12px;
  }

  body.client-portal .record-header h1 {
    max-width: 920px;
    color: #102f4d !important;
    font-size: clamp(27px, 2.2vw, 34px);
    line-height: 1.2;
  }

  body.client-portal .record-header p {
    color: #657584 !important;
    font-size: 14px;
  }

  body.client-portal .record-integrity {
    flex: 0 0 auto;
    min-width: 190px;
    padding: 13px 15px;
  }

  body.client-portal .record-main {
    gap: 20px;
  }

  body.client-portal .record-summary {
    border-radius: 17px;
  }

  body.client-portal .record-summary > div {
    min-height: 78px;
    padding: 17px 19px;
  }

  body.client-portal .record-summary span {
    color: #71808d !important;
    font-size: 10px;
  }

  body.client-portal .record-summary strong {
    color: #223746 !important;
    font-size: 14px;
  }

  body.client-portal .record-pdf-review {
    grid-template-columns: 72px minmax(0,1fr) 220px;
    gap: 22px;
    padding: 24px 26px;
    border-radius: 17px;
  }

  body.client-portal .record-pdf-review__icon {
    width: 64px;
    height: 76px;
  }

  body.client-portal .record-pdf-review h2 {
    color: #102f4d !important;
    font-size: 20px;
  }

  body.client-portal .record-pdf-review p,
  body.client-portal .record-pdf-review__eyebrow,
  body.client-portal .record-pdf-review__state small,
  body.client-portal .record-pdf-review__actions > span {
    color: #667684 !important;
  }

  body.client-portal .record-pdf-review.is-reviewed {
    border-color: #b8dbc6 !important;
    background: #fbfffc !important;
  }

  body.client-portal .record-pdf-review__actions {
    min-width: 220px;
  }

  body.client-portal .record-pdf-review__actions .btn {
    min-height: 46px;
    font-size: 12px;
  }

  body.client-portal .record-text-fallback {
    margin-top: 0;
    border-radius: 15px;
  }

  body.client-portal .record-text-fallback > summary {
    min-height: 58px;
    padding: 16px 20px;
    color: #17324b !important;
  }

  body.client-portal .record-text-fallback > summary small {
    color: #74818d !important;
  }

  body.client-portal .record-text-fallback .record-paper {
    border-top-color: #e3e7ea !important;
    background: #fff !important;
    color: #111 !important;
  }

  body.client-portal .record-section {
    padding: 24px;
    border-radius: 17px;
  }

  body.client-portal .record-section__head h2,
  body.client-portal .record-actions__card h2 {
    color: #102f4d !important;
  }

  body.client-portal .record-section__head p,
  body.client-portal .record-action-help,
  body.client-portal .record-steps small,
  body.client-portal .signature-card small,
  body.client-portal .record-certificate dt {
    color: #71808d !important;
  }

  body.client-portal .record-section__head > span {
    background: #edf2f5;
    color: #647482;
  }

  body.client-portal .record-steps strong,
  body.client-portal .record-certificate dd,
  body.client-portal .signature-card strong,
  body.client-portal .comment-form label {
    color: #243746 !important;
  }

  body.client-portal .signature-card {
    background: #fbfcfd;
    border-color: #d2dae0;
  }

  body.client-portal .signature-card.is-signed {
    background: #f8fcfa;
    border-color: #c9dfd5;
  }

  body.client-portal .correspondence-body {
    background: #fbfcfd;
    border-color: #e0e5e9;
  }

  body.client-portal .correspondence-meta strong,
  body.client-portal .correspondence-text {
    color: #35424e !important;
  }

  body.client-portal .comment-form textarea {
    border-color: #d5dde4;
    background: #fff;
    color: #1f3445;
  }

  body.client-portal .record-actions__card {
    padding: 24px;
    border-radius: 18px;
  }

  body.client-portal .record-actions__card h2 {
    margin-bottom: 20px;
    font-size: 18px;
  }

  body.client-portal .record-steps li:not(:last-child):after {
    background: #dce2e6;
  }

  body.client-portal .record-steps li > span {
    background: #fff;
    border-color: #cdd6dc;
    color: #7e8b96;
  }

  body.client-portal .record-steps li.is-done > span {
    background: #228b50;
    border-color: #228b50;
    color: #fff;
  }

  body.client-portal .record-primary-action,
  body.client-portal .record-secondary-action {
    min-height: 46px;
    font-size: 12px;
  }
}

/* Compact desktop / small laptop: keep a wide readable main column and move
   the action workflow above it. This range deliberately starts above the
   untouched mobile breakpoint. */
@media (min-width: 901px) and (max-width: 1179px) {
  body.client-portal .dcr-content {
    max-width: 1120px !important;
    padding-left: 26px !important;
    padding-right: 26px !important;
  }

  body.client-portal .record-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  body.client-portal .record-actions {
    position: static;
    order: -1;
  }

  body.client-portal .record-actions__card {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(280px,360px);
    gap: 14px 28px;
    align-items: start;
  }

  body.client-portal .record-actions__card > h2 {
    grid-column: 1 / -1;
    margin: 0;
  }

  body.client-portal .record-actions__card > .record-steps {
    grid-column: 1;
    grid-row: 2 / span 4;
    margin: 0;
  }

  body.client-portal .record-actions__card > .record-primary-action,
  body.client-portal .record-actions__card > .record-complete-note {
    grid-column: 2;
    grid-row: 2;
  }

  body.client-portal .record-actions__card > form {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
  }

  body.client-portal .record-actions__card > .record-action-help {
    grid-column: 2;
    grid-row: 4;
    margin: 0;
  }

  body.client-portal .record-summary {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
}

/* Full desktop workspace */
@media (min-width: 1180px) {
  body.client-portal .record-layout {
    grid-template-columns: minmax(0,1fr) 360px;
    gap: 24px;
    align-items: start;
  }

  body.client-portal .record-actions {
    position: sticky;
    top: 88px;
  }
}

@media (min-width: 1440px) {
  body.client-portal .record-layout {
    grid-template-columns: minmax(0,1fr) 380px;
    gap: 28px;
  }
}


/* DCR 2.4.32 — mobile signature reliability hardening */
.signature-modal,
.signature-modal *{box-sizing:border-box}
.signature-modal{padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));overscroll-behavior:contain}
.signature-modal__panel{max-height:calc(100dvh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.signature-modal__close:disabled,.signature-tools button:disabled{opacity:.55;cursor:wait}
.signature-canvas-wrap{min-height:150px;isolation:isolate}
.signature-canvas-wrap canvas{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;cursor:crosshair}
.signature-tools{position:sticky;bottom:-1px;z-index:5;padding:10px 0 max(2px,env(safe-area-inset-bottom));background:linear-gradient(to bottom,rgba(255,255,255,.94),#fff 24%)}
.signature-status{position:relative;z-index:6;overflow-wrap:anywhere}
@media(max-width:680px){
  .signature-modal{align-items:flex-end;padding:max(6px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
  .signature-modal__panel{max-height:calc(100dvh - max(8px,env(safe-area-inset-top)) - max(8px,env(safe-area-inset-bottom)));border-radius:20px 20px 10px 10px;padding:16px 14px calc(14px + env(safe-area-inset-bottom))}
  .signature-canvas-wrap{height:clamp(165px,29dvh,220px)}
  .signature-tools>.btn,.pen-choice{min-height:48px}
}
@media(max-width:360px){
  .signature-modal__panel{padding-left:11px;padding-right:11px}
  .signature-modal__heading h2{font-size:19px!important}
  .signature-consent{padding:11px}
  .signature-tools{gap:7px}
}
@media(max-height:560px) and (orientation:landscape){
  .signature-modal{align-items:flex-start}
  .signature-modal__panel{max-height:100dvh;border-radius:12px;padding-top:10px}
  .signature-modal__head{margin-bottom:8px}
  .signature-modal__heading p{display:none}
  .signature-consent{margin-bottom:8px;padding:9px 11px}
  .signature-canvas-wrap{height:130px;min-height:120px}
  .signature-tools{margin-top:7px;padding-top:7px}
}
