.customer-portal { width:min(1040px,100%); box-sizing:border-box; margin:18px auto; padding:clamp(20px,3vw,36px); background:rgba(255,255,255,.93); border-radius:12px; text-align:left; color:#352626; box-shadow:0 4px 18px #0002; }
.customer-portal h1 { font-size:clamp(1.7rem,3vw,2.4rem); color:#a00000; margin:0 0 12px; }
.customer-portal h2 { color:#850000; font-size:1.25rem; margin:24px 0 12px; }
.customer-portal p { font-size:1rem; line-height:1.6; color:#352626; font-weight:400; text-shadow:none; }
.portal-intro { background:#fff8f4; border-left:4px solid #a00000; padding:10px 15px; }
.portal-tabs { display:flex; gap:10px; margin:18px 0; }
.portal-tabs button,.customer-portal button,.customer-portal .wa-action { cursor:pointer; border:0; border-radius:5px; padding:9px 16px; background:#8b0000; color:#fff; font-weight:700; font-size:14px; text-decoration:none; }
.customer-portal button:disabled { opacity:.45; cursor:not-allowed; }
.portal-tabs button[aria-selected="false"] { background:#e7e0df; color:#632222; }
.portal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
.portal-field { display:flex; flex-direction:column; gap:5px; font-size:14px; font-weight:600; }
.portal-field input,.portal-field select,.portal-field textarea { box-sizing:border-box; width:100%; border:1px solid #ab9e9e; border-radius:5px; padding:10px; font:inherit; background:white; color:#231b1b; }
.portal-field small { font-weight:400; }
.portal-field.full { grid-column:1/-1; }
.portal-verify { display:flex; align-items:end; gap:8px; }
.portal-verify input { min-width:0; }
.portal-verify button { flex:none; }
.portal-message { min-height:1.5em; color:#8b0000; font-weight:600; }
.portal-products { display:grid; gap:8px; margin:10px 0; }
.portal-product { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#fff; border:1px solid #ddd; padding:10px; border-radius:5px; }
.portal-product small { display:block; color:#555; }
.portal-selected { list-style:none; margin:10px 0; padding:0; }
.portal-selected li { display:flex; gap:10px; align-items:center; margin:6px 0; }
.portal-selected input { width:90px; padding:7px; }
.portal-selected button { background:#777; padding:6px 10px; }
.customer-portal [hidden] { display:none !important; }
@media(max-width:680px) { .portal-grid { grid-template-columns:1fr; } .portal-field.full { grid-column:auto; } .portal-verify { flex-wrap:wrap; } }
.portal-kind { border:1px solid #d9c6c6; border-radius:8px; display:flex; flex-wrap:wrap; gap:12px 22px; padding:14px; margin:20px 0; }
.portal-kind legend { font-weight:700; color:#850000; }
.portal-kind label { display:inline-flex; align-items:center; gap:7px; cursor:pointer; }
.portal-kind input { accent-color:#8b0000; }
.portal-actions { display:flex; flex-direction:row; flex-wrap:wrap; gap:10px; }
.portal-line { display:grid !important; grid-template-columns:minmax(180px,2fr) auto auto auto minmax(130px,1fr) auto; gap:10px; padding:12px; border-bottom:1px solid #ddd; background:white; }
.portal-line strong { font-size:14px; }
.portal-line small { color:#666; }
.portal-line label { font-size:13px; }
.portal-line label input { display:block; width:100%; box-sizing:border-box; border:1px solid #aaa; border-radius:4px; font:inherit; }
.portal-line label:first-of-type input { width:80px; }
.portal-sheet { background:white; color:#202020; border:1px solid #d8d8d8; padding:clamp(16px,3vw,32px); margin-top:24px; box-shadow:0 4px 18px #0002; font:14px/1.5 Arial,sans-serif; }
.portal-sheet .sheet-brand { font-weight:700; letter-spacing:.03em; font-size:18px; }
.portal-sheet h2 { margin:8px 0; font-size:21px; color:#222; }
.portal-sheet.quote-sheet { border-top:5px solid #8b0000; }
.portal-sheet.inquiry-sheet { border-left:5px solid #8b0000; }
.portal-sheet .sheet-code { border-bottom:1px solid #aaa; padding-bottom:8px; }
.portal-sheet .sheet-info { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.portal-sheet .sheet-info p { margin:3px 0; overflow-wrap:anywhere; }
.portal-sheet table { width:100%; border-collapse:collapse; margin:15px 0; table-layout:fixed; }
.portal-sheet th,.portal-sheet td { border:1px solid #999; padding:7px; overflow-wrap:anywhere; vertical-align:top; }
.portal-sheet th:first-child { width:6%; }.portal-sheet th:nth-child(2) { width:40%; }
.portal-sheet small { color:#555; }
@media(max-width:820px) { .portal-line { grid-template-columns:1fr 1fr; }.portal-line strong { grid-column:1/-1; }.portal-line label:last-of-type { grid-column:1/-1; }.portal-sheet { overflow-x:auto; } }
@media print {
  @page { size:A4 portrait; margin:9mm; }
  body,main,.welcome-section,.customer-portal { margin:0 !important; padding:0 !important; background:white !important; box-shadow:none !important; width:auto !important; max-width:none !important; color:#111 !important; }
  body > header,body > footer,.customer-portal > :not(#sheet-preview) { display:none !important; }
  .customer-portal #sheet-preview { display:block !important; border:0 !important; box-shadow:none !important; margin:0 !important; padding:0 !important; overflow:visible !important; }
  .portal-sheet th,.portal-sheet td { break-inside:avoid; }
  .portal-sheet tr { break-inside:avoid; }
}
