/* ============================================================
   PRiSM app styles: login, client portal, admin, blog
   (loaded after site.css, reuses its tokens)
   ============================================================ */
[hidden] { display: none !important; }

/* ---------- toast + demo ribbon ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.has-demo-ribbon .toast-wrap { bottom: 64px; }
.toast { background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 6px; font-size: 0.9rem; box-shadow: 0 12px 30px rgba(10,25,40,0.25); opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; border-left: 3px solid var(--teal-400); pointer-events: auto; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: var(--orange-500); }
.demo-ribbon { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: #FFF4EC; border-top: 1px solid #FFD2BC; color: #7A2E10; font-size: 0.84rem; padding: 9px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.demo-ribbon button { background: none; border: 1px solid #E8A584; color: #7A2E10; border-radius: 3px; padding: 4px 10px; font-size: 0.8rem; }
body.has-demo-ribbon { padding-bottom: 44px; }

/* ---------- generic UI ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 20px; background: var(--mist-100); color: var(--ink-600); border: 1px solid var(--line); white-space: nowrap; }
.pill-live { background: #E3F6F5; color: var(--teal-ink); border-color: #BEE7E5; }
.pill-draft { background: #FFF1E9; color: #B5461B; border-color: #FFD2BC; }
.pill-wait { background: #F2F4F7; color: #5B6B78; }
.btn-danger { color: #B3261E; border-color: #F1C7C3; background: #fff; }
.btn-danger:hover { background: #B3261E; color: #fff; border-color: #B3261E; }
.btn-quiet { background: none; border: none; color: var(--ink-600); padding: 8px 10px; font-weight: 500; }
.btn-quiet:hover { color: var(--navy-800); background: var(--mist-100); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.link { color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: none; padding: 0; font-size: inherit; }
.muted { color: var(--ink-400); }
.field .hint { font-size: 0.8rem; color: var(--ink-400); margin-top: 6px; }
.field input[type=file] { background: #fff; padding: 10px; }
.field input[type=checkbox] { width: auto; }
.check { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; }
.form-msg { font-size: 0.88rem; margin-top: 12px; padding: 10px 12px; border-radius: 4px; background: #E3F6F5; color: var(--teal-ink); }
.form-msg.err { background: #FDECEA; color: #B3261E; }
.empty-state { text-align: center; padding: 56px 24px; border: 1.5px dashed var(--line); border-radius: 8px; color: var(--ink-600); background: #fff; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--ink-900); }
.empty-state p { max-width: 46ch; margin: 0 auto; font-size: 0.94rem; }
.empty-state .btn { margin-top: 18px; }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--line); border-top-color: var(--teal-500); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- app header ---------- */
.app-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.app-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; max-width: 1280px; margin: 0 auto; }
.app-header .brand img { height: 30px; width: auto; }
.app-header .right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-header .who { font-size: 0.86rem; color: var(--ink-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.app-header .divider { width: 1px; height: 22px; background: var(--line); }
@media (max-width: 640px) { .app-header .inner { padding: 10px 16px; } .app-header .who, .app-header .divider { display: none; } .app-header .brand img { height: 26px; } }

/* ---------- login ---------- */
.auth-page { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-visual { position: relative; background: var(--navy-950) url('../img/tank-farm.jpg') center/cover; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px; overflow: hidden; }
.auth-visual::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6,12,20,0.92), rgba(6,12,20,0.35) 60%, rgba(6,12,20,0.55)); }
.auth-visual::after { content: ''; position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(154,227,223,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(154,227,223,0.06) 1px, transparent 1px); background-size: 42px 42px; }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual img { height: 34px; width: auto; }
.auth-visual h2 { font-size: clamp(1.8rem, 2.4vw + .8rem, 2.6rem); max-width: 16ch; margin-top: 16px; }
.auth-visual p { color: rgba(255,255,255,0.75); margin-top: 14px; max-width: 44ch; }
.auth-visual ul { margin-top: 26px; display: flex; flex-direction: column; gap: 10px; }
.auth-visual li { display: flex; gap: 10px; align-items: center; font-size: 0.92rem; color: rgba(255,255,255,0.88); }
.auth-visual li::before { content: ''; width: 8px; height: 8px; border-top: 2px solid var(--orange-500); border-left: 2px solid var(--orange-500); }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(24px, 6vw, 88px); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 1.9rem; margin: 14px 0 8px; }
.auth-card > p { color: var(--ink-600); margin-bottom: 26px; font-size: 0.96rem; }
.auth-card .btn { width: 100%; }
.auth-card .code-input { text-align: center; font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: .4em; }
.auth-links { margin-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.88rem; }
.auth-links a, .auth-links button { color: var(--teal-ink); font-weight: 600; background: none; border: none; padding: 0; }
.auth-foot { margin-top: 36px; font-size: 0.8rem; color: var(--ink-400); }
.demo-hint { margin-top: 18px; padding: 12px 14px; border-radius: 6px; background: var(--mist-100); font-size: 0.84rem; color: var(--ink-600); }
.demo-hint button { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; margin: 6px 6px 0 0; font-size: 0.82rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 0.78rem; font-weight: 600; color: var(--teal-ink); padding: 8px; }
@media (max-width: 860px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { padding: 22px 20px 26px; min-height: 0; }
  .auth-visual h2, .auth-visual p, .auth-visual ul, .auth-visual .eyebrow { display: none; }
  .auth-main { justify-content: flex-start; padding: 32px 20px 48px; }
  .auth-card .field input { font-size: 16px; }
}

/* ---------- portal ---------- */
.portal-main { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.portal-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.portal-hero h1 { font-size: clamp(1.7rem, 2vw + 1rem, 2.3rem); margin-top: 12px; }
.portal-hero p { color: var(--ink-600); margin-top: 8px; }
.admin-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #FFF4EC; border: 1px solid #FFD2BC; color: #7A2E10; padding: 10px 14px; border-radius: 6px; font-size: 0.88rem; margin-bottom: 24px; }
.admin-bar select { padding: 7px 10px; border: 1px solid #E8A584; border-radius: 4px; font: inherit; background: #fff; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.proj-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; color: inherit; }
@media (hover: hover) and (pointer: fine) { .proj-card:hover { transform: translateY(-3px); border-color: var(--teal-500); box-shadow: 0 16px 36px rgba(10,25,40,0.08); } }
.proj-card .cover { aspect-ratio: 16 / 9; background: var(--navy-800) linear-gradient(135deg, rgba(34,171,168,0.28), transparent 60%); position: relative; overflow: hidden; }
.proj-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.proj-card .cover .pill { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,0.92); }
.proj-card .body { padding: 18px 20px 22px; }
.proj-card h3 { font-size: 1.12rem; line-height: 1.25; }
.proj-card .meta { margin-top: 8px; font-size: 0.85rem; color: var(--ink-600); display: flex; gap: 6px 14px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--teal-ink); background: none; border: none; padding: 0; margin-bottom: 18px; }
.proj-head { margin-bottom: 26px; }
.proj-head h1 { font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem); margin-top: 10px; }
.proj-head .meta { margin-top: 10px; color: var(--ink-600); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.92rem; }
.proj-head .desc { margin-top: 14px; color: var(--ink-600); max-width: 70ch; line-height: 1.6; white-space: pre-line; }
.dl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.dl-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dl-viewer, .dl-pano, .dl-video { grid-column: 1 / -1; }
.dl-head { display: flex; gap: 14px; align-items: center; }
.dl-head .kicon { width: 38px; height: 38px; padding: 8px; border-radius: 8px; background: var(--mist-100); color: var(--teal-ink); flex-shrink: 0; }
.dl-kind { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); }
.dl-head h3 { font-size: 1.05rem; margin-top: 2px; }
.dl-notes { font-size: 0.9rem; color: var(--ink-600); line-height: 1.55; }
.dl-media { position: relative; border-radius: 6px; overflow: hidden; background: #060c14; aspect-ratio: 16 / 9; }
.dl-pano .dl-media { aspect-ratio: 16 / 8; }
.dl-photo .dl-media { aspect-ratio: auto; background: var(--mist-100); }
.dl-media iframe, .dl-media video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dl-media .pano-host { position: absolute; inset: 0; }
.dl-photo .dl-media img { width: 100%; height: auto; display: block; }
.dl-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.dl-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.dl-meta { font-size: 0.84rem; color: var(--ink-400); word-break: break-all; }
.dl-open { font-size: 0.84rem; font-weight: 600; color: var(--teal-ink); align-self: flex-start; }
.ph-frame { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--teal-300); background: var(--navy-900); background-image: linear-gradient(rgba(154,227,223,0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(154,227,223,0.07) 1px, transparent 1px); background-size: 28px 28px; }
.ph-frame > div { display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: .1em; text-transform: uppercase; text-align: center; padding: 16px; }
.ph-frame svg { width: 40px; height: 40px; }
.dl-photo .ph-frame { position: relative; aspect-ratio: 4 / 3; }
@media (max-width: 760px) {
  .portal-main { padding: 28px 16px 64px; }
  .dl-list { grid-template-columns: 1fr; }
  .dl-pano .dl-media, .dl-viewer .dl-media { aspect-ratio: 4 / 3; }
}

/* ---------- admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 55px); }
.admin-nav { background: var(--navy-900); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 6px; color: rgba(255,255,255,0.72); font-size: 0.93rem; font-weight: 500; }
.admin-nav a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav a.active { background: rgba(34,171,168,0.16); color: #fff; box-shadow: inset 3px 0 0 var(--orange-500); }
.admin-nav .nav-sep { height: 1px; background: rgba(255,255,255,0.1); margin: 12px 6px; }
.admin-main { padding: 32px 36px 80px; min-width: 0; background: var(--mist-50); }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.view-head h1 { font-size: 1.75rem; }
.view-head p { color: var(--ink-600); margin-top: 6px; font-size: 0.94rem; max-width: 64ch; }
.view-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding: 8px 10px; gap: 2px; position: sticky; top: 55px; z-index: 50; scrollbar-width: none; }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav a { white-space: nowrap; padding: 9px 12px; font-size: 0.88rem; }
  .admin-nav a.active { box-shadow: inset 0 -3px 0 var(--orange-500); }
  .admin-nav .nav-sep { display: none; }
  .admin-main { padding: 24px 16px 72px; }
  .view-head h1 { font-size: 1.45rem; }
}

/* panels, tables, lists */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.panel + .panel { margin-top: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1.08rem; }
.panel-head p { font-size: 0.86rem; color: var(--ink-600); margin-top: 4px; }
.panel-body { padding: 20px; }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.row:first-child { border-top: none; }
.row .title { font-weight: 600; color: var(--ink-900); }
.row .sub { font-size: 0.85rem; color: var(--ink-600); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.row .end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-click { cursor: pointer; }
.row-click:hover { background: var(--mist-50); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 4px; font: inherit; font-size: 0.9rem; background: #fff; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-tile { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.stat-tile b { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--navy-800); }
.stat-tile span { font-size: 0.82rem; color: var(--ink-600); }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr 1fr; } .row { grid-template-columns: 1fr; } .row .end { justify-content: flex-start; } }

/* editor layout */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.edit-grid .side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1080px) { .edit-grid { grid-template-columns: 1fr; } .edit-grid .side { position: static; } }
.status-toggle { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--line); border-radius: 6px; overflow: hidden; }
.status-toggle button { background: #fff; border: none; padding: 10px; font-weight: 600; font-size: 0.88rem; color: var(--ink-600); }
.status-toggle button.on[data-v=draft] { background: #FFF1E9; color: #B5461B; }
.status-toggle button.on[data-v=published] { background: #E3F6F5; color: var(--teal-ink); }
.cover-pick { border: 1.5px dashed var(--line); border-radius: 6px; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: var(--mist-50); color: var(--ink-400); font-size: 0.86rem; text-align: center; }
.cover-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* deliverable rows in admin */
.dl-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.dl-row:first-child { border-top: none; }
.dl-row .kicon { width: 36px; height: 36px; padding: 8px; border-radius: 8px; background: var(--mist-100); color: var(--teal-ink); }
.dl-row .title { font-weight: 600; }
.dl-row .sub { font-size: 0.82rem; color: var(--ink-600); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-row .end { display: flex; gap: 2px; }
.icon-btn { width: 34px; height: 34px; border-radius: 6px; border: none; background: none; color: var(--ink-600); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--mist-100); color: var(--navy-800); }
.icon-btn.danger:hover { background: #FDECEA; color: #B3261E; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
@media (max-width: 560px) { .dl-row { grid-template-columns: 36px minmax(0, 1fr); } .dl-row .end { grid-column: 1 / -1; justify-content: flex-end; } }

/* modal */
dialog.modal { border: none; border-radius: 10px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(6,12,20,0.35); color: var(--ink-900); }
dialog.modal::backdrop { background: rgba(6,12,20,0.55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 1.2rem; }
.modal-body { padding: 20px 22px; overflow-y: auto; max-height: calc(100vh - 190px); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--mist-50); flex-wrap: wrap; }
.kind-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-pick label { border: 1.5px solid var(--line); border-radius: 6px; padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--ink-600); }
.kind-pick label .kicon { width: 22px; height: 22px; }
.kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.kind-pick input:checked + label { border-color: var(--teal-500); background: #E3F6F5; color: var(--teal-ink); }
.kind-pick input:focus-visible + label { outline: 2.5px solid var(--orange-500); outline-offset: 2px; }
.src-tabs { display: inline-flex; border: 1.5px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.src-tabs button { background: #fff; border: none; padding: 8px 14px; font-size: 0.84rem; font-weight: 600; color: var(--ink-600); }
.src-tabs button.on { background: var(--navy-800); color: #fff; }
.progress { height: 6px; border-radius: 3px; background: var(--mist-100); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 40%; background: var(--teal-500); animation: indet 1.2s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (max-width: 480px) { .kind-pick { grid-template-columns: 1fr 1fr; } }

/* rich text editor */
.rte { border: 1.5px solid var(--line); border-radius: 6px; background: #fff; }
.rte:focus-within { border-color: var(--teal-500); }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--mist-50); position: sticky; top: 55px; z-index: 5; border-radius: 6px 6px 0 0; }
.rte-bar button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 4px; border: none; background: none; font-size: 0.86rem; font-weight: 600; color: var(--ink-600); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.rte-bar button:hover { background: #fff; color: var(--navy-800); box-shadow: 0 0 0 1px var(--line); }
.rte-bar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rte-bar .sep { width: 1px; background: var(--line); margin: 4px 4px; }
.rte-area { min-height: 380px; padding: 20px 22px; outline: none; }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--ink-400); }
@media (max-width: 900px) { .rte-bar { top: 101px; } }

/* website media slots */
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.media-slot { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.media-slot .thumb { aspect-ratio: 4 / 3; background: var(--navy-900); position: relative; }
.media-slot .thumb img, .media-slot .thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-slot .info { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.media-slot .info strong { font-size: 0.95rem; }
.media-slot .info .btns { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) { .media-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .media-grid { grid-template-columns: 1fr; } }
.social-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .social-form { grid-template-columns: 1fr; } }

/* ---------- blog / prose ---------- */
.blog-hero { background: var(--navy-950); color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden; }
.blog-hero::after { content: ''; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(154,227,223,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(154,227,223,0.05) 1px, transparent 1px); background-size: 46px 46px; }
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); margin-top: 14px; max-width: 22ch; }
.blog-hero p { color: rgba(255,255,255,0.72); margin-top: 14px; max-width: 58ch; font-size: 1.04rem; }
.blog-hero .meta { margin-top: 18px; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-300); }
.blog-list { padding: 64px 0 96px; }
.post-cover { max-width: 980px; margin: -36px auto 0; position: relative; z-index: 2; padding: 0 24px; }
.post-cover img { width: 100%; border-radius: 8px; aspect-ratio: 16 / 8; object-fit: cover; box-shadow: 0 24px 60px rgba(10,25,40,0.18); }
.prose { max-width: 720px; margin: 0 auto; padding: 48px 24px 96px; font-size: 1.06rem; line-height: 1.75; color: var(--ink-900); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.65rem; margin-top: 1.8em; line-height: 1.2; }
.prose h3 { font-size: 1.3rem; margin-top: 1.6em; line-height: 1.25; }
.prose h4 { font-size: 1.1rem; margin-top: 1.4em; }
.prose a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .35em; }
.prose blockquote { border-left: 3px solid var(--orange-500); padding: 4px 0 4px 20px; color: var(--ink-600); font-style: italic; }
.prose img { border-radius: 6px; margin-left: auto; margin-right: auto; height: auto; }
.prose figure figcaption { font-size: 0.86rem; color: var(--ink-400); margin-top: 8px; text-align: center; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.prose pre { background: var(--navy-950); color: #E6F1F5; padding: 16px; border-radius: 6px; overflow-x: auto; font-size: 0.9rem; }
.prose code { font-family: var(--font-mono); font-size: 0.92em; }
.prose .embed { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.prose .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rte-area.prose { max-width: none; padding: 20px 22px; margin: 0; font-size: 1rem; }
.post-foot { max-width: 720px; margin: 0 auto; padding: 0 24px 80px; }
.post-foot .cta { background: var(--navy-800); color: #fff; border-radius: 8px; padding: 28px; display: flex; gap: 18px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.post-foot .cta h3 { font-size: 1.2rem; }
.post-foot .cta p { color: rgba(255,255,255,0.72); font-size: 0.92rem; margin-top: 6px; }
@media (max-width: 640px) { .prose { padding: 32px 20px 72px; font-size: 1rem; } .post-cover { padding: 0 16px; margin-top: -24px; } .blog-hero { padding: 48px 0 52px; } }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange-500); color: #fff; font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.dl-row.g { grid-template-columns: 64px minmax(0, 1fr) auto; }
.dl-row .gthumb { width: 64px; height: 46px; object-fit: cover; border-radius: 6px; display: block; }
.row.inq { align-items: start; }
.row.inq .sub a { color: var(--teal-ink); }
@media (max-width: 560px) { .dl-row.g { grid-template-columns: 56px minmax(0, 1fr); } .dl-row.g .gthumb { width: 56px; height: 42px; } }
/* login page: match the public site */
.auth-visual { background-image: url('../img/work/downtown-night.jpg'); }
.auth-visual h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: clamp(2.4rem, 3vw + 1rem, 3.6rem); line-height: 1; letter-spacing: -0.02em; max-width: 14ch; }
.auth-visual h2 em { font-style: italic; color: var(--teal-300); }
.auth-card h1 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 2.6rem; letter-spacing: -0.01em; }
.auth-card .btn-primary { border-radius: 999px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.82rem; font-weight: 700; }
.view-head h1, .portal-hero h1, .proj-head h1 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.view-head h1 { font-size: 2.2rem; }

/* ============ Client portal: payments ============ */
.portal-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -8px 0 26px; }
.portal-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-weight: 600; font-size: 0.94rem; color: var(--ink-600); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.portal-tabs a:hover { color: var(--ink-900); }
.portal-tabs a.on { color: var(--navy-800); border-bottom-color: var(--orange-500); }
.tab-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--orange-500); color: #fff; font-size: 0.72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.due-banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #FFF6EF; border: 1px solid #FFD2BC; color: #7A2E10; padding: 14px 18px; border-radius: 8px; margin: 0 0 22px; font-size: 0.94rem; }
.due-banner .go { font-weight: 700; color: #B5461B; white-space: nowrap; }
.due-banner:hover { border-color: var(--orange-500); }
.proj-head + .due-banner { margin-top: 22px; }
.pay-h { font-size: 0.74rem; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); font-weight: 500; margin: 8px 0 12px; }
.pay-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 34px; }
.pay-item { display: flex; justify-content: space-between; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; }
.pay-item.is-overdue { border-left: 3px solid var(--orange-500); }
.pay-item h3 { font-size: 1.08rem; line-height: 1.3; }
.pay-item .meta, .ph-row .meta, .pay-summary .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 0.86rem; color: var(--ink-600); }
.pay-item .desc { margin-top: 10px; font-size: 0.9rem; color: var(--ink-600); line-height: 1.55; white-space: pre-line; max-width: 62ch; }
.due.overdue { color: #B5461B; font-weight: 600; }
.pi-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; flex-shrink: 0; max-width: 220px; }
.pi-side .amt { font-size: 1.45rem; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.pi-side .btn svg, .pay-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.all-paid { background: #E3F6F5; border: 1px solid #BEE7E5; color: var(--teal-ink); padding: 16px 18px; border-radius: 8px; margin-bottom: 34px; }
.pay-history { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.ph-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.ph-row:first-child { border-top: 0; }
.ph-row .t { font-weight: 600; }
.ph-row .end { display: flex; align-items: center; gap: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 28px; align-items: start; }
.pay-summary { padding: 4px 0 0; }
.pay-summary h1 { font-size: clamp(1.6rem, 1.6vw + 1rem, 2.1rem); margin-top: 10px; line-height: 1.15; }
.pay-summary .desc { margin-top: 14px; color: var(--ink-600); line-height: 1.6; white-space: pre-line; max-width: 60ch; }
.pay-summary .total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); max-width: 420px; }
.pay-summary .total span { color: var(--ink-600); font-weight: 600; }
.pay-summary .total b { font-size: 2rem; font-variant-numeric: tabular-nums; color: var(--ink-900); }
.pay-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px; box-shadow: 0 18px 40px rgba(10,25,40,0.06); }
.pay-box .form-msg { margin: 0 0 14px; }
.sandbox-note { background: #FFF8E6; border: 1px solid #F3D58A; color: #6B4E00; font-size: 0.84rem; line-height: 1.5; padding: 10px 12px; border-radius: 6px; margin-bottom: 16px; }
.wallets { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.apple-pay-btn { display: block; height: 48px; width: 100%; border-radius: 6px; cursor: pointer; -webkit-appearance: -apple-pay-button; -apple-pay-button-type: pay; -apple-pay-button-style: black; }
#sq-gpay { height: 48px; }
#sq-gpay[hidden], .apple-pay-btn[hidden], .wallets[hidden] { display: none; }
.wallets .or { display: flex; align-items: center; gap: 12px; color: var(--ink-400); font-size: 0.8rem; margin: 8px 0 4px; }
.wallets .or::before, .wallets .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.sq-card { min-height: 90px; margin-bottom: 8px; }
.sq-loading, .sq-demo { border: 1.5px dashed var(--line); border-radius: 8px; padding: 22px 16px; text-align: center; color: var(--ink-600); font-size: 0.88rem; margin-bottom: 16px; }
.sq-demo { display: flex; flex-direction: column; gap: 6px; background: var(--mist-50); }
.pay-btn { width: 100%; justify-content: center; gap: 8px; height: 50px; font-size: 1rem; }
.pay-btn:disabled { opacity: .55; cursor: not-allowed; }
.secure-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 0.8rem; color: var(--ink-400); line-height: 1.5; }
.secure-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.pay-done { max-width: 520px; margin: 30px auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 40px 28px; }
.pay-done .check { width: 64px; height: 64px; border-radius: 50%; background: #E3F6F5; color: var(--teal-ink); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.pay-done .check svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pay-done h1 { font-size: 1.8rem; }
.pay-done p { margin-top: 10px; color: var(--ink-600); line-height: 1.55; }
.pay-done .acts { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .pay-grid { grid-template-columns: 1fr; gap: 20px; }
  .pay-box { padding: 18px; }
  .pay-item { flex-direction: column; gap: 14px; }
  .pi-side { align-items: stretch; text-align: left; max-width: none; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
  .ph-row { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============ Admin: payments ============ */
.amt-cell { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill-overdue { background: #FFE8DD; color: #B5461B; border-color: #FFC6AC; }
.money-in { position: relative; }
.money-in span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); font-weight: 600; pointer-events: none; }
.money-in input { padding-left: 26px; }

/* ============ Locked-until-paid projects ============ */
.lock-tag { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: rgba(7,13,21,0.82); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 6px 10px; border-radius: 20px; backdrop-filter: blur(4px); }
.lock-tag svg, .unlocks svg, .lp-icon svg, .lp-lock svg, .lock-panel .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0; }
.proj-card.is-locked .cover img { filter: saturate(.7) brightness(.85); }
.unlocks { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.86rem; font-weight: 600; color: var(--teal-ink); }
.lock-panel { padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 26px; overflow: hidden; }
.lp-head { display: flex; gap: 16px; align-items: center; padding: 22px 24px; background: linear-gradient(135deg, #F2FBFA, #fff 70%); flex-wrap: wrap; }
.lp-head > div:nth-child(2) { flex: 1; min-width: 220px; }
.lp-head h2 { font-size: 1.2rem; }
.lp-head p { color: var(--ink-600); margin-top: 4px; font-size: 0.93rem; line-height: 1.5; }
.lp-icon { width: 46px; height: 46px; border-radius: 50%; background: #E3F6F5; color: var(--teal-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lp-icon svg { width: 20px; height: 20px; }
.lock-panel .btn { gap: 8px; }
.lp-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lp-items li { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-top: 1px solid var(--line); }
.lp-items li:first-child { border-top: 0; }
.lp-items li > svg, .lp-items .kicon { width: 34px; height: 34px; padding: 7px; border-radius: 8px; background: var(--mist-100); color: var(--ink-400); flex-shrink: 0; }
.lp-items li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-items strong { font-weight: 600; color: var(--ink-600); }
.lp-lock { color: var(--ink-400); }
@media (max-width: 820px) { .lp-head { padding: 18px; } .lp-head .btn { width: 100%; justify-content: center; } .lp-items li { padding: 12px 18px; } }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--mist-50); font-size: 0.88rem; line-height: 1.45; cursor: pointer; }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal-500); flex-shrink: 0; }
.check-row.off { opacity: .5; cursor: not-allowed; }
.lock-note { color: var(--teal-ink); font-weight: 600; }
.pj-lock { margin-top: 14px; padding: 12px; border-radius: 6px; background: #E3F6F5; border: 1px solid #BEE7E5; color: var(--teal-ink); font-size: 0.82rem; line-height: 1.45; display: flex; flex-direction: column; gap: 4px; }

/* ============ Admin: invoice editor ============ */
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 720px) { .form-row.three { grid-template-columns: 1fr; } }
.mono { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: .04em; }
.view-head h1 .pill { vertical-align: middle; margin-left: 8px; }
.li-table { padding: 0 22px; }
.li-head, .li-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 120px 110px 76px; gap: 10px; align-items: center; }
.li-head { padding: 14px 0 8px; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); border-bottom: 1px solid var(--line); }
.li-head span:nth-child(n+2):nth-child(-n+4) { text-align: right; }
.li-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.li-row input { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; font: inherit; font-size: 0.92rem; background: #fff; }
.li-row input:focus { border-color: var(--teal-500); outline: none; }
.li-row .li-qty, .li-row .li-rate { text-align: right; }
.li-row input:disabled { background: var(--mist-50); color: var(--ink-600); }
.li-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.li-ctl { display: flex; justify-content: flex-end; gap: 2px; }
.li-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 22px; }
.li-add select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 0.86rem; background: #fff; max-width: 260px; }
.li-totals { margin: 4px 22px 22px auto; max-width: 340px; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.li-totals > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-600); font-size: 0.92rem; }
.li-totals > div[hidden] { display: none; }
.li-totals b { color: var(--ink-900); }
.li-totals .grand { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; font-size: 1.05rem; }
.li-totals .grand b { font-size: 1.3rem; }
.money-in.sm, .pct-in { display: inline-block; position: relative; vertical-align: middle; margin-left: 8px; }
.money-in.sm input, .pct-in input { width: 92px; padding: 6px 8px 6px 22px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-size: 0.88rem; text-align: right; }
.pct-in input { width: 70px; padding: 6px 22px 6px 8px; }
.pct-in span { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }
.money-in.sm span { left: 8px; }
.side-total { display: flex; justify-content: space-between; align-items: baseline; }
.side-total span { color: var(--ink-600); font-weight: 600; font-size: 0.9rem; }
.side-total b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.side-acts { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.side-acts .btn { width: 100%; justify-content: center; }
.side-links { display: flex; flex-direction: column; gap: 6px; }
.side-links .btn { width: 100%; justify-content: center; }
.danger-text { color: #B3261E !important; }
.pj-invoices { margin-top: 14px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pj-invoices .lbl { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); padding: 8px 10px; background: var(--mist-50); }
.pj-invoices a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border-top: 1px solid var(--line); font-size: 0.84rem; font-weight: 600; color: var(--ink-900); }
.pj-invoices a:hover { background: var(--mist-50); }
.pj-invoices a > span:last-child { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .li-table { padding: 0 14px; }
  .li-head { display: none; }
  .li-row { grid-template-columns: 1fr 1fr; grid-template-areas: "d d" "q r" "a c"; padding: 12px 0; }
  .li-row .li-desc { grid-area: d; } .li-row .li-qty { grid-area: q; } .li-row .money-in { grid-area: r; } .li-amt { grid-area: a; text-align: left; } .li-ctl { grid-area: c; }
  .li-add { padding: 14px; } .li-totals { margin: 4px 14px 18px; max-width: none; }
}
.pi-side .view-inv { font-size: 0.84rem; }
.pay-lines { margin-top: 22px; max-width: 420px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: var(--ink-600); font-variant-numeric: tabular-nums; }
.pay-lines > div { display: flex; justify-content: space-between; gap: 14px; }
.pay-lines + .total { margin-top: 14px; }
.proj-invoices { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.proj-invoices a { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 0.9rem; font-weight: 600; }
.proj-invoices a:hover { border-color: var(--teal-500); }
.proj-invoices a span:last-child { color: var(--teal-ink); }

/* ============ Two-step login ============ */
.mfa-gate { max-width: 420px; margin: 60px auto; text-align: center; }
.mfa-gate h1 { font-size: 1.5rem; margin-top: 14px; }
.mfa-gate p { color: var(--ink-600); margin-top: 8px; line-height: 1.5; }
.mfa-gate input { width: 100%; margin-top: 20px; text-align: center; font-size: 1.6rem; letter-spacing: .4em; padding: 12px; border: 1.5px solid var(--line); border-radius: 6px; font-family: var(--font-mono); }
.mfa-gate input:focus { border-color: var(--teal-500); outline: none; }
.mfa-icon { width: 54px; height: 54px; border-radius: 50%; background: #E3F6F5; color: var(--teal-ink); display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.mfa-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mfa-qr { display: flex; justify-content: center; margin: 6px 0 10px; }
.mfa-qr img { background: #fff; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.mfa-secret { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 0.82rem; word-break: break-all; background: var(--mist-100); padding: 4px 8px; border-radius: 4px; }
.mfa-steps { margin: 0 0 6px; padding-left: 0; list-style: none; font-size: 0.92rem; }
.mfa-on { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; margin-bottom: 14px; }
.mfa-nudge { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #FFF6EF; border-bottom: 1px solid #FFD2BC; color: #7A2E10; padding: 10px 36px; font-size: 0.88rem; grid-column: 1 / -1; }
#mfa-panel .panel-body p { color: var(--ink-600); line-height: 1.55; margin-bottom: 14px; font-size: 0.92rem; }
.terms-note { margin-top: 8px; font-size: 0.78rem; color: var(--ink-400); line-height: 1.5; padding-left: 22px; }
.terms-note a { color: inherit; text-decoration: underline; }

/* ============ Quotes (portal + admin) ============ */
.quote-banner { background: #F2FBFA; border-color: #BEE7E5; color: #0F4F4D; }
.quote-banner .go { color: var(--teal-ink); }
.quote-banner:hover { border-color: var(--teal-500); }
.q-item.is-new { border-left: 3px solid var(--teal-500); }
.q-item .pill { font-size: 0.62rem; }
/* admin: quote builder */
section.qb-panel, .qb-panel { margin-top: 22px; padding: 0; }
.edit-grid > div > .qb-panel:first-child, .tpl-strip + .qb-panel { margin-top: 0; }
.tpl-strip { margin-bottom: 22px; background: linear-gradient(90deg, #F2FBFA, #fff); }
.tpl-strip .lbl, .q-activity .lbl { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink); margin-bottom: 8px; }
.tpl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-btns .btn { border: 1px solid var(--line); background: #fff; padding: 8px 12px; }
.tpl-btns .btn:hover { border-color: var(--teal-500); }
.qb-panel.is-off .panel-body { opacity: .45; }
.qb-panel.is-off .panel-head h2::after { content: 'Hidden from client'; margin-left: 10px; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: .08em; text-transform: uppercase; color: #B5461B; vertical-align: middle; }
.inc-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--ink-600); cursor: pointer; white-space: nowrap; }
.inc-toggle input { width: 16px; height: 16px; accent-color: var(--teal-500); }
.chip-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1.5px solid var(--line); border-radius: 18px; font-size: 0.84rem; background: #fff; cursor: pointer; user-select: none; }
.chip input { width: 14px; height: 14px; accent-color: var(--teal-500); margin: 0; }
.chip:has(input:checked) { border-color: var(--teal-500); background: #F2FBFA; color: var(--teal-ink); font-weight: 600; }
.chip:has(input:disabled) { cursor: default; opacity: .75; }
.dl-table, .li-table .qli-head { width: 100%; }
.dlt-head { display: none; }
.dlt-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 76px; grid-template-areas: "i f c" "s t c"; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dlt-row [data-f=item] { grid-area: i; font-weight: 600; } .dlt-row [data-f=format] { grid-area: f; } .dlt-row [data-f=spec] { grid-area: s; } .dlt-row [data-f=turnaround] { grid-area: t; } .dlt-row .li-ctl { grid-area: c; }
.dlt-row:first-child { padding-top: 0; }
.dlt-row input, .cs-row input, .cs-row textarea, .qli-row input:not([type=checkbox]) { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; font: inherit; font-size: 0.9rem; background: #fff; }
.dlt-row input:focus, .cs-row input:focus, .cs-row textarea:focus, .qli-row input:focus { border-color: var(--teal-500); outline: none; }
.dlt-row input:disabled, .cs-row input:disabled, .cs-row textarea:disabled, .qli-row input:disabled { background: var(--mist-50); color: var(--ink-600); }
.cs-row { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cs-row:first-child { padding-top: 0; }
.cs-row + .btn, #cs-rows:not(:empty) + .btn { margin-top: 14px; }
.cs-top { display: flex; gap: 8px; align-items: center; }
.cs-top input { font-weight: 600; }
.qli-head { display: none; }
.qli-row { display: grid; grid-template-columns: 74px 84px 128px minmax(0, 1fr) auto 70px; grid-template-areas: "m m m m m m" "q u r a o c"; gap: 8px 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qli-main { grid-area: m; } .qli-row .li-qty { grid-area: q; } .qli-row .li-unit { grid-area: u; } .qli-row .money-in { grid-area: r; }
.qli-row .li-amt { grid-area: a; text-align: right; } .qli-opt { grid-area: o; } .qli-row .li-ctl { grid-area: c; }
.qli-cap { display: grid; grid-template-columns: 74px 84px 128px minmax(0, 1fr) auto 70px; gap: 10px; padding: 12px 0 0; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); }
.qli-cap span:nth-child(4) { text-align: right; }
.qli-row.is-opt { background: linear-gradient(90deg, #FFF8F3, transparent 70%); }
.qli-main { display: flex; flex-direction: column; gap: 6px; }
.qli-main .li-det { font-size: 0.82rem !important; padding: 7px 10px !important; color: var(--ink-600); }
.qli-row .li-qty, .qli-row .li-rate { text-align: right; }
.qli-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--ink-600); cursor: pointer; }
.qli-opt input { width: 15px; height: 15px; accent-color: var(--orange-500); margin: 0; }
.qli-row.is-opt .qli-opt { color: #B5461B; }
#t-opt-row { font-size: 0.84rem; color: #B5461B; }
#t-opt-row b { color: #B5461B; }
.side-sub { font-size: 0.84rem; color: #B5461B; margin-top: 4px; min-height: 1em; }
.side-dep { margin-top: 12px; padding: 12px; border-radius: 6px; background: #E3F6F5; display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; }
.side-dep > div { display: flex; justify-content: space-between; gap: 10px; color: var(--teal-ink); }
.side-dep b { font-variant-numeric: tabular-nums; }
.field select { width: 100%; }
.side .field select, .side .field input { padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 4px; font: inherit; font-size: 0.9rem; background: #fff; }
.rev-note { margin-top: 12px; padding: 10px 12px; background: #F2F6FA; border-radius: 6px; font-size: 0.8rem; line-height: 1.45; color: var(--navy-700); }
.quick-days { display: flex; gap: 4px; flex-wrap: wrap; }
.quick-days .link { font-size: 0.78rem; }
.q-admin-cr { margin: 0 0 20px; padding: 14px 18px; background: #FFF6EF; border: 1px solid #FFD2BC; border-left: 4px solid var(--orange-500); border-radius: 8px; font-size: 0.9rem; line-height: 1.55; }
.q-admin-cr p { margin: 6px 0; white-space: pre-line; color: var(--ink-900); }
.q-admin-cr span { font-size: 0.82rem; color: #7A2E10; }
.q-admin-cr.q-ref { background: #F2F6FA; border-color: #D5E0EA; border-left-color: var(--navy-600); }
.q-admin-cr.q-ref p { margin-top: 0; }
.q-admin-cr.q-ref span { color: var(--navy-600); }
.q-activity { list-style: none; margin: 0; padding: 6px 0; max-height: 360px; overflow-y: auto; }
.q-activity li { padding: 9px 18px; display: flex; flex-direction: column; gap: 2px; font-size: 0.84rem; border-left: 3px solid transparent; }
.q-activity li + li { border-top: 1px solid var(--line); }
.q-activity .when { font-size: 0.74rem; color: var(--ink-400); }
.q-activity .note { color: var(--ink-600); white-space: pre-line; word-break: break-word; }
.q-activity .ev-accepted { border-left-color: var(--teal-500); }
.q-activity .ev-changes_requested { border-left-color: var(--orange-500); }
.tpl-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; }
.tpl-list > div { display: flex; justify-content: space-between; align-items: center; padding: 6px 6px 6px 12px; font-size: 0.9rem; }
.tpl-list > div + div { border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .dlt-row { grid-template-columns: 1fr 1fr; grid-template-areas: "i i" "f t" "s s" ". c"; }
  .qli-cap { display: none; }
  .qli-row { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "m m m" "q u r" "a o c"; }
  .qli-row .li-amt { text-align: left; }
  .panel-head .inc-toggle { width: 100%; }
}
}

/* Quotes for prospects */
.prospect-box { margin: -4px 0 14px; padding: 12px 14px 2px; border: 1px dashed var(--line); border-radius: 8px; background: var(--mist-50); }
.prospect-box .form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .prospect-box .form-row.three { grid-template-columns: 1fr; } }
.ok-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500); margin-right: 7px; vertical-align: 1px; }

/* Client two-step login (portal Account dialog) */
.mfa-box { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 18px; }
.mfa-box h3 { font-size: 1rem; margin-bottom: 6px; }
.mfa-box p { color: var(--ink-600); font-size: 0.9rem; line-height: 1.5; margin-bottom: 12px; }
.mfa-box .btn { margin-right: 6px; }
.pill-mfa { font-size: 0.68rem; }
