:root{
  --bg:#eef3f1;
  --panel:#ffffff;
  --ink:#17231f;
  --muted:#68756f;
  --line:#dbe4df;
  --brand:#10231f;
  --brand-2:#21483d;
  --accent:#efb74b;
  --accent-dark:#be7f13;
  --good:#237a57;
  --warn:#b7791f;
  --bad:#b4473f;
  --blue:#356c8a;
  --shadow:0 16px 48px rgba(16,35,31,.09);
  --radius:20px;
  --radius-sm:12px;
}
*{box-sizing:border-box}
html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}
body{margin:0;min-height:100vh;background:linear-gradient(180deg,#f5f8f7 0%,#e9efec 100%)}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.hidden{display:none!important}
.mobile-only{display:none}
.app-shell{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;padding:26px 20px;background:linear-gradient(180deg,#10231f 0%,#173a31 100%);color:#fff;display:flex;flex-direction:column;z-index:30}
.brand-block{display:flex;align-items:center;gap:12px;padding:0 8px 26px}
.brand-mark{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,var(--accent),#ffe0a0);color:#35240b;font-weight:900;letter-spacing:-.03em;box-shadow:0 10px 26px rgba(0,0,0,.18)}
.brand-block strong{display:block;font-size:1.05rem}
.brand-block span{display:block;color:#b9cbc4;font-size:.78rem;margin-top:3px}
.nav-list{display:grid;gap:7px}
.nav-item{appearance:none;border:0;color:#d7e3de;background:transparent;border-radius:13px;display:flex;align-items:center;gap:12px;padding:12px 13px;text-align:left;font-weight:700;transition:.18s ease}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-item.is-active{background:#fff;color:var(--brand);box-shadow:0 10px 25px rgba(0,0,0,.13)}
.nav-icon{width:25px;text-align:center;font-size:1.15rem}
.sidebar-note{margin-top:auto;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:15px;padding:13px;display:flex;gap:10px;align-items:center}
.sidebar-note strong,.sidebar-note small{display:block}.sidebar-note small{color:#b9cbc4;margin-top:2px}
.status-dot{width:11px;height:11px;background:#6ce0a3;border-radius:50%;box-shadow:0 0 0 5px rgba(108,224,163,.12)}
.main-panel{min-width:0}
.topbar{padding:28px 38px 22px;display:flex;align-items:center;gap:18px;justify-content:space-between;border-bottom:1px solid rgba(16,35,31,.07);background:rgba(245,248,247,.82);backdrop-filter:blur(16px);position:sticky;top:0;z-index:20}
.topbar h1{font-size:1.65rem;margin:2px 0 0;letter-spacing:-.035em}
.eyebrow{margin:0;color:var(--good);font-size:.72rem;font-weight:900;text-transform:uppercase;letter-spacing:.13em}
.eyebrow.light{color:#f1ce87}
.topbar-actions{display:flex;gap:10px;align-items:center}
.page-content{padding:28px 38px 48px;max-width:1500px;width:100%;margin:0 auto}
.button{border:0;border-radius:12px;padding:11px 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.18s ease;text-decoration:none}
.button:hover{transform:translateY(-1px)}
.button-primary{background:var(--brand);color:white;box-shadow:0 10px 25px rgba(16,35,31,.18)}
.button-accent{background:var(--accent);color:#34230a;box-shadow:0 12px 28px rgba(239,183,75,.22)}
.button-secondary{background:#e7efeb;color:var(--brand)}
.button-danger{background:#f6e7e5;color:var(--bad)}
.button-quiet{background:white;color:var(--brand);border:1px solid var(--line)}
.button-ghost-light{background:rgba(255,255,255,.08);color:#fff;border:1px solid rgba(255,255,255,.2)}
.icon-button{width:42px;height:42px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--brand)}
.text-button{border:0;background:none;color:var(--good);font-weight:900;padding:6px}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr);gap:22px}
.hero-card{grid-column:1/-1;border-radius:26px;padding:34px;background:radial-gradient(circle at 85% 10%,rgba(239,183,75,.19),transparent 30%),linear-gradient(135deg,#10231f,#1e4b3e);color:white;display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:30px;align-items:end;box-shadow:var(--shadow);overflow:hidden;position:relative}
.hero-card:after{content:"";position:absolute;width:330px;height:330px;border-radius:50%;border:1px solid rgba(255,255,255,.08);right:-130px;bottom:-180px}
.hero-copy{position:relative;z-index:1}.hero-copy h2{font-size:clamp(1.8rem,3vw,3rem);line-height:1.03;max-width:760px;letter-spacing:-.045em;margin:12px 0 16px}.hero-copy p{color:#cad8d3;max-width:820px;line-height:1.65}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.hero-metric{position:relative;z-index:1;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.14);border-radius:20px;padding:22px;text-align:center}.hero-metric span,.hero-metric small{display:block;color:#cfddd8}.hero-metric strong{display:block;font-size:3.4rem;line-height:1;margin:10px 0;color:#ffe0a0}
.metrics-row{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.metric-card,.panel-card{background:var(--panel);border:1px solid rgba(16,35,31,.07);box-shadow:0 10px 35px rgba(16,35,31,.055);border-radius:var(--radius)}
.metric-card{padding:20px}.metric-card span,.metric-card small{display:block;color:var(--muted)}.metric-card strong{display:block;font-size:2rem;margin:9px 0 5px;letter-spacing:-.04em}.metric-card small{font-size:.78rem}
.panel-card{padding:22px}.panel-heading{display:flex;justify-content:space-between;gap:15px;align-items:center;margin-bottom:18px}.panel-heading h3{margin:4px 0 0;font-size:1.25rem;letter-spacing:-.03em}
.recent-panel{min-height:390px}.report-pack-panel{min-height:390px}
.report-list{display:grid;gap:10px}.report-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fbfcfc;transition:.16s}.report-row:hover{border-color:#b5c9c0;transform:translateY(-1px)}
.report-type-icon{width:46px;height:46px;border-radius:13px;background:#e9f0ed;display:grid;place-items:center;font-size:1.2rem;color:var(--brand)}
.report-row h4{margin:0 0 4px;font-size:.95rem}.report-row p{margin:0;color:var(--muted);font-size:.83rem}.row-actions{display:flex;gap:7px}
.mini-button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 10px;font-weight:800;color:var(--brand)}
.pack-grid{display:grid;gap:10px}.pack-card{display:grid;grid-template-columns:45px minmax(0,1fr) auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:13px}.pack-card.featured{border-color:#a9cabb;background:#f5faf7}.pack-icon{width:42px;height:42px;border-radius:12px;background:#edf2f0;display:grid;place-items:center;font-size:1.2rem}.pack-card strong{display:block}.pack-card p{margin:4px 0 0;color:var(--muted);font-size:.82rem;line-height:1.35}
.tag{font-size:.68rem;font-weight:900;text-transform:uppercase;letter-spacing:.07em;border-radius:999px;padding:6px 9px;background:#eef1f0;color:#68756f}.tag-green{background:#dff2e8;color:var(--good)}.tag-amber{background:#faedcf;color:var(--warn)}.tag-red{background:#f6dfdc;color:var(--bad)}.tag-blue{background:#e1edf3;color:var(--blue)}
.section-grid{display:grid;gap:18px}.toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;flex-wrap:wrap}.toolbar-group{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.search-input{min-width:260px;background:white;border:1px solid var(--line);border-radius:12px;padding:11px 13px;color:var(--ink)}
.data-table-wrap{overflow:auto;background:white;border-radius:18px;border:1px solid var(--line);box-shadow:0 8px 30px rgba(16,35,31,.05)}
.data-table{width:100%;border-collapse:collapse;min-width:840px}.data-table th,.data-table td{text-align:left;padding:14px 16px;border-bottom:1px solid var(--line);vertical-align:middle}.data-table th{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);background:#f7f9f8}.data-table tr:last-child td{border-bottom:0}.data-table h4{margin:0 0 3px}.data-table p{margin:0;color:var(--muted);font-size:.82rem}
.empty-state{border:1px dashed #b9c7c1;border-radius:18px;padding:36px;text-align:center;background:#fafcfc}.empty-state h3{margin:12px 0 8px}.empty-state p{color:var(--muted);max-width:520px;margin:0 auto 18px;line-height:1.55}.empty-icon{font-size:2.2rem}
.form-shell{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:20px}.form-main,.form-side{display:grid;gap:16px;align-content:start}.form-card{background:white;border:1px solid var(--line);border-radius:18px;padding:21px;box-shadow:0 8px 28px rgba(16,35,31,.045)}.form-card h3{margin:0 0 6px;font-size:1.13rem}.form-card>.help{margin:0 0 18px;color:var(--muted);font-size:.86rem;line-height:1.5}
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:.78rem;font-weight:900;color:#42514b}.field input,.field textarea,.field select{width:100%;border:1px solid #cfdad5;background:#fbfcfc;border-radius:11px;padding:11px 12px;color:var(--ink);outline:none}.field textarea{resize:vertical;min-height:105px}.field input:focus,.field textarea:focus,.field select:focus{border-color:#6b9e88;box-shadow:0 0 0 3px rgba(72,128,103,.12)}
.form-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}
.progress-card{background:linear-gradient(135deg,#10231f,#21483d);color:white}.progress-card h3{color:white}.progress-list{display:grid;gap:11px;margin-top:14px}.progress-item{display:flex;align-items:center;gap:10px;color:#d3e0db;font-size:.85rem}.progress-check{width:22px;height:22px;border-radius:50%;background:rgba(255,255,255,.12);display:grid;place-items:center;font-size:.72rem}.progress-item.done .progress-check{background:#6ce0a3;color:#10231f}.progress-item.done{color:white}
.summary-stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.summary-stat{border:1px solid rgba(255,255,255,.13);border-radius:12px;padding:12px;background:rgba(255,255,255,.06)}.summary-stat span{display:block;color:#c9d8d2;font-size:.73rem}.summary-stat strong{display:block;margin-top:5px;font-size:1.3rem}
.finding-list{display:grid;gap:12px}.finding-card{border:1px solid var(--line);border-radius:15px;padding:15px;background:#fcfdfd}.finding-top{display:flex;justify-content:space-between;gap:12px}.finding-card h4{margin:0 0 5px}.finding-card p{margin:0;color:var(--muted);font-size:.84rem;line-height:1.45}.finding-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:11px}.finding-actions{display:flex;gap:7px;align-items:flex-start}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:10px;margin-top:12px}.photo-card{position:relative;border-radius:12px;overflow:hidden;background:#e8eeeb;border:1px solid var(--line);aspect-ratio:4/3}.photo-card img{width:100%;height:100%;object-fit:cover}.photo-card button{position:absolute;right:6px;top:6px;width:28px;height:28px;border-radius:50%;border:0;background:rgba(16,35,31,.78);color:#fff}.photo-add{border:1px dashed #9badA5;border-radius:12px;display:grid;place-items:center;min-height:110px;background:#fafcfc;color:var(--muted);font-weight:800}.photo-add input{display:none}
.voice-row{display:flex;gap:8px;align-items:center}.voice-status{font-size:.78rem;color:var(--muted)}
.ai-box{background:#f3f8f5;border:1px solid #cfe2d8;border-radius:14px;padding:14px}.ai-box p{margin:0 0 10px;color:#50625a;font-size:.84rem;line-height:1.5}
.sticky-card{position:sticky;top:116px}
.modal-backdrop{position:fixed;inset:0;background:rgba(7,17,14,.62);display:grid;place-items:center;padding:20px;z-index:100;backdrop-filter:blur(6px)}
.modal{background:white;border-radius:22px;max-width:760px;width:min(100%,760px);max-height:92vh;overflow:auto;box-shadow:0 30px 90px rgba(0,0,0,.32)}.modal.wide{max-width:1080px;width:min(100%,1080px)}.modal-head{display:flex;justify-content:space-between;gap:15px;padding:20px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:3}.modal-head h2{margin:0;font-size:1.3rem}.modal-body{padding:22px}.modal-foot{display:flex;justify-content:flex-end;gap:9px;padding:18px 22px;border-top:1px solid var(--line);position:sticky;bottom:0;background:white}
.report-preview-shell{background:#dfe5e2;padding:28px}.report-paper{width:794px;max-width:100%;margin:auto;background:white;min-height:1123px;box-shadow:0 18px 55px rgba(16,35,31,.18);padding:52px 54px;color:#16221e}.report-header{display:flex;justify-content:space-between;gap:30px;border-bottom:4px solid #173a31;padding-bottom:20px}.report-logo{display:flex;gap:12px;align-items:center}.report-logo-mark{width:52px;height:52px;border-radius:14px;background:#10231f;color:#efb74b;display:grid;place-items:center;font-weight:900}.report-logo strong{display:block;font-size:1.15rem}.report-logo span{display:block;color:#68756f;font-size:.78rem;margin-top:3px}.report-title{text-align:right}.report-title h1{font-size:1.8rem;margin:0 0 6px}.report-title p{margin:0;color:#68756f}.report-status-banner{margin:20px 0;background:#ecf5f0;border-left:5px solid #237a57;padding:14px 16px;font-weight:800}.report-section{margin-top:24px}.report-section h2{font-size:1.05rem;text-transform:uppercase;letter-spacing:.08em;border-bottom:1px solid #d9e3de;padding-bottom:8px}.report-detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px 28px}.report-detail{display:grid;grid-template-columns:120px 1fr;gap:8px;font-size:.84rem}.report-detail span{color:#68756f}.report-summary{font-size:.91rem;line-height:1.65}.report-finding{page-break-inside:avoid;border:1px solid #d9e3de;border-radius:10px;padding:14px;margin:12px 0}.report-finding-head{display:flex;justify-content:space-between;gap:15px}.report-finding h3{margin:0;font-size:1rem}.report-finding p{font-size:.86rem;line-height:1.55}.report-photo-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-top:12px}.report-photo{border:1px solid #d9e3de;border-radius:8px;overflow:hidden}.report-photo img{display:block;width:100%;height:180px;object-fit:cover}.report-photo span{display:block;padding:7px;font-size:.72rem;color:#68756f}.report-signoff{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:34px}.signature-box{border-top:1px solid #68756f;padding-top:8px;font-size:.82rem}.report-footer{margin-top:46px;border-top:1px solid #d9e3de;padding-top:12px;display:flex;justify-content:space-between;gap:15px;color:#68756f;font-size:.68rem}
.toast-root{position:fixed;right:20px;bottom:20px;display:grid;gap:9px;z-index:200}.toast{background:#10231f;color:white;border-radius:12px;padding:12px 15px;box-shadow:0 15px 40px rgba(0,0,0,.2);animation:toast-in .22s ease}.toast.error{background:#8e352f}@keyframes toast-in{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}
.client-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}.client-card{background:white;border:1px solid var(--line);border-radius:17px;padding:18px}.client-card h3{margin:0 0 6px}.client-card p{margin:0;color:var(--muted);line-height:1.5;font-size:.84rem}.client-actions{display:flex;gap:8px;margin-top:16px}
.backup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.backup-card{background:white;border:1px solid var(--line);border-radius:18px;padding:24px}.backup-card h3{margin:0 0 8px}.backup-card p{color:var(--muted);line-height:1.55}.drop-zone{border:1px dashed #9aada4;border-radius:14px;padding:24px;text-align:center;background:#fafcfc}.drop-zone input{display:none}
.notice{border-radius:13px;padding:13px 14px;background:#fff7e4;border:1px solid #f1d79a;color:#74510c;font-size:.84rem;line-height:1.5}.notice.info{background:#edf5f8;border-color:#c6dae3;color:#315e73}.notice.danger{background:#faecea;border-color:#eac2bd;color:#873c35}
.checkbox-row{display:flex;gap:9px;align-items:flex-start}.checkbox-row input{margin-top:3px}
@media(max-width:1120px){.dashboard-grid{grid-template-columns:1fr}.report-pack-panel,.recent-panel{grid-column:1}.metrics-row{grid-template-columns:repeat(2,1fr)}.form-shell{grid-template-columns:1fr}.sticky-card{position:static}.form-side{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.app-shell{display:block}.sidebar{position:fixed;left:-290px;transition:.22s ease;width:270px}.sidebar.open{left:0}.drawer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:25}.mobile-only{display:inline-grid}.topbar{padding:18px 16px}.topbar h1{font-size:1.25rem}.topbar .eyebrow{display:none}.page-content{padding:18px 14px 36px}.topbar-actions .button-quiet{display:none}.hero-card{grid-template-columns:1fr;padding:24px}.hero-metric{display:none}.hero-copy h2{font-size:2rem}.field-grid,.field-grid.three{grid-template-columns:1fr}.metrics-row{grid-template-columns:repeat(2,1fr)}.form-side{grid-template-columns:1fr}.backup-grid{grid-template-columns:1fr}.report-preview-shell{padding:8px}.report-paper{padding:30px 24px}.report-header{display:block}.report-title{text-align:left;margin-top:18px}.report-detail-grid,.report-signoff{grid-template-columns:1fr}.report-photo-grid{grid-template-columns:1fr}}
@media(max-width:520px){.topbar-actions #installButton{display:none!important}.topbar-actions .button{padding:10px 12px}.metrics-row{grid-template-columns:1fr 1fr;gap:9px}.metric-card{padding:15px}.metric-card strong{font-size:1.6rem}.panel-card{padding:16px}.report-row{grid-template-columns:42px minmax(0,1fr)}.row-actions{grid-column:1/-1}.toolbar{align-items:stretch}.toolbar-group{width:100%}.search-input{min-width:0;width:100%}.hero-actions .button{width:100%}.modal-backdrop{padding:0}.modal{height:100vh;max-height:100vh;border-radius:0}.modal-head,.modal-foot{padding:15px}.modal-body{padding:15px}}
@media print{
  body{background:white}
  .app-shell,.modal-head,.modal-foot{display:none!important}
  #modalRoot{display:block!important}
  .modal-backdrop{position:static;background:white;padding:0;display:block}
  .modal{box-shadow:none;max-height:none;overflow:visible;max-width:none;width:auto}
  .modal-body{padding:0}
  .report-preview-shell{padding:0;background:white}
  .report-paper{box-shadow:none;width:100%;min-height:auto;padding:10mm 12mm}
}


/* v0.2.0 Racking inspection pack */
.risk-legend{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.risk-chip{padding:9px 12px;border-radius:999px;font-size:.78rem;border:1px solid var(--line);background:#fff}.risk-chip.green{border-color:#8bb89c;background:#edf8f0}.risk-chip.amber{border-color:#d8a34d;background:#fff8e8}.risk-chip.red{border-color:#d16b6b;background:#fff0f0}.defect-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 18px;margin:10px 0;font-size:.79rem;color:var(--muted)}.defect-mini-grid strong{color:var(--ink)}.racking-finding{border-left:5px solid #c98a2e}.report-table{width:100%;border-collapse:collapse;font-size:.72rem}.report-table th,.report-table td{border:1px solid #cfd8d3;padding:7px;vertical-align:top;text-align:left}.report-table th{background:#edf2ef;font-size:.67rem;text-transform:uppercase;letter-spacing:.04em}.report-table.compact{min-width:940px}.report-red-section{border:2px solid #b83d3d;background:#fffafa;padding:14px}.report-status-banner.danger{background:#9e2525;color:#fff}.page-break-avoid{break-inside:avoid;page-break-inside:avoid}@media(max-width:720px){.defect-mini-grid{grid-template-columns:1fr}.risk-legend{display:grid}.report-table{font-size:.65rem}}


/* v0.3.0 AI-assisted racking rebuild */
.ai-capture-card{background:linear-gradient(135deg,#10231f,#1b493e);border:0;color:#fff;overflow:hidden}.ai-capture-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,.6fr);gap:22px;align-items:center}.ai-capture-card h3{font-size:1.45rem;margin:.3rem 0 .55rem}.ai-capture-card p{color:#d2e1db;line-height:1.6;margin:0}.ai-safety-note{border:1px solid rgba(255,255,255,.17);background:rgba(255,255,255,.08);border-radius:16px;padding:18px}.ai-safety-note strong,.ai-safety-note span{display:block}.ai-safety-note span{font-size:.8rem;line-height:1.5;color:#c7d8d1;margin-top:7px}.ai-command-card{background:#f3f8f5;border:1px solid #cfe2d8;border-radius:18px;padding:18px;margin-bottom:18px}.ai-command-card>label{display:block;font-size:.82rem;font-weight:850;margin-bottom:8px}.ai-command-card textarea{min-height:170px;font-size:1rem;line-height:1.55}.mic-button{min-width:84px;align-self:stretch;border:0;border-radius:14px;background:#173a31;color:#fff;font-size:1.4rem;display:grid;place-items:center;padding:12px;cursor:pointer}.mic-button span{font-size:.7rem;font-weight:800}.ai-context-grid{padding:4px 0 16px}.ai-analysis-status{display:flex;gap:12px;align-items:center;border-radius:14px;padding:14px;background:#edf5f8;border:1px solid #c6dae3}.ai-analysis-status strong,.ai-analysis-status small{display:block}.ai-analysis-status small{color:#55707d;margin-top:3px}.spinner{width:24px;height:24px;border:3px solid #bad0c7;border-top-color:#173a31;border-radius:50%;animation:spin .8s linear infinite;flex:none}@keyframes spin{to{transform:rotate(360deg)}}.ai-review-notice ul{margin:8px 0 0 18px;padding:0}.ai-settings-card{border-left:5px solid #237a57}.connection-pill{display:inline-flex;align-items:center;border-radius:999px;padding:7px 10px;background:#f4e8e6;color:#843e37;font-size:.72rem;font-weight:850}.connection-pill.connected{background:#e8f5ed;color:#246145}.ai-pack{box-shadow:0 10px 28px rgba(35,122,87,.1)}
@media(max-width:820px){.ai-capture-layout{grid-template-columns:1fr}.ai-capture-card .hero-actions{display:grid}.ai-capture-card .button{width:100%}.mic-button{min-width:70px}.ai-command-card .voice-row{align-items:stretch}}
@media(max-width:520px){.ai-command-card{padding:13px}.ai-command-card textarea{min-height:210px}.mic-button{min-width:58px;padding:8px}.ai-capture-card h3{font-size:1.25rem}}


/* A4-safe racking tables */
.report-table.compact{min-width:0;width:100%;table-layout:fixed;font-size:.56rem;line-height:1.28}.report-table.compact th,.report-table.compact td{padding:4px;overflow-wrap:anywhere;word-break:normal}.report-table.compact th:nth-child(1){width:17%}.report-table.compact th:nth-child(2){width:13%}.report-table.compact th:nth-child(3){width:11%}.report-table.compact th:nth-child(4){width:8%}.report-table.compact th:nth-child(5){width:17%}.report-table.compact th:nth-child(6){width:22%}.report-table.compact th:nth-child(7){width:12%}.report-table thead{display:table-header-group}.report-section{break-inside:auto}.report-finding{break-inside:avoid-page}.data-table-wrap{overflow:visible}
@media print{.report-table.compact{font-size:7pt}.report-table.compact th,.report-table.compact td{padding:3px}.report-section h2{break-after:avoid}.report-photo img{height:55mm}.report-paper{font-size:10pt}}

/* v0.4.0 handwritten document importer */
.handwriting-steps{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}.handwriting-steps span{padding:7px 11px;border:1px solid var(--line);border-radius:999px;background:#f4f7f5;color:var(--muted);font-size:.78rem;font-weight:700}.handwriting-steps span.is-active{background:#173a31;color:#fff;border-color:#173a31}
.document-dropzone{display:flex;min-height:170px;border:2px dashed #8aa69d;border-radius:18px;background:linear-gradient(135deg,#f6faf8,#eaf3ef);align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:24px;cursor:pointer;transition:.2s ease}.document-dropzone:hover{transform:translateY(-1px);border-color:#276b59;background:#edf7f2}.document-dropzone input{display:none}.document-drop-icon{font-size:2.3rem;margin-bottom:8px}.document-dropzone strong{font-size:1.05rem}.document-dropzone small{display:block;color:var(--muted);margin-top:6px}
.document-file-list{display:grid;gap:10px;margin:14px 0 20px}.empty-document-list{border:1px solid var(--line);border-radius:12px;padding:15px;color:var(--muted);background:#fafcfb}.document-file-card{display:grid;grid-template-columns:62px 1fr auto;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff}.document-file-card strong,.document-file-card small{display:block}.document-file-card small{color:var(--muted);margin-top:3px}.document-thumb{width:62px;height:62px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#e8efec;color:#173a31;font-weight:800;overflow:hidden}.document-thumb img{width:100%;height:100%;object-fit:cover}
.import-summary-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;border:1px solid #bfd2cb;background:#f5faf8;border-radius:18px;padding:18px;margin-bottom:16px}.import-summary-card p{margin:.25rem 0 .45rem;line-height:1.55}.import-summary-card small{color:var(--muted)}.import-summary-metrics{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap;justify-content:flex-end}.import-summary-metrics span{min-width:68px;padding:9px 10px;border-radius:12px;background:#fff;border:1px solid var(--line);text-align:center;color:var(--muted);font-size:.72rem}.import-summary-metrics strong{display:block;color:var(--ink);font-size:1.25rem}.import-summary-metrics .risk-red{border-color:#e7b3b3;background:#fff6f6}.import-summary-metrics .risk-red strong{color:#a22b2b}.import-summary-metrics .risk-amber{border-color:#ead0a3;background:#fffaf0}.import-summary-metrics .risk-amber strong{color:#9b5d00}.import-summary-metrics .risk-green{border-color:#add2bd;background:#f3fbf6}.import-summary-metrics .risk-green strong{color:#247044}
.review-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:15px 0;color:var(--muted);font-size:.85rem}.review-toolbar label{display:flex;align-items:center;gap:8px;color:var(--ink);font-weight:700}.handwriting-review-list{display:grid;gap:14px}.import-review-card{border:1px solid var(--line);border-radius:16px;padding:15px;background:#fff}.import-review-card.needs-review{border:2px solid #b94141;background:#fffafa}.import-review-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.import-review-head>div{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.import-select-label{display:flex;align-items:center;gap:8px}.confidence-chip{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eaf7ef;color:#21643d;font-size:.72rem;font-weight:800}.confidence-chip.medium{background:#fff2d7;color:#855400}.confidence-chip.low{background:#ffe1e1;color:#962b2b}.source-transcription{margin:12px 0;padding:12px;border-radius:12px;background:#f4f6f5;border-left:4px solid #6f8f84}.source-transcription strong{display:block;font-size:.8rem;color:#39564d}.source-transcription blockquote,.handwriting-source-notice blockquote{margin:8px 0 0;padding:0;font-style:italic;color:#33463f;line-height:1.5}.review-reasons{padding:10px 12px;border-radius:10px;background:#fff0f0;color:#842d2d;font-size:.84rem}.import-review-card details{margin-top:12px}.import-review-card summary{cursor:pointer;font-weight:800;color:#234d41;padding:7px 0}.import-field-grid{padding-top:10px}.handwriting-source-notice{border-color:#c8b28d;background:#fffaf0}.source-summary-block{margin-top:14px;padding:12px 14px;border-radius:12px;background:#f6f8f7}.source-summary-block p{margin:.5rem 0;line-height:1.5}
@media(max-width:760px){.import-summary-card{grid-template-columns:1fr}.import-summary-metrics{justify-content:flex-start}.review-toolbar{align-items:flex-start;flex-direction:column}.document-file-card{grid-template-columns:50px 1fr auto}.document-thumb{width:50px;height:50px}}


/* RackVerity dedicated racking-only refinements */
.rack-brand-mark { background: linear-gradient(145deg,#f5b942,#d98517); color:#10231f; }
.rack-hero { background: radial-gradient(circle at 85% 20%,rgba(245,185,66,.25),transparent 28%),linear-gradient(135deg,#10231f,#1b4439 68%,#255d4e); }
.risk-metric.red { border-top:4px solid #b91c1c; }
.risk-metric.amber { border-top:4px solid #d97706; }
.risk-metric.red strong { color:#991b1b; }
.risk-metric.amber strong { color:#b45309; }
.report-type-icon { background:#eaf4f0; color:#173a31; }
@media (max-width:760px){.hero-card.rack-hero{padding:22px}.hero-copy h2{font-size:1.55rem}.metrics-row{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v0.6.0 regulations, guidance and safety controls */
.guidance-hero{background:linear-gradient(135deg,#10231f,#214d41)}
.guidance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.guidance-card{border:1px solid var(--line);border-radius:16px;padding:18px;background:#fff;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.guidance-card-head{display:flex;flex-direction:column;gap:9px}.guidance-card h3{margin:0}.guidance-card p{margin:0;color:var(--muted);line-height:1.55}
.rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.rule-grid article{border:1px solid var(--line);border-radius:14px;padding:16px;background:var(--soft)}.rule-grid p{margin:.45rem 0 0;color:var(--muted);line-height:1.5}
.notice.success{background:#eaf6ef;border-color:#a7d7b8;color:#174e2a}
.safety-warning-card{border-color:#e4a5a5!important;background:#fff7f7!important}.compact-list{padding-left:18px;margin:8px 0 0}.compact-list li{margin:5px 0}
.finding-overdue{border-color:#c04b4b!important;box-shadow:0 0 0 2px rgba(192,75,75,.08)}
.repair-subheading{border-top:1px solid var(--line);padding-top:18px;margin-top:8px}.repair-subheading span{display:block;color:var(--muted);font-size:.85rem;margin-top:4px}
.repair-evidence-block{margin-top:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f7faf8}.repair-evidence-block>strong{display:block;margin-bottom:10px}
.report-note{font-size:.78rem;color:#5d6d66;line-height:1.55;border-left:3px solid #d6a33f;padding-left:10px}.report-amber-section{border-left:5px solid #d69b2d;padding-left:16px}
@media(max-width:900px){.guidance-grid,.rule-grid{grid-template-columns:1fr}}

/* v3.1.0 mixed-orientation professional report renderer */
.report-modal{width:98vw!important;max-width:98vw!important;height:96vh;max-height:96vh!important;display:flex;flex-direction:column;overflow:hidden;border-radius:18px}
.report-modal.report-fullscreen{position:fixed;inset:0;width:100vw!important;max-width:100vw!important;height:100vh;max-height:100vh!important;border-radius:0}
.report-modal .modal-head{flex:0 0 auto}
.report-modal .modal-body{flex:1 1 auto;min-height:0;overflow:auto;padding:0}
.report-modal .modal-foot{flex:0 0 auto}
.report-preview-toolbar{align-items:center}
.report-preview-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.report-preview-actions .button{padding:8px 11px}
.report-zoom-label{min-width:48px;text-align:center;font-weight:800;font-size:.8rem;color:var(--muted)}
.report-print-footer{align-items:center;justify-content:space-between}
.report-print-footer>span{font-size:.75rem;color:var(--muted);line-height:1.4}
.report-print-footer>div{display:flex;gap:8px;flex-wrap:wrap}
.report-preview-shell{background:#cfd7d3;padding:28px;overflow:auto}
.report-document{--report-zoom:.72;zoom:var(--report-zoom);display:grid;gap:28px;justify-items:center;width:max-content;min-width:100%;margin:0 auto;padding-bottom:24px}
.report-page{position:relative;box-sizing:border-box;background:#fff;color:#17221e;box-shadow:0 20px 60px rgba(16,35,31,.22);overflow:hidden;display:flex;flex-direction:column;font-size:12px;line-height:1.42}
.report-page.portrait{width:794px;min-height:1123px;padding:42px 48px 46px}
.report-page.landscape{width:1123px;min-height:794px;padding:34px 42px 40px}
.report-page-content{flex:1;min-height:0}
.report-header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;border-bottom:4px solid #173a31;padding-bottom:15px;margin-bottom:16px}
.report-header.compact{border-bottom-width:2px;padding-bottom:10px;margin-bottom:14px}
.report-header.compact .report-logo-mark{width:36px;height:36px;border-radius:9px}
.report-header.compact .report-logo strong{font-size:.95rem}
.report-header.compact .report-logo span{font-size:.65rem}
.report-header.compact .report-title h1{font-size:1.1rem}
.report-header.compact .report-title p{font-size:.72rem}
.report-logo-image{max-width:150px;max-height:58px;object-fit:contain}
.report-header.compact .report-logo-image{max-width:110px;max-height:38px}
.report-page .report-title h1{font-size:1.65rem;margin:0 0 4px}
.report-page .report-title p{font-size:.78rem}
.report-page .report-status-banner{margin:14px 0 16px;padding:11px 13px}
.report-status-banner.warning{background:#fff4d8;border-left-color:#c27a13;color:#734709}
.report-page .report-section{margin-top:16px}
.report-page .report-section-first{margin-top:0}
.report-page .report-section h2,.report-evidence-heading h2{font-size:.95rem;letter-spacing:.075em;margin:0 0 10px;padding-bottom:7px;border-bottom:1px solid #cfd9d4;text-transform:uppercase}
.report-page .report-summary{font-size:.8rem;line-height:1.55;margin:7px 0}
.report-preserve-lines{white-space:normal}
.report-page .report-detail-grid{gap:6px 22px}
.report-page .report-detail-grid-compact{gap:5px 20px}
.report-page .report-detail{grid-template-columns:116px minmax(0,1fr);gap:7px;font-size:.74rem;line-height:1.35;min-width:0}
.report-page .report-detail strong{overflow-wrap:anywhere}
.report-page .report-note{margin-top:10px;border-left:4px solid #d6a72f;background:#fff9e8;padding:9px 11px;font-size:.7rem;line-height:1.45;color:#665528}
.report-final-note{margin-top:28px!important}
.report-metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.report-metric{border:1px solid #cfd9d4;border-radius:9px;padding:11px 12px;background:#f7faf8}
.report-metric span{display:block;color:#64716b;font-size:.68rem;text-transform:uppercase;letter-spacing:.04em}
.report-metric strong{display:block;font-size:1.55rem;margin-top:4px}
.report-metric.red{border-top:4px solid #b91c1c}.report-metric.red strong{color:#991b1b}
.report-metric.amber{border-top:4px solid #d97706}.report-metric.amber strong{color:#a95b05}
.report-metric.green{border-top:4px solid #2f7d4a}.report-metric.green strong{color:#23633a}
.report-page .report-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:8.7pt;line-height:1.22;color:#17221e}
.report-page .report-table th,.report-page .report-table td{border:1px solid #bdc9c3;padding:6px 7px;vertical-align:top;text-align:left;overflow-wrap:anywhere}
.report-page .report-table th{background:#e7eeea;font-size:7.6pt;letter-spacing:.035em;text-transform:uppercase;font-weight:900}
.report-page .report-table tbody tr:nth-child(even) td:not(.risk-cell){background:#fafcfb}
.report-page .report-table small{display:block;margin-top:4px;font-size:6.8pt;color:#67746e;line-height:1.25}
.report-check-table{font-size:8.4pt!important}
.report-check-table th:first-child{width:58%}
.check-result{font-weight:800}
.check-result.yes{color:#245e38;background:#edf8f1!important}
.check-result.partial{color:#83520b;background:#fff7e2!important}
.check-result.no{color:#8e2525;background:#fff0f0!important}
.check-result.not_checked{color:#59645f;background:#f1f4f2!important}
.report-table-intro{font-size:8pt;line-height:1.45;margin:0 0 10px}
.report-register-table .col-number{width:4%}.report-register-table .col-location{width:19%}.report-register-table .col-component{width:14%}.report-register-table .col-position{width:10%}.report-register-table .col-risk{width:7%}.report-register-table .col-issue{width:14%}.report-register-table .col-action{width:22%}.report-register-table .col-status{width:10%}
.report-action-table .col-number{width:4%}.report-action-table .col-location{width:20%}.report-action-table .col-risk{width:7%}.report-action-table .col-component{width:14%}.report-action-table .col-action-wide{width:25%}.report-action-table .col-responsible{width:12%}.report-action-table .col-target{width:10%}.report-action-table .col-status{width:8%}
.row-number{text-align:center!important;font-weight:900}
.location-cell strong,.location-cell span{display:block}
.location-cell strong{font-size:8.2pt;margin-bottom:2px}
.location-cell span{font-size:7.4pt;color:#52615a;line-height:1.25;margin-top:2px}
.risk-cell{padding:0!important;text-align:center!important;vertical-align:middle!important;color:#fff;font-weight:900;letter-spacing:.04em;white-space:nowrap;overflow:hidden!important}
.risk-cell span{display:flex;align-items:center;justify-content:center;min-height:36px;padding:5px 3px;font-size:7.7pt;line-height:1;writing-mode:horizontal-tb!important;transform:none!important}
.risk-cell.risk-red{background:#b91c1c!important}.risk-cell.risk-amber{background:#d97706!important}.risk-cell.risk-green{background:#2f7d4a!important}.risk-cell.risk-unclassified{background:#4b647b!important}
.report-red-section{border:2px solid #b91c1c;background:#fffafa;padding:12px}
.report-amber-section{border:1px solid #d69a2e;background:#fffaf0;padding:12px}
.report-evidence-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:14px}
.report-evidence-heading small{display:block;color:#65716c;margin-bottom:4px;font-size:.68rem}
.report-evidence-heading h2{font-size:1.02rem;text-transform:none;letter-spacing:0;margin:0;border-bottom:0;padding:0}
.risk-badge{min-width:78px;border-radius:999px;padding:7px 10px;text-align:center;color:#fff;font-size:.72rem;font-weight:900;letter-spacing:.06em;white-space:nowrap}
.risk-badge.risk-red{background:#b91c1c}.risk-badge.risk-amber{background:#d97706}.risk-badge.risk-green{background:#2f7d4a}.risk-badge.risk-unclassified{background:#4b647b}
.report-evidence-notes{margin-top:12px;padding:10px 12px;border:1px solid #d5ded9;background:#fafcfb;border-radius:8px;font-size:.77rem;line-height:1.48}
.report-evidence-notes p{margin:4px 0}
.report-page .report-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
.report-page .report-photo{margin:0;border:1px solid #cbd6d0;border-radius:8px;overflow:hidden;background:#fff}
.report-page .report-photo img{height:205px;width:100%;display:block;object-fit:contain;background:#e9eeeb}
.report-page .report-photo figcaption{display:block;padding:7px 9px;font-size:.67rem;color:#5c6963;line-height:1.35}
.report-evidence-photo-page .report-photo img{height:300px}
.report-no-photo{margin-top:16px;border:1px dashed #a9b7b0;background:#f6f9f7;border-radius:8px;padding:18px;text-align:center;color:#66726c;font-size:.76rem}
.report-page .report-signoff{margin-top:44px}
.report-page-footer{position:absolute;left:48px;right:48px;bottom:18px;border-top:1px solid #d5ddd9;padding-top:7px;display:grid;grid-template-columns:1fr auto 1fr;gap:14px;font-size:6.5pt;color:#68746e;align-items:center}
.report-page.landscape .report-page-footer{left:42px;right:42px}
.report-page-footer span:nth-child(2){text-align:center;font-weight:800;color:#45534c}
.report-page-footer span:last-child{text-align:right}

@media(max-width:820px){
  .report-preview-actions .button:not([data-action="report-fit"]){display:none}
  .report-print-footer>span{display:none}
  .report-print-footer{justify-content:flex-end}
}

@page portrait-report{size:A4 portrait;margin:0}
@page landscape-report{size:A4 landscape;margin:0}
@media print{
  html,body{margin:0!important;padding:0!important;background:#fff!important}
  body *{visibility:hidden!important}
  #modalRoot,#modalRoot *{visibility:visible!important}
  #modalRoot{position:absolute!important;left:0!important;top:0!important;width:100%!important}
  .modal-backdrop{position:static!important;display:block!important;background:#fff!important;padding:0!important;backdrop-filter:none!important}
  .report-modal{display:block!important;position:static!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:visible!important;border-radius:0!important;box-shadow:none!important}
  .report-modal .modal-head,.report-modal .modal-foot{display:none!important}
  .report-modal .modal-body{display:block!important;overflow:visible!important;padding:0!important}
  .report-preview-shell{display:block!important;padding:0!important;background:#fff!important;overflow:visible!important}
  .report-document{display:block!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important;zoom:1!important}
  .report-page{box-shadow:none!important;margin:0!important;break-after:page;page-break-after:always;overflow:hidden!important}
  .report-page:last-child{break-after:auto;page-break-after:auto}
  .report-page.portrait{page:portrait-report;width:210mm!important;height:297mm!important;min-height:297mm!important;padding:11mm 13mm 13mm!important}
  .report-page.landscape{page:landscape-report;width:297mm!important;height:210mm!important;min-height:210mm!important;padding:9mm 11mm 11mm!important}
  .report-page-footer{left:13mm!important;right:13mm!important;bottom:5mm!important}
  .report-page.landscape .report-page-footer{left:11mm!important;right:11mm!important}
  .report-page .report-photo img{height:52mm!important}
  .report-evidence-photo-page .report-photo img{height:78mm!important}
  .report-page .report-table{font-size:8.5pt!important}
  .report-page .report-table th{font-size:7.4pt!important}
  a[href]::after{content:none!important}
}

/* v3.1.0 rack profiles, quick picks and report layout */
.rack-profile-register-card{border-top:4px solid #173f36}.rack-profile-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:16px}.rack-profile-mini{display:grid;grid-template-columns:125px 1fr;border:1px solid #d8e5df;border-radius:15px;overflow:hidden;background:#fbfdfc}.rack-profile-mini-image{background:linear-gradient(145deg,#173f36,#356b5d);display:grid;place-items:center;min-height:180px}.rack-profile-mini-image img{width:100%;height:100%;object-fit:cover}.rack-profile-mini-image span{font-size:26px;font-weight:900;color:#f4b93e}.rack-profile-mini>div:last-child{padding:15px}.rack-profile-mini h4{font-size:22px;margin:.2rem 0;color:#12392f}.rack-profile-mini p{line-height:1.5}.rack-profile-mini .client-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.layout-summary-strip{margin-top:14px;padding:12px 14px;border-radius:10px;background:#eef6f2;color:#31594d;border:1px solid #d2e4dc}.rack-profile-modal-section{border:1px solid #dbe7e2;background:#f7faf9;border-radius:13px;padding:16px;margin-bottom:14px}.rack-profile-modal-section h3{margin:0 0 12px;color:#12392f}.report-rack-profile-layout{display:grid;grid-template-columns:1.35fr .65fr;gap:7mm}.report-profile-key-grid{display:grid;grid-template-columns:1fr 1fr;border:1px solid #cfdad6;border-radius:3mm;overflow:hidden}.report-profile-key-grid>div{padding:2.4mm 3mm;border-right:1px solid #dce5e1;border-bottom:1px solid #dce5e1;min-height:13mm}.report-profile-key-grid>div:nth-child(even){border-right:0}.report-profile-key-grid span{display:block;font-size:7pt;text-transform:uppercase;letter-spacing:.05em;color:#657a72}.report-profile-key-grid strong{display:block;margin-top:1.2mm;font-size:9pt;color:#173a31}.report-rack-profile-photo{border:1px solid #cfdad6;border-radius:3mm;overflow:hidden;min-height:115mm;background:#eef3f1;display:grid;place-items:center;color:#6f827b;text-align:center}.report-rack-profile-photo img{width:100%;height:100%;object-fit:cover}.report-layout-plan{position:relative;height:130mm;border:1px solid #bfcfc9;border-radius:3mm;overflow:hidden;background-color:#fff;background-image:linear-gradient(#edf3f0 1px,transparent 1px),linear-gradient(90deg,#edf3f0 1px,transparent 1px);background-size:5mm 5mm}.report-layout-object{position:absolute;border:1.2pt solid #173f36;background:#e1eee9;display:grid;place-items:center;transform-origin:center}.report-layout-object span{font-size:7pt;font-weight:800;text-align:center}.report-layout-wall{background:#263d37}.report-layout-aisle{background:#edf4f7;border-style:dashed}.report-layout-hazard{background:#fff1c9}.report-layout-marker{position:absolute;width:7mm;height:7mm;border-radius:50%;transform:translate(-50%,-50%);display:grid;place-items:center;color:#fff;font-size:6pt;font-weight:900;border:1mm solid #fff}.report-layout-marker.red{background:#c93434}.report-layout-marker.amber{background:#d88a11}.report-layout-marker.green{background:#16895d}.report-layout-marker.repaired{background:#3f6f98}.report-layout-legend{display:flex;gap:6mm;margin-top:3mm;font-size:8pt}.report-layout-legend span:before{content:"";display:inline-block;width:3mm;height:3mm;border-radius:50%;margin-right:1.5mm}.report-layout-legend .red:before{background:#c93434}.report-layout-legend .amber:before{background:#d88a11}.report-layout-legend .green:before{background:#16895d}.report-layout-legend .repaired:before{background:#3f6f98}
@media(max-width:900px){.rack-profile-mini-grid{grid-template-columns:1fr}.rack-profile-mini{grid-template-columns:105px 1fr}.rack-profile-mini-image{min-height:160px}}
@media(max-width:560px){.rack-profile-mini{grid-template-columns:1fr}.rack-profile-mini-image{height:150px}.rack-profile-modal-section{padding:12px}.report-rack-profile-layout{grid-template-columns:1fr}}
/* v3.1.0 professional building/rack-bank report layout */
.report-layout-rack{background:#e0eee9!important;overflow:hidden}.report-layout-rack>b{position:absolute;inset:1mm;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(100% / var(--report-rack-bays) - .35mm),#6c8c82 calc(100% / var(--report-rack-bays) - .35mm),#6c8c82 calc(100% / var(--report-rack-bays)))}.report-layout-rack-bank{display:grid!important;grid-template-rows:repeat(var(--report-rack-rows),minmax(.7mm,1fr));gap:.35mm;padding:.7mm}.report-layout-rack-bank>i{display:block;border:.25mm solid #173f36;background:repeating-linear-gradient(90deg,#e0eee9 0,#e0eee9 calc(100% / var(--report-rack-bays) - .25mm),#6c8c82 calc(100% / var(--report-rack-bays) - .25mm),#6c8c82 calc(100% / var(--report-rack-bays)))}.report-layout-rack-bank>span,.report-layout-rack>span{position:relative;z-index:2;background:rgba(255,255,255,.78);padding:.4mm 1mm;border-radius:1mm}.report-layout-door{background:#f8ebd1!important;border-color:#a97b27!important}.report-layout-loading_bay{background:repeating-linear-gradient(0deg,#e7f0f5 0,#e7f0f5 1mm,#9bb6c7 1mm,#9bb6c7 1.4mm)!important}.report-layout-fire_exit{background:#dff4e8!important;border-color:#16895d!important}.report-layout-dimension{background:transparent!important;border-top:1px solid #3a5c52!important;border-left:0!important;border-right:0!important;border-bottom:0!important}.report-layout-north{background:transparent!important;border:0!important;font-size:16pt}.report-layout-wall span{display:none}


/* v3.1.0 unified portal/tablet access */
.field-login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(320px,1.2fr) minmax(320px,.8fr);background:#eef3f0}.field-login-brand{padding:clamp(42px,7vw,96px);background:linear-gradient(145deg,#0f2a24,#173f35);color:#fff;display:flex;flex-direction:column;justify-content:center}.field-login-brand h1{font-size:clamp(2.1rem,4vw,4.7rem);line-height:1.02;max-width:760px;margin:.7rem 0 1.2rem}.field-login-brand>p:not(.eyebrow){max-width:700px;color:#d7e5df;font-size:1.08rem;line-height:1.7}.field-login-points{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.field-login-points span{padding:10px 13px;border-radius:999px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.16)}.field-login-card{align-self:center;margin:clamp(24px,6vw,80px);padding:32px;border-radius:24px;background:#fff;box-shadow:0 28px 70px rgba(19,54,45,.16)}.field-login-card h2{font-size:1.9rem;margin:.35rem 0 1.4rem}.field-login-card label{display:grid;gap:7px;margin:0 0 16px;font-weight:700;color:#213f37}.field-login-card input{width:100%;min-height:48px;border:1px solid #bccfc8;border-radius:10px;padding:11px 13px;font:inherit}.field-login-status{min-height:24px;color:#9c272b;font-weight:700}.field-organisation-choices{display:grid;gap:10px;margin:18px 0}.field-organisation-choice{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:12px!important;padding:14px;border:1px solid #cfddd8;border-radius:12px}.field-organisation-choice span{display:grid;gap:3px}.field-organisation-choice small{font-weight:500;color:#688078}.cloud-banner{padding:10px 14px;border-radius:12px;background:#e6f3ed;border:1px solid #bbd9cd;color:#173f35}.hidden{display:none!important}@media(max-width:820px){.field-login-shell{grid-template-columns:1fr}.field-login-brand{padding:36px 24px}.field-login-card{margin:24px}.field-login-brand h1{font-size:2.35rem}}

/* v3.1.0 compact tablet/desktop density with touch-safe field controls */
@media (min-width:821px){
  :root{--radius:16px;--radius-sm:10px}
  .app-shell{grid-template-columns:238px minmax(0,1fr)}
  .sidebar{padding:18px 14px}.brand-block{padding:0 6px 18px}.brand-mark{width:40px;height:40px;border-radius:11px}
  .nav-list{gap:4px}.nav-item{padding:9px 10px;border-radius:10px}
  .topbar{padding:18px 28px 15px}.topbar h1{font-size:1.45rem}
  .page-content{max-width:1680px;padding:20px 28px 36px}
  .button{padding:9px 13px;border-radius:10px;min-height:36px}.icon-button{width:38px;height:38px}
  .dashboard-grid{gap:14px}.hero-card{padding:24px;border-radius:19px;gap:20px}.hero-copy h2{margin:8px 0 11px}.hero-actions{margin-top:14px}
  .hero-metric{padding:16px;border-radius:15px}.hero-metric strong{font-size:2.8rem;margin:7px 0}
  .metrics-row{gap:10px}.metric-card{padding:15px}.metric-card strong{font-size:1.7rem;margin:5px 0 3px}
  .panel-card{padding:16px}.panel-heading{margin-bottom:12px}.panel-heading h3{font-size:1.12rem}
  .recent-panel,.report-pack-panel{min-height:0}
  .report-list,.pack-grid,.section-grid{gap:8px}.report-row,.pack-card{padding:10px;border-radius:11px}
  .report-type-icon{width:40px;height:40px}.pack-icon{width:38px;height:38px}
  .section-grid{gap:12px}.toolbar{gap:7px}.search-input{padding:8px 10px;min-height:36px}
  .data-table th,.data-table td{padding:10px 12px}
  .form-shell{grid-template-columns:minmax(0,1fr) 280px;gap:13px}.form-main,.form-side{gap:10px}
  .form-card{padding:15px;border-radius:14px}.form-card>.help{margin-bottom:11px;line-height:1.4}
  .field-grid{gap:9px}.field{gap:4px}.field label{font-size:.74rem}
  .field input,.field textarea,.field select{padding:8px 10px;min-height:36px;border-radius:9px}
  .field textarea{min-height:82px;line-height:1.4}
  .form-actions{gap:7px}.sticky-card{top:92px}
  .summary-stat-grid{gap:6px}.summary-stat{padding:9px}.progress-list{gap:8px;margin-top:10px}
  .finding-list{gap:8px}.finding-card{padding:11px;border-radius:12px}.finding-meta{margin-top:7px}
  .photo-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:7px;margin-top:8px}
  .ai-box,.repair-evidence-block{padding:10px}
  .modal{border-radius:17px}.modal-head{padding:14px 16px}.modal-body{padding:16px}.modal-foot{padding:13px 16px}
  .client-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:9px}.client-card{padding:13px;border-radius:13px}.client-actions{margin-top:10px}
  .backup-grid{gap:12px}.backup-card{padding:17px;border-radius:14px}.drop-zone{padding:17px}
  .guidance-grid,.rule-grid{gap:10px}.guidance-card,.rule-grid article{padding:13px}
  .rack-profile-mini-grid{gap:9px;margin-top:10px}.rack-profile-mini>div:last-child{padding:11px}.rack-profile-modal-section{padding:12px;margin-bottom:9px}
}
@media (min-width:1200px){
  .field-grid:not(.single){grid-template-columns:repeat(3,minmax(0,1fr))}
  .field-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:820px){
  .page-content{padding:14px 12px 28px}.topbar{padding:14px 12px}.panel-card,.form-card{padding:14px}
  .section-grid,.form-main,.form-side{gap:10px}.metrics-row{gap:8px}.metric-card{padding:13px}
  .field input,.field textarea,.field select,.search-input{min-height:44px;padding:10px 11px}
  .field textarea{min-height:92px}.button{min-height:42px;padding:9px 12px}
}
@media (min-width:821px){.field-login-card{padding:24px;border-radius:18px}.field-login-card input{min-height:40px;padding:9px 11px}.field-login-card label{margin-bottom:11px}}

/* v3.1.0 real tablet activation and company context */
.field-login-card select{width:100%;min-height:48px;border:1px solid #bccfc8;border-radius:10px;padding:11px 13px;font:inherit;background:#fff}
#fieldCompanyContext{display:block;margin-top:3px;color:#b9ccc5;line-height:1.35}
@media(min-width:821px){.field-login-card select{min-height:40px;padding:9px 11px}}


/* v2.8 unified portal / Windows tablet inspection workspace */
body.embedded-inspection{background:#eef3f1;overflow:hidden}body.embedded-inspection .field-login-shell{min-height:100vh;padding:28px}body.embedded-inspection .field-login-brand{display:none}body.embedded-inspection .field-login-card{margin:auto}body.embedded-inspection .app-shell{display:block;min-height:100vh}body.embedded-inspection .sidebar{display:none}body.embedded-inspection .main-panel{margin:0;width:100%;height:100vh;overflow:hidden}body.embedded-inspection .topbar{display:none}body.embedded-inspection .page-content{height:100vh;overflow:auto;padding:14px 18px 42px}body.embedded-inspection .form-shell{max-width:none;margin:0;grid-template-columns:minmax(0,1fr) 310px}body.embedded-inspection .form-card{padding:16px}body.embedded-inspection .field-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 12px}body.embedded-inspection .toolbar{position:sticky;top:-14px;z-index:12;background:#f6f8f7;border:1px solid #d7e1dd;border-radius:10px;padding:10px 12px;margin-bottom:10px}body.embedded-inspection .form-side{position:sticky;top:8px;align-self:start}@media(max-width:1050px){body.embedded-inspection .form-shell{grid-template-columns:1fr}body.embedded-inspection .form-side{position:static}body.embedded-inspection .field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:680px){body.embedded-inspection .page-content{padding:8px}body.embedded-inspection .field-grid{grid-template-columns:1fr}}


/* v3.1.0 working tablet inputs and local-draft feedback */
input:not(:disabled),select:not(:disabled),textarea:not(:disabled){pointer-events:auto!important;touch-action:manipulation;-webkit-user-select:text;user-select:text}
input:not(:disabled),textarea:not(:disabled){cursor:text}select:not(:disabled){cursor:pointer}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(20,112,91,.28);outline-offset:1px;border-color:#14705b!important}
.editor-draft-status{margin:0 0 10px;padding:7px 9px;border-radius:7px;background:#e8f4ee;color:#17674f;font-size:12px;font-weight:700}.editor-draft-status[data-state="dirty"]{background:#fff2d9;color:#8d5900}

/* v3.2.1 inspection-first workflow and progressive racking details */
.inspection-stepper{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 8px 24px rgba(16,35,31,.045)}
.inspection-step{display:flex;align-items:center;gap:8px;min-width:0;padding:10px;border:1px solid transparent;border-radius:11px;background:#f3f7f5;color:#52645d;text-align:left;font-weight:800}
.inspection-step span{width:28px;height:28px;flex:0 0 28px;border-radius:50%;display:grid;place-items:center;background:#dce8e3;color:#24483d;font-size:.78rem}
.inspection-step b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8rem}
.inspection-step:hover{border-color:#b7cbc2;background:#edf4f1}
.inspection-step.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.inspection-step.active span{background:var(--accent);color:#34230a}
.inspection-step.complete:not(.active) span{background:#d9f0e5;color:var(--good)}
.inspection-step-panel{display:none!important}
.inspection-step-panel.is-active{display:block!important}
.inspection-details{padding:0;overflow:hidden}
.inspection-details>summary,.defect-progressive-details>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;cursor:pointer;color:var(--brand)}
.inspection-details>summary::-webkit-details-marker,.defect-progressive-details>summary::-webkit-details-marker{display:none}
.inspection-details>summary:after,.defect-progressive-details>summary:after{content:'＋';font-size:1.2rem;font-weight:900}
.inspection-details[open]>summary:after,.defect-progressive-details[open]>summary:after{content:'−'}
.inspection-details>summary span,.defect-progressive-details>summary span{display:grid;gap:3px}
.inspection-details>summary small,.defect-progressive-details>summary small{color:var(--muted);font-weight:600}
.inspection-details>summary~*{margin-left:18px;margin-right:18px}
.inspection-details>summary~*:last-child{margin-bottom:18px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.inspection-step-navigation{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:center;padding:13px 15px;border-radius:14px;background:#fff;border:1px solid var(--line);position:sticky;bottom:10px;z-index:8;box-shadow:0 14px 34px rgba(16,35,31,.12)}
.inspection-step-navigation>div{display:grid;text-align:center;gap:2px}.inspection-step-navigation small{color:var(--muted)}.inspection-step-navigation>.button:last-child{justify-self:end}
.report-step-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}
.no-defects-confirm{display:flex;align-items:flex-start;gap:11px;padding:14px;margin-top:14px;border:1px solid #c9d8d2;border-radius:12px;background:#f7faf9;cursor:pointer}
.no-defects-confirm input{width:20px;height:20px;margin:1px 0 0;accent-color:var(--good)}
.no-defects-confirm span{display:grid;gap:3px}.no-defects-confirm small{color:var(--muted);line-height:1.4}
.defect-form-section{padding:14px 0;border-bottom:1px solid var(--line)}.defect-form-section:first-of-type{padding-top:0}.defect-form-section h3{margin:0 0 13px}
.defect-progressive-details{margin-top:13px;border:1px solid var(--line);border-radius:13px;background:#fbfcfc;overflow:hidden}
.defect-progressive-details .details-grid{padding:0 15px 15px}
.defect-progressive-details .notice{margin:0 15px 15px}
.repair-verification-details{border-color:#e1cfaa;background:#fffdfa}
.modal-body>.defect-form-section .photo-input-wrap,.modal-body>.defect-form-section [data-photo-input]{grid-column:1/-1}
@media(max-width:1000px){.inspection-stepper{grid-template-columns:repeat(5,1fr)}.inspection-step b{font-size:0}.inspection-step b:after{content:attr(data-short)}.inspection-step{justify-content:center;padding:9px}.inspection-step-navigation{bottom:4px}}
@media(max-width:680px){.inspection-stepper{gap:4px;padding:6px}.inspection-step{padding:7px 4px;justify-content:center}.inspection-step span{width:25px;height:25px;flex-basis:25px}.inspection-step b{display:none}.inspection-step-navigation{grid-template-columns:1fr 1fr}.inspection-step-navigation>div{display:none}.inspection-step-navigation .button{width:100%}.inspection-details>summary,.defect-progressive-details>summary{padding:14px}.inspection-details>summary~*{margin-left:14px;margin-right:14px}}
