/* Paper desk finish: visible material and hierarchy, with unchanged action timing. */
:root {
  --desk-relief-edge: #d4cdc4;
  --desk-relief-highlight: #fff;
  --desk-relief-shadow: 0 2px 3px #3d2c1e0b, 0 12px 28px #3d2c1e0b;
  --desk-relief-raised: 0 2px 0 #c9c1b6, 0 5px 10px #3b2d2112;
}
body#wltProduct480.wlt-desk {
  --desk-muted: #655f5b;
  --desk-line: #dcd6ce;
  --desk-shadow: var(--desk-relief-shadow);
  --desk-relief-paper: linear-gradient(145deg,var(--desk-paper),color-mix(in srgb,var(--desk-paper),#9a9690 2%));
  --desk-relief-field: linear-gradient(180deg,color-mix(in srgb,var(--desk-field),#9a9690 3%),var(--desk-paper));
}
body#wltProduct480.wlt-desk.wlt-dark-product {
  --desk-muted: #c5beb6;
  --desk-line: #5e5650;
  --desk-relief-edge: #71665d;
  --desk-relief-highlight: #6d6258;
  --desk-relief-shadow: 0 2px 3px #0004,0 12px 28px #0003;
  --desk-relief-raised: 0 2px 0 #13100e,0 5px 10px #0004;
  --desk-relief-paper: linear-gradient(145deg,var(--desk-paper),color-mix(in srgb,var(--desk-paper),#000 9%));
}
/* Navigation keeps its familiar width and position; the current page is a tab. */
body#wltProduct480.wlt-desk .desk-nav .nav-item {
  min-height: 44px !important;
  font-size: 13px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
}
body#wltProduct480.wlt-desk .desk-nav .nav-item.active {
  background: var(--desk-relief-paper) !important;
  color: var(--desk-accent) !important;
  border-color: var(--desk-line) !important;
  box-shadow: inset 4px 0 0 var(--desk-accent),var(--desk-relief-raised) !important;
  font-weight: 700 !important;
}
body#wltProduct480.wlt-desk .desk-nav .nav-item:hover:not(.active) {
  background: var(--desk-field) !important;
  border-color: var(--desk-line) !important;
}
body#wltProduct480.wlt-desk .desk-top-book {
  background: var(--desk-relief-paper);
  border: 1px solid var(--desk-line);
  box-shadow: 0 2px 0 var(--desk-line);
  border-radius: 10px;
  padding: 8px 12px;
}
body#wltProduct480.wlt-desk :is(.desk-panel,.pro-panel,.section-card,.fhw-card,.ia-card) {
  border: 1px solid var(--desk-line) !important;
  background: var(--desk-relief-paper) !important;
  box-shadow: var(--desk-relief-shadow) !important;
}
body#wltProduct480.wlt-desk :is(.desk-panel-head,.pro-panel-head,.card-head) {
  border-bottom-color: var(--desk-line) !important;
}
body#wltProduct480.wlt-desk :is(.desk-panel-head,.pro-panel-head,.card-head) :is(h2,h3) {
  font-size: 16px !important;
  font-weight: 700 !important;
}
body#wltProduct480.wlt-desk .desk-welcome {
  border: 1px solid var(--desk-line);
  background: var(--desk-relief-paper);
  box-shadow: var(--desk-relief-shadow);
}
body#wltProduct480.wlt-desk :is(.desk-kpi,.desk-debt-strip>button,.desk-workflow-card,.fhw-debt-card) {
  background: var(--desk-relief-paper) !important;
  border: 1px solid var(--desk-line) !important;
  box-shadow: inset 0 3px 0 var(--desk-card-edge,var(--desk-line)),var(--desk-relief-shadow) !important;
  border-radius: 13px !important;
}
body#wltProduct480.wlt-desk .desk-kpi {
  padding: 21px 22px !important;
}
body#wltProduct480.wlt-desk .desk-kpi-title { font-size: 13px; }
body#wltProduct480.wlt-desk .desk-kpi small { font-size: 12px; line-height: 1.7; }
body#wltProduct480.wlt-desk .desk-kpi strong { font-size: clamp(25px,2.5vw,34px); }
body#wltProduct480.wlt-desk .desk-kpi[data-home-metric=accounts] { --desk-card-edge:var(--desk-ink); }
body#wltProduct480.wlt-desk .desk-kpi[data-home-metric=month_income] { --desk-card-edge:var(--desk-accent); }
body#wltProduct480.wlt-desk .desk-kpi[data-home-metric=month_expense] { --desk-card-edge:var(--desk-green); }
body#wltProduct480.wlt-desk .desk-kpi[data-home-metric=tasks] { --desk-card-edge:#8a7963; }
body#wltProduct480.wlt-desk .desk-home .desk-kpi[data-home-metric=month_income]>strong { color:var(--desk-accent) !important; }
body#wltProduct480.wlt-desk .desk-home .desk-kpi[data-home-metric=month_expense]>strong { color:var(--desk-green) !important; }
body#wltProduct480.wlt-desk .desk-welcome-copy { min-width:0;max-width:540px; }
body#wltProduct480.wlt-desk .desk-welcome-copy h2 { overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow-wrap:anywhere; }
body#wltProduct480.wlt-desk :is(.desk-page-title p,.desk-panel-head p,.desk-chart-summary,.desk-page-footnote,.desk-task p,.desk-inline-button,.desk-quick-grid button,.desk-debt-strip>button) { font-size:12px !important;line-height:1.8; }
body#wltProduct480.wlt-desk .desk-debt-strip>button { box-shadow:none !important;border:0 !important;background:none !important;padding:8px 12px; }
/* Balances are compact ledger rows, independent of avatar/status badge styles. */
body#wltProduct480.wlt-desk .wlt-contact-balances { display:flex !important;flex-direction:column;align-items:stretch;justify-content:center;gap:4px;width:auto !important;height:auto !important;min-width:0;max-width:240px;padding:8px 12px !important;background:var(--desk-field) !important;border:1px solid var(--desk-line);border-radius:8px !important;color:var(--desk-ink) !important;flex:none;box-shadow:none !important; }
body#wltProduct480.wlt-desk .wlt-contact-balances small { display:flex !important;justify-content:space-between;align-items:baseline;gap:14px;font-size:12px !important;line-height:1.8;text-align:left;white-space:nowrap;color:var(--desk-muted) !important; }
body#wltProduct480.wlt-desk .wlt-contact-balances b { font-size:14px !important;line-height:1.8;color:var(--desk-ink) !important;white-space:nowrap; }
body#wltProduct480.wlt-desk .v477-contact-row>em { background:none !important;border:0 !important;border-radius:0 !important;padding:0 !important;max-width:none;min-width:0; }
body#wltProduct480.wlt-desk .v477-contact-row>em>span:last-child { font-size:12px;color:var(--desk-muted); }
body#wltProduct480.wlt-desk .v477-contact-row>span:nth-child(2)>b { flex-wrap:wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.8; }
.desk-workflow-cards { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:18px 0; }
body#wltProduct480.wlt-desk .desk-workflow-card { position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;row-gap:5px;min-width:0;text-align:left;padding:20px;color:var(--desk-ink); }
.desk-workflow-icon { grid-row:1/4;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--desk-line);border-radius:10px;background:var(--desk-field);color:var(--desk-accent); }
.desk-workflow-icon svg { width:20px;height:20px; }
.desk-workflow-label { font-size:14px;font-weight:650; }
.desk-workflow-card>strong { font-size:25px;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.desk-workflow-card>small { grid-column:1/-1;font-size:12px;line-height:1.8;color:var(--desk-muted); }
.desk-workflow-open { grid-column:1/-1;display:flex;align-items:center;gap:7px;margin-top:9px;padding-top:10px;border-top:1px solid var(--desk-line);font-size:12px;color:var(--desk-accent); }
.desk-workflow-open svg { width:14px;height:14px; }
body#wltProduct480.wlt-desk .desk-workflow-card:hover { border-color:var(--desk-accent) !important; }
.fhw-counterparty-cards { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0; }
body#wltProduct480.wlt-desk .fhw-debt-card { display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:22px;text-align:left;color:var(--desk-ink); }
.fhw-debt-card>span { font-size:15px;font-weight:700; }
.fhw-debt-card>strong { margin:10px 0;font-size:31px;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.fhw-debt-card>small { color:var(--desk-muted);font-size:13px;line-height:1.8; }
.fhw-debt-card>em { align-self:stretch;margin-top:15px;padding-top:12px;border-top:1px solid var(--desk-line);font-size:13px;font-style:normal;color:var(--desk-accent); }
.fhw-counterparty-basis { grid-column:1/-1;font-size:12px;line-height:1.8;margin:0; }
.fhw-debt-card:disabled { cursor:wait; }
.funds-detail-scope { display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;padding:14px;background:var(--desk-field);border:1px solid var(--desk-line);border-radius:10px; }
/* A raised face identifies an action. Pressing is immediate and decorative. */
body#wltProduct480.wlt-desk :is(.gold-btn,.outline-btn,.danger-btn,.ia-button) {
  min-height: 40px !important;
  padding: 9px 16px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.5 !important;
  box-shadow: inset 0 1px 0 #ffffff45,var(--desk-relief-raised) !important;
  transition: background-color 120ms,border-color 120ms,box-shadow 120ms,color 120ms !important;
}
body#wltProduct480.wlt-desk .outline-btn {
  background: var(--desk-relief-paper) !important;
  border-color: var(--desk-relief-edge) !important;
  color: var(--desk-ink) !important;
}
body#wltProduct480.wlt-desk :is(.table-wrap,.fhw-heading,.desk-page-tools,.card-head) .outline-btn { box-shadow:none !important;background:transparent !important; }
body#wltProduct480.wlt-desk :is(.text-link,.fhw-text,.desk-inline-button) { font-size:13px !important;min-height:32px;box-shadow:none !important; }
body#wltProduct480.wlt-desk .fhw-subnav .outline-btn { background:transparent !important;box-shadow:none !important;border-color:transparent !important; }
body#wltProduct480.wlt-desk .fhw-subnav .outline-btn:hover { background:var(--desk-field) !important;border-color:var(--desk-line) !important; }
body#wltProduct480.wlt-desk :is(.fhw-small,.fhw-metrics small,.fhw-metrics .fhw-card>span,.fhw-footer,.fhw-reminder p,.fhw-private p,.fhw details,.pro-dialog-intro,.pro-finance-strip small) { font-size:12px !important;line-height:1.8; }
body#wltProduct480.wlt-desk input::placeholder,body#wltProduct480.wlt-desk textarea::placeholder { color:var(--desk-muted) !important;opacity:1; }
body#wltProduct480.wlt-desk .gold-btn {
  background: linear-gradient(180deg,color-mix(in srgb,var(--desk-button-face,var(--desk-accent)),white 7%),var(--desk-button-face,var(--desk-accent))) !important;
  border-color: color-mix(in srgb,var(--desk-button-face,var(--desk-accent)),black 22%) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 #ffffff38,0 2px 0 color-mix(in srgb,var(--desk-button-face,var(--desk-accent)),black 30%),0 5px 12px #66151b20 !important;
}
body#wltProduct480.wlt-desk :is(.gold-btn,.outline-btn,.danger-btn,.ia-button):is(:active,.desk-pressed):not(:disabled) {
  box-shadow: inset 0 2px 4px #0002,0 1px 0 var(--desk-line) !important;
}
body#wltProduct480.wlt-desk :is(.gold-btn,.outline-btn,.danger-btn,.ia-button):disabled {
  background: var(--desk-field) !important;
  color: var(--desk-disabled-ink) !important;
  border-color: var(--desk-line) !important;
  box-shadow: none !important;
}
body#wltProduct480.wlt-desk :is(.v430-input,.query-field input,.query-field select,.fhw-form input,.fhw-form select,.fhw-form textarea,.funds-form input,.funds-form textarea) {
  min-height: 42px !important;
  font-size: 14px !important;
  border-color: var(--desk-relief-edge) !important;
  background: var(--desk-relief-field) !important;
  box-shadow: inset 0 2px 3px #392a1910 !important;
}
body#wltProduct480.wlt-desk :is(.v430-field>span,.query-field>span,.query-field>label,#orderForm .v430-field>span) {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--desk-ink) !important;
}
body#wltProduct480.wlt-desk :is(.v430-input,.query-field input,.query-field select):focus {
  border-color: var(--desk-accent) !important;
  box-shadow: inset 0 1px 2px #392a1908,0 0 0 3px color-mix(in srgb,var(--desk-accent),transparent 80%) !important;
}
body#wltProduct480.wlt-desk :is(.v487-filter-panel,.query-filter-panel,.query-main-filters,.hf3-account-filters) {
  background: var(--desk-relief-field) !important;
  border: 1px solid var(--desk-line) !important;
  border-radius: 12px;
}
body#wltProduct480.wlt-desk :is(.query-table,.v430-table,.v487-table,.desk-recent-table,.desk-record-lines table,.fhw table) th {
  background: var(--desk-field) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--desk-ink) !important;
  padding: 13px 14px !important;
  border-bottom: 2px solid var(--desk-line) !important;
}
body#wltProduct480.wlt-desk :is(.query-table,.v430-table,.v487-table,.desk-recent-table,.desk-record-lines table,.fhw table) td {
  font-size: 13px !important;
  padding: 14px !important;
  line-height: 1.75 !important;
}
body#wltProduct480.wlt-desk :is(.query-table,.v430-table,.v487-table,.desk-recent-table,.fhw table) tbody tr:nth-child(even) {
  background: color-mix(in srgb,var(--desk-field),transparent 38%);
}
body#wltProduct480.wlt-desk .modal-card {
  border: 1px solid var(--desk-relief-edge) !important;
  background: var(--desk-paper) !important;
  box-shadow: 0 4px 0 color-mix(in srgb,var(--desk-paper),#000 12%),0 24px 70px #0003 !important;
  display:flex;
  flex-direction:column;
  overflow:hidden !important;
  max-height:calc(100dvh - 48px) !important;
}
body#wltProduct480.wlt-desk .modal-card>.modal-head { flex:none; }
body#wltProduct480.wlt-desk .modal-card>.modal-body { min-height:0;overflow:auto !important;overscroll-behavior:contain;scroll-padding-block:20px 110px; }
body#wltProduct480.wlt-desk .modal-body form>.v430-actions-row:last-child {
  position:sticky;bottom:-24px;z-index:6;
  background:var(--desk-paper);border-top:1px solid var(--desk-line);
  margin:18px -26px -24px;padding:15px 26px 18px;
  box-shadow:0 -5px 14px #36292108;flex-wrap:wrap;
}
body#wltProduct480.wlt-desk .modal-body form>:is(button.gold-btn,button[type=submit]):last-child { position:sticky;bottom:0;z-index:6; }
body#wltProduct480.wlt-desk .modal-head {
  background: var(--desk-relief-paper) !important;
  border-bottom: 2px solid var(--desk-line) !important;
}
body#wltProduct480.wlt-desk .modal-head h2 { font-size: 20px !important; }
body#wltProduct480.wlt-desk .desk-record-cover {
  background: var(--desk-relief-paper) !important;
  border: 1px solid var(--desk-line);
  border-left: 5px solid var(--desk-accent);
  border-radius: 10px;
  box-shadow: var(--desk-relief-shadow);
}
body#wltProduct480.wlt-desk .wlt-record-detail .v430-kv :is(span,b) { font-size: 13px !important; }
/* Cloth binding and paper edges remain CSS surfaces on the existing 3D object. */
.nb-cover-front {
  background: linear-gradient(90deg,#b9aa961c,transparent 15%),repeating-linear-gradient(0deg,#b3a28e0c 0,#b3a28e0c 1px,transparent 1px,transparent 4px),linear-gradient(130deg,#fffdf8,#ece5d9) !important;
  border-color: #d8cbb7;
  box-shadow: inset 0 1px 0 #fff,inset -2px -3px 0 #c6b8a075,1px 4px 8px #35281724 !important;
}
.nb-cover-ribbon { width: 15px; box-shadow: 2px 0 0 #0002,4px 0 6px #35281724; }
.nb-cover-dot { box-shadow: inset 0 1px 2px #fff8,0 1px 2px #0002; }
.nb-cover-bottom { border-top: 2px solid #cdbfa8; }
.nb-cover-top small,.nb-cover-top>span,.nb-cover-bottom>span { color: #65594b; }
.nb-pages {
  background: repeating-linear-gradient(to bottom,#fffdf4 0,#fffdf4 2px,#bbae982c 2px,#bbae982c 3px);
  box-shadow: 8px 5px 0 #c1b59f,8px 6px 0 #fff7e9,9px 9px 9px #35281726;
}
.nb-spine { background: linear-gradient(90deg,#8d7761,#d4c4aa 32%,#f5ecd9 72%,#c4b299); }
.nb-back { background: #d4c5aa; border-color: #b8a78c; }
.nb-bookmark { box-shadow: 0 4px 4px #0003; }
.desk-login-book-deck>.nb-scene:nth-child(2) { opacity: .88; }
.desk-login-book-deck>.nb-scene:nth-child(3) { opacity: .72; }
.desk-login-book-deck>.nb-scene:nth-child(n+2) .nb-cover-front {
  background: linear-gradient(140deg,color-mix(in srgb,var(--nb-soft),white 60%),color-mix(in srgb,var(--nb-soft),#c7b59a 28%)) !important;
}
.desk-login-book-deck>.nb-scene:nth-child(n+2) .nb-cover-top { opacity: .85; }
.desk-login-book-deck>.nb-scene:nth-child(n+2) .nb-cover-bottom { opacity: .7; }
.desk-login-card { border-color: #fff; box-shadow: inset 0 1px 0 #fff,0 4px 0 #d4ccc0,0 26px 55px #3d2b1b24; }
@media(max-width:680px) {
  .desk-workflow-cards { grid-template-columns:minmax(0,1fr);gap:12px; }
  .fhw-counterparty-cards { grid-template-columns:minmax(0,1fr);gap:12px; }
  body#wltProduct480.wlt-desk .desk-workflow-card { padding:17px; }
  body#wltProduct480.wlt-desk .desk-kpi { padding: 17px !important; }
  body#wltProduct480.wlt-desk :is(.gold-btn,.outline-btn,.danger-btn,.ia-button) { min-height: 44px !important; }
  body#wltProduct480.wlt-desk :is(.query-table,.v430-table,.v487-table,.desk-recent-table,.fhw table) td { padding: 12px !important; }
  body#wltProduct480.wlt-desk .wlt-contact-balances { max-width:175px;padding:7px 9px !important; }
  body#wltProduct480.wlt-desk .wlt-contact-balances small { gap:9px; }
  body#wltProduct480.wlt-desk .desk-welcome-copy p { font-size:12px; }
  body#wltProduct480.wlt-desk .v477-contact-row>em { justify-content:flex-start; }
}
@media(max-width:520px) {
  body#wltProduct480.wlt-desk .modal-card { max-height:calc(100dvh - 20px) !important; }
  body#wltProduct480.wlt-desk .modal-body form>.v430-actions-row:last-child { bottom:-18px;margin:18px -18px -18px;padding:14px 18px; }
}
@media(prefers-reduced-motion:reduce) {
  body#wltProduct480.wlt-desk :is(.gold-btn,.outline-btn,.danger-btn,.ia-button) { transition:none !important; }
}
html[data-motion=reduced] body#wltProduct480.wlt-desk :is(.gold-btn,.outline-btn,.danger-btn,.ia-button) { transition:none !important; }
