/* Rasayely Client Portal */
:root {
  --ink: #1f2a3c;
  --muted: #5d6878;
  --line: #d6dce5;
  --bg: #f4f6f9;
  --card: #ffffff;
  --primary: #34557f;
  --primary-dark: #263f60;
  --gold: #e8a33d;
  --ok: #2f7d4f;
  --bad: #b3372f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 .8rem; }
h2 { font-size: 1.2rem; margin: 0 0 .8rem; }
h3 { font-size: 1.02rem; margin: 1.2rem 0 .5rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: 26px; padding-bottom: 50px; min-height: 60vh; }
.sr { position: absolute; left: -9999px; }
.hint { color: var(--muted); font-size: .9rem; }
.inline { display: inline; margin: 0; }

.top { background: #fff; border-bottom: 3px solid var(--gold); }
.top-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand img { height: 52px; width: auto; display: block; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); padding: 6px 0; font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: underline; }
.linklike { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 500; color: var(--primary); cursor: pointer; text-decoration: underline; }
.banner { background: #fff4d6; border-bottom: 1px solid #e9cf86; padding: 9px 0; font-size: .95rem; }
.foot { border-top: 1px solid var(--line); padding: 18px 0 30px; color: var(--muted); font-size: .9rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 22px 24px; margin: 0 0 22px; }
.card.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.card-inner { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.prose { max-width: 760px; margin-left: auto; margin-right: auto; }
.prose h2 { margin-top: 1.4rem; }

.field { margin: 0 0 1rem; }
.field label, .field > label { display: block; font-weight: 600; margin-bottom: .3rem; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #aab4c2; border-radius: 5px; padding: .6rem .7rem; }
input[type="file"] { background: #f7f9fb; padding: .5rem; }
input[type="checkbox"] { width: auto; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid rgba(52, 85, 127, .35); outline-offset: 1px; }
.check { margin: 0 0 .8rem; }
.check label { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { margin-top: .32rem; flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (max-width: 820px) { .row2, .grid2 { grid-template-columns: 1fr; } .top-in { gap: 8px; } .nav { margin-left: 0; } }
.bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.bar input[type="search"] { width: 280px; max-width: 100%; }

.btn { display: inline-block; background: var(--primary); color: #fff !important; border: 0; border-radius: 5px; padding: .62rem 1.3rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--primary) !important; border: 1px solid var(--primary); }
.btn-secondary:hover { background: #eef2f7; }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #8f2a24; }
.btn-small { padding: .3rem .8rem; font-size: .9rem; }
.btn-large { padding: .8rem 1.8rem; font-size: 1.05rem; }
.btn[disabled] { opacity: .6; cursor: wait; }

.alert { padding: .8rem 1rem; border-radius: 6px; margin: 0 0 1.1rem; border: 1px solid; }
.alert ul { margin: .3rem 0 0 1.2rem; padding: 0; }
.alert-error { background: #fdf0ef; border-color: #e0a49f; }
.alert-success { background: #eef7f1; border-color: #9cc9ae; }
.alert-info { background: #eef3fa; border-color: #a9bedb; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: .8rem; font-weight: 600; background: #e6eaf0; color: var(--ink); vertical-align: middle; }
.badge-received { background: #dce8f7; }
.badge-quotation_sent { background: #fdecc3; }
.badge-payment_confirmed { background: #d3eddc; }
.badge-process_started { background: #e0e1f7; }
.badge-files_ready { background: #b8e5c6; }
.badge-cancelled { background: #f3d2cf; }

.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .85rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 0 0 24px; }
.tile { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.tile strong { display: block; font-size: 1.05rem; color: var(--primary); }
.tile span { color: var(--muted); font-size: .92rem; }
.tile:hover { border-color: var(--primary); border-left-color: var(--gold); }

.dl { display: grid; grid-template-columns: 9.5rem 1fr; gap: .45rem 1rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .92rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: 1fr; gap: 0; } .dl dd { margin-bottom: .6rem; } }

.services { border: 0; padding: 0; margin: 0 0 1rem; }
.service { margin: 0 0 .7rem; }
.service .check { margin: 0; font-weight: 600; }
.tip { margin: .2rem 0 0 1.7rem; }
.tip summary { cursor: pointer; color: var(--primary); font-size: .9rem; }
.tip p { margin: .3rem 0; color: var(--muted); font-size: .92rem; }
.cond { border-left: 4px solid var(--gold); padding: .2rem 0 .2rem 1rem; margin: 1.1rem 0; }
.cond.alert { border-left-width: 4px; }
.cond[hidden] { display: none !important; }

.steps { list-style: none; margin: .4rem 0 0 .5rem; padding: 0; border-left: 3px solid var(--line); }
.steps li { position: relative; padding: 0 0 1.3rem 1.5rem; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ""; position: absolute; left: -11px; top: .2rem; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #b6c0cd; }
.steps li.done::before { background: var(--primary); border-color: var(--primary); }
.steps li.current::before { border-color: var(--gold); box-shadow: 0 0 0 5px rgba(232, 163, 61, .28); }
.steps li.pending { color: var(--muted); }
.steps .date { display: block; font-size: .88rem; color: var(--muted); }

.files { list-style: none; margin: 0; padding: 0; }
.files li { margin: 0 0 .7rem; }
.inq { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.inq-new { border-left: 4px solid var(--gold); padding-left: 12px; }
.pager { margin: 14px 0 0; color: var(--muted); }
.tplbox { border: 1px solid var(--line); border-radius: 6px; padding: .5rem .9rem; margin: 0 0 .7rem; }
.tplbox summary { cursor: pointer; font-weight: 600; padding: .3rem 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }
.cf-turnstile { margin: 0 0 1rem; }

/* Stage 1.1 */
.wa-box { display: flex; gap: 1.2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.3rem; margin: 1.4rem 0 0; }
.wa-box h3 { margin: 0 0 .3rem; }
.wa-box p { margin: .3rem 0; }
.wa-qr { width: 170px; height: 170px; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 4px; }
.btn-wa { background: #1f8f4e; }
.btn-wa:hover { background: #187440; }
.filerow { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; border-bottom: 1px solid var(--line); padding: .6rem 0; }
.filerow:last-child { border-bottom: 0; }
.filerow .grow { flex: 1 1 260px; }
.filerow details { flex: 1 1 100%; }
.old-version { color: var(--muted); font-size: .92rem; margin: .2rem 0 0 1rem; }
.reverted { text-decoration: line-through; color: var(--muted); }
.reverted-tag { display: inline-block; background: #f3e3e1; color: #8a2d26; border-radius: 4px; padding: 0 .4rem; font-size: .8rem; margin-left: .4rem; text-decoration: none; }
.conflict-note { border-left: 4px solid #c0392b; }
.inline-check { display: inline-flex; gap: .4rem; align-items: center; margin-right: .8rem; }
.filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: 0 0 1rem; }
.filters .field { margin: 0; }
.seg-box { border-left: 4px solid var(--gold); background: #fff8ec; padding: .8rem 1rem; border-radius: 4px; margin: 0 0 1rem; }
@media (max-width: 520px) { .wa-qr { width: 140px; height: 140px; } }

/* Stage 2 */
.file-x { margin-left: .5rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid #c0392b; background: #fff; color: #c0392b; font-size: 1.2rem; line-height: 1; cursor: pointer; vertical-align: middle; }
.file-x:hover { background: #c0392b; color: #fff; }
.file-x[hidden] { display: none; }
.big { font-size: 1.15rem; }
.share .btn { margin: 0 .4rem .4rem 0; }
.removed-tag { display: inline-block; background: #f3e3e1; color: #8a2d26; border-radius: 4px; padding: 0 .4rem; font-size: .8rem; margin-left: .4rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem; margin: 0 0 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; }
.kpi strong { display: block; font-size: 1.5rem; }
.kpi span { color: var(--muted); font-size: .9rem; }

.chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.chip{font:inherit;font-size:.85rem;padding:3px 9px;border:1px solid #c9d3cf;border-radius:14px;background:#f3f7f5;cursor:pointer}
.chip:hover{background:#e3eeea}

.badge-revision { background: #fde3c4; }
.badge-hold { background: #f6d3d3; }
.bars text { font-size: 12px; fill: currentColor; }
.bars .bar { fill: #3f7d6e; }
a.num { font-weight: 600; }

/* ---- Client project page (Stage 2.2) ---- */
.project-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 0 28px; align-items: start; }
.project-main, .project-side { min-width: 0; }
@media (max-width: 900px) { .project-grid { grid-template-columns: 1fr; } }
.cta { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 20px 0; border-top: 1px solid var(--line); }
.cta:first-of-type { border-top: 0; }
.cta-text { flex: 1 1 auto; min-width: 0; }
.cta-text h3 { margin: 0 0 6px; font-size: 1.05rem; }
.cta-text p { margin: 0 0 10px; color: var(--muted); line-height: 1.6; }
.cta-text p:last-child { margin-bottom: 0; }
.cta-action { flex: none; }
.earn-pill { display: inline-block; background: #e6f3ec; color: #24664a; border-radius: 99px; padding: 3px 12px; font-size: .85rem; font-weight: 600; }
@media (max-width: 560px) { .cta { flex-direction: column; align-items: flex-start; gap: 12px; } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 6px; }
@media (max-width: 560px) { .choices { grid-template-columns: 1fr; } }
.choice { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; cursor: pointer; font-weight: 400; background: #fff; }
.choice input { flex: none; margin: 0; width: 18px; height: 18px; }
.choice span { display: block; line-height: 1.4; }
.choice strong { display: block; }
.choice:has(input:checked) { border-color: var(--primary); background: #eef3fa; box-shadow: 0 0 0 1px var(--primary); }
.portfolio-foot { margin: 16px 0 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---- Survey (Stage 2.2) ---- */
.survey-form { max-width: 760px; }
.survey-form fieldset { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.survey-form legend { padding: 0; margin: 0 0 10px; font-weight: 600; font-size: 1.05rem; line-height: 1.4; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.scale label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 12px 6px; cursor: pointer; background: #fff; font-weight: 400; line-height: 1.25; }
.scale .n { font-size: 1.25rem; font-weight: 700; }
.scale .t { font-size: .78rem; color: var(--muted); }
.scale input { position: absolute; opacity: 0; pointer-events: none; }
.scale label:has(input:checked) { border-color: var(--primary); background: #eef3fa; box-shadow: 0 0 0 1px var(--primary); }
.scale label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 560px) { .scale { grid-template-columns: 1fr; } .scale label { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; text-align: left; } .scale .n { width: 1.5rem; } }

/* ---- Admin feedback (Stage 2.2) ---- */
.fb-item { border-top: 1px solid var(--line); padding: 16px 0; }
.fb-item:first-of-type { border-top: 0; }
.fb-head { margin-bottom: 4px; }
.fb-quote { margin: 8px 0 12px; padding: 10px 16px; border-left: 3px solid var(--primary); background: #f6f8fb; border-radius: 0 6px 6px 0; max-width: 820px; line-height: 1.6; }
.fb-url { margin: 6px 0 10px; overflow-wrap: anywhere; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.fb-actions form { margin: 0; }
.fb-actions details { flex: 1 1 100%; }
.fb-actions details summary { list-style: none; display: inline-block; }
.fb-actions details[open] form { margin-top: 10px; max-width: 520px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin: 6px 0 16px; }
.tabs a { padding: 8px 14px; border-radius: 6px 6px 0 0; text-decoration: none; color: var(--ink); border: 1px solid transparent; margin-bottom: -1px; }
.tabs a.on { background: #fff; border-color: var(--line); border-bottom-color: #fff; font-weight: 600; }
.fb-filter { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; }
.fb-filter .field input[type=search] { width: 280px; max-width: 100%; }
.fb-table td.wide { min-width: 280px; max-width: 520px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 18px; }
.btn-danger { background: var(--bad); }

/* ---- Client project page, second design pass (Stage 2.3) ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr); gap: 0 32px; border-top: 4px solid var(--ok); }
.hero:not(:has(.hero-side)) { grid-template-columns: 1fr; }
.hero h2 { margin-top: 0; font-size: 1.35rem; }
.hero-side { border-left: 1px solid var(--line); padding-left: 32px; }
.hero-side h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.hero-side p { color: var(--muted); }
.bigfiles li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 12px; }
.bigfiles .btn { padding: .7rem 1.4rem; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; } }
.lead { margin: -4px 0 16px; }
.tiles2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .tiles2 { grid-template-columns: 1fr; } }
.tile2 { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; background: #fbfcfe; }
.tile2 h3 { margin: 0 0 6px; font-size: 1.02rem; }
.tile2 p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; flex: 1 1 auto; }
.tile2-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.done-mark { color: var(--ok); font-weight: 600; }
details.fold { padding: 0; }
details.fold > summary { cursor: pointer; padding: 18px 24px; font-weight: 700; font-size: 1.1rem; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "Show"; float: right; font-weight: 400; font-size: .9rem; color: var(--primary); }
details.fold[open] > summary::after { content: "Hide"; }
details.fold > :not(summary) { margin-left: 24px; margin-right: 24px; }
details.fold > dl { margin-bottom: 8px; }
details.fold[open] { padding-bottom: 20px; }
.scale label { position: relative; }
.page-narrow { max-width: 760px; }

.tile2-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tile2-head h3 { margin: 0; }
.tile2-foot { min-height: 0; }
.status-card h2 { margin-top: 0; }
.page-narrow { margin-left: auto; margin-right: auto; }


/* Stage 2.4: admin project summary, folded sections, grouped menu, attention tiles */
.sumbar { padding: 18px 22px; margin-bottom: 20px; }
.sum-top { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sum-next { padding: 8px 14px; border-radius: 6px; background: #eef2f8; border-left: 4px solid var(--primary); }
.sum-next .btn { margin-left: 10px; }
.sum-act { background: #fff7e0; border-left-color: var(--gold); }
.sum-ok { background: #eef7f1; border-left-color: #3a8f5a; }
.sum-wait { background: #f3f4f6; border-left-color: #9aa3b2; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 20px; margin: 0; }
.sum-grid dt { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sum-grid dd { margin: 2px 0 0; font-weight: 600; }
.reqbox { background: #f6f8fb; border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; }
.choicebox { border: 1px solid var(--line); border-radius: 8px; padding: 4px 16px 6px; margin: 0 0 14px; }
.choicebox h3 { margin: 12px 0 8px; font-size: 1rem; }
.sub { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.sub h3 { margin: 0 0 8px; font-size: 1rem; }
details.fold > summary h2 { display: inline; }
.navgroup { position: relative; }
.navgroup > summary { cursor: pointer; list-style: none; font-weight: 500; padding: 6px 0; color: var(--ink); }
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary::after { content: " \25BE"; font-size: .8em; }
.navgroup[open] > summary { color: var(--primary); }
.navmenu { position: absolute; z-index: 20; top: 100%; left: -10px; min-width: 160px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(20,40,70,.12); padding: 6px 0; }
.navmenu a { display: block; padding: 8px 16px; }
.tiles.attn { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile-on { border-left-color: #d97706; background: #fffaf0; }
.tile-on strong { color: #b45309; font-size: 1.5rem; }
.tile-off { opacity: .6; }
.tile-off strong { font-size: 1.5rem; color: var(--muted); }

.filterbar { padding: 16px 20px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 18px; }
.row-late td { background: #fff5f3; }

.xbtn { border: 0; background: #eee; color: #a33; width: 22px; height: 22px; line-height: 20px; border-radius: 50%; cursor: pointer; font-size: 16px; padding: 0; margin-left: 8px; }
.xbtn:hover { background: #f5d4d0; }
form.inline { display: inline; }

.verify-card { margin-top: 16px; }
.verify-ok { color: #1b6b3a; font-size: 1.1rem; }
.verify-warn { color: #8a5a00; }
.verify-bad { color: #a12; }
.verify-table th { width: 38%; text-align: left; vertical-align: top; }

.svc-set { border: 1px solid #e3e7ee; border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid #e3e7ee; }
.tabs .tab { padding: 8px 14px; border-radius: 8px 8px 0 0; text-decoration: none; color: #1f3a5f; }
.tabs .tab.on { background: #1f3a5f; color: #fff; }
.reqrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.reqrow input[type=text], .reqrow input:not([type]) { flex: 1 1 260px; }
.reqrow select { width: auto; flex: 0 0 200px; }
.reqrow input:not([type=checkbox]) { width: auto; flex: 1 1 240px; min-width: 0; }
.reqrow .check { flex: 0 0 auto; white-space: nowrap; }
.svc-line { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #e3e7ee; border-radius: 8px; }
.svc-line textarea { width: 100%; margin-top: 6px; }
.asg { padding: 4px 0; }
.filelist { list-style: none; padding-left: 0; }
.filelist li { margin: 4px 0; }
.chip.on { background: #1f3a5f; color: #fff; }

/* Stage 4-2: file groups */
.fgroup { margin: 0 0 18px; padding: 0 0 4px; }
.fgroup h3 { margin: 0 0 4px; font-size: 1rem; }
.ftag { display: inline-block; font-size: .75rem; line-height: 1; padding: 3px 8px; border-radius: 10px; border: 1px solid transparent; vertical-align: middle; }
.ftag-orig { background: #eef1f4; color: #3b4a5a; border-color: #d5dce3; }
.ftag-admin { background: #fff4d6; color: #7a5200; border-color: #ecd596; }
.ftag-sent { background: #e2f3e8; color: #1d6b3a; border-color: #b7dfc4; }
.ftag-draft { background: #fde8e6; color: #9b2b22; border-color: #f2c0bb; }
.pwwrap { position: relative; display: block; }
.pwwrap input { width: 100%; padding-right: 74px; box-sizing: border-box; }
.pwtoggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #1f3a5f; font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; padding: 6px; }
.card h2.sub { font-size: 1.05rem; margin-top: 20px; }
.invalid, .has-error input, .has-error select, .has-error textarea { border-color: #b3261e !important; background: #fff6f5; }
.has-error label, p.has-error > strong { color: #b3261e; }
#assign-errors ul { margin: 6px 0 6px 18px; }

/* Action highlighter: sections and rows that need someone to act now */
.needs-action { border-left: 5px solid #d97706; background: #fffaf0; }
.needs-action > h2:first-child::after, .needs-action > summary::after, .hero.needs-action .hero-main > h2:first-child::after {
  content: "Action needed"; display: inline-block; margin-left: 10px; padding: 2px 9px; border-radius: 10px;
  background: #d97706; color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .02em; vertical-align: middle; }
tr.row-action td:first-child { box-shadow: inset 5px 0 0 #d97706; }
tr.row-action { background: #fffaf0; }

.fmt-bar{display:flex;gap:4px;margin:4px 0}
.fmt-btn{border:1px solid #bbb;background:#fff;border-radius:4px;padding:2px 9px;cursor:pointer;font:inherit;min-width:34px}
.fmt-btn:hover,.fmt-btn:focus{background:#eef3f8}
