
:root {
  --navy: #182631;
  --navy-dark: #101c25;
  --teal: #537e98;
  --teal-deep: #456d84;
  --mint: #e6eff5;
  --lime: #b3cbd9;
  --ink: #253541;
  --muted: #6d7e88;
  --line: #dbe4e9;
  --paper: #ffffff;
  --canvas: #f4f6f8;
  --amber: #b97932;
  --amber-bg: #fbf0df;
  --red: #ae5349;
  --red-bg: #fbeae6;
  --shadow: 0 12px 38px rgba(18,42,44,.06);
  --radius: 15px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Aptos, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
input, textarea, select { outline-color: var(--teal); }
a { color: inherit; }
svg { flex-shrink: 0; }
.app-shell { min-height: 100vh; display: flex; }
.boot-screen { margin: auto; text-align: center; color: var(--muted); }
.boot-logo { font-size: 54px; font-weight: 900; letter-spacing: -.1em; color: var(--navy); }
.boot-logo span { color: var(--teal); }
.sidebar { position: fixed; width: 250px; inset: 0 auto 0 0; z-index: 30; background: var(--navy); display:flex; flex-direction:column; padding: 26px 18px 18px; color:#e9f1ed; box-shadow: 4px 0 20px rgba(0,0,0,.04); }
.brand { display:flex; align-items:center; gap: 11px; padding: 4px 9px 27px; }
.brand-mark { background: var(--lime); color:var(--navy); border-radius: 9px; min-width: 55px; width:55px; height:46px; display:flex; align-items:center; justify-content:center; font-size:22px; font-weight:900; letter-spacing:-1.8px; }
.brand-txt { font-size: 11px; font-weight:800; line-height:1.24; letter-spacing:.07em; }
.brand-txt small { font-size:10px; font-weight:400; opacity:.63; letter-spacing:.09em; display:block; margin-top:5px; }
.side-kicker { color:#a4b6b6; font-size:10px; font-weight:800; letter-spacing:.18em; padding:0 14px; margin:7px 0 10px; }
.nav { display:flex; flex-direction:column; gap:4px; }
.nav-button { appearance:none; border:0; border-radius:9px; padding:12px 13px; color:#c8d8d7; background:transparent; text-align:left; display:flex; align-items:center; gap:11px; font-size:13px; font-weight:650; transition: .16s ease; }
.nav-button:hover { background:rgba(255,255,255,.07); color:white; }
.nav-button.active { background: #304554; color:white; box-shadow:inset 3px 0 0 var(--lime); }
.nav-button svg { width:18px; height:18px; opacity:.83; }
.side-spacer { flex:1; }
.side-card { background:#253a49; padding:16px; border:1px solid #34565c; border-radius:12px; margin-bottom:14px; }
.side-card strong { font-size:12px; display:block; margin-bottom:6px; }
.side-card p { color:#b9cbcb; margin:0 0 12px; font-size:11px; line-height:1.55; }
.side-card .progress-track { background:#546b7a; }
.progress-track { height:7px; border-radius:30px; background:#e6eeeb; overflow:hidden; }
.progress-fill { height:100%; background:var(--teal); border-radius:30px; transition: width .25s; }
.side-user { color:#aac0c0; font-size:11px; padding:7px 11px; }
.workspace { margin-left:250px; flex:1; min-width:0; }
.topbar { height:79px; display:flex; justify-content:space-between; align-items:center; padding:0 38px; background:var(--paper); border-bottom:1px solid var(--line); gap:15px; position:sticky; top:0; z-index:20; }
.project-switch { display:flex; align-items:center; gap:10px; min-width:0; }
.project-switch select { width:min(330px,28vw); max-width:330px; font-size:13px; font-weight:700; color:var(--navy); background:transparent; border:0; text-overflow:ellipsis; padding:6px; }
.save-status { display:flex; align-items:center; gap:7px; font-size:11px; color:var(--muted); white-space:nowrap; }
.save-dot { height:7px; width:7px; background:#65a69b; border-radius:50%; }
.top-actions { display:flex; align-items:center; gap:9px; }
.btn { border:1px solid var(--line); background:white; color:var(--navy); border-radius:9px; padding:10px 15px; display:inline-flex; align-items:center; justify-content:center; gap:8px; font-size:12px; font-weight:800; min-height:38px; line-height:1.2; white-space:nowrap; transition: .16s ease; }
.btn:hover { box-shadow:0 3px 12px rgba(11,34,39,.1); transform:translateY(-1px); }
.btn svg { width:15px; height:15px; }
.btn.primary { background:var(--navy); border-color:var(--navy); color:white; }
.btn.accent { background:var(--teal); border-color:var(--teal); color:white; }
.btn.light { background:#ecf3f0; border-color:#ecf3f0; }
.btn.soft-danger { background:var(--red-bg); border-color:#f0d2ca; color:#8e3b34; }
.btn.tiny { padding:6px 9px; min-height:28px; font-size:11px; }
.btn.plain { border-color:transparent; background:transparent; padding:7px 9px; }
.btn:disabled { opacity:.45; cursor:not-allowed; transform:none; }
.content { max-width:1390px; margin:0 auto; padding:35px 38px 80px; }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:26px; }
.eyebrow { display:block; text-transform:uppercase; font-size:10px; font-weight:900; letter-spacing:.2em; color:var(--teal); margin-bottom:7px; }
h1 { font-size:31px; letter-spacing:-.038em; line-height:1.2; margin:0 0 8px; color:var(--navy); font-weight:800; }
h2 { font-size:20px; line-height:1.3; letter-spacing:-.028em; margin:0 0 7px; color:var(--navy); }
h3 { font-size:15px; margin:0; color:var(--navy); }
p { margin:0; }
.subhead { color:var(--muted); max-width:700px; font-size:13px; }
.card { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:22px; min-width:0; }
.card + .card { margin-top:18px; }
.card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:19px; }
.card-head p { margin-top:4px; font-size:12px; color:var(--muted); }
.mini-eyebrow { text-transform:uppercase; font-weight:900; font-size:10px; letter-spacing:.15em; color:var(--muted); }
.two-col { display:grid; grid-template-columns:1.3fr 1fr; gap:18px; }
.two-equal { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.metric-card { padding:20px 22px; background:var(--paper); border:1px solid var(--line); border-radius:13px; }
.metric-card .metric-number { font-size:32px; color:var(--navy); font-weight:800; letter-spacing:-.07em; line-height:1.25; }
.metric-card small { display:block; color:var(--muted); font-size:11px; margin-top:5px; }
.metric-label { text-transform:uppercase; font-weight:900; letter-spacing:.12em; font-size:10px; color:var(--teal); margin-bottom:12px; }
.hero { background:var(--navy); color:#edf7f2; padding:30px 33px; border-radius:16px; margin-bottom:19px; display:flex; align-items:center; justify-content:space-between; gap:20px; overflow:hidden; position:relative; }
.hero:after { content:''; position:absolute; right:-95px; top:-170px; height:400px; width:400px; border-radius:50%; border:65px solid rgba(198,219,149,.1); pointer-events:none; }
.hero h2 { color:#fff; font-size:26px; letter-spacing:-.03em; margin:0 0 8px; }
.hero p { color:#c3d9d5; max-width:650px; font-size:13px; }
.hero .btn { background:var(--lime); border-color:var(--lime); color:var(--navy); position:relative; z-index:1; }
.grid-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px 18px; }
.grid-form.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.field { min-width:0; }
.field.wide { grid-column:1/-1; }
.field label { display:block; font-size:11px; color:#44565c; font-weight:800; margin-bottom:7px; }
.field input, .field textarea, .field select, .inline-input { border:1px solid #d9e1de; border-radius:8px; padding:10px 12px; display:block; width:100%; background:#fff; color:var(--ink); min-height:41px; font-size:13px; }
.field textarea { resize:vertical; min-height:85px; line-height:1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color:var(--teal); box-shadow:0 0 0 3px rgba(36,125,128,.09); }
.field small { font-size:11px; color:var(--muted); display:block; margin-top:5px; }
hr.rule { border:0; border-top:1px solid var(--line); margin:22px 0; }
.note { border:1px solid #dbe8e3; background:#f2f8f5; border-radius:10px; padding:15px 17px; color:#3d6361; font-size:12px; line-height:1.55; }
.note.warn { background:var(--amber-bg); border-color:#f0ddbb; color:#865a2a; }
.note.danger { background:var(--red-bg); border-color:#f0d2ca; color:#8e3b34; }
.note strong { display:block; margin-bottom:4px; }
.info-stack { display:grid; gap:9px; }
.info-row { display:flex; align-items:center; justify-content:space-between; gap:13px; padding:12px 0; border-bottom:1px solid #eef0ec; }
.info-row:last-child { border:0; }
.info-row .label { font-size:12px; color:var(--muted); }
.info-row strong { color:var(--navy); font-size:12px; text-align:right; }
.badge { display:inline-block; border-radius:30px; padding:5px 10px; font-weight:800; font-size:10px; white-space:nowrap; background:#eaf0ed; color:#46615e; }
.badge.green { background:#e0f1e9; color:#227361; }
.badge.amber { background:var(--amber-bg); color:#93612a; }
.badge.red { background:var(--red-bg); color:#a2423b; }
.badge.navy { background:#e3ecee; color:#2c565b; }
.step-list { display:grid; gap:0; }
.step { padding:14px 0; display:flex; gap:14px; border-bottom:1px solid var(--line); align-items:flex-start; }
.step:last-child { border:0; }
.step-number { border:1px solid var(--line); background:#f7faf8; color:var(--teal); border-radius:10px; min-width:34px; height:34px; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:900; }
.step strong { display:block; color:var(--navy); font-size:13px; }
.step p { color:var(--muted); margin-top:3px; font-size:12px; }
.section-actions { display:flex; flex-wrap:wrap; gap:9px; justify-content:flex-end; }
.room-layout { display:grid; grid-template-columns:245px minmax(0,1fr); gap:17px; align-items:start; }
.room-sidebar { position:sticky; top:102px; }
.room-list { display:grid; gap:6px; margin:18px 0; max-height:58vh; overflow-y:auto; }
.room-select { text-align:left; width:100%; display:flex; align-items:center; justify-content:space-between; background:#f7f9f7; border:1px solid transparent; border-radius:8px; padding:11px 12px; font-size:12px; color:var(--navy); font-weight:750; gap:7px; }
.room-select:hover { background:#eef4f0; }
.room-select.active { background:#e1f2ed; border-color:#bddfd5; }
.room-select small { display:block; font-weight:400; color:var(--muted); margin-top:3px; }
.room-select .count { border-radius:99px; background:white; padding:3px 7px; font-size:10px; color:var(--muted); }
.add-room-mini { border-top:1px solid var(--line); padding-top:15px; display:grid; gap:8px; }
.checklist { border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.check-row { display:flex; align-items:center; justify-content:space-between; gap:17px; padding:12px 15px; border-bottom:1px solid #e9efec; }
.check-row:nth-child(even) { background:#fcfdfc; }
.check-row:last-child { border:0; }
.check-label { min-width:0; font-size:12px; font-weight:750; color:var(--ink); }
.check-label small { display:block; font-weight:400; color:var(--muted); font-size:11px; margin-top:4px; }
.check-row select { min-width:180px; max-width:200px; width:37%; border-radius:7px; border:1px solid #dae3de; padding:8px 10px; background:white; color:var(--navy); font-size:11px; }
.check-row select.is-concern { background:var(--red-bg); border-color:#ecc8c1; color:#863f3b; }
.check-row select.is-ok { background:#e8f5ed; border-color:#cae8d7; color:#327451; }
.check-row select.is-inaccessible { background:var(--amber-bg); border-color:#f0ddbb; color:#94612c; }
.table-wrap { overflow-x:auto; }
table.data-table { border-collapse:collapse; width:100%; table-layout:auto; font-size:12px; }
.data-table th { text-align:left; color:#6a7c7d; background:#f6f9f7; letter-spacing:.07em; font-size:10px; text-transform:uppercase; padding:11px 12px; border-bottom:1px solid var(--line); white-space:nowrap; }
.data-table td { padding:11px 12px; border-bottom:1px solid #ebf0ed; vertical-align:top; }
.data-table tr:last-child td { border-bottom:0; }
.data-table input, .data-table select { width:100%; min-width:90px; padding:8px; background:white; border:1px solid #dfe7e2; border-radius:7px; font-size:11px; }
.data-table input.wide-input { min-width:140px; }
.data-table .remove-col { width:24px; padding-right:2px; }
.empty { border:1px dashed #d4e2db; border-radius:11px; padding:27px; color:var(--muted); background:#fbfcfb; text-align:center; font-size:12px; }
.empty strong { display:block; color:var(--navy); font-size:14px; margin-bottom:5px; }
.photo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.photo-card { border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.photo-card .photo-image { display:block; width:100%; height:132px; object-fit:cover; background:#e9ede9; cursor:zoom-in; }
.photo-card .photo-form { padding:9px; display:grid; gap:7px; }
.photo-card input, .photo-card select { width:100%; border:1px solid var(--line); border-radius:6px; padding:7px 8px; font-size:11px; }
.photo-card .photo-footer { display:flex; align-items:center; justify-content:space-between; }
.upload-zone { position:relative; display:flex; align-items:center; justify-content:center; text-align:center; border:1px dashed #a4c5bc; border-radius:10px; min-height:104px; background:#f5faf7; color:#44766d; padding:13px; cursor:pointer; }
.upload-zone input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.upload-zone strong { display:block; }
.upload-zone small { color:var(--muted); }
.records { display:grid; gap:16px; }
.record-card { border:1px solid var(--line); border-radius:13px; background:white; overflow:hidden; }
.record-head { display:flex; justify-content:space-between; align-items:center; gap:10px; background:#f8faf8; border-bottom:1px solid var(--line); padding:14px 17px; }
.record-head strong { font-size:13px; color:var(--navy); }
.record-head span { font-size:11px; color:var(--muted); }
.record-body { padding:17px; }
.record-footer { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:9px; margin-top:17px; padding-top:14px; border-top:1px solid var(--line); }
.sample-calc { background:#e9f4f0; padding:9px 12px; border-radius:8px; font-size:12px; color:#246c63; font-weight:750; }
.finding-category { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.tip { display:inline-flex; align-items:flex-start; gap:7px; font-size:11px; color:#627373; margin-top:8px; }
.tip svg { width:14px; height:14px; margin-top:2px; }
.dashboard-photo { position:relative; overflow:hidden; border-radius:11px; background:linear-gradient(140deg,#1f4e54,#18353a); height:160px; padding:22px; color:white; display:flex; flex-direction:column; justify-content:flex-end; }
.dashboard-photo:after { content:''; width:220px; height:220px; border:42px solid rgba(198,219,149,.22); position:absolute; border-radius:50%; right:-58px; top:-65px; }
.dashboard-photo strong { font-size:19px; letter-spacing:-.03em; position:relative; z-index:1; }
.dashboard-photo span { font-size:11px; color:#c8dddd; position:relative; z-index:1; }
.report-preview-wrap { display:grid; grid-template-columns: minmax(0,1fr) 300px; align-items:start; gap:19px; }
.preview-shell { background:#e1e7e3; border:1px solid var(--line); border-radius:12px; padding:18px; overflow:hidden; }
.report-frame { display:block; border:0; width:100%; height:870px; background:white; box-shadow:0 8px 28px rgba(12,32,34,.13); }
.readiness { display:grid; gap:9px; }
.readiness-item { display:flex; align-items:flex-start; gap:9px; font-size:12px; }
.readiness-icon { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; border-radius:50%; font-size:11px; background:#e6f2eb; color:#31714c; font-weight:900; }
.readiness-item.missing .readiness-icon { background:#fbeadd; color:#a86c25; }
.readiness-item span { margin-top:1px; }
.settings-logo { width:185px; max-height:90px; object-fit:contain; background:white; border:1px solid var(--line); border-radius:10px; padding:12px; display:block; margin:10px 0; }
.modal { display:none; position:fixed; inset:0; z-index:70; background:rgba(8,20,24,.8); align-items:center; justify-content:center; padding:34px; }
.modal.open { display:flex; }
.modal img { max-width:100%; max-height:83vh; object-fit:contain; border-radius:6px; }
.modal .modal-close { position:absolute; top:22px; right:25px; color:white; background:#233e43; border:1px solid #527378; border-radius:8px; padding:9px 15px; }
.toast { position:fixed; bottom:22px; right:24px; background:var(--navy); color:#fff; border-radius:11px; padding:12px 18px; box-shadow:0 15px 30px rgba(0,0,0,.18); z-index:90; font-size:12px; max-width:350px; }
.mobile-bar { display:none; }
@media (max-width:1150px) {
  .sidebar { width:210px; padding-left:12px; padding-right:12px; }
  .workspace { margin-left:210px; }
  .content { padding:30px 25px 70px; }
  .topbar { padding:0 25px; }
  .report-preview-wrap { grid-template-columns:minmax(0,1fr); }
  .report-preview-wrap > :last-child { order:-1; }
}
@media (max-width:900px) {
  .sidebar { position:static; width:auto; height:auto; padding:14px 17px; box-shadow:none; }
  .brand { padding:0; }
  .brand-mark { width:44px; min-width:44px; height:38px; font-size:19px; }
  .side-kicker, .side-card, .side-user { display:none; }
  .nav { flex-direction:row; flex-wrap:wrap; margin-top:13px; }
  .nav-button { padding:9px 11px; font-size:12px; }
  .workspace { margin-left:0; }
  .app-shell { display:block; }
  .topbar { top:0; height:auto; min-height:65px; padding:12px 18px; }
  .top-actions { gap:5px; }
  .project-switch select { width:min(260px,31vw); }
  .content { padding:24px 19px 60px; }
  .room-sidebar { position:static; }
  .room-layout { grid-template-columns:1fr; }
  .room-list { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:none; }
  .add-room-mini { grid-template-columns:1fr 1fr auto; align-items:end; }
}
@media (max-width:600px) {
  h1 { font-size:26px; }
  .page-head { flex-wrap:wrap; }
  .topbar { flex-wrap:wrap; }
  .save-status { display:none; }
  .project-switch { flex:1; }
  .project-switch select { width:min(200px,45vw); }
  .top-actions .btn:not(.primary) { display:none; }
  .content { padding:21px 12px 55px; }
  .brand-txt { font-size:10px; }
  .nav { overflow-x:auto; flex-wrap:nowrap; scrollbar-width:none; }
  .nav-button { white-space:nowrap; font-size:11px; gap:5px; padding:9px; }
  .nav-button svg { width:15px; height:15px; }
  .hero { align-items:flex-start; flex-direction:column; padding:24px; }
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric-card { padding:15px; }
  .two-col, .two-equal, .grid-form, .grid-form.three { grid-template-columns:1fr; }
  .grid-form .field.wide { grid-column:auto; }
  .card { padding:17px; }
  .room-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .add-room-mini { grid-template-columns:1fr; }
  .check-row { flex-direction:column; align-items:stretch; gap:7px; }
  .check-row select { width:100%; max-width:none; }
  .photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .record-head { align-items:flex-start; }
  .report-frame { height:680px; }
  .preview-shell { padding:7px; }
}

/* TEC 2.0 - practical finding builder and Kato / silver-blue brand */
.brand{display:block;padding:0 4px 23px}
.brand-image-frame{background:#f4f6f7;border-radius:11px;min-height:108px;display:flex;align-items:center;justify-content:center;padding:8px 11px}
.brand-logo{display:block;width:100%;max-height:99px;object-fit:contain}
.brand-caption{font-size:11px;font-weight:850;letter-spacing:.19em;color:#dbe7ef;margin:12px 2px 0}
.brand-caption small{display:block;color:#9eb2c0;font-size:9px;letter-spacing:.14em;margin-top:3px;font-weight:550}
.finding-panel{background:#f9fbfc;border:1px solid #e2e9ef;border-radius:11px;padding:17px 19px;margin-bottom:16px}
.finding-panel:nth-of-type(2){background:#fff}
.finding-panel-head{margin-bottom:15px;display:flex;flex-direction:column;gap:5px}
.finding-panel-head p{font-size:12px;color:#71818c}
.suggestion-box{margin-top:16px;background:#f1f6fa;border:1px solid #d3e1ec;border-left:4px solid var(--teal);border-radius:9px;padding:16px 18px}
.suggestion-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.suggestion-top strong{display:block;color:#26485e;font-size:13px}
.suggestion-top small{display:block;color:#6e8290;margin-top:3px;font-size:11px}
.suggestion-box p{margin:14px 0 10px;font-size:12px;line-height:1.65;color:#364b5a}
.suggestion-box details{border-top:1px solid #d6e5ee;padding-top:10px;margin-top:13px}
.suggestion-box summary{cursor:pointer;color:#355e75;font-size:11px;font-weight:850}
.scope-preview{white-space:pre-line;line-height:1.75;font-size:11px;color:#4b6271;padding:10px 2px 6px}
.room-action-strip{margin-top:18px;border:1px solid #d9e5ed;background:#f2f7fa;border-radius:9px;padding:13px 15px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.room-action-strip strong{display:block;font-size:12px;color:#2d4b5e}
.room-action-strip small{display:block;font-size:11px;color:#667b89;margin-top:3px}
.field textarea[data-finding-field$="|scope"]{min-height:175px}
.settings-logo{width:min(260px,100%);max-height:140px}
@media(max-width:900px){.brand{display:flex;align-items:center;gap:11px;padding:0}.brand-image-frame{min-height:0;width:112px;height:60px}.brand-logo{max-height:54px}.brand-caption{margin:0}.nav{margin-top:12px}}
@media(max-width:600px){.finding-panel{padding:12px}.room-action-strip{align-items:flex-start;flex-direction:column}.suggestion-top{flex-direction:column;gap:7px}}

.brand-no-logo{color:#203341;font-size:29px;font-weight:900;letter-spacing:-.075em}

/* TEC Inspection Studio v3 / evidence builder and photo editor */
.library-layout { display:grid; grid-template-columns:minmax(220px,290px) minmax(0,1fr); gap:18px; align-items:start; }
.library-list { padding:17px; }
.library-list>.mini-eyebrow { padding:4px 9px 12px; }
.library-item { appearance:none; display:block; width:100%; padding:12px 13px; border:1px solid transparent; border-bottom:1px solid var(--line); background:transparent; text-align:left; border-radius:9px; }
.library-item:hover { background:#f1f5f7; }
.library-item.selected { background:#e7f0f6; border:1px solid #bfd5e3; }
.library-item strong { font-size:12px; color:var(--navy); display:block; }
.library-item small { display:block; font-size:10.5px; color:var(--muted); margin-top:4px; }
.library-list-footer { display:flex; flex-wrap:wrap; gap:6px; margin-top:15px; padding-top:14px; border-top:1px solid var(--line); }
.library-editor .field textarea { min-height:140px; line-height:1.65; }
.library-editor code { background:#e4eef4; border-radius:4px; padding:2px 4px; font-size:11px; white-space:nowrap; }
.evidence-panel { background:#fafcfd; border:1px solid #dbe7ee; margin-top:15px; border-radius:9px; padding:12px 14px; }
.evidence-panel>summary { cursor:pointer; font-size:12px; color:#28475b; font-weight:800; display:flex; align-items:center; flex-wrap:wrap; gap:7px; list-style: none; }
.evidence-panel>summary::-webkit-details-marker { display:none; }
.evidence-panel>summary::before { content:'+'; border:1px solid #bdcfd9; width:20px; height:20px; display:inline-grid; place-items:center; border-radius:5px; margin-right:3px; }
.evidence-panel[open]>summary::before { content:'-'; }
.evidence-panel summary small { color:#718491; font-weight:450; margin-left:6px; }
.evidence-form { margin-top:17px; }
.observation-draft { background:#eff5f8; padding:13px 15px; margin-top:14px; border-left:3px solid #7398ae; }
.observation-draft p { margin:8px 0 12px; line-height:1.6; font-size:12px; color:#324959; }
.finding-photo-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin-top:15px; }
.finding-photo-opt { border:1px solid #dbe4e9; border-radius:8px; overflow:hidden; cursor:pointer; background:#fff; }
.finding-photo-opt img { width:100%; height:98px; object-fit:cover; display:block; }
.finding-photo-opt span { display:flex; align-items:start; gap:5px; padding:9px; font-size:11px; color:#354c5c; }
.finding-photo-opt input { margin-top:2px; accent-color:#3b6c88; }
.photo-actions { display:flex; align-items:center; gap:3px; }
.photo-actions button { padding-left:5px; padding-right:5px; }
.annotation-modal { display:none; position:fixed; inset:0; z-index:85; background:rgba(7,19,29,.88); padding:18px; align-items:center; justify-content:center; }
.annotation-modal.open { display:flex; }
.annotation-sheet { width:min(1280px,100%); max-height:96vh; display:flex; flex-direction:column; background:#f7f9fb; border-radius:14px; overflow:hidden; border:1px solid #607889; box-shadow:0 35px 80px #0008; }
.annotation-head { display:flex; justify-content:space-between; align-items:start; gap:20px; padding:14px 18px; background:#fff; border-bottom:1px solid var(--line); }
.annotation-head h2 { font-size:17px; margin:3px 0; }
.annotation-head p { font-size:11px; color:var(--muted); }
.annotation-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:10px 17px; border-bottom:1px solid var(--line); }
.tool-set { display:flex; align-items:center; gap:5px; }
.annotate-tool { border:1px solid #cad9e2; background:white; color:#364e5d; border-radius:7px; padding:7px 10px; font-weight:750; font-size:11px; }
.annotate-tool.selected { background:var(--navy); border-color:var(--navy); color:white; }
.color-dot { width:25px; height:25px; border-radius:50%; border:3px solid white; outline:1px solid #bacbd6; padding:0; }
.color-dot.selected { outline:3px solid var(--navy); }
.annotation-label { border:1px solid #d1dde4; background:#fff; border-radius:7px; padding:8px 11px; font-size:12px; flex:1; max-width:260px; min-width:130px; }
.annotation-canvas-frame { background:#1b2832; display:flex; align-items:center; justify-content:center; min-height:140px; flex:1; overflow:auto; padding:10px; }
#annotationCanvas { display:block; max-width:100%; max-height:61vh; width:auto; height:auto; object-fit:contain; touch-action:none; cursor:crosshair; border:1px solid #556977; box-shadow:0 5px 28px #0008; }
.annotation-bottom { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 17px; background:#fff; border-top:1px solid var(--line); }
.annotation-bottom>span { color:var(--muted); font-size:11px; }
@media (max-width:940px) { .library-layout {grid-template-columns:1fr;} .library-list {display:flex;overflow-x:auto;align-items:center;gap:7px;} .library-list>.mini-eyebrow {min-width:130px;} .library-item {min-width:190px;max-width:250px;border:1px solid var(--line);} .library-list-footer {min-width:175px;margin:0;padding:0;border:0;} }
@media (max-width:680px) { .finding-photo-options {grid-template-columns:repeat(2,minmax(0,1fr));}.annotation-modal {padding:4px;} .annotation-head {padding:10px 12px;} .annotation-head p {display:none;} .annotation-toolbar {padding:7px;gap:8px;} .annotate-tool {padding:7px;font-size:10px;} .annotation-sheet {max-height:99vh;} .annotation-canvas-frame {padding:4px;} #annotationCanvas {max-height:48vh;} .annotation-bottom {padding:10px;flex-wrap:wrap;} }



/* TEC v4 - phone-friendly field mode, decision cards, and structured lab entry */
.inline-link{border:0;background:none;color:#356780;text-decoration:underline;cursor:pointer;padding:0;font:inherit;font-weight:750}
.camera-direct{margin-top:10px;display:inline-flex}
.decision-editor{padding:20px;border:1px solid #cfdde7;background:#f4f8fb;border-radius:11px;margin:0 0 20px}
.decision-editor h3{font-size:17px;margin:5px 0 7px;color:#263d4e}
.decision-editor>.mini-eyebrow{color:#4a768d}
.decision-editor .grid-form{margin-top:15px}.decision-editor .note{margin-top:12px}
.lab-entry{border:1px solid #d5e2e9;border-radius:8px;background:#f8fafc;padding:13px;margin-top:15px}
.lab-entry h3{font-size:13px;color:#274154;margin-bottom:6px}.lab-entry h3 .badge{vertical-align:middle;margin-left:6px}
.lab-entry p{font-size:11px;line-height:1.4;margin-bottom:13px}
.lab-row-head,.lab-entry-row{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(90px,.8fr) 35px;gap:8px;align-items:center;margin-bottom:8px}
.lab-row-head span{font-size:10px;color:#718593;font-weight:800;text-transform:uppercase;letter-spacing:.07em}
.lab-entry-row input{width:100%;min-width:0;border:1px solid #d2dee5;border-radius:7px;padding:10px;font-size:13px;height:42px}
.comparison-scroll{overflow-x:auto;margin-top:12px}.comparison-scroll .r-table{min-width:480px}
@media(max-width:600px){
 .sidebar{padding:10px 12px 0}.brand{gap:9px}.brand-image-frame{max-width:92px}.brand-caption{font-size:14px}
 .nav{position:fixed;z-index:66;left:0;right:0;bottom:0;margin:0;background:#192935;box-shadow:0 -6px 25px #1115;padding:6px 6px max(7px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;overflow:visible}
 .nav-button{min-height:49px;border-radius:8px;padding:7px 3px;display:flex;flex-direction:column;gap:3px;font-size:10px;white-space:normal;line-height:1.12;text-align:center;justify-content:center}
 .nav-button svg{width:19px;height:19px;flex-shrink:0}.nav-button:nth-child(6),.nav-button:nth-child(8),.nav-button:nth-child(1){display:none}
 .nav-button:nth-child(2){order:1}.nav-button:nth-child(3){order:2}.nav-button:nth-child(4){order:3}.nav-button:nth-child(5){order:4}.nav-button:nth-child(7){order:5}
 .content{padding:18px 12px 103px}.topbar{min-height:58px;position:sticky;top:0;z-index:55;padding:9px 12px}.top-actions .btn{min-height:39px}
 .btn,select,input,textarea{font-size:16px} .check-row select{min-height:48px}.field input,.field textarea,.field select{min-height:46px;font-size:16px}
 .photo-grid{grid-template-columns:1fr 1fr;gap:8px}.photo-card .photo-image{height:114px}.photo-card .photo-footer{flex-wrap:wrap;gap:5px}
 .camera-direct{min-height:44px}.page-head{gap:11px}.page-head .section-actions{flex-wrap:wrap;gap:6px}
 .records .record-card{overflow:visible}.record-head{flex-wrap:wrap}.record-footer{flex-wrap:wrap}
 .lab-entry{padding:10px}.lab-entry-row{grid-template-columns:minmax(0,1.2fr) minmax(85px,.7fr) 34px}
}


.mobile-room-control{display:none}
.check-summary{font-size:9px;line-height:1.45;color:#697d88;margin-top:9px}
@media(max-width:600px){
 .mobile-room-control{display:grid;gap:10px;border:1px solid #d7e2e9;background:#fff;border-radius:11px;padding:12px;margin-bottom:13px}
 .mobile-room-control .field label{font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.07em}
 .mobile-room-control select{width:100%;border:1px solid #d2dfe8;background:#fff;padding:10px;border-radius:8px;min-height:44px;font-size:15px;color:#203544}
 .mobile-room-add{display:grid;grid-template-columns:1fr 110px;gap:8px}.mobile-room-add .btn{justify-content:center;white-space:nowrap}
 .room-layout.has-rooms > .room-sidebar{display:none}
 .room-layout.has-rooms .card-head .section-actions{margin-left:auto}
 .room-layout.has-rooms .card-head .section-actions .btn{font-size:11px;min-height:38px}
}

  .photo-form-label{font-size:11px;font-weight:800;color:#455c64;margin:0 0 4px;display:block}.photo-dual{display:grid;grid-template-columns:1fr 1fr;gap:7px}.scan-review{margin-bottom:18px}.scan-upload-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.scan-message{border-radius:9px;padding:9px 12px;background:#edf4f6;color:#375567;margin:12px 0;font-size:12px}.scan-summary{cursor:pointer;font-weight:800;color:var(--navy);font-size:12px}.scan-list{margin-top:17px;border-top:1px solid var(--line);padding-top:16px}.scan-list h3{margin:0 0 6px}.scan-row{display:grid;grid-template-columns:1fr 1.6fr 1.1fr auto;gap:9px;align-items:end;padding:10px 0;border-bottom:1px solid #ecf1ef}.scan-row label{display:block;font-size:10px;font-weight:750;color:#566670;margin-bottom:4px}.scan-row input,.scan-row select{width:100%;padding:9px;border:1px solid #d9e1de;border-radius:7px;font-size:12px;background:white;min-height:37px}.room-page .r-two.one-only{grid-template-columns:1fr}.sample-table td{overflow-wrap:anywhere}@media(max-width:780px){.photo-dual,.scan-row{grid-template-columns:1fr}.scan-row{gap:6px;padding:15px 0}.scan-row .btn{justify-self:start}}

/* V6: on-site sampling separated from later laboratory attachments */
.lab-preview-image{max-width:520px;margin-top:15px;padding:9px;border:1px solid var(--line);background:#f7f9fa;border-radius:9px}
.lab-preview-image img{display:block;max-width:100%;max-height:300px;object-fit:contain}
.lab-status-row{display:grid;grid-template-columns:1.15fr 1fr auto;gap:13px;padding:12px 0;border-bottom:1px solid #dce6e8;align-items:center}
.lab-status-row strong{font-size:13px}.lab-status-row small{display:block;color:#667e8a;margin-top:4px;font-size:11px}
.lab-confirm{font-size:11px;font-weight:750;display:flex;gap:7px;align-items:center;cursor:pointer}
@media(max-width:780px){.lab-status-row{grid-template-columns:1fr}.lab-confirm{padding:8px 0}}
/* v7: fast room presets, voice notes, grouped evidence and persistent report history */
.preset-panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:17px 19px;margin:0 0 19px;box-shadow:var(--shadow)}
.preset-panel-head strong{display:block;font-size:14px;color:var(--navy);margin-bottom:4px}.preset-panel-head small{display:block;color:var(--muted);font-size:12px}
.preset-tools,.quick-area-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
.preset-button{background:#e9f1f6;color:#233e53;border:1px solid #cadce7;border-radius:8px;padding:10px 13px;font:750 12px inherit;cursor:pointer;min-height:43px}
.preset-button:hover{background:#dfeaf1;border-color:#9ebacb}.quick-area-list{border-top:1px solid var(--line);padding-top:12px}.quick-area-list>span{font-size:11px;font-weight:800;color:var(--muted);margin-right:2px}
.quick-area-list .btn{min-height:36px}.voice-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px}.voice-label label{margin:0}
.voice-button{white-space:nowrap;color:#285c79;border-color:#c1d9e7;background:#f1f7fa}.voice-button.listening{color:#fff;background:#a13f36;border-color:#a13f36;animation:voicePulse 1.5s ease-in-out infinite}
.voice-footnote{font-size:10px;line-height:1.5;color:#72828c;margin:10px 0 0}
@keyframes voicePulse{50%{box-shadow:0 0 0 5px #a13f3620}}
.photo-sets{margin:4px 0 18px;display:grid;gap:17px}.photo-set{border:1px solid var(--line);border-radius:10px;padding:12px;background:#fbfcfd}.photo-set-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px;font-size:12px;color:var(--navy)}.photo-set-label span{font-size:11px;color:var(--muted)}
.photo-id-chip{color:#325d75;font-size:10px;font-weight:900;letter-spacing:.12em}.photo-card select{font-size:12px}
.revision-panel{margin:0 0 18px}.revision-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f0f6fa;border:1px solid #d2e2eb;padding:16px;border-radius:9px;margin-top:10px}
.revision-intro.ready{background:#eff6f2;border-color:#d6e6dc}.revision-intro strong{font-size:12px;color:var(--navy)}.revision-intro p{color:var(--muted);font-size:11px;margin-top:4px}.revision-intro .btn{flex-shrink:0}
.revision-list{margin-top:14px;border-top:1px solid var(--line)}.revision-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.revision-number{flex-shrink:0;min-width:43px;height:43px;display:grid;place-items:center;background:#203748;border-radius:7px;color:white;font-size:13px;font-weight:900}
.revision-info{flex:1;min-width:0}.revision-info strong{display:block;font-size:12px;color:var(--navy)}.revision-info small{color:var(--muted);font-size:11px;display:block;margin-top:3px}.revision-buttons{display:flex;gap:5px}
@media(max-width:700px){.preset-panel{padding:13px}.preset-button{flex:1;min-width:calc(50% - 4px);font-size:12px}.quick-area-list .btn{min-height:42px}.revision-intro,.revision-row{align-items:flex-start}.revision-intro{flex-direction:column}.revision-buttons{flex-direction:column}.revision-row{gap:8px}.revision-number{min-width:36px;height:36px;font-size:11px}.voice-button{min-height:40px}}

.mobile-more-nav,.mobile-more-panel{display:none}
@media(max-width:600px){
 .nav{grid-template-columns:repeat(6,minmax(0,1fr));padding:5px 4px max(6px,env(safe-area-inset-bottom));gap:1px}
 .nav .nav-button{min-height:55px;padding:5px 1px;font-size:9px;line-height:1.06}
 .nav .nav-button:nth-child(1),.nav .nav-button:nth-child(5),.nav .nav-button:nth-child(7),.nav .nav-button:nth-child(9){display:none}
 .nav .nav-button:nth-child(2){display:flex;order:1}.nav .nav-button:nth-child(3){display:flex;order:2}.nav .nav-button:nth-child(4){display:flex;order:3}
 .nav .nav-button:nth-child(6){display:flex;order:4}.nav .nav-button:nth-child(8){display:flex;order:5}
 .nav .mobile-more-nav{display:flex;order:6}
 .mobile-more-panel:not([hidden]){display:grid;position:fixed;z-index:78;left:10px;right:10px;bottom:calc(70px + env(safe-area-inset-bottom));padding:12px;background:#fff;border:1px solid #cad9e2;border-radius:12px;box-shadow:0 12px 30px #132d3940;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .mobile-more-panel>strong{grid-column:1/-1;color:#264357;font-size:13px;margin:3px 3px 7px}
 .mobile-more-panel button{min-height:48px;padding:10px 9px;border-radius:8px;background:#f0f5f8;border:1px solid #d8e4eb;color:#233c4c;font-size:12px;font-weight:800;text-align:left}
 .content{padding-bottom:110px}
 .room-layout:not(.has-rooms)>.room-sidebar{display:none}
}


/* TEC v8 - protocol builder */
.protocol-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#eaf1f5;border:1px solid #d8e5ed;padding:18px 20px;border-radius:13px;margin-bottom:18px}.protocol-intro strong{font-size:15px;color:#25485d}.protocol-intro p{margin:5px 0 0;color:#607485;line-height:1.5;max-width:710px;font-size:13px}.protocol-state{white-space:nowrap;background:#fff5e5;border:1px solid #f2d9b3;color:#9f6624;font-size:11px;text-transform:uppercase;letter-spacing:.04em;font-weight:750;border-radius:999px;padding:7px 11px}.protocol-state.ready{background:#e9f3ef;color:#2c765b;border-color:#c8e1d6}.protocol-areas{display:grid;gap:15px}.protocol-area-card{border:1px solid #dbe5eb;border-radius:12px;padding:17px;background:#fbfdfe}.protocol-area-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:16px}.protocol-area-top small{font-size:10px;letter-spacing:.045em;font-weight:800;color:#617d8c}.protocol-area-top h3{font-size:16px;color:#1b3a50;margin:5px 0}.protocol-area-top p{font-size:12px;color:#617484;margin:0}.protocol-method{background:#e8f1f5;color:#426b7f;max-width:240px;border-radius:8px;padding:7px 9px;font-weight:700;font-size:11px}.protocol-area-card .grid-form{margin-bottom:13px}.protocol-area-card .field textarea{min-height:140px}.protocol-muted{display:block;color:#697f8d;font-size:12px;margin-top:9px}.protocol-warning{border-left:4px solid #bb7c32;background:#fff8ec;padding:13px 15px;margin:12px 0}.protocol-warning strong{color:#8b5b23}.protocol-warning ul{margin:8px 0;padding-left:20px;color:#805b35;font-size:12px;line-height:1.8}.protocol-ok{padding:13px 15px;border-left:4px solid #608e7c;background:#eff7f3;color:#3c6957;font-size:12px;margin-bottom:12px}.protocol-history{margin-top:26px;border-top:1px solid #dfe8ed;padding-top:17px}.protocol-history h3{color:#25485e;font-size:14px;margin:0 0 12px}.protocol-history-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:11px 0;border-top:1px solid #e4ebf0}.protocol-history-row strong,.protocol-history-row small{display:block}.protocol-history-row small{font-size:11px;color:#738895;margin-top:3px}.protocol-bottom{display:flex;justify-content:space-between;gap:12px;margin:15px 0 35px}.protocol-report-link{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dde8ed;background:#f3f8fa;border-radius:10px;padding:13px 15px;margin:9px 0 16px}.protocol-report-link strong{font-size:13px;color:#264b60}.protocol-report-link p{margin:3px 0 0;font-size:12px;color:#607b8b}@media(max-width:700px){.protocol-intro,.protocol-area-top,.protocol-bottom{flex-direction:column;align-items:stretch}.protocol-state{align-self:flex-start}.protocol-method{max-width:none}.protocol-history-row{align-items:flex-start}.protocol-report-link{flex-direction:column;align-items:stretch}.protocol-area-card{padding:13px}.protocol-intro{padding:15px}}

/* TEC Cloud Edition secure-account UI */
.cloud-login-screen{min-height:100vh;width:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 70% 12%,#334b60 0,#192a39 45%,#0d1721 100%);padding:28px}
.cloud-login-card{width:min(460px,100%);background:#fff;border-radius:20px;padding:35px 38px;box-shadow:0 20px 60px #0005}
.cloud-brand{font-size:21px;font-weight:900;letter-spacing:.11em;color:#183246;margin-bottom:23px}.cloud-brand span{color:#7a9cad}
.cloud-login-card h1{font-size:25px;margin:0 0 8px}.cloud-login-card>p{color:#627783;line-height:1.6;margin-bottom:24px}
.cloud-login-card label{display:block;font-size:12px;color:#344e60;font-weight:800;margin:15px 0 6px}
.cloud-login-card input{width:100%;padding:13px;border:1px solid #bdcbd5;border-radius:9px;font-size:15px}
.cloud-login-btn{width:100%;padding:13px 18px;border-radius:10px;background:#183246;color:#fff;font-weight:800;border:0;margin-top:20px;font-size:14px}
.cloud-login-card>small{display:block;font-size:10px;color:#7b8e9a;margin-top:25px}
.cloud-login-error{color:#a33333;font-size:12px;margin-top:12px;min-height:18px}
.cloud-mfa-qr{display:block;width:min(240px,100%);margin:12px auto;border:1px solid #d8e2e9}
.cloud-mfa-secret{overflow-wrap:anywhere;padding:12px;background:#eef2f6;color:#314758;border-radius:8px;font-size:12px;text-align:center}
.cloud-setup-hint{padding:14px;background:#f1f5f8;border:1px solid #d8e4ed;border-radius:10px;color:#344a59;line-height:1.6}
.cloud-sync-btn{background:#ecf2f5}.cloud-signout{font-size:11px}
.cloud-conflict-modal{position:fixed;inset:0;z-index:2000;background:#0a1824b5;display:flex;justify-content:center;align-items:center;padding:18px}
.cloud-conflict-dialog{width:min(620px,100%);max-height:90vh;overflow-y:auto;background:#fff;border-radius:14px;padding:25px}.cloud-conflict-dialog>p{margin:8px 0 17px;color:#718592}
.cloud-conflict-item{margin:13px 0;padding:14px;background:#f2f5f8;border:1px solid #dbe3e8;border-radius:9px}
.cloud-conflict-item p{color:#8a5b3b;font-size:12px;margin:7px 0}.cloud-conflict-item button{margin:3px}
@media(max-width:750px){.top-actions .cloud-signout{font-size:10px;padding:6px}.top-actions .cloud-sync-btn{font-size:10px;padding:6px}.cloud-login-card{padding:27px 22px}}

.cloud-mfa-label{font-size:12px;font-weight:800;color:#344e60;margin:14px 0 6px}
.cloud-mfa-help{font-size:12px;color:#627783;line-height:1.45;margin:12px 0}
