:root{--blue:#007f89;--blue2:#006570;--ink:#123b56;--text:#173b51;--bg:#f2f8fa;--card:#fff;--line:#d6e6eb;--soft:#e6f6f5;--muted:#57717e;--sidebar:#eef7f8;--nav:#fff;--nav2:#01c6c8;--header-mid:#e0f7f4;--header-end:#01c6c8}
html[data-honoreo-theme="marine"]{--blue:#134f79;--blue2:#0c3658;--ink:#12344e;--text:#17344c;--bg:#eef3f8;--line:#d3e0eb;--soft:#e7f1f7;--sidebar:#133b59;--header-mid:#dbe5ee;--header-end:#123b59}
html[data-honoreo-theme="lagon"]{--blue:#007972;--blue2:#00645f;--ink:#164d50;--text:#23494b;--bg:#f2f9f5;--line:#d3e7df;--soft:#e1f4e9;--sidebar:#e5f3ed}
header.top,body>header,body:has(.login-shell)>header{background:linear-gradient(100deg,#fff 5%,#fff 27%,var(--header-mid) 67%,var(--header-end) 100%);color:var(--ink);border-bottom:1px solid var(--line);box-shadow:0 2px 14px #153b5210}
.top .brand-sub,.top .usertext span,header .account-dropdown{color:var(--ink)}
.top .brand-title,.top .top-link{color:var(--ink)}
.account-dropdown summary{border-color:#0d627440;background:#ffffff70}
.account-dropdown summary:hover,.account-dropdown[open] summary{background:#fff}
.active-surgeon-switch{background:#ffffffb3;border-color:#80cfcd;color:var(--ink)!important}
.honoreo-brand{background:transparent}
.btn:not(.secondary):not(.ghost):not(.reminder),button:not(.ghost):not(.secondary),.button{background:var(--blue)}
.btn:hover,button:hover{filter:brightness(.96)}
.nav-item.active,.settings-nav a:hover,.account-dropdown-panel>a:hover{background:var(--soft);color:var(--blue)}
html[data-honoreo-theme="marine"] .sidebar .nav-item{color:#dceaf3}
html[data-honoreo-theme="marine"] .sidebar .nav-item.active{background:#e3f5f3;color:#123b56}
.honoreo-theme-picker{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0 22px}
.honoreo-theme-picker button{background:var(--card);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:12px 16px;cursor:pointer}
.honoreo-theme-picker button[aria-pressed="true"]{outline:2px solid var(--blue);outline-offset:2px}
.honoreo-theme-picker i{display:inline-block;width:30px;height:12px;border-radius:10px;margin-right:8px;background:linear-gradient(90deg,#01c6c8,#123b59)}
.honoreo-transfer-status{padding:12px 16px;background:var(--soft);border-radius:9px;margin:12px 0;color:var(--ink)}
/* A horizontal scroll on small screens preserves every character in CCAM/amount fields. */
.table-wrap:has(#code1),.section:has(#code1){overflow-x:auto;-webkit-overflow-scrolling:touch}
.grid-main:has(#code1){grid-template-columns:minmax(0,1fr) 310px;align-items:start}
.grid-main:has(#code1)>div{min-width:0}
.grid-main:has(#code1)>.right-col{display:block}
table:has(#code1){min-width:980px;table-layout:auto;width:100%}
table:has(#code1) th:nth-child(2),table:has(#code1) td:nth-child(2){min-width:145px;width:145px}
table:has(#code1) th:nth-child(3),table:has(#code1) td:nth-child(3){min-width:240px}
input[id^="code"]{min-width:11ch!important;width:100%!important;font:600 15px ui-monospace,Consolas,monospace!important;padding:10px!important;letter-spacing:.02em}
input[id^="base"],input[id^="remb"],input[id^="fact"]{min-width:13ch!important;width:100%!important;padding:10px!important;font-variant-numeric:tabular-nums}
.summary-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important}
.summary-grid input{min-width:15ch;font-variant-numeric:tabular-nums}
.summary-grid>div{min-width:0}
td:has(input[id^="base"]),td:has(input[id^="remb"]),td:has(input[id^="fact"]){min-width:132px}
.ccam-libelle{min-width:220px}
table td:first-child:has(+td){overflow-wrap:normal}
.honoreo-document-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
@media(max-width:850px){.top .brand{min-width:0}.grid-main:has(#code1){display:block}.grid-main:has(#code1)>div{min-width:0}.section:has(#code1){overflow-x:auto}.summary-grid{display:grid!important}}

.section h2,.page-title{color:var(--ink)}.btn.secondary{color:var(--blue);border-color:var(--blue)}.segment input:checked+label{background:var(--blue);border-color:var(--blue)}.summary-note{border-color:var(--line);background:var(--soft);color:var(--ink)}

/* Keep account controls legible on the blue end of the header. */
html[data-honoreo-theme="marine"] header .account-dropdown summary{background:#fff;color:var(--ink)}
html[data-honoreo-theme="marine"] .top .usertext,html[data-honoreo-theme="marine"] .top .usertext span,html[data-honoreo-theme="marine"] .top .top-link{color:#fff}

@media(max-width:1100px){.grid-main:has(#code1){grid-template-columns:minmax(0,1fr)}.grid-main:has(#code1)>.right-col{display:block}}
