:root{font:16px system-ui,sans-serif;color:#193247;background:#f4f7fa}*{box-sizing:border-box}body{margin:0}main{max-width:880px;margin:auto;padding:24px}header{display:flex;align-items:center;gap:16px;flex-wrap:wrap}h1{font-size:clamp(24px,5vw,36px);margin:0 0 20px}h2{font-size:21px}.eyebrow{width:100%;color:#51687d;font-size:13px;text-transform:uppercase;letter-spacing:.08em}form,.record{background:white;border:1px solid #dce5ed;padding:20px;border-radius:14px;margin:16px 0}label{display:block;margin:12px 0;font-weight:600}input,select{width:100%;padding:12px;border:1px solid #a9b9c7;border-radius:8px;font:inherit;margin-top:7px}button{padding:12px 18px;border:0;border-radius:8px;background:#126650;color:white;font:inherit;cursor:pointer;margin:4px 4px 4px 0}.secondary{background:#e6eef4;color:#193247}.summary{display:flex;flex-wrap:wrap;gap:8px}.pill{padding:10px 14px;border-radius:10px;background:#e5eef5}.record p{overflow-wrap:anywhere}.record h3{margin:0}#notice{color:#9d352a;white-space:pre-wrap}[hidden]{display:none!important}input:focus,select:focus,button:focus-visible{outline:3px solid #75b7ee;outline-offset:2px}@media(max-width:500px){main{padding:14px}form,.record{padding:14px}}

#templateNav{display:flex;gap:.5rem;flex-wrap:wrap;margin:0 0 1rem}.nav-item{padding:.45rem .7rem;border:1px solid #d9dee7;border-radius:.45rem;background:#fff}.template-context{margin:0 0 1rem;padding:1rem;border:1px solid #d9dee7;border-radius:.65rem}.template-context h2{margin-top:0}.template-context p{margin:.35rem 0}

/* Stable module mounting zones. FeudFix placement is the reference geometry. */
.assistant-slot{position:fixed;right:1.25rem;bottom:1.25rem;z-index:60}.floating-helper-slot{position:fixed;left:1.5rem;top:5.5rem;z-index:60;width:280px}.sidebar-slot{position:fixed;right:0;top:0;height:100vh;z-index:50}

.module-zone:empty{display:none}.module-card{padding:1rem;margin:.75rem 0;border:1px solid #d9dee7;border-radius:.65rem;background:#fff}.header-actions{display:flex;justify-content:flex-end;gap:.5rem}.dashboard-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem}.floating-module{position:relative;box-shadow:0 8px 28px rgba(0,0,0,.16)}.module-close{position:absolute;right:.35rem;top:.25rem;padding:.15rem .45rem}
#dashboardGrid{margin:1rem 0}.grid-stack-item-content{background:#fff;border:1px solid #d9dee7;border-radius:.65rem;padding:1rem;overflow:hidden}.grid-stack-item-content strong{display:block;font-size:2rem;margin-top:.5rem}#statusChart{min-height:85px}.status-bar-row{display:grid;grid-template-columns:minmax(70px,auto) 1fr auto;gap:.5rem;align-items:center;margin:.3rem 0}.status-bar-label{font-size:.85rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-bar-track{height:.55rem;background:#e6eef4;border-radius:99px;overflow:hidden}.status-bar-fill{display:block;height:100%;background:#126650;border-radius:99px}.status-bar-count{font-size:.85rem;min-width:1.5rem;text-align:right}#records{margin:1rem 0}
.module-map,.module-workflow{height:320px}.sidebar-slot:not([hidden]){display:block}.assistant-slot:not([hidden]),.floating-helper-slot:not([hidden]){display:block}

/* Mobile presentation variants: same app/data/workflows, phone-specific presentation. */
body[data-presentation="mobile"] main{max-width:none;padding:12px 12px calc(24px + env(safe-area-inset-bottom))}
body[data-presentation="mobile"] header{gap:8px;padding-top:env(safe-area-inset-top)}
body[data-presentation="mobile"] header h1{font-size:1.55rem;margin:0 0 8px;flex:1 1 100%}
body[data-presentation="mobile"] .eyebrow{font-size:11px;margin-bottom:0}
body[data-presentation="mobile"] #templateNav{display:flex;flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding:.25rem 0 .65rem;margin:0;gap:.4rem}
body[data-presentation="mobile"] #templateNav::-webkit-scrollbar{display:none}
body[data-presentation="mobile"] .nav-item{flex:0 0 auto;padding:.5rem .7rem;border-radius:999px;font-size:.9rem;white-space:nowrap}
body[data-presentation="mobile"] .nav-item-primary{background:#126650;color:#fff;border-color:#126650}
body[data-presentation="mobile"] .template-context{padding:.7rem .8rem;margin:0 0 .75rem}
body[data-presentation="mobile"] .template-context h2{font-size:1rem;margin:0}
body[data-presentation="mobile"] .mobile-focus{margin:.25rem 0 0;font-size:.86rem;color:#526779}
body[data-presentation="mobile"] #dashboardGrid{display:grid;grid-template-columns:1fr;gap:.6rem;margin:.65rem 0}
body[data-presentation="mobile"] .grid-stack-item{position:static!important;width:auto!important;height:auto!important;transform:none!important}
body[data-presentation="mobile"] .grid-stack-item-content{position:static!important;min-height:auto;padding:.8rem}
body[data-presentation="mobile"] #records{display:block;margin:.65rem 0}
body[data-presentation="mobile"] .record{margin:.65rem 0;padding:14px;border-radius:12px}
body[data-presentation="mobile"] .record dl{grid-template-columns:1fr;gap:.1rem}
body[data-presentation="mobile"] .record dt{margin-top:.45rem}
body[data-presentation="mobile"] form{padding:14px;margin:.75rem 0}
body[data-presentation="mobile"] input,body[data-presentation="mobile"] select{font-size:16px;min-height:48px}
body[data-presentation="mobile"] #editor>button,body[data-presentation="mobile"] .field-action,body[data-presentation="mobile"] .field-controls button{width:100%;min-height:52px}
body[data-presentation="mobile"] .summary{gap:.4rem}
body[data-presentation="mobile"] .pill{padding:.55rem .7rem;font-size:.88rem}
body[data-presentation="mobile"] #statusChart{min-height:0}
body[data-presentation="mobile"] .status-bar-row{grid-template-columns:minmax(64px,auto) 1fr auto}
body[data-presentation="mobile"][data-template="field_service"] .nav-item-primary::before{content:"● ";font-size:.65em}
body[data-presentation="mobile"][data-template="inventory_ops"] .record h3{font-size:1.1rem}
body[data-presentation="mobile"][data-template="customer_portal"] #operationsDashboard{display:none!important}
body[data-presentation="mobile"] .floating-helper-slot{left:.75rem;right:.75rem;top:auto;bottom:.75rem;width:auto;max-width:none}
body[data-presentation="mobile"] .sidebar-slot{left:.5rem;right:.5rem;top:auto;bottom:.5rem;height:auto}

/* Shared Operations desktop layout; dedicated touch-first field workflow. */
.record{min-width:0;overflow-wrap:anywhere}.record dl{display:grid;grid-template-columns:minmax(90px,1fr) 2fr;gap:.25rem .75rem}.record dt{font-weight:700;color:#526779}.record dd{margin:0;overflow-wrap:anywhere}.status-pill{display:inline-block;padding:.5rem .8rem;border-radius:2rem;background:#e2f2e9;color:#17533d;font-weight:700;margin:.4rem 0}.field-controls{display:grid;grid-template-columns:1fr;gap:.5rem;margin:.75rem 0}.field-controls select,.field-action,.field-upload{min-height:56px;font-size:1.05rem}.field-action{width:100%;font-weight:700}.field-upload{display:flex;align-items:center;justify-content:center;border:2px dashed #5c8977;border-radius:12px;padding:12px;cursor:pointer}.field-upload input{margin:0}.field-hint{color:#4d6574}.signature-pad{margin-top:1rem;padding:1rem;border:1px solid #dce5ed;border-radius:12px;background:#f8fbfd}.signature-canvas{display:block;width:100%;height:150px;margin:.5rem 0;border:1px solid #a9b9c7;border-radius:8px;background:white;touch-action:none}.operations-map{height:300px;margin:.75rem 0;border-radius:12px;overflow:hidden}.document-image{display:block;max-width:100%;max-height:480px;object-fit:contain;margin:.75rem 0;border:1px solid #dce5ed}.sync-pending{font-weight:700;color:#80520b}.signature-state{color:#17533d;font-weight:700}#syncState{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;padding:.75rem;background:#fff6dc;border-radius:10px}#login select{min-height:48px}button{min-height:44px}#install{margin-left:auto}.template-context{overflow-wrap:anywhere}@media(min-width:800px){main{max-width:1180px}#records{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:.75rem}.field-controls{grid-template-columns:1fr auto}.field-controls .field-action{width:auto}}

/* First-admin setup help: concise at a glance, details on demand. */
.setup-guide{margin:.75rem 0 1rem;padding:.8rem 1rem;border:1px solid #d9dee7;border-radius:.65rem;background:#f8fbfd}
.setup-guide details{margin:.45rem 0;padding:.45rem 0;border-top:1px solid #e5eaf0}
.setup-guide details:first-of-type{border-top:0}
.setup-guide summary{cursor:pointer;font-weight:700}
.setup-guide p{margin:.4rem 0;line-height:1.45}
@media(max-width:700px){.setup-guide{padding:.7rem}.setup-guide details{padding:.55rem 0}}

:root{--app-accent:#24664b;--app-bg:#f5f8f4;--app-ink:#20362e;--app-soft:#e7f0e8}body{background:var(--app-bg);color:var(--app-ink)}button{background:var(--app-accent)}.secondary{background:var(--app-soft);color:var(--app-ink)}.status-bar-fill{background:var(--app-accent)}
.trial-live-banner{position:sticky;top:0;z-index:999;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 18px;background:#fff6d8;border-bottom:1px solid #dfc873;box-shadow:0 2px 8px rgba(0,0,0,.08)}.trial-banner-copy{display:flex;flex-direction:column;gap:2px}.trial-banner-copy span{font-size:13px}.trial-banner-actions{display:flex;gap:8px}.trial-banner-actions a{padding:9px 14px;border-radius:7px;text-decoration:none;font-weight:700}.trial-buy{background:var(--app-accent);color:white}.trial-edit{background:white;color:var(--app-ink);border:1px solid #b9aa72}@media(max-width:650px){.trial-live-banner{align-items:flex-start;flex-direction:column}.trial-banner-actions{width:100%}.trial-banner-actions a{flex:1;text-align:center}}
.trial-role{width:auto;min-width:135px;margin:0;padding:9px 10px;background:white;color:var(--app-ink);border:1px solid #b9aa72}
