/* Shared customer and ERP portal surfaces, after the CRM theme. */
body.clientes-portal { padding-bottom: 0; }
.clientes-portal .portal-main { width:100%; max-width:none; margin:0; padding:clamp(20px,2vw,36px) var(--page-gutter); min-height:65vh; }
.clientes-portal .fama-header { gap:0; }
.clientes-portal .fama-header nav { gap:0; }
.clientes-portal .fama-footer { text-align:left; border:0; }
.clientes-portal .fama-footer-main { padding-block:36px; }
.clientes-portal .portal-account { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; padding:12px var(--page-gutter); margin:0; background:var(--theme-surface); border-bottom:1px solid var(--theme-border); }
.clientes-portal .portal-account a { padding:10px 12px; border-radius:8px; font-weight:600; }
.clientes-portal .portal-account [aria-current] { background:var(--theme-soft); color:var(--theme-link); }
.clientes-portal .portal-account form { margin:0 0 0 auto; }
.clientes-portal .portal-user { overflow-wrap:anywhere; min-width:0; }
.clientes-portal .portal-time { padding:0 var(--page-gutter); color:var(--theme-muted); font-size:12px; text-align:right; }
.clientes-portal .portal-main :is(a,.button) { color:var(--theme-link); }
.clientes-portal .portal-main :is(h1,h2,h3,label,dt,dd) { color:var(--theme-text); }
.clientes-portal .portal-main h1 { font-size:clamp(26px,2.6vw,42px); overflow-wrap:anywhere; }
.clientes-portal .portal-main :is(p,dd,li,strong,h2,h3) { overflow-wrap:anywhere; }
.clientes-portal :is(.card,.metric) { background:var(--theme-surface); border:1px solid var(--theme-border); border-radius:12px; box-shadow:0 8px 28px #142d3908; padding:clamp(18px,2vw,28px); min-width:0; }
.clientes-portal .narrow { width:100%; max-width:none; margin:20px 0; }
.clientes-portal .auth { width:100%; max-width:none; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:clamp(20px,3vw,64px); margin:24px 0; }
.clientes-portal .auth > * { min-width:0; }
.clientes-portal .auth > section:first-child { padding:clamp(24px,4vw,60px); border-radius:14px; background:linear-gradient(90deg,#102638f5,#102638c9),url('/crm-assets/hero.webp') center/cover; }
.clientes-portal .auth > section:first-child :is(h1,p) { color:#fff; }
.clientes-portal .auth > section:first-child a { color:#f2c582; }
.clientes-portal .modules { width:100%; display:flex; flex-wrap:wrap; gap:8px; overflow:visible; }
.clientes-portal .modules a { flex:0 1 auto; min-width:0; white-space:normal; overflow-wrap:anywhere; background:var(--theme-surface); border:1px solid var(--theme-border); color:var(--theme-text); }
.clientes-portal .modules a.active { background:#102638; border-color:#102638; color:#fff; box-shadow:inset 0 -3px #edba5a; }
.clientes-portal .modules a:hover { border-color:var(--theme-link); }
.clientes-portal :is(.workspace-heading,.section-title,.record-list li) { flex-wrap:wrap; min-width:0; }
.clientes-portal .workspace-heading > * { min-width:0; }
.clientes-portal :is(.muted,small,.workspace-heading p,.metric p,.metric span,.detail-grid dt,.history time,.auth p) { color:var(--theme-muted); }
.clientes-portal :is(.scope-card,.balance,.empty,.notice) { background:var(--theme-soft); color:var(--theme-text); border-color:var(--theme-border); }
.clientes-portal .notice.error { background:#fff0ed; color:#a41f2b; border-color:#edccd0; }
html.dark .clientes-portal .notice.error { background:#482930; color:#ffbdc3; border-color:#80444d; }
.clientes-portal .metric:first-child { border-top:3px solid #b92632; }
.clientes-portal .metric strong { font-size:clamp(23px,2vw,32px); overflow-wrap:anywhere; }
.clientes-portal :is(.metric-grid,.quick-grid,.detail-grid) { grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr)); }
.clientes-portal .catalog-grid { grid-template-columns:repeat(auto-fit,minmax(min(265px,100%),1fr)); }
.clientes-portal .form-grid { grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr)); }
.clientes-portal :is(.filters,.scope-card .filters) label { flex:1 1 180px; min-width:0; }
.clientes-portal :is(input,select,textarea) { min-width:0; width:100%; margin-top:0; color:var(--theme-text); background:var(--theme-surface); border-color:var(--theme-input); }
.clientes-portal input[type=file] { overflow:hidden; }
.clientes-portal textarea { resize:vertical; }
.clientes-portal :is(button,.button) { min-height:44px; white-space:normal; overflow-wrap:anywhere; }
.clientes-portal .portal-main .primary { color:#fff; background:#b92632; border-color:#b92632; }
.clientes-portal .portal-main .primary:hover { background:#a41f2b; }
.clientes-portal .table-wrap { width:100%; min-width:0; max-width:100%; overflow-x:auto; overscroll-behavior-inline:contain; border:1px solid var(--theme-border); border-radius:8px; }
.clientes-portal table { width:100%; white-space:normal; }
.clientes-portal :is(td,th) { padding:14px; border-color:var(--theme-border); min-width:120px; overflow-wrap:anywhere; }
.clientes-portal td input { min-width:100px; }
.clientes-portal th { background:var(--theme-soft); color:var(--theme-muted); }
.clientes-portal td { color:var(--theme-text); }
.clientes-portal :is(.tag,.product-mark,.tracking span) { background:var(--theme-soft); color:var(--theme-text); border-color:var(--theme-border); }
.clientes-portal .product-card .stock { color:var(--theme-muted); }
.clientes-portal .tracking .done { background:#eaf4ef; border-color:#91b7a1; color:#246c59; }
html.dark .clientes-portal .tracking .done { background:#173c32; color:#a1e5c3; }
.clientes-portal .record-list li { border-color:var(--theme-border); }
.clientes-portal nav[aria-label="Pagination Navigation"] svg { width:20px; height:20px; }
@media(max-width:1023px) { .clientes-portal .auth { grid-template-columns:minmax(0,1fr); } }
@media(max-width:700px) {
 .clientes-portal .portal-account { gap:8px; }
 .clientes-portal .portal-account a { padding:10px 8px; }
 .clientes-portal .portal-account form { margin-left:0; }
 .clientes-portal .modules { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .clientes-portal .modules a { display:flex; align-items:center; justify-content:center; margin:0; padding:12px 8px; }
 .clientes-portal .filters { gap:12px; }
 .clientes-portal :is(.filters,.scope-card .filters) label { flex-basis:100%; }
 .clientes-portal .filters button { width:100%; }
 .clientes-portal .table-wrap table { min-width:560px; }
 .clientes-portal .portal-main .card .card { padding:16px; }
}
@media(max-width:380px) { .clientes-portal .metric-grid { grid-template-columns:minmax(0,1fr); } }
@media print {
 .clientes-portal :is(.fama-header,.portal-account,.fama-footer,.modules,.filters,.action-row) { display:none!important; }
 .clientes-portal .portal-main { padding:0; }
 .clientes-portal .table-wrap { overflow:visible; border:0; }
 .clientes-portal .table-wrap table { min-width:0; }
}
.clientes-portal .portal-account a { color: var(--theme-link); text-decoration: none; }
