/* Sta. Rita — client & admin portal styles (extends styles.css) */
body.portal { background: #f2f4f8; min-height: 100vh; display: flex; flex-direction: column; }
.pwrap { width: min(1180px, 100% - 28px); margin-inline: auto; }
.ptop { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.ptop-in { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; }
.pbrand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.pbrand img { width: 34px; height: auto; }
.pbrand b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.1rem; line-height: 1; }
.pbrand small { color: var(--muted); font-size: .76rem; }
body.admin .ptop { background: var(--navy); border-color: var(--navy); }
body.admin .pbrand, body.admin .pbrand small { color: #fff; }
body.admin .pbrand small { opacity: .75; }
.pnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pnav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .93rem; padding: 8px 11px; border-radius: 8px; }
.pnav a:hover, .pnav a.on { background: #eaf0fa; color: var(--blue-2); }
body.admin .pnav a { color: #dfe7f5; } body.admin .pnav a:hover, body.admin .pnav a.on { background: rgba(255,255,255,.12); color: #fff; }
body.admin .pnav .linkish { color: var(--gold); }
.pnav .btn-blue { color: #fff; } .pnav .btn-blue:hover { background: #143f88; color: #fff; }
.pnav-user { border: 1px solid var(--line); }
.pmain { flex: 1; padding: 22px 0 40px; outline: none; }
.pfoot { color: var(--muted); font-size: .82rem; padding: 18px 0 28px; border-top: 1px solid var(--line); }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; }
.pcard h1, .hello h1 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); }
.h2 { font-size: 1.2rem; color: var(--navy); margin: 22px 0 10px; }
.h3 { font-size: 1.08rem; color: var(--navy); margin-bottom: 8px; }
.muted { color: var(--muted); } .d-b { display: block; } .bad-t { color: var(--bad); font-weight: 700; } .ok-t { color: var(--good); font-weight: 600; margin: 4px 0 10px; }
.wide { width: 100%; } .mt { margin-top: 10px; } .pad { padding: 12px 16px; }
.narrow-card { max-width: 460px; margin: 30px auto; }
.back { display: inline-block; margin-bottom: 10px; color: var(--blue-2); font-weight: 600; text-decoration: none; }
.actions.left { justify-content: flex-start; }
.check.sm { font-size: .82rem; margin: 0; align-items: center; }

/* auth */
.auth { display: grid; grid-template-columns: .85fr 1.15fr; gap: 26px; align-items: center; max-width: 1000px; margin: 10px auto; }
.auth-side { background: linear-gradient(160deg, var(--navy-2), var(--navy) 60%, #1d4a85); color: #fff; border-radius: 18px; padding: 28px; position: relative; overflow: hidden; min-height: 100%; }
.auth-side img { width: 120px; height: auto; float: right; margin: -6px -6px 6px 10px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
.auth-side h2 { font-size: 1.6rem; line-height: 1.15; margin-bottom: 14px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; clear: both; }
.ticks li { padding-left: 26px; position: relative; color: #dbe7f6; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.auth-card form { display: grid; gap: 12px; margin-top: 14px; }
.auth-alt { margin-top: 14px; font-size: .92rem; color: var(--muted); }
.pw { position: relative; display: block; } .pw input { padding-right: 44px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1rem; padding: 6px; opacity: .6; }

/* dashboard */
.hello { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.fcard { display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: inherit; transition: .15s; }
.fcard:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.fcard-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fcard-top b { font-family: var(--display); font-size: 1.25rem; color: var(--navy); }
.fcard-mid { font-size: .92rem; }
.fcard-bot { display: flex; justify-content: space-between; font-size: .84rem; color: var(--muted); border-top: 1px solid #eef2f7; padding-top: 8px; }
.fcard .go { color: var(--blue-2); font-weight: 700; }
.empty { text-align: center; padding: 26px; background: #fff; border: 1px dashed #c9d6ea; border-radius: 14px; display: grid; justify-items: center; gap: 10px; }
.empty img { width: 64px; height: auto; }
.chip { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip-grey { background: #eef1f5; color: #4b5563; } .chip-blue { background: #e3edfb; color: #1a4fa8; } .chip-amber { background: #fff1d6; color: #8a5a00; }
.chip-teal { background: #dff5f1; color: #0f6f62; } .chip-green { background: #e1f4e8; color: #1d7a4c; }
.retainer-card { display: flex; gap: 16px; align-items: center; background: #fff7e3; border: 1px solid #f2d593; border-radius: 16px; padding: 16px 18px; margin: 20px 0; flex-wrap: wrap; }
.retainer-card img { width: 56px; height: auto; }
.retainer-card > div { flex: 1 1 260px; } .retainer-card b { color: var(--navy); font-size: 1.05rem; } .retainer-card p { color: #6a4a00; font-size: .93rem; margin-top: 4px; }
.retainer-card.big { padding: 20px; }
.ptable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ptable th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 10px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.ptable .r { text-align: right; white-space: nowrap; }
.ptable tr[data-go] { cursor: pointer; } .ptable tr[data-go]:hover td { background: #f7faff; }
.ptable td.wrap { max-width: 320px; white-space: pre-wrap; }
.scroll { overflow-x: auto; }

/* new filing */
.q { font-size: 1rem; color: var(--navy); margin: 18px 0 10px; }
.method { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mcard { text-align: left; border: 2px solid var(--line); background: #fbfdff; border-radius: 14px; padding: 16px; cursor: pointer; display: grid; gap: 4px; }
.mcard b { font-size: 1.05rem; color: var(--navy); } .mcard span { color: var(--muted); font-size: .9rem; }
.mcard[aria-pressed="true"] { border-color: var(--blue-2); background: #eef4fd; }
.lead-card { display: flex; gap: 20px; align-items: flex-start; }
.lead-card form { display: grid; gap: 12px; margin-top: 12px; }
.lead-benz { width: 80px; height: auto; flex: 0 0 auto; }

/* filing page */
.fhead { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: start; }
.fhead h1 small { font-size: .95rem; color: var(--muted); font-family: var(--body); font-weight: 500; display: block; margin-top: 2px; }
.fhead-r { display: grid; justify-items: end; gap: 6px; font-size: .88rem; }
.tracker { grid-column: 1 / -1; list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; counter-reset: t; }
.tracker li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .74rem; color: var(--muted); position: relative; }
.tracker li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: #e3e9f2; z-index: 0; }
.tracker li:first-child::before { display: none; }
.tracker li span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #eef1f5; font-weight: 800; position: relative; z-index: 1; border: 2px solid #fff; }
.tracker li.done span { background: var(--good); color: #fff; } .tracker li.done::before { background: var(--good); }
.tracker li.cur span { background: var(--blue-2); color: #fff; box-shadow: 0 0 0 4px #dbe7fa; } .tracker li.cur em { color: var(--navy); font-weight: 700; }
.tracker em { font-style: normal; line-height: 1.2; }
.step { position: relative; }
.step-h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.sn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-2); color: #fff; font-weight: 800; flex: 0 0 auto; }
.step.done .sn { background: var(--good); } .step.locked { opacity: .55; } .step.locked .sn { background: #c3ccd8; }
.step.on { border-color: #9ab7e3; box-shadow: 0 0 0 3px #e7f0fc; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.row-actions .btn, .btnrow .btn { cursor: pointer; }
.checklist { list-style: none; padding: 0; margin: 10px 0; display: flex; gap: 8px 16px; flex-wrap: wrap; }
.checklist li { color: var(--muted); font-weight: 600; font-size: .9rem; } .checklist li::before { content: "○ "; }
.checklist li.ok { color: var(--good); } .checklist li.ok::before { content: "✓ "; }
.stage-card { display: flex; gap: 18px; align-items: flex-start; }
.stage-card img { width: 72px; height: auto; flex: 0 0 auto; }
.stage-card.ok { border-color: #b6dcc6; background: #f5fbf7; } .stage-card.amber { border-color: #f2d593; background: #fffcf4; }
.due-amt { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--bad); margin: 4px 0 8px; }
.channels { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 8px 0 14px; }
.channels li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-weight: 700; color: var(--navy); font-size: .9rem; }
.payform { display: grid; gap: 12px; border-top: 1px dashed var(--line); padding-top: 14px; }
.dl-row2 { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.docs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #eef2f7; border-radius: 12px; }
.docs.small li { padding: 8px 10px; }
.doc-ic { font-size: 1.3rem; } .doc-t { flex: 1; display: grid; min-width: 0; } .doc-t b { color: var(--navy); font-size: .93rem; }
.doc-t small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lock { font-size: .8rem; color: #8a5a00; background: #fff1d6; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { padding: 10px 0 10px 18px; border-left: 2px solid #e3e9f2; position: relative; font-size: .9rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue-2); }
.timeline li.internal::before { background: var(--gold); }
.timeline time { display: block; color: var(--muted); font-size: .76rem; }
.tag { font-size: .68rem; background: #fff1d6; color: #8a5a00; border-radius: 6px; padding: 1px 6px; }

/* admin */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: inherit; display: grid; gap: 2px; }
.kpi b { font-family: var(--display); font-size: 1.6rem; color: var(--navy); }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi.blue { border-color: #9ab7e3; } .kpi.red b { color: var(--bad); } .kpi.amber { border-color: #f2d593; } .kpi.green { border-color: #b6dcc6; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.qhead input { max-width: 300px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 7px 12px; border-radius: 999px; font-size: .86rem; font-weight: 600; color: var(--muted); background: #f2f5f9; }
.tabs a.on { background: var(--navy); color: #fff; }
.a-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 10px; font-size: .9rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.kv.cols { grid-template-columns: auto 1fr auto 1fr; }
.flow { padding-left: 20px; display: grid; gap: 14px; margin: 6px 0; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.note-form { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.note-form input[name=message] { flex: 1 1 220px; }

/* modal + viewer */
.pmodal, .viewer { position: fixed; inset: 0; z-index: 80; background: rgba(10,22,40,.55); display: grid; place-items: center; padding: 16px; }
.pmodal-box { background: #fff; border-radius: 16px; padding: 22px; width: min(520px, 100%); max-height: 92dvh; overflow: auto; position: relative; }
.pmodal-box.wide { width: min(820px, 100%); }
.pmodal-x { position: absolute; right: 12px; top: 12px; }
.viewer-box { background: #fff; border-radius: 14px; width: min(900px, 100%); height: min(90dvh, 1000px); display: flex; flex-direction: column; overflow: hidden; }
.viewer-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.viewer iframe { flex: 1; border: 0; width: 100%; } .viewer img { flex: 1; object-fit: contain; min-height: 0; max-width: 100%; margin: auto; }

@media (max-width: 900px) {
  .auth, .a-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tracker { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
  .tracker li:nth-child(5)::before { display: none; }
}
@media (max-width: 600px) {
  .pcard { padding: 16px; border-radius: 14px; }
  .method { grid-template-columns: 1fr; }
  .fhead { grid-template-columns: 1fr; } .fhead-r { justify-items: start; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-card img, .lead-benz { display: none; }
  .lead-card { display: block; }
  .kv.cols { grid-template-columns: auto 1fr; }
  .auth-side { display: none; }
  .pnav a { padding: 7px 8px; font-size: .86rem; }
  .ptop-in { padding: 6px 0; }
  .q-table thead { display: none; }
  .q-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid #eef2f7; }
  .q-table td { border: 0; padding: 2px 4px; }
  .docs li { flex-wrap: wrap; }
}

.benz-admin-head { display: flex; gap: 16px; align-items: center; }
.benz-admin-head img { width: 56px; height: auto; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cfd8e3; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--good); } .switch input:checked + span::before { transform: translateX(18px); }
.sections { padding-left: 20px; display: grid; gap: 8px; max-height: 60vh; overflow: auto; }
.sections li b { display: block; color: var(--navy); } .sections li small { color: var(--muted); }
