/* Client portal */
:root { --brand: #0f3d3e; --accent: #c49a4a; --ink: #1b2627; --muted: #5d6b6c; --line: #e4dfd5; --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
* { box-sizing: border-box; }
body.portal { margin: 0; font-family: var(--font); background: #f5f2ec; color: var(--ink); line-height: 1.55; }
a { color: var(--brand); }
.p-top { background: var(--brand); color: #fff; display: flex; align-items: center; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2.5rem); flex-wrap: wrap; }
.p-top img { height: 40px; display: block; }
.p-top nav { margin-left: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.p-top nav a { color: #fff; text-decoration: none; font-weight: 600; }
.p-top nav form { margin: 0; }
.p-top nav button { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; padding: .3rem .8rem; font: inherit; cursor: pointer; }
.practice .p-top { background: #5a4a12; }
.p-main { max-width: 980px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { font-size: 1.6rem; margin: .3rem 0 1rem; font-stretch: 92%; }
h2 { font-size: 1.2rem; margin: 0 0 .3rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.p-card { background: #fff; border-radius: 14px; padding: 1.3rem 1.4rem; margin-bottom: 1.2rem; box-shadow: 0 2px 14px rgba(20, 40, 40, .07); }
.p-card.narrow { max-width: 440px; margin: 2rem auto; }
.p-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.p-head p { margin: 0; }
.p-badge { background: #e8f1ee; color: var(--brand); border-radius: 99px; padding: .15rem .7rem; font-weight: 700; font-size: .8rem; white-space: nowrap; }
.p-badge.small { font-size: .72rem; }
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .7rem; margin: 1rem 0; }
.p-stats div { background: #f6f3ec; border-radius: 10px; padding: .7rem .9rem; display: grid; }
.p-stats span { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.p-stats b { font-size: 1.3rem; }
.p-stats b.late { color: #a3271b; }
.p-stats small { color: var(--muted); }
.p-pay { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; background: #fff8ea; border: 1px solid #f0dca9; border-radius: 12px; padding: .9rem 1rem; margin: .5rem 0 1rem; }
.p-pay label { display: grid; gap: .2rem; font-weight: 600; font-size: .88rem; }
.p-pay input { font: inherit; padding: .55rem .7rem; border: 1px solid #cfc8bb; border-radius: 8px; width: 160px; font-size: 1.05rem; font-weight: 700; }
.p-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.p-list { list-style: none; padding: 0; margin: 0; }
.p-list li { padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.p-list li:last-child { border-bottom: 0; }
.p-req summary { cursor: pointer; list-style: none; }
.p-req summary h3 { display: inline; }
.p-up { display: flex; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }
.p-form { display: grid; gap: .8rem; }
.p-form.inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.p-form label { display: grid; gap: .25rem; font-weight: 600; font-size: .9rem; }
.p-form input, .p-form select, .p-form textarea { font: inherit; padding: .6rem .75rem; border: 1px solid #cfc8bb; border-radius: 10px; width: 100%; background: #fff; }
.p-form .consent { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.p-form .consent input { width: auto; margin-top: .3rem; }
.p-btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: .65rem 1.2rem; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.p-btn.small { padding: .4rem .8rem; font-size: .88rem; }
.p-btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.p-link { background: none; border: 0; color: var(--brand); text-decoration: underline; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.alert { padding: .7rem 1rem; border-radius: 10px; margin: 0 0 1rem; }
.alert.ok { background: #e5f4ec; color: #145236; } .alert.warn { background: #fdf3dc; color: #5f3e00; } .alert.error { background: #fbe7e4; color: #7c1d14; }
.doc-body { background: #fff; border-radius: 12px; padding: 1.8rem 2rem; font-family: Georgia, "Times New Roman", serif; line-height: 1.7; margin-bottom: 1.2rem; box-shadow: 0 2px 14px rgba(20, 40, 40, .07); }
.sig-cert { margin-top: 1.5rem; border: 1px dashed #9fb7a9; background: #f2faf5; padding: .8rem 1rem; border-radius: 8px; font-family: var(--font); font-size: .88rem; }
.sig-cert img { max-height: 90px; display: block; }
.sig-pad { width: 100%; max-width: 600px; height: auto; aspect-ratio: 600/180; border: 2px dashed #b9b09f; border-radius: 10px; background: #fffef9; touch-action: none; display: block; margin: .3rem 0; }
.lbl { font-weight: 600; font-size: .9rem; }
.p-timeline { list-style: none; padding: 0; }
.p-timeline li { background: #f6f3ec; border-radius: 10px; padding: .6rem .8rem; margin-bottom: .5rem; max-width: 85%; }
.p-timeline li.me { background: #e8f1ee; margin-left: auto; }
.p-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 1rem; }
@media (max-width: 700px) { .p-cols { grid-template-columns: 1fr; } .p-top nav { margin-left: 0; width: 100%; } .doc-body { padding: 1.2rem; } }
@media print { .p-top, .p-foot, .p-btn { display: none; } body.portal { background: #fff; } .doc-body { box-shadow: none; } }
.prog-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .4rem; margin: .6rem 0; }
.prog-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.prog-bar { height: 10px; background: #ece7dd; border-radius: 99px; overflow: hidden; margin: .3rem 0; }
.prog-bar i { display: block; height: 100%; background: var(--brand, #0f3d3e); border-radius: 99px; }

/* 1.4: language switch, broker portal tables, progress */
.p-lang, .lang-switch { display: inline-flex; gap: .4rem; font-size: .85rem; }
.p-lang a, .p-lang b { color: #fff; opacity: .85; text-decoration: none; }
.p-lang b { opacity: 1; border-bottom: 2px solid var(--accent); }
.p-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.p-table th, .p-table td { padding: .5rem .4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.p-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.p-table .num { text-align: right; white-space: nowrap; }
.p-table tr.grp th { background: #f6f3ec; padding-top: .7rem; }
.table-scroll { overflow-x: auto; }
details.hold summary { list-style: none; cursor: pointer; display: inline-block; }
details.hold summary::-webkit-details-marker { display: none; }
details.hold[open] .p-form { margin-top: .6rem; min-width: 230px; background: #fbf8f1; padding: .7rem; border-radius: 10px; }
.p-form.inline { display: flex; gap: .5rem; align-items: center; }
.p-form.inline select { font: inherit; padding: .35rem .5rem; border-radius: 8px; border: 1px solid #cfc8bb; }
form.inline { display: inline; }
.hp { position: absolute; left: -9999px; }
.p-prog { background: #f6f3ec; border-radius: 12px; padding: .2rem 1rem .6rem; margin: .5rem 0 1rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; display: grid; gap: .6rem; }
legend { font-weight: 600; font-size: .9rem; }
.consent { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; }
