:root{color-scheme:dark;--bg:#071521;--panel:#0d2538;--panel2:#11354f;--input:#082134;--line:#2a4b61;--ink:#f0f8ff;--muted:#b1c8d8;--blue:#54b8f4;--green:#70d7bb;--shadow:0 12px 40px rgba(0,0,0,.23)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5;font-size:16px}
button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation;min-height:47px}button:disabled{opacity:.6;cursor:not-allowed}
a{color:#8ad6ff}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:3px solid #8cdeff;outline-offset:3px}
.hidden{display:none!important}.muted{color:var(--muted)}.eyebrow{letter-spacing:.15em;font-size:.72rem;font-weight:800;color:#8fcee9}
.site-header{height:64px;background:#061522;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(15px,calc((100vw - 1260px)/2));gap:12px;position:sticky;top:0;z-index:3}
.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:#fff}.brand img{width:98px;height:41px;object-fit:contain}.brand-live{font-weight:900;letter-spacing:.1em;font-size:1.16rem;color:#80cfff}.header-actions{display:flex;align-items:center;gap:12px}.environment-tag{color:#acdfff;background:#18445f;border:1px solid #3b7398;border-radius:30px;font-weight:800;font-size:.69rem;letter-spacing:.07em;padding:5px 9px}.version{font-size:.73rem;color:#a0c8dc}
.container{max-width:1240px;margin:0 auto;padding:24px 20px 125px;min-height:calc(100vh - 64px)}
.auth-view{display:flex;justify-content:center;margin:5vh auto}.auth-card{width:min(100%,510px);border-radius:20px;border:1px solid var(--line);background:var(--panel);box-shadow:var(--shadow);padding:30px;display:grid;gap:13px}
.auth-card h1,.welcome h1{font-size:clamp(1.65rem,3vw,2.4rem);letter-spacing:-.035em;line-height:1.1;margin:0}.auth-card p{margin:0;color:var(--muted)}.auth-card form{display:grid;gap:10px;margin-top:12px}
label{font-size:.91rem;color:#d8e9f6;font-weight:700}input,select{background:var(--input);color:var(--ink);border:1px solid #52728b;border-radius:11px;min-height:49px;padding:10px 14px;width:100%}input::placeholder{color:#91aec0}
button.primary{background:#177cb7;color:white;border:1px solid #54afe4}button.primary:hover{background:#246c9d}button.secondary{background:#15354e;color:#ecfaff;border:1px solid #477490}button.secondary:hover{background:#205271}button{border-radius:11px;font-weight:750;padding:10px 17px}.big{min-height:57px;font-size:1.06rem;width:100%}
.feedback{display:flex;align-items:flex-start;gap:12px;position:fixed;inset:74px auto auto 50%;transform:translateX(-50%);z-index:10000;box-sizing:border-box;width:calc(100% - 24px);max-width:760px;max-height:min(40dvh,320px);overflow-y:auto;padding:13px 18px;border:1px solid #6b9ab7;border-radius:11px;background:#12364c;color:#e4f7ff;margin:0;box-shadow:0 10px 28px rgba(0,0,0,.24)}.feedback.error{border-color:#db8491;background:#431c28;color:#ffe0e8}.feedback.ok{border-color:#389b83;background:#123e36;color:#cbffee}
#welcome{margin-top:10px}.welcome{display:flex;justify-content:space-between;align-items:start;gap:16px;margin:3px 0 22px}.welcome p{margin:6px 0 0}.welcome button{flex-shrink:0}
.admin-preview{background:#173146;padding:13px;border-radius:12px;border:1px solid #486881;margin-bottom:14px;display:flex;align-items:center;gap:15px}.admin-preview label{min-width:180px}.admin-preview select{flex:1}
.preview-banner{padding:13px 16px;border:1px solid #89a3bc;background:#334459;color:white;border-radius:11px;margin-bottom:13px}
.dashboard{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:25px}.tile{background:#143b58;border:1px solid #396f94;color:#fff;padding:19px;border-radius:16px;min-height:112px;text-align:left;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:6px;font-size:1.1rem;box-shadow:0 6px 15px #020a1160}.tile:hover,.tile.active{background:#245d7b;border-color:#81c8eb}.tile strong{font-size:1.65rem;color:#d1f3ff}.tile small{color:#c3e1f0;font-weight:500;font-size:.78rem}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 12px}.toolbar h2{font-size:1.3rem;margin:0}.toolbar-buttons{display:flex;gap:9px}
.orders{display:grid;gap:10px}.order{width:100%;text-align:left;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:13px;padding:17px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:14px}.order:hover{background:#163d57;border-color:#60a9d1}.order h3{font-size:1.08rem;margin:0 0 4px;font-weight:850}.order p{color:var(--muted);font-size:.88rem;margin:4px 0}.order .tag{align-self:center}
.tag{display:inline-flex;align-items:center;padding:4px 10px;border-radius:30px;font-size:.78rem;border:1px solid #4a849f;color:#bce9ff;background:#204a63;white-space:nowrap;font-weight:780}.tag.draft{color:#ffe1a7;background:#59492c;border-color:#b28d42}.tag.done{background:#154b42;color:#a5f3d6;border-color:#267a61}
.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:19px;margin-bottom:14px;box-shadow:0 3px 15px rgba(0,0,0,.08)}.panel h3{font-size:1.06rem;margin:0 0 13px}.panel p{margin:5px 0;color:var(--muted)}
.info-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px}.pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pair{min-width:0}.pair span{color:var(--muted);font-size:.74rem;font-weight:650;display:block}.pair strong{display:block;overflow-wrap:anywhere;font-weight:720;font-size:.96rem;margin-top:1px}
.line-table{width:100%;border-collapse:collapse}.line-table th,.line-table td{padding:9px 6px;border-bottom:1px solid #365068;text-align:left;font-size:.88rem}.line-table th{color:#bdd5e5}.line-table th:last-child,.line-table td:last-child{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.details-actions{display:flex;flex-wrap:wrap;gap:8px}.details-actions button{background:#1a4b68;color:#d6f1ff;border:1px solid #3a7295}
.message{border:1px solid #43677d;background:#12334a;padding:16px;border-radius:12px;color:#d5e9f4}
.search-panel{display:flex;gap:10px;align-items:center;margin-bottom:14px}.search-panel input{flex:1}
.empty{border:1px dashed #456780;color:#b8d2e3;padding:30px 15px;border-radius:14px;text-align:center}
.secret{font-weight:900;letter-spacing:.17em;color:#9fe9ff!important;font-size:1.15rem;overflow-wrap:anywhere}
footer{color:#92adbd;text-align:center;font-size:.75rem;margin:45px 0 10px}
@media(max-width:900px){.dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.site-header{height:58px}.brand img{width:86px;height:36px}.brand-live{font-size:.99rem}.version{font-size:.65rem}.environment-tag{padding:4px 6px;font-size:.59rem}.container{padding:19px 13px 95px}.auth-card{padding:23px 17px}.dashboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{min-height:95px;padding:14px;font-size:.96rem}.tile strong{font-size:1.3rem}.welcome{align-items:flex-start}.welcome button{font-size:.82rem}.admin-preview{display:block}.admin-preview select{margin-top:7px}.info-grid,.pairs{grid-template-columns:1fr}.order{padding:14px}.toolbar{align-items:start;flex-direction:column}.toolbar-buttons{width:100%}.toolbar-buttons button{flex:1}.line-table td{word-break:break-word}.search-panel{flex-direction:column;align-items:stretch}}

/* v1.1.1: locked Auth state is a real notice, not a misleading sign-in form. */
.readiness-panel{border:1px solid #5789a7;border-radius:14px;background:#17354a;padding:19px 18px;display:grid;gap:11px}
.readiness-panel strong{color:#f2faff;font-size:1.12rem}
.readiness-panel p{color:#d9edf8!important;margin:0}
.demo-link{display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:11px;background:#22638b;border:1px solid #79b6de;color:#fff;font-weight:800;text-decoration:none;text-align:center;padding:11px 16px}
.demo-link:hover,.demo-link:focus-visible{background:#307eaa;color:#fff}
/* Keep the active support user and exit action visible while scrolling. */
.preview-banner{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.user-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:260px}

#phone-settings{max-width:620px}#phone-settings h2{font-size:1.15rem;margin:0 0 10px}#phone-settings form{display:grid;gap:10px;margin:14px 0}#phone-settings p{font-size:.9rem}

.totp-qr{display:block;width:240px;max-width:100%;height:auto;background:#fff;padding:12px;border-radius:12px;margin:20px auto}.secret{overflow-wrap:anywhere;user-select:all}

.totp-qr{justify-self:center;margin-inline:auto}#mfa-view{width:100%}

/* v1.4 — demo navigation and workspace, backed by authorized live data. */
:root{--panel:#13283a;--line:#2b465f;--muted:#acbfd0;--ink:#f3f8ff}
body{background:radial-gradient(ellipse 95% 44% at 50% -9%,#214661 0%,#0b1a2a 63%,#071522 100%);min-height:100vh}
.site-header{z-index:40;height:62px}.header-actions{display:flex;align-items:center;gap:16px}.brand img{width:138px;height:44px}.brand-live{color:#88d6ff;font-size:11px;letter-spacing:.22em;border-left:1px solid #44647d;padding-left:10px}
.container{max-width:1260px;padding-bottom:110px}.admin-preview{margin:0;padding:0;border:0;background:none;gap:8px}.admin-preview label{min-width:0;font-size:11px;color:var(--muted)}.admin-preview select{min-height:38px;max-width:170px;width:auto;padding:7px 24px 7px 10px;font-size:13px}.version{font-size:11px}.preview-banner{top:69px;z-index:30;font-size:14px}
.welcome h1{font-size:clamp(28px,4vw,40px);letter-spacing:-.045em;margin:6px 0}.welcome{align-items:center;margin-bottom:20px}.welcome p{font-size:12px}.user-actions button{font-size:12px;min-height:40px}.workspace-banner{display:flex;justify-content:space-between;align-items:center;gap:20px;border:1px solid #3e6c8b;border-radius:18px;background:linear-gradient(120deg,#173b55,#0e283d);padding:24px;margin-bottom:16px}.workspace-banner h2{font-size:25px;letter-spacing:-.03em;margin:7px 0}.workspace-banner p{margin:0;font-size:14px}.workspace-banner button{display:flex;gap:10px;align-items:center;min-height:52px;flex-shrink:0}.summary-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0 23px}.summary-stat{border:1px solid var(--line);border-radius:15px;padding:18px;background:#102537}.summary-stat span{display:block;font-size:12px}.summary-stat strong{display:block;font-size:clamp(22px,3vw,32px);margin-top:5px;overflow-wrap:anywhere}
.dashboard{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.tile{min-height:160px;gap:8px;border-color:#365673;background:linear-gradient(150deg,#1a3850,#102638);padding:20px;justify-content:flex-start;transition:background .15s}.tile.dark{background:linear-gradient(130deg,#154e76,#0c334f)}.tile-top{width:100%;display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.tile-top>.icon{display:grid;place-items:center;background:#6ec6fa20;border-radius:13px;width:45px;height:45px;color:#9ddaff}.tile-top strong{font-size:28px;color:#f4fbff}.tile-label{font-size:19px;font-weight:850}.tile small{font-size:12px;color:#b9ccda}.icon{display:inline-flex;flex-shrink:0}.icon svg{width:23px;height:23px}.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
.quick-section{margin-top:26px}.quick-section h2{font-size:19px;margin-bottom:13px}.quick-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.quick-card{display:flex;align-items:center;gap:10px;background:#13283a;color:var(--ink);border:1px solid var(--line);border-radius:14px;min-height:78px;padding:17px;text-align:left;font-size:14px;font-weight:800}.quick-card strong{margin-left:auto;color:#8fd3ff;font-size:23px}.quick-card .icon{color:#8fd3ff}.quick-section>.order{margin-bottom:10px}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:45;display:flex;justify-content:center;gap:5px;border-top:1px solid #355069;background:#081827f5;backdrop-filter:blur(14px);padding:8px 12px calc(8px + env(safe-area-inset-bottom))}.nav-button{width:min(18%,180px);border:0;background:none;color:#b5cde0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;border-radius:12px;min-height:56px;font-size:12px;font-weight:750}.nav-button.active{background:#1c425e;color:#a9e2ff}.nav-button:hover{background:#17374e}
.order{min-height:105px;align-items:center;padding:20px}.order h3{font-size:18px}.order p.job-title{font-size:15px;color:#d6e4f0}.order p.order-meta{font-size:12px}.order-aside{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.order-aside>.icon{display:none}.order-aside strong{font-size:17px}.order .tag{white-space:normal;text-align:right;justify-content:flex-end;max-width:220px}.order-hero{background:linear-gradient(120deg,#173b55,#102638);border:1px solid #365673;border-radius:18px;padding:26px;margin-bottom:18px}.order-hero h1{font-size:clamp(25px,4vw,36px);letter-spacing:-.035em;line-height:1.2;margin:10px 0;overflow-wrap:anywhere}.order-hero p{color:#c4d8e7;font-size:18px}.pair{background:#152d42;border:1px solid #2b465f;border-radius:12px;padding:13px}.pair strong{font-size:16px}.contact-actions{margin-bottom:16px}.contact-actions a{min-height:46px}.order-lines summary{cursor:pointer;font-size:17px;font-weight:800;min-height:30px}.line-table{margin-top:12px}.operation-card{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:15px;margin:10px 0;border:1px solid #3a5d77;border-radius:13px;background:#163147}.operation-card>.muted{grid-column:2;font-size:13px}.operation-card>.tag{grid-column:3;grid-row:1/3}.source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.source-grid p{margin-top:14px}.feature-status{padding:28px;max-width:750px}.feature-status>.icon{color:#8fd3ff;margin-bottom:10px}.feature-status p{margin:18px 0;line-height:1.7}
@media(max-width:1000px){.dashboard{grid-template-columns:repeat(3,minmax(0,1fr))}.quick-card{flex-wrap:wrap}}
@media(max-width:620px){.site-header{height:59px;padding:0 12px}.brand img{width:101px;height:40px}.brand{gap:7px}.brand-live{font-size:9px;padding-left:6px}.header-actions{gap:7px}.header-actions>.version{display:none}.admin-preview{display:flex}.admin-preview label{display:none}.admin-preview select{margin:0;max-width:140px;font-size:12px}.container{padding-top:20px}.welcome{align-items:flex-start}.welcome h1{font-size:29px}.welcome p{max-width:235px;line-height:1.6}.user-actions{max-width:85px}.user-actions button{padding:8px;font-size:11px}.workspace-banner{padding:18px;display:block}.workspace-banner h2{font-size:23px}.workspace-banner button{width:100%;margin-top:16px}.summary-stats{gap:7px}.summary-stat{padding:12px 9px}.summary-stat span{font-size:10px;min-height:26px}.summary-stat strong{font-size:18px}.dashboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.tile{min-height:151px;padding:16px}.tile-label{font-size:17px}.tile small{font-size:11px}.tile-top>.icon{height:39px;width:39px}.tile-top strong{font-size:25px}.quick-cards{grid-template-columns:1fr;gap:9px}.quick-card{min-height:66px;flex-wrap:nowrap}.toolbar{flex-direction:row;align-items:center}.toolbar h2{font-size:19px}.toolbar-buttons{width:auto}.toolbar-buttons button{font-size:12px;padding:9px}.order{padding:16px;grid-template-columns:1fr;gap:12px}.order-aside{flex-direction:row;align-items:center;justify-content:space-between}.order-aside strong{font-size:15px}.order h3{font-size:17px}.order p.job-title{font-size:14px}.order .tag{font-size:11px;max-width:75%;text-align:left}.info-grid{gap:0}.pairs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pair{padding:10px}.pair strong{font-size:14px}.order-hero{padding:20px}.source-grid{grid-template-columns:1fr;gap:0}.nav-button{width:20%;font-size:10px;min-height:53px}.bottom-nav{gap:1px;padding-inline:5px}.operation-card{grid-template-columns:auto 1fr}.operation-card>.tag{grid-column:2;grid-row:auto;justify-self:start}.preview-banner{top:65px;font-size:12px}.preview-banner button{min-height:36px;font-size:11px}.line-table th,.line-table td{padding:10px 4px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.alex-panel{width:100%;max-width:none}.alex-panel select,.alex-form textarea{width:100%;box-sizing:border-box}.alex-form{display:grid;gap:12px;margin-top:18px}.alex-form textarea{padding:14px;border:1px solid #35516b;border-radius:12px;background:#0d2539;color:#fff;font:inherit;resize:vertical}.alex-text{white-space:pre-wrap;line-height:1.65}.alex-answer{width:100%;max-width:none}.alex-answer .details-actions{flex-wrap:wrap}


/* Company finance: retains the existing LIVE cards and dark profile. */
.finance-date-field,.date-input-frame{display:contents}
.finance-period{display:flex;gap:14px;align-items:end;flex-wrap:wrap;margin-top:18px}.finance-period label{display:grid;gap:7px;min-width:170px;flex:1}.finance-period button{min-height:46px}.finance-stats small{display:block;line-height:1.6;margin-top:6px}.finance-heading h2{font-size:22px}.finance-stats strong{font-size:clamp(22px,3vw,30px)}
@media(max-width:620px){.finance-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.finance-stats .summary-stat{padding:16px 12px}.finance-stats strong{font-size:21px}.finance-stats small{font-size:11px}.finance-period label{min-width:120px}.finance-period button{width:100%}.finance-period input{min-width:0;width:100%;color-scheme:dark}}
.marketing-report{border-top:1px solid var(--line,#dce4df);margin-top:1.3rem;padding-top:1rem}.marketing-metric{display:flex;justify-content:space-between;gap:1rem;margin-top:.75rem}.marketing-report h4{margin:0 0 .6rem}.marketing-report .muted{font-size:.82rem}

/* v1.8: role-specific sections, fewer repeated cards, same LIVE visual profile. */
.dashboard{display:block}.dashboard-group{margin:24px 0}.section-heading{font-size:18px;margin:0 0 12px;color:#dbeaf5}.dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.dashboard-grid .tile{min-height:140px}.tile.primary-tile{border-color:#6ebde8;background:linear-gradient(135deg,#215575,#13334b)}
.summary-stats:not(.finance-stats){grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.nav-button{width:min(calc(100% / var(--nav-count,5)),180px)}
@media(max-width:1000px){.dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.dashboard-grid .tile{min-height:136px;padding:14px}.dashboard-group{margin:21px 0}.tile-label{font-size:16px;overflow-wrap:anywhere}.summary-stats:not(.finance-stats){grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}.preview-banner{align-items:center;gap:10px;flex-wrap:nowrap}.preview-banner>span{flex:1;min-width:0}.preview-banner button{flex-shrink:0;max-width:132px}.nav-button{width:calc(100% / var(--nav-count,5))}}

/* Shared resource-only availability blocks */
.order-delete-menu-action,.resource-block-menu-action{width:100%;min-height:44px;text-align:left}
.resource-dialog{width:min(560px,calc(100vw - 24px))}
.resource-dialog h2{margin-bottom:6px}
.resource-block-form input,.resource-block-form select,.resource-block-form textarea{box-sizing:border-box;min-width:0;max-width:100%;width:100%}
.resource-block-form textarea{resize:vertical;border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--input);color:var(--ink);font:inherit}
.resource-block-check{display:flex!important;flex-direction:row!important;align-items:center;gap:12px}
.resource-block-check input[type=checkbox]{width:22px;flex:0 0 22px}
.resource-block-times{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.resource-block-times label{display:grid;gap:6px}
.resource-block-existing{margin-top:20px;border-top:1px solid var(--line);padding-top:12px}
.resource-block-existing h3{margin:0 0 8px;font-size:16px}
.resource-block-item{display:flex;flex-direction:column;align-items:start;gap:4px;padding:11px 12px;border-radius:9px;background:var(--panel2);border-left:3px solid #ddad67;margin:7px 0}
.resource-block-item strong{font-size:13px;font-weight:650}
.resource-block-item small{font-size:12px}
.resource-block-item button{margin-top:6px;min-height:36px}
.resource-block-remove{align-self:start}
.plan-block-summary{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:8px 0 14px;color:var(--ink)}
.plan-block-summary>strong{font-size:12px}
.plan-block-chip{padding:6px 9px;background:var(--panel2);border-left:3px solid #ddad67;border-radius:5px;font-size:12px}
.plan-block-overlay{position:absolute;z-index:1;left:0;right:0;box-sizing:border-box;pointer-events:none;overflow:hidden;border:1px solid #f2c2797a;border-left:4px solid #e9a85e;background:repeating-linear-gradient(135deg,#ce8b3840,#ce8b3840 7px,#ce8b3821 7px,#ce8b3821 14px);color:#ffe6b5;font-size:11px;font-weight:650;padding:4px}
@media(max-width:700px){.resource-dialog{padding:18px}.resource-block-item{padding:9px}.resource-block-times{gap:8px}}

/* Installation calendar and mobile workday */
.plan-toolbar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:16px}.plan-toolbar h3{flex:1;font-size:17px}.plan-filters{display:flex;gap:6px}.plan-filters .active{background:#146ca2;border-color:#6dc8ff;color:white}.plan-legend{font-size:12px;line-height:1.6;margin:12px 0}.plan-scroll{overflow:auto;border:1px solid #456078;border-radius:12px;margin-bottom:22px}.plan-week{--plan-slot-height:22.4px;min-width:980px;display:grid;grid-template-columns:56px repeat(7,minmax(0,1fr));background:#0c1c2a}.plan-corner,.plan-day-heading{padding:8px 7px;background:#183347;border-right:1px solid #39516a;border-bottom:1px solid #456078;min-width:0}.plan-day-heading strong{font-size:13px;display:block;text-transform:capitalize}.plan-day-heading small{font-size:11px;color:#b7cad9;display:block;margin-top:5px}.plan-day-heading.today{background:#175582}.plan-axis{position:relative;height:calc(var(--plan-slot-count,28) * var(--plan-slot-height));background:#122737;font-size:11px;color:#b7cad9}.plan-axis span{position:absolute;right:7px;transform:translateY(-50%)}.plan-axis span:first-child{transform:none}.plan-axis span:last-child{transform:translateY(-100%)}.plan-day{position:relative;height:calc(var(--plan-slot-count,28) * var(--plan-slot-height));border-right:1px solid #2a4154;min-width:0}.plan-slot{height:var(--plan-slot-height);border-bottom:1px solid #26394b;box-sizing:border-box;background:#0c1b29}.plan-slot.working{background:#23455a;border-color:#36596e}.plan-slot:nth-child(2n){border-bottom-color:#476074}.plan-slot.drop-target{background:#2986ac;outline:2px solid #9ce7ff;outline-offset:-2px}.plan-card{position:absolute;display:flex;flex-direction:column;gap:2px;overflow:hidden;min-height:0;min-width:0;padding:4px 5px;border-radius:5px;box-sizing:border-box;text-align:left;line-height:1.18;border:2px solid #61caff;background:#145b86;color:white;z-index:2;cursor:pointer;font-size:11px;overflow-wrap:anywhere}.plan-card.k2{background:#754320;border-color:#ffbc70}.plan-card.tentative{border-style:dashed}.plan-card.completed{opacity:.55}.plan-card strong{font-size:11px}.plan-card small{font-size:10px;opacity:.9}.plan-card[draggable=true]{cursor:grab}.plan-card:focus-visible{outline:3px solid white;z-index:3}.plan-unplanned{margin-top:20px}.plan-pending{display:flex;align-items:center;gap:14px;border-top:1px solid #304d63;padding:12px 0;flex-wrap:wrap}.plan-pending-title{background:transparent;border:0;color:#e4f3ff;text-align:left;padding:8px 0;font-weight:700;flex:1}.plan-pending[draggable=true]{cursor:grab}.plan-dialog{background:#10293b;color:#e5f3ff;border:1px solid #51718b;border-radius:18px;padding:24px;max-width:520px;width:calc(100% - 30px);max-height:90vh;overflow:auto}.plan-dialog::backdrop{background:#020b15c9}.plan-dialog h2{font-size:22px;margin-bottom:8px}.plan-form{display:grid;gap:14px;margin-top:20px}.plan-form label{display:flex;flex-direction:column;gap:7px;color:#cadfea}.plan-form input,.plan-form select{width:100%;padding:12px;color-scheme:dark}.plan-form input[type=checkbox]{width:22px;height:22px}.plan-form small{line-height:1.6}.plan-form .details-actions{margin:0}.plan-end{font-weight:700;color:#98ddff}.plan-agenda{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:16px;text-align:left;align-items:center;width:100%;padding:18px;border-radius:12px;background:#15364c;border:1px solid #355971;border-left:4px solid #56baf2;color:#eef7ff;margin:10px 0}.plan-agenda.k2{border-left-color:#ffb56b}.plan-agenda h3{font-size:17px;line-height:1.4}.plan-agenda p{font-size:13px;line-height:1.5;margin:4px 0}.plan-agenda small{font-size:12px}.plan-agenda-time{display:flex;flex-direction:column;gap:7px}.plan-agenda-time strong{font-size:20px}.plan-agenda-date{font-size:16px;text-transform:capitalize;margin:22px 0 12px}.plan-detail-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:14px 0;border-bottom:1px solid #345168;margin-bottom:12px}.plan-detail-row strong{flex:1}.plan-history{border-top:1px solid #3b5970;margin-top:15px;padding-top:10px;font-size:13px;line-height:1.7}.panel>.secondary,.panel>.primary{margin:6px 8px 6px 0}
@media(max-width:700px){.plan-toolbar{gap:10px}.plan-toolbar h3{flex-basis:100%;order:-1}.plan-toolbar .details-actions{gap:5px}.plan-toolbar button{padding:10px}.plan-agenda{grid-template-columns:58px minmax(0,1fr);gap:12px;padding:14px}.plan-agenda>.tag{grid-column:2;justify-self:start;white-space:normal}.plan-agenda-time strong{font-size:18px}.plan-pending{display:grid;grid-template-columns:1fr auto;gap:6px}.plan-pending small{grid-column:1}.plan-pending>.secondary{grid-column:2;grid-row:1/3}.plan-dialog{padding:20px}.plan-detail-row{display:grid}.plan-filters{flex:1}}
.plan-card strong{white-space:nowrap;font-size:10px}.plan-card>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.plan-card small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.estimate-missing{background:#59421c!important;border:1px solid #e6b653!important;color:#ffe0a0!important;font-weight:700;white-space:normal!important}.plan-pending .estimate-missing{font-size:11px}

.plan-estimate{padding:16px 0;margin:8px 0;border-bottom:1px solid var(--border,#284158)}.plan-estimate-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.plan-estimate-form label{display:grid;gap:6px;font-weight:600}.plan-estimate-form input{width:180px;max-width:100%}.plan-estimate p{margin:8px 0}.plan-estimate small{display:block;margin-bottom:8px}

/* Reconciliation reports */
.report-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.report-count{display:flex;flex-direction:column;gap:8px;margin:0}.report-count strong{font-size:2rem}.report-count span{font-size:.9rem}.report-row{display:flex;justify-content:space-between;gap:16px;padding:18px 0;border-top:1px solid #e3e8ec}.report-row>div:first-child{min-width:0;overflow-wrap:anywhere}.report-row p{margin:7px 0}.report-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}.report-section{margin-top:18px}.report-body>input{width:100%;margin:12px 0}.report-intro h2{margin-top:8px}@media(max-width:700px){.report-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.report-row{flex-direction:column}.report-actions{justify-content:flex-start}.report-count strong{font-size:1.6rem}}

/* Order documents and work entries */
.line-product{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}.line-number{font-size:.8rem;font-weight:600;color:var(--muted,#64748b)}.line-description{margin:8px 0 0 18px;padding-left:14px;border-left:2px solid var(--line);white-space:pre-wrap;line-height:1.55;color:var(--muted)}.line-table td{vertical-align:top}.work-field{display:flex;flex-direction:column;gap:6px;font-weight:600}.work-field:has(input[type=checkbox]){flex-direction:row;align-items:start}.work-field input[type=checkbox]{width:auto;margin-top:5px}.work-form{display:grid;gap:14px;max-width:660px;padding:20px;background:var(--panel2);border-radius:12px}.work-form h4{margin:0}.work-form textarea{width:100%;resize:vertical;border:1px solid var(--line);border-radius:8px;padding:12px;font:inherit;background:var(--input);color:var(--ink)}.work-editor:empty{display:none}.work-editor{margin:16px 0}.work-group{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}.work-group summary{cursor:pointer;font-weight:700}.work-file{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:14px 0;border-bottom:1px solid var(--line)}.work-file>div:first-child{flex:1;min-width:180px;overflow-wrap:anywhere}.work-file small{display:block;margin-top:5px}.work-file .details-actions{margin:0}.work-photo{width:100%;max-height:600px;object-fit:contain;display:block;background:var(--panel2);border-radius:8px}.work-note{padding:16px 0;border-bottom:1px solid var(--line)}.work-text{white-space:pre-wrap;overflow-wrap:anywhere}.order-work>.details-actions{gap:8px}.work-form input[type=file]{max-width:100%}@media(max-width:620px){.work-file .details-actions{width:100%}.work-form{padding:14px}.line-description{margin-left:8px;padding-left:10px}}
/* Marketing workspace: compact metrics, shared weekly plan and source detail. */
.mk-dashboard{display:grid;gap:22px;max-width:1400px;margin:auto}.mk-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.mk-heading h2{margin:3px 0;font-size:clamp(22px,3vw,30px)}.mk-kicker{font-size:11px;letter-spacing:.13em;color:#70baff;font-weight:750;margin:0 0 7px}.mk-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.mk-kpi{padding:22px;border:1px solid #294057;border-radius:16px;background:linear-gradient(145deg,#162c44,#101e30);display:flex;flex-direction:column;gap:10px;min-width:0}.mk-label{color:#c4d3e4;font-size:13px}.mk-value{font-size:clamp(25px,3vw,36px);letter-spacing:-.04em;line-height:1.15;font-variant-numeric:tabular-nums}.mk-trend{color:#8dcaff;font-size:12px}.mk-kpi small{font-size:11px}.mk-plan-summary{display:flex;align-items:center;gap:24px;justify-content:space-between;background:#132b3c;padding:18px;border-radius:12px;margin:18px 0}.mk-plan-result{display:flex;gap:14px;align-items:center}.mk-plan-table{width:100%;border-collapse:collapse;font-size:14px}.mk-plan-table th{text-align:left;color:#96aac0;font-size:12px;font-weight:600}.mk-plan-table th,.mk-plan-table td{padding:12px 8px;border-bottom:1px solid #273a4f}.mk-plan-table th:nth-child(2),.mk-plan-table td:nth-child(2),.mk-plan-table th:nth-child(3),.mk-plan-table td:nth-child(3){text-align:center}.mk-plan-table td:nth-child(2),.mk-plan-table td:nth-child(3){font-size:20px;font-weight:700;color:#edf6ff}.mk-week-notes{display:grid;grid-template-columns:1fr 1fr 1fr;gap:24px;margin:22px 0}.mk-week-notes h3{font-size:15px}.mk-preserve{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.mk-week small{display:block;margin:12px 0}.mk-insights{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:18px}.mk-insight{border-left:3px solid #3d92e5;padding:8px 16px;background:#122438;border-radius:0 10px 10px 0}.mk-insight h3{font-size:15px;margin:14px 0 8px}.mk-insight p{font-size:13px;line-height:1.6}.mk-insight small{font-size:11px}.mk-note{font-size:13px;color:#c9b98a}.mk-channels{display:grid;gap:24px}.mk-channel-group>h2{font-size:19px;margin-bottom:12px}.mk-channel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(265px,1fr));gap:14px}.mk-channel{margin:0!important;min-width:0}.mk-channel>small{display:block;margin:8px 0}.mk-metrics{display:grid;gap:9px;margin:18px 0}.mk-metrics>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #26394f;padding-bottom:9px;font-size:13px}.mk-metrics dd{margin:0;font-weight:700;text-align:right}.mk-metrics small{display:block}.mk-details{margin:16px 0;font-size:12px}.mk-details summary{cursor:pointer;color:#a1b9cf}.mk-details p{line-height:1.6}.mk-week .details-actions{flex-wrap:wrap}.mk-channel-group>small{display:block;margin-top:12px}
@media(max-width:900px){.mk-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.mk-week-notes,.mk-insights{grid-template-columns:1fr}.mk-heading{align-items:flex-start;flex-direction:column}.mk-kpi{padding:17px}.mk-week{padding:18px!important}}
@media(max-width:480px){.mk-dashboard{gap:16px}.mk-kpis{gap:9px}.mk-kpi{padding:14px}.mk-plan-summary{gap:12px;align-items:flex-start;flex-direction:column}.mk-plan-table{font-size:12px}.mk-plan-table th,.mk-plan-table td{padding:10px 4px}.mk-channel-grid{grid-template-columns:minmax(0,1fr)}}
@media print{body:has(.mk-dashboard){background:white!important;color:#152434!important}body:has(.mk-dashboard) header,body:has(.mk-dashboard) nav,body:has(.mk-dashboard) .sidebar,body:has(.mk-dashboard) #bottom-nav,body:has(.mk-dashboard) #admin-preview,body:has(.mk-dashboard) #source-setup,body:has(.mk-dashboard) #trello-setup,.mk-dashboard button{display:none!important}.mk-dashboard .panel,.mk-kpi,.mk-insight,.mk-plan-summary{background:white!important;color:#152434!important;break-inside:avoid;border-color:#ccd4dc!important}.mk-dashboard .muted,.mk-dashboard small,.mk-label,.mk-plan-table td:nth-child(2),.mk-plan-table td:nth-child(3){color:#34485d!important}.mk-dashboard{display:block}.mk-dashboard>section{margin:20px 0}.mk-kpis{display:grid;grid-template-columns:repeat(4,1fr)}.mk-dashboard .details-actions strong{display:block}.mk-channel-grid{grid-template-columns:1fr 1fr}.mk-dashboard h2{color:#152434!important}.mk-value{font-size:27px}}
/* Compact installation categories keep their counts and reading order on phones. */

@media print{.packing-lines th:last-child,.packing-lines td:last-child{width:28mm;min-width:28mm;white-space:nowrap}}
.connection-grid{align-items:stretch}.connection-card{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:0;min-width:0}.connection-card h3{margin-bottom:12px}.connection-card .tag{white-space:normal}.connection-card p{line-height:1.55;overflow-wrap:anywhere}.connection-card .muted{font-size:12px}.connection-link{margin-top:auto;padding:10px 0;background:transparent;border:0;color:#8fd3ff;text-align:left;text-decoration:underline;text-underline-offset:4px}.connection-link:hover{background:transparent;color:white}.connection-link:focus-visible{outline:2px solid #8fd3ff;outline-offset:4px}.connection-grid .tag.ready{background:#133e35;color:#9de6bc;border-color:#2d6b53}@media(max-width:620px){.connection-grid{gap:14px}}
.mk-cadence{display:flex;align-items:center;gap:9px;color:#abc2d5;font-size:12px;margin:-5px 0 22px}.mk-cadence-dot{width:7px;height:7px;background:#70d7bb;border-radius:50%;flex-shrink:0}.mk-channel-heading{display:flex;align-items:center;gap:12px;margin-bottom:15px}.mk-channel-heading h3{margin:0 0 3px}.mk-channel-icon{display:grid;place-items:center;width:43px;height:43px;flex-shrink:0;background:#173c59;border:1px solid #315b7b;border-radius:13px;font-size:18px;font-weight:800;color:#b8e3ff}.mk-channel-facebook .mk-channel-icon{color:#a8cdff;background:#183f75}.mk-channel-instagram .mk-channel-icon{color:#f7b8da;background:linear-gradient(140deg,#522857,#4e273c)}.mk-channel-analytics .mk-channel-icon{color:#ffd69a;background:#50391e}.mk-channel-business .mk-channel-icon{color:#b0e6d2;background:#1a483e}.mk-channel-search .mk-channel-icon{color:#bce1ff;background:#23445d}.mk-channel-hero{display:flex;flex-direction:column;gap:3px;padding:21px 0 17px;margin:0 0 10px;border-bottom:1px solid #2a4357}.mk-channel-hero .mk-value{font-size:clamp(30px,4vw,42px);line-height:1.2}.mk-channel .mk-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0 20px}.mk-channel .mk-metrics>div{display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:13px;background:#102b40;border:1px solid #28455b;border-radius:11px;min-width:0}.mk-channel .mk-metrics dt{font-size:12px;color:#b2c9da}.mk-channel .mk-metrics dd{margin:0;font-size:20px;font-weight:750;overflow-wrap:anywhere}.mk-channel .mk-metrics small{font-size:11px;line-height:1.5}.mk-channel{display:flex;flex-direction:column}.mk-channel>.tag{align-self:flex-start;font-size:11px}.mk-channel .mk-details{margin-top:auto}.mk-source-time{display:block;margin-top:10px;font-size:11px}.marketing-report{border:1px solid #2a4b61;border-radius:14px;padding:18px;margin-top:16px;background:#102b40}.marketing-report h4{font-size:18px;margin:0 0 10px}.marketing-report .marketing-metric{padding:12px 0;gap:20px;border-bottom:1px solid #294358}.marketing-report .marketing-metric strong{font-size:21px}.marketing-report>.muted{font-size:12px}@media(max-width:620px){.mk-channel .mk-metrics{gap:8px}.mk-channel .mk-metrics>div{padding:11px}.mk-channel .mk-metrics dd{font-size:18px}.mk-cadence{align-items:flex-start;line-height:1.6}.mk-cadence-dot{margin-top:6px}}@media print{.mk-channel .mk-metrics>div,.marketing-report{background:white!important;border-color:#ccd4dc!important}.mk-channel .mk-metrics dt,.mk-channel .mk-metrics dd,.mk-channel-hero .mk-label,.mk-channel-hero .mk-value{color:#152434!important}}


.mk-report-latest,.mk-report-row{display:flex;justify-content:space-between;gap:20px;align-items:center}.mk-report-latest h3{margin:4px 0 8px}.mk-report-row{padding:16px 0;border-top:1px solid var(--line)}.mk-report .details-actions{flex-shrink:0}.mk-report .mk-note{max-width:75ch}@media(max-width:650px){.mk-report-latest,.mk-report-row{align-items:stretch;flex-direction:column;gap:8px}.mk-report .details-actions button{flex:1}}

/* Shared content rows align metric boxes even when card introductions wrap. */
.mk-channel-grid>.mk-channel{display:grid;grid-row:span 3;grid-template-rows:subgrid;row-gap:0;align-items:start}.mk-channel-intro{min-width:0;align-self:stretch;display:flex;flex-direction:column}.mk-channel-intro>.mk-channel-hero{flex:1}.mk-channel-intro>.tag{display:inline-block;align-self:flex-start;font-size:11px}.mk-channel-heading>div{min-width:0;overflow-wrap:anywhere}.mk-channel-body{min-width:0}.mk-channel .mk-details{margin-top:0;align-self:end}.mk-channel-linkedin .mk-channel-icon{color:#bce1ff;background:#164565}


.header-refresh{display:flex;align-items:center;gap:7px;min-height:38px;padding:6px 12px;font-size:13px;white-space:nowrap}.header-refresh>span:first-child{font-size:22px;line-height:1}@media(max-width:620px){.header-refresh{min-width:38px;min-height:38px;padding:6px;justify-content:center}.refresh-label{display:none}.admin-preview select{max-width:120px}}@media(max-width:380px){.admin-preview select{max-width:100px}}


/* Account controls stay compact; the dropdown remains in normal keyboard order. */
.site-footer{display:flex;align-items:center;gap:20px;text-align:left}.site-footer>span{flex:1;text-align:center}.user-menu{position:relative;flex-shrink:0;z-index:35;margin:0}
.user-menu>summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;padding:9px 12px;min-height:42px;border:1px solid var(--line);border-radius:12px;color:var(--muted);font-size:13px;font-weight:650}
.user-menu>summary::-webkit-details-marker{display:none}.user-menu>summary:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
.user-menu[open]>summary{background:var(--panel2);color:var(--ink)}
.user-menu-panel{position:absolute;left:0;bottom:calc(100% + 8px);max-height:calc(100dvh - 140px);overflow-y:auto;width:min(292px,calc(100vw - 26px));display:grid;gap:10px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--panel);box-shadow:var(--shadow)}
.user-menu-panel>strong{font-size:17px}.user-menu-panel>.muted{font-size:12px}.user-menu-panel button{width:100%;font-size:13px;min-height:44px}.user-menu-panel .account-signout{border:0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--muted);text-align:left;justify-content:flex-start;margin-top:4px;padding:15px 0 0}
.theme-picker{min-width:0;border:0;padding:0;margin:8px 0;display:flex;gap:8px}.theme-picker legend{color:var(--muted);font-size:12px;margin-bottom:8px}.theme-picker button{flex:1;min-width:0;width:auto;border:1px solid var(--line);background:var(--input);color:var(--muted);font-weight:650}.theme-picker button[aria-pressed=true]{background:var(--panel2);color:var(--ink);border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
.admin-access-intro{display:flex;align-items:center;justify-content:space-between;gap:20px}.admin-access-intro h3{margin-bottom:5px}.admin-access-intro button{flex-shrink:0}
.access-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.access-card{margin:0;min-width:0}.access-heading{display:flex;justify-content:space-between;align-items:start;gap:10px;flex-wrap:wrap}.access-heading h3{font-size:21px;margin:0}.access-heading .tag{font-size:11px;white-space:normal}.access-email{font-size:13px;overflow-wrap:anywhere}.access-role{display:block;margin-top:20px}.access-rights{margin:20px 0}.access-rights>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:9px 0;font-size:13px}.access-rights dd{margin:0;font-weight:750}.access-yes{color:var(--green)}.access-screens{font-size:13px;margin:16px 0}.access-screens summary{cursor:pointer;color:var(--muted)}.access-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.access-chips span{padding:5px 9px;background:var(--panel2);border-radius:7px;font-size:12px}.access-card>small{display:block;font-size:12px;line-height:1.6}.access-overview>.message,.access-overview>div>.message{margin-top:18px}
@media(max-width:700px){.access-grid{grid-template-columns:1fr}.admin-access-intro{align-items:start;flex-direction:column}.admin-access-intro button{width:100%}.user-menu>summary{padding:8px 10px;font-size:12px}}

/* Light theme: explicit surfaces and semantic status colours, leaving print layouts intact. */
@media screen{
 html[data-theme=light]{color-scheme:light;--bg:#f4f7fb;--panel:#fff;--panel2:#eaf1f7;--input:#fff;--line:#cfdae5;--ink:#182e43;--muted:#50677b;--blue:#0878b8;--green:#14745a;--shadow:0 12px 40px #19375018}
 html[data-theme=light] body{background:radial-gradient(ellipse 100% 65% at 50% 0%,#e4eff8 0%,#f4f7fb 65%);color:var(--ink)}
 html[data-theme=light] :is(a,.eyebrow,.brand-live,.quick-card strong,.quick-card .icon,.feature-status>.icon,.connection-link,.mk-kicker,.mk-trend,.plan-end){color:#08699f}
 html[data-theme=light] :is(button,input,select,a,summary):focus-visible{outline-color:#0878b8}
 html[data-theme=light] .site-header{background:#f9fbfe;border-color:var(--line)}
 html[data-theme=light] .brand img{filter:brightness(0)}
 html[data-theme=light] :is(.brand-live,input,select,.line-table td,.line-table th,.plan-scroll,.plan-day,.plan-slot,.plan-slot:nth-child(2n),.plan-pending,.plan-detail-row,.plan-history,.mk-plan-table th,.mk-plan-table td,.mk-metrics>div,.mk-channel-hero,.marketing-report .marketing-metric){border-color:var(--line)}
 html[data-theme=light] :is(label,.section-heading,.line-table th,.order p.job-title,.order-hero p,.mk-label,.mk-plan-table td:nth-child(2),.mk-plan-table td:nth-child(3),.plan-pending-title,.plan-form label){color:var(--ink)}
 html[data-theme=light] :is(.version,footer,.nav-button,.tile small,.mk-cadence,.mk-details summary,.mk-plan-table th,.mk-channel .mk-metrics dt,.order-filters label,.order-extra-filters summary,.plan-day-heading small,.plan-axis){color:var(--muted)}
 html[data-theme=light] input::placeholder{color:#687c8e}
 html[data-theme=light] :is(input,select,textarea,.plan-form input,.plan-form select,.finance-period input){color-scheme:light;background:var(--input);color:var(--ink);border-color:var(--line)}
 html[data-theme=light] button.primary{background:#086fa8;color:#fff;border-color:#086fa8}
 html[data-theme=light] button.primary:hover{background:#075784}
 html[data-theme=light] :is(button.secondary,.details-actions button){background:#e8f1f8;color:#174e73;border-color:#b5ccde}
 html[data-theme=light] :is(button.secondary:hover,.details-actions button:hover){background:#d7e8f5}
 html[data-theme=light] :is(.workspace-banner,.order-hero){background:linear-gradient(120deg,#e2eff9,#fff);border-color:#bed3e4}
 html[data-theme=light] :is(.tile,.tile.dark){background:linear-gradient(145deg,#fff,#edf4fa);border-color:#c5d6e5;color:var(--ink);box-shadow:0 3px 12px #19375008}
 html[data-theme=light] .tile.primary-tile{background:var(--action-bg);border-color:var(--action-line)}
 html[data-theme=light] :is(.tile:hover,.tile.active){background:#dfedf8;border-color:#639cc4}
 html[data-theme=light] :is(.tile strong,.tile-top strong){color:#123e60}
 html[data-theme=light] .tile-top>.icon{color:#17669a;background:#dceefa}
 html[data-theme=light] :is(.quick-card,.summary-stat,.pair,.operation-card,.plan-agenda,.plan-dialog,.marketing-report,.mk-kpi,.mk-plan-summary,.mk-insight,.mk-channel .mk-metrics>div){background:var(--panel);color:var(--ink);border-color:var(--line)}
 html[data-theme=light] .order:hover{background:#eaf3fa;border-color:#8cb5d1}
 html[data-theme=light] .bottom-nav{background:#f9fbfef5;border-color:var(--line)}
 html[data-theme=light] :is(.nav-button.active,.nav-button:hover){background:#dcecf8;color:#155a85}
 html[data-theme=light] :is(.feedback,.message,.readiness-panel){background:#e7f2fb;color:#214b6a;border-color:#a8c8de}
 html[data-theme=light] .feedback.error{background:#fff0f1;color:#922e3c;border-color:#dfa5ae}
 html[data-theme=light] .feedback.ok{background:#e5f5ed;color:#1b604b;border-color:#a4cfbb}
 html[data-theme=light] :is(.readiness-panel strong,.readiness-panel p){color:#214b6a!important}
 html[data-theme=light] .preview-banner{background:#e2ecf8;color:#243f61;border-color:#aec4df}
 html[data-theme=light] .tag{background:#e5f1fa;color:#205d83;border-color:#adcce0}
 html[data-theme=light] .tag.draft{background:#fff3d9;color:#78541b;border-color:#dfc28a}
 html[data-theme=light] :is(.tag.done,.connection-grid .tag.ready){background:#e4f4eb;color:#216947;border-color:#a4ceb7}
 html[data-theme=light] .estimate-missing{background:#fff3d9!important;color:#78541b!important;border-color:#dfc28a!important}
 html[data-theme=light] .empty{color:var(--muted);border-color:var(--line)}
 html[data-theme=light] .secret{color:#126893!important}
 html[data-theme=light] :is(.plan-week,.plan-slot){background:#f0f3f7}
 html[data-theme=light] :is(.plan-corner,.plan-day-heading,.plan-axis){background:#e8eff5;border-color:var(--line)}
 html[data-theme=light] .plan-day-heading.today{background:#cbe6f8}
 html[data-theme=light] .plan-slot.working{background:#fff}
 html[data-theme=light] .plan-slot.drop-target{background:#d4edfc;outline-color:#2486bd}
 html[data-theme=light] .plan-card{background:#17658f;color:white;border-color:#094f7a}
 html[data-theme=light] .plan-card.k2{background:#885423;border-color:#693b11}
 html[data-theme=light] .plan-filters .active{background:#176b9b;color:#fff;border-color:#176b9b}
 html[data-theme=light] .mk-note{color:#786020}
 html[data-theme=light] .mk-insight{border-left-color:#2195ce}
 html[data-theme=light] .mk-channel-icon{background:#e3f0fa;color:#18639a;border-color:#bfd5e5}
 html[data-theme=light] .mk-channel-instagram .mk-channel-icon{background:#fbe8f2;color:#a33471}
 html[data-theme=light] .mk-channel-analytics .mk-channel-icon{background:#fff1dc;color:#8d5b16}
 html[data-theme=light] .mk-channel-business .mk-channel-icon{background:#e0f3eb;color:#246f53}
 html[data-theme=light] .connection-link:hover{color:#10466c}
}

/* Compact operational follow-up, sharing the existing dark/light palette. */
.followup-stack{display:grid;gap:16px;margin:18px 0}.followup-section>summary{font-size:17px;font-weight:700;cursor:pointer;padding:4px 0}.followup-section[open]>summary{margin-bottom:16px}.followup-section .followup-section{margin-top:14px}.followup-section .work-form{margin-top:14px}.followup-row{padding:14px 0;border-bottom:1px solid var(--line,#354259)}.followup-row:last-child{border-bottom:0}.followup-row p{margin:7px 0}.work-field:has(input[type=checkbox]){display:flex;align-items:flex-start;gap:12px;flex-direction:row-reverse;justify-content:flex-end;font-weight:400}.work-field input[type=checkbox]{width:20px;min-width:20px;height:20px;margin:0}.message-card.unread{border-left:4px solid var(--accent,#48a9ed)}.message-card{margin-bottom:12px}.message-card button{margin-top:12px}.order-next-date{font-weight:650;color:var(--text,#edf3ff)}.plan-agenda-wrap{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;margin-bottom:10px}.plan-agenda-wrap .plan-agenda{margin:0}.report-photo-names{overflow-wrap:anywhere}textarea[readonly]{opacity:.9;min-height:130px}.followup-section .work-form textarea{width:100%}.followup-section .work-form button{justify-self:start}@media(max-width:620px){.plan-agenda-wrap{grid-template-columns:1fr}.plan-agenda-wrap>button:last-child{justify-self:start}.followup-section .work-form button{width:100%}}
@media(max-width:700px){.site-footer{flex-direction:column;align-items:flex-start;gap:16px}.site-footer>span{text-align:left;line-height:1.7}}
@media print{.user-menu{display:none!important}}

/* Account menu has its own fixed slot to the left of the main navigation. */
.bottom-nav{padding-left:112px;padding-right:112px}
.bottom-nav>.user-menu{position:absolute;left:12px;bottom:calc(14px + env(safe-area-inset-bottom))}
.bottom-nav .user-menu-panel{max-height:calc(100dvh - 110px)}
@media(max-width:700px){.bottom-nav{padding-left:56px;padding-right:5px}.bottom-nav>.user-menu{left:8px;bottom:calc(13px + env(safe-area-inset-bottom))}.bottom-nav .user-menu>summary{width:40px;min-height:44px;padding:8px;justify-content:center;font-size:20px}.account-menu-label{display:none}.bottom-nav .nav-button{min-width:0;font-size:9px;padding-inline:1px}}

/* Metricool detail: one channel per column, across the full content width. */
.source-grid.metricool-detail{grid-template-columns:minmax(0,1fr);margin-top:18px}
.metricool-detail>.panel{min-width:0}
.metricool-report-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0;align-items:start}
.metricool-report-grid>.marketing-report{min-width:0;margin:0;height:100%}
.metricool-report-grid .marketing-metric{align-items:start;gap:12px}
.metricool-report-grid .marketing-metric>span{min-width:0;flex:1;font-size:13px}
.metricool-report-grid .marketing-metric>strong{max-width:58%;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;font-size:19px}
.metricool-report-grid .marketing-report>.muted{line-height:1.6;overflow-wrap:anywhere}
.metricool-report-grid .tag{white-space:normal}
@media(max-width:1099px){.metricool-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:739px){.metricool-report-grid{grid-template-columns:minmax(0,1fr);gap:12px}.metricool-detail>.panel{padding:14px}.metricool-report-grid>.marketing-report{padding:15px}}

/* Back mirrors Account on the other side of the bottom navigation. */
.bottom-nav>.bottom-back{position:absolute;right:12px;bottom:calc(14px + env(safe-area-inset-bottom));min-height:42px;padding:8px 12px;font-size:13px}
.bottom-back>span:first-child{font-size:25px;line-height:1}
@media(max-width:700px){.bottom-nav{padding-right:56px}.bottom-nav>.bottom-back{right:8px;bottom:calc(13px + env(safe-area-inset-bottom));width:40px;min-height:44px;padding:8px}.bottom-back .back-label{display:none}.nav-button>span:not(.icon){max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
textarea.sms-text{font-weight:400;line-height:1.6;field-sizing:content;min-height:180px}.followup-section{scroll-margin-top:80px}

/* Dedicated completion forms, including the native mobile camera picker. */
.completion-dialog{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:16px;width:min(720px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:92dvh;padding:24px;overflow:auto;box-sizing:border-box;overscroll-behavior:contain}.completion-dialog::backdrop{background:#020b15c9}.completion-heading{display:flex;gap:12px;align-items:center;justify-content:space-between}.completion-heading h2{font-size:24px;margin:0}.completion-heading button{flex-shrink:0}.completion-order-title{font-weight:600;overflow-wrap:anywhere}.completion-context{border-left:3px solid var(--accent);padding-left:12px;margin:16px 0}.completion-context p{margin:6px 0;overflow-wrap:anywhere}.completion-dialog .work-form{max-width:none;padding:0;background:transparent}.completion-time-fields,.completion-photo-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.completion-dialog input,.completion-dialog select,.completion-dialog textarea{width:100%;min-width:0;box-sizing:border-box}.completion-dialog input[type=file]{font-size:13px;padding:10px;border:1px dashed var(--line);border-radius:8px}.completion-dialog input[type=file]::file-selector-button{border:0;border-radius:5px;background:var(--panel2);color:var(--ink);padding:9px;margin-right:8px;cursor:pointer}.completion-dialog .details-actions{margin:0;gap:8px}.completion-destination{padding:12px;background:var(--panel2);border:1px solid var(--line);border-radius:8px;line-height:1.5}.completion-progress{margin:0;line-height:1.5;overflow-wrap:anywhere}.completion-progress:empty{display:none}.report-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}.report-photo-grid:empty{display:none}.report-photo-preview{min-width:0;margin:0;padding:8px;border:1px solid var(--line);border-radius:8px}.report-photo-preview img{width:100%;height:120px;object-fit:cover;border-radius:5px}.report-photo-preview figcaption{font-size:12px;overflow-wrap:anywhere;margin:8px 0}.report-photo-preview button{font-size:12px;width:100%;overflow-wrap:anywhere;padding:8px}.completion-buttons{padding-top:12px;border-top:1px solid var(--line);flex-wrap:wrap}.completion-dialog :disabled{opacity:.65}.hour-shortcuts button{min-width:68px}
@media(max-width:600px){.completion-dialog{padding:16px;max-height:94dvh}.completion-heading h2{font-size:21px}.completion-time-fields,.completion-photo-fields{grid-template-columns:1fr}.completion-buttons>button{width:100%;min-height:44px}.completion-dialog .completion-heading button{padding:10px}.completion-dialog .work-field{min-width:0}.completion-dialog input{font-size:16px}}


/* Compact shared heading for every role's workspace. */
.welcome{flex-wrap:wrap;gap:14px 28px;margin:0 0 18px}
.welcome-identity{flex:1 1 240px;min-width:0}
.welcome h1{font-size:clamp(26px,3vw,32px);margin:4px 0;overflow-wrap:anywhere}
.welcome p{margin-top:5px}
#workspace-summary{flex:0 1 auto;max-width:100%}
.workspace-stats{display:flex;align-items:center;margin:0;gap:0}
.workspace-stat{min-width:0;padding:2px 24px;border-left:1px solid var(--line)}
.workspace-stat:first-child{padding-left:0;border-left:0}
.workspace-stat:last-child{padding-right:0}
.workspace-stat dt{font-size:12px;line-height:1.4}
.workspace-stat dd{margin:4px 0 0;font-size:clamp(22px,2.4vw,28px);line-height:1.2;font-weight:800;font-variant-numeric:tabular-nums}
@media(max-width:700px){
 .welcome{gap:12px;margin-bottom:16px}
 .welcome-identity{flex-basis:100%}
 .welcome h1{font-size:26px}
 .welcome p{max-width:none;line-height:1.4}
 #workspace-summary{flex-basis:100%}
 .workspace-stats{align-items:stretch}
 .workspace-stat{flex:1 1 auto;padding:0 10px}
 .workspace-stat dt{font-size:11px}
 .workspace-stat dd{font-size:20px}
}
@media(max-width:380px){.workspace-stat{padding-inline:8px}.workspace-stat dd{font-size:18px}}
.installation-overview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start}
.installation-group{min-width:0}.installation-group .section-heading{margin-bottom:10px}
.installation-group .order-view-card.order{padding:12px;min-height:0;gap:8px}
.installation-group .order-view-number{font-size:19px}
@media(max-width:700px){.installation-overview{grid-template-columns:minmax(0,1fr);gap:20px}}

.plan-card.aana{background:#226747;border-color:#83e5ae}.plan-agenda.aana{border-left-color:#83e5ae}
.plan-filters{flex-wrap:wrap}.plan-team-legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin:0 0 12px;font-size:12px;font-weight:650}
.plan-team-key{display:inline-flex;align-items:center;gap:7px}.plan-team-key:before{content:'';display:inline-block;width:11px;height:11px;border-radius:3px;background:#61caff;border:1px solid currentColor}
.plan-team-key.k2:before{background:#ffbc70}.plan-team-key.aana:before{background:#83e5ae}
html[data-theme=light] .plan-card.aana{background:#226747;color:white;border-color:#164b31}
html[data-theme=light] .plan-agenda.aana{border-left-color:#226747}
@media(max-width:700px){.plan-filters{width:100%}.plan-filters button{flex:1 1 calc(50% - 6px);padding:9px 8px;font-size:12px}}

@media(max-width:700px){.plan-toolbar .plan-filters{flex:1 0 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.plan-toolbar .plan-filters button{width:100%;min-width:0;padding:9px 8px;font-size:12px}}

.order-contact-filter{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin:0 0 12px}.order-contact-filter>span{font-size:12px;margin-right:4px}.order-contact-filter button{min-height:38px;padding:7px 15px;font-size:14px}.order-contact-filter button[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--blue)}
@media(max-width:620px){.order-contact-filter{justify-content:flex-start;margin-bottom:10px}.order-contact-filter button{flex:1;min-height:40px;padding:7px 10px}}


/* Reconciliation totals double as category filters. */
button.report-count{padding:14px 18px;gap:5px;text-align:left;color:var(--ink);font-weight:400;justify-content:flex-start;min-width:0}
button.report-count strong{font-size:1.7rem;line-height:1.2}button.report-count span{font-size:.85rem;line-height:1.4}
button.report-count:hover{border-color:var(--blue)}button.report-count[aria-pressed=true]{background:var(--panel2);border-color:var(--blue);box-shadow:inset 0 0 0 1px var(--blue)}
button.report-count:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.report-filter-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:-6px 0 12px}.report-filter-controls button{min-height:38px;padding:7px 13px;font-size:.85rem}.report-filter-controls span{font-size:.85rem}
.report-filter-controls button[aria-pressed=true]{border-color:var(--blue)}
@media(max-width:700px){button.report-count{padding:12px;gap:4px}button.report-count strong{font-size:1.5rem}}


/* Account and sync information stay in the shared page header. */
.site-header{height:auto;min-height:62px;padding-block:8px;flex-wrap:wrap;gap:6px 20px}
.header-identity{flex:1 1 220px;min-width:0}
.header-identity-line{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px}
.header-identity #who-name{font-size:16px;line-height:1.2;font-weight:800}
.header-identity #who-role{font-size:10px;line-height:1.3;letter-spacing:.08em}
.header-identity #last-sync{margin:3px 0 0;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
#app-view>#workspace-summary{margin-bottom:18px}
@media(max-width:900px){.header-identity{order:3;flex-basis:100%}.site-header{gap:4px 12px}}
@media(max-width:620px){.site-header{min-height:59px;padding-block:5px}.header-identity #who-name{font-size:14px}.header-identity #who-role{font-size:9px}.header-identity #last-sync{margin-top:2px}}

/* Contact filter joins the desktop header; mobile keeps its content toolbar. */
.header-contact-slot{display:contents}
@media(min-width:901px){
 .header-actions .order-contact-filter{margin:0;gap:5px;flex-shrink:0}
 .header-actions .order-contact-filter>span{font-size:11px;margin-right:2px;white-space:nowrap}
 .header-actions .order-contact-filter button{min-height:34px;padding:6px 10px;font-size:12px}
}
@media(min-width:901px) and (max-width:1200px){
 .header-identity{flex-basis:150px}
 .header-actions{gap:9px}
 .header-actions>.version,.admin-preview label{display:none}
}


.auth-card .remember-login{display:flex;align-items:flex-start;gap:10px;margin:16px 0;font-size:14px;line-height:1.45}.auth-card .remember-login input{width:18px;min-height:18px;height:18px;margin:2px 0 0;flex:0 0 18px;accent-color:var(--accent,#3d92e5)}.remember-login small{display:block;font-size:12px;margin-top:3px}
/* Conversations reuse the order workspace and its existing dialog. */
.messages-inbox{display:inline-flex;align-items:center;gap:7px;position:relative;white-space:nowrap}.messages-inbox svg{width:18px;height:18px}.message-badge,.comment-unread,.comment-mention{display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:750;border-radius:20px;padding:3px 8px;background:var(--panel2,#16364a);color:var(--text,#fff)}.message-badge,.has-unread .order-message-count,.comment-unread{background:var(--accent,#58baff);color:#062135}.messages-inbox.has-unread,.order-messages-trigger.has-unread{border-color:var(--accent,#58baff)}.message-badge[hidden]{display:none}.comments-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px}.comments-toolbar button{font-size:13px;padding:9px 12px}.comment-card{padding:16px;border:1px solid var(--line,#345068);border-radius:12px;margin:12px 0;min-width:0}.comment-card.unread{border-left:4px solid var(--accent,#58baff)}.comment-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.comment-meta time{font-size:12px}.comment-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;margin:12px 0}.comment-tags,.comment-footer,.comment-options,.comment-selected-tags{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.comment-footer{justify-content:space-between;margin-top:12px}.comment-footer .details-actions{margin:0;gap:8px}.comment-footer button{font-size:12px;padding:7px 10px}.comment-composer{border-top:1px solid var(--line,#345068);padding-top:18px;display:grid;gap:10px;margin-top:18px}.comment-composer textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:96px}.comment-composer>button{justify-self:start}.comment-composer select{width:auto;max-width:100%}.comment-picker{min-width:190px;max-width:100%;padding:8px;border:1px solid var(--line,#345068);border-radius:8px}.comment-picker summary{cursor:pointer;font-size:13px}.comment-picker input{margin-top:10px;width:100%;box-sizing:border-box}.comment-people{display:flex;flex-wrap:wrap;gap:6px;max-height:180px;overflow:auto;margin-top:8px}.comment-person,.comment-tag-remove{font-size:12px;padding:7px 10px}.comment-person[aria-pressed=true]{border-color:var(--accent,#58baff)}.comment-progress:empty,.comment-selected-tags:empty{display:none}.comment-progress{font-size:13px;margin:0;line-height:1.5}.message-inbox .comment-card h3{font-size:17px;margin:0 0 12px}.order-conversation{min-width:0}.order-messages-dialog{width:min(780px,calc(100vw - 24px))}.comment-composer[hidden]{display:none}.comment-mention{font-size:11px}.order-conversation>p{font-size:13px}
@media(max-width:620px){.messages-inbox .messages-label{display:none}.messages-inbox{padding:9px;gap:4px;min-width:36px}.message-badge{font-size:11px;padding:2px 6px}.comment-card{padding:12px}.comment-footer{align-items:flex-start}.comment-footer .details-actions{width:100%}.comment-options{align-items:stretch;flex-direction:column}.comment-options select{width:100%}.comment-composer>button{width:100%}.comment-meta{gap:6px}.comment-meta time{margin-left:auto}.comments-toolbar button{flex:1 0 auto}.order-messages-dialog{padding:14px;max-height:92dvh;box-sizing:border-box}.comment-picker{min-width:0}}

.comment-quick-tags{display:flex;flex-wrap:wrap;gap:7px}.comment-quick-tags .comment-person{padding:7px 11px}.comment-quick-tags:empty{display:none}

/* Tasks share one scroll area. Phone views fill the screen; desktop stays a dialog. */
html.has-live-dialog{overflow:hidden}
.responsive-dialog[open]{display:flex;flex-direction:column;overflow:hidden;max-height:92dvh;max-height:min(92dvh,var(--task-height,92dvh));min-width:0}
.responsive-dialog>.completion-heading{flex:0 0 auto;min-width:0;gap:12px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.responsive-dialog>.completion-heading h2{min-width:0;overflow-wrap:anywhere;line-height:1.25}
.live-dialog-content{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-block:16px;padding-top:12px;overflow-wrap:anywhere}
.live-dialog-content>*{min-width:0;max-width:100%}
.live-dialog-content :is(input,textarea,select){max-width:100%;min-width:0}
.live-dialog-content .work-photo{display:block;max-width:100%;max-height:70dvh;height:auto;object-fit:contain}
.dialog-mobile-back{display:none}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 :is(input,textarea,select){font-size:16px!important}
 .finance-period{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;width:100%;max-width:100%}
 .finance-period label{width:100%;min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr)}
 /* iOS date controls can add their padding outside a declared 100% width.
    Keep all decoration on a shrinkable frame; the native picker has zero padding. */
 .finance-period,.finance-period label{min-inline-size:0;box-sizing:border-box}
 .finance-period .finance-date-field,.responsive-dialog .date-input-frame{display:flex;align-items:center;width:100%;min-width:0;max-width:100%;min-inline-size:0;box-sizing:border-box;min-height:49px;padding:10px 14px;border:1px solid #52728b;border-radius:11px;background:var(--input)}
 .finance-date-field:focus-within,.date-input-frame:focus-within{outline:3px solid #8cdeff;outline-offset:3px}
 .finance-period .finance-date-field>input[type=date],.responsive-dialog .date-input-frame>input[type=date]{display:block;flex:1 1 0%;width:0;min-width:0;min-inline-size:0;max-width:100%;max-inline-size:100%;box-sizing:border-box;padding:0;border:0;border-radius:0;min-height:27px;margin:0;background:transparent;color:var(--ink);font-size:16px;line-height:1.5;-webkit-appearance:none;appearance:none;outline:none}
 .finance-period input::-webkit-date-and-time-value,.responsive-dialog .date-input-frame>input::-webkit-date-and-time-value{min-width:0;max-width:100%;padding:0;text-align:left}
 .finance-period input::-webkit-datetime-edit,.responsive-dialog .date-input-frame>input::-webkit-datetime-edit{min-width:0;padding:0}
 .finance-period>button{width:100%;min-width:0;min-height:46px}
 .finance-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .finance-presets>button{min-width:0;min-height:44px;padding:9px 8px;font-size:14px;white-space:normal}
 .finance-stats .summary-stat{min-width:0}
 .finance-stats strong{font-size:clamp(16px,4.6vw,21px);overflow-wrap:anywhere;max-width:100%}
 .comments-toolbar button,.report-filter-controls button{flex:0 1 auto;width:auto;min-width:0;max-width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}
 .plan-toolbar .plan-filters{display:flex;flex-wrap:wrap;gap:6px;min-width:0;width:100%}
 .plan-toolbar .plan-filters button{flex:0 1 auto;width:auto;min-width:0;max-width:100%;min-height:44px;padding:8px 11px;font-size:14px;white-space:normal;overflow-wrap:anywhere}
 .order-work .work-section-actions>button{min-height:44px}
 .responsive-dialog[open]{position:fixed;inset:auto;left:var(--task-left,0px);top:var(--task-top,0px);margin:0;width:var(--task-width,100%);max-width:var(--task-width,100%);height:var(--task-height,100dvh);max-height:var(--task-height,100dvh);padding:0;border:0;border-radius:0;box-sizing:border-box;background:var(--panel)}
 .responsive-dialog>.completion-heading{padding:calc(10px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));gap:10px;flex-direction:row-reverse;background:var(--panel)}
 .responsive-dialog>.completion-heading h2{font-size:19px;flex:1;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .responsive-dialog .dialog-back{min-height:44px;padding:9px 10px;max-width:45%;font-size:15px;white-space:nowrap}
 .dialog-mobile-back{display:inline}.dialog-desktop-close{display:none}
 .live-dialog-content{flex:1;padding:14px max(14px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));scroll-padding-block:16px 90px}
 .responsive-dialog :is(input,textarea,select){font:inherit;font-size:16px!important;line-height:1.4}
 .responsive-dialog :is(input,select){min-height:46px}
 .responsive-dialog input[type=checkbox]{min-height:20px;width:20px;height:20px}
 .responsive-dialog .plan-form{margin-top:8px;gap:12px}
 .responsive-dialog .work-form,.responsive-dialog .plan-form{width:100%;max-width:100%;min-width:0;grid-template-columns:minmax(0,1fr)}
 .responsive-dialog .work-form{padding:0}
 .responsive-dialog .work-form>*,.responsive-dialog .work-field{min-width:0;max-width:100%}
 .responsive-dialog input[type=date],.responsive-dialog input[type=file]{display:block;min-inline-size:0;max-inline-size:100%;width:100%;box-sizing:border-box}
 .responsive-dialog input[type=date]::-webkit-date-and-time-value{min-width:0;text-align:left}
 .responsive-dialog .completion-time-fields,.responsive-dialog .completion-photo-fields{grid-template-columns:1fr}
 .responsive-dialog .completion-buttons{position:sticky;bottom:-1px;z-index:1;background:var(--panel);padding:12px 0 8px;gap:8px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .responsive-dialog .completion-buttons:has(>button:nth-child(3))>.primary{grid-column:1/-1}
 .responsive-dialog .completion-buttons>button{width:100%;min-height:44px;white-space:normal;overflow-wrap:anywhere}
 .responsive-dialog .work-photo{max-height:calc(var(--task-height,100dvh) - 160px)}
 .responsive-dialog .report-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Task forms and compact, content-sized controls on both desktop and phone. */
.followup-task-dialog .production-deadline-form{width:100%;max-width:100%;min-width:0}
.followup-task-dialog .production-deadline-form input{font-size:16px;box-sizing:border-box;min-width:0;max-width:100%}
@media(max-width:700px),(max-height:500px) and (pointer:coarse){
 .responsive-dialog .production-deadline-form .completion-buttons button{font-size:16px;min-height:46px}
}

/* One compact list toolbar for every role and viewport. */
.list-controls{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin:0 0 12px;min-width:0}
.list-controls label{display:flex;flex:1 1 150px;flex-direction:column;gap:5px;min-width:0;max-width:100%;font-size:12px;color:var(--muted)}
.list-controls .list-search{flex:3 1 260px}
.list-controls input,.list-controls select{width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:44px;margin:0;padding:10px 12px;font-size:14px;text-overflow:ellipsis}
.list-result{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:32px;margin:0 0 12px}
.list-result p{margin:0;font-size:12px}.list-result button{padding:6px 12px;font-size:12px;min-height:36px}.list-result [hidden]{display:none}
.home-primary{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.home-primary .tile{min-height:110px;padding:18px}.home-primary .tile-label{font-size:16px}
.home-work-links{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}.home-work-links button{min-height:44px;padding:8px 12px;font-size:13px}
.user-menu>summary{position:relative}.menu-alert{position:absolute;top:4px;right:4px;width:9px;height:9px;background:var(--blue,#58baff);border-radius:50%;box-shadow:0 0 0 2px var(--panel)}.menu-alert[hidden]{display:none}
.user-menu.has-alert .menu-alert{background:#f25b64}.user-menu.has-alert>summary{border-color:#f25b64}
.user-menu-panel{box-sizing:border-box;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 104px);padding:16px;overscroll-behavior:contain}
.user-menu-panel .messages-inbox{display:flex;justify-content:flex-start;text-align:left}.user-menu-panel .messages-label{display:inline}.user-menu-panel .message-badge{margin-left:auto}
.workspace-menu-group{display:grid;gap:2px;padding:6px 0;border-top:1px solid var(--line)}.workspace-menu-group h3{font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin:10px 8px 5px}
.workspace-menu-group button{justify-content:flex-start;text-align:left;border-color:transparent;background:transparent;border-radius:8px;padding:9px 10px;gap:10px}.workspace-menu-group button:hover,.workspace-menu-group button[aria-current=page]{background:var(--panel2);border-color:var(--line)}.workspace-menu-group button .icon{width:17px;height:17px;flex-shrink:0}
.menu-account{border-top:1px solid var(--line);padding-top:8px}.menu-account>summary{cursor:pointer;min-height:44px;padding:12px 8px;font-size:14px;font-weight:650}.menu-account>button{margin-top:8px}
@media(max-width:620px){
 .list-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.list-controls .list-search{grid-column:1/-1}.list-controls input,.list-controls select{font-size:16px;padding:9px 10px}.list-controls label{font-size:12px}.list-controls .list-scope{grid-column:1/-1}
 .list-result button{min-height:44px}.home-primary{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.home-primary .tile{min-height:96px;padding:12px 9px}.home-primary .tile-count{font-size:23px}.home-primary .tile-label{font-size:13px;line-height:1.3}.home-primary .tile-top .icon{width:19px;height:19px}.home-work-links{gap:6px}.home-work-links button{font-size:13px;padding:8px 10px;flex:1 1 auto}.home-work-links .icon{display:none}
 .user-menu-panel{max-height:calc(100dvh - 100px);width:min(360px,calc(100vw - 24px))}
}
/* The shared menu opens from the top right; bottom navigation is work only. */
.site-header .header-actions{margin-left:auto}.site-header .user-menu{z-index:60}
.site-header .user-menu>summary{min-width:44px;min-height:44px;justify-content:center;padding:8px 12px;font-size:18px}
.site-header .user-menu-panel{top:calc(100% + 8px);bottom:auto;right:0;left:auto;max-height:calc(100dvh - 160px - env(safe-area-inset-bottom))}
.site-header .account-menu-label{display:inline;font-size:13px}
.user-menu-panel .menu-sync{font-size:11px;line-height:1.4;margin:0;color:var(--muted)}
.user-menu-panel .menu-refresh{display:flex;justify-content:flex-start;gap:10px}.user-menu-panel .refresh-label{display:inline}
.user-menu-panel .admin-preview{display:grid;gap:5px;min-width:0}.user-menu-panel .admin-preview.hidden{display:none}.user-menu-panel .admin-preview label{display:block;font-size:11px}.user-menu-panel .admin-preview select{width:100%;max-width:100%;font-size:14px;margin:0}
.bottom-nav{padding-left:64px;padding-right:64px}.bottom-nav .nav-button{width:min(28%,180px);font-size:12px}
@media(max-width:620px){.site-header{height:59px;min-height:59px;flex-wrap:nowrap}.site-header .account-menu-label{display:none}.site-header .user-menu>summary{padding:8px;width:44px}.bottom-nav{padding-left:48px;padding-right:48px}.bottom-nav .nav-button{width:33%;font-size:10px}.user-menu-panel .admin-preview select{font-size:16px}}

/* Role-specific process entry points and the shared sales board. */
.home-primary{grid-template-columns:repeat(var(--home-columns,4),minmax(0,1fr))}
.sales-board{grid-template-columns:repeat(4,minmax(270px,1fr))}.sales-board .sales-focus{border-color:var(--accent,#58baff)}
.sales-board-job .sales-action{width:100%;box-sizing:border-box;min-height:44px;font-size:14px;margin-top:8px;padding:8px}
.sales-task-dialog{width:min(560px,calc(100vw - 24px));box-sizing:border-box}.sales-task-dialog textarea{width:100%;box-sizing:border-box}.sales-task-dialog .sales-review-check{display:flex;align-items:center;gap:10px;margin:18px 0}.sales-review-check input{width:20px;min-width:20px;height:20px}.sales-action-status{white-space:pre-wrap}
@media(max-width:620px){.home-primary{grid-template-columns:repeat(2,minmax(0,1fr))}.home-primary .tile{min-height:90px}.sales-board{grid-template-columns:repeat(4,minmax(min(82vw,330px),1fr))}.sales-board-job .sales-action{font-size:16px}}

/* Shared navigation/action surfaces, including packing-slip disclosure. */
:root{--action-bg:#15354e;--action-hover:#205271;--action-ink:#ecfaff;--action-line:#477490;--blocked-bg:#17222b;--blocked-ink:#a5afb7;--blocked-line:#53616a}
@media screen{html[data-theme=light]{--action-bg:#e8f1f8;--action-hover:#d7e8f5;--action-ink:#174e73;--action-line:#b5ccde;--blocked-bg:#e2e5e8;--blocked-ink:#606a72;--blocked-line:#a9b0b6}}
html :is(button.secondary,.details-actions button:not(.primary),.order-header-pack>summary,.tile,.quick-card){background:var(--action-bg);color:var(--action-ink);border-color:var(--action-line)}
html :is(button.secondary,.details-actions button:not(.primary),.order-header-pack>summary,.tile,.quick-card):hover:not(:disabled):not([aria-disabled=true]){background:var(--action-hover);filter:none}
html :is(.tile.primary-tile,.tile.dark){background:var(--action-bg);border-color:var(--action-line)}
html :is(.tile.primary-tile,.tile.dark):hover{background:var(--action-hover)}
html button:is(:disabled,[aria-disabled=true]),html .order-header-actions button:disabled{background:var(--blocked-bg);color:var(--blocked-ink);border:1px dashed var(--blocked-line);box-shadow:none;opacity:1;cursor:not-allowed;filter:none}
html .order-delivery-trigger:disabled::after{content:'⊘';font-size:1em;color:currentColor}
html .order-delivery-menu[data-busy=true] .order-delivery-trigger{cursor:wait}
html .order-delivery-menu[data-busy=true] .order-delivery-trigger::after{content:''}

html[data-theme] :is(button,.order-header-actions button):is(:disabled,[aria-disabled=true]){background:var(--blocked-bg);color:var(--blocked-ink);border:1px dashed var(--blocked-line);box-shadow:none;opacity:1;cursor:not-allowed;filter:none}

/* Calendar controls share one selector; layout adapts to the available width. */
.plan-calendar-filter,.plan-period-mobile,.plan-help{display:none}
@media(max-width:700px){
 .plan-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:0 0 10px}
 .plan-toolbar .plan-period{grid-column:1/-1;grid-row:1;order:0;margin:0 0 2px;font-size:16px;line-height:1.4}
 .plan-period-desktop,.plan-toolbar .plan-filters,.plan-desktop-help{display:none}
 .plan-period-mobile{display:inline}
 .plan-toolbar .plan-week-nav{grid-column:1;grid-row:2;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:5px;min-width:0}
 .plan-toolbar button{min-height:44px;padding:8px;font-size:14px;white-space:nowrap}
 .plan-toolbar .plan-calendar-filter{display:block;grid-column:1/-1;grid-row:3;min-width:0;width:100%;min-height:44px;font-size:16px;padding:8px 12px}
 .plan-help{display:block;margin:0 0 12px;color:var(--muted);font-size:12px}
 .plan-help>summary{cursor:pointer;padding:6px 0;min-height:32px}
 .plan-help .plan-team-legend{margin:8px 0}
 .plan-help .plan-legend{margin:6px 0}
}

@media(max-width:700px){.plan-toolbar .plan-view-toggle{grid-column:2;grid-row:2}}

/* Mobile drill-down uses the same simple top-back pattern as full-screen tasks. */
.mobile-header-back{display:none}
@media(max-width:700px){
 .mobile-subpage .site-header{height:56px;justify-content:flex-start;padding:0 12px}
 .mobile-subpage .site-header>.brand{display:none}
 .mobile-subpage .site-header>.header-actions{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;margin-left:auto}
 html .mobile-subpage .mobile-header-back{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;color:var(--ink);font-size:32px;line-height:1}
 .bottom-nav>.bottom-back{display:none}
 .bottom-nav{padding-right:5px}
}


.responsive-dialog>.completion-heading{justify-content:flex-start;flex-direction:row}
.responsive-dialog>.completion-heading .dialog-back{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;max-width:none;padding:0;font-size:30px;line-height:1}
.dialog-content-title{font-size:24px;line-height:1.25;margin:0 0 16px}

/* Desktop: compact working surfaces, with dialogs kept over the current page. */
@media(min-width:701px) and (min-height:501px),(min-width:701px) and (pointer:fine){
 .home-primary{gap:10px}
 .home-primary .tile{min-height:78px;padding:14px 16px;border-radius:10px;display:flex;flex-direction:row;align-items:center;gap:14px}
 .home-primary .tile-top{display:contents}
 .home-primary .tile-top .icon{width:22px;height:22px;flex-shrink:0}
 .home-primary .tile-label{flex:1;font-size:15px;text-align:left}
 .home-primary .tile-count{order:3;font-size:24px;margin-left:auto}
 .dashboard-group{margin-bottom:18px}
 .list-controls{gap:12px;margin-bottom:6px}
 .list-controls label{flex:0 1 210px}
 .list-controls .list-search{flex:1 1 280px}
 .list-controls input,.list-controls select{min-height:40px;padding:8px 10px}
 .list-result{margin-bottom:6px;min-height:28px}
 .orders:has(>.order){gap:0;border-top:1px solid var(--line)}
 .orders>.order{min-height:76px;padding:12px 14px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
 .orders>.order:hover{background:var(--panel2)}
 .orders>.order h3{font-size:16px}
 .orders>.order p{margin:3px 0}
 .production-view-switch{margin-bottom:12px}
 .plan-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:8px}
 .plan-toolbar .plan-period{order:-1;flex:1 0 100%;margin:0 0 4px;font-size:20px}
 .plan-toolbar .plan-filters,.plan-desktop-help{display:none}
 .plan-toolbar .plan-week-nav{display:flex;gap:6px;margin:0}
 .plan-toolbar button{min-height:40px;padding:8px 12px;font-size:14px}
 .plan-toolbar .plan-calendar-filter{display:block;width:190px;min-height:40px;padding:8px 12px;margin:0;font-size:14px}
 .plan-toolbar .plan-view-toggle{margin-left:auto}
 .plan-help{display:block;margin:0 0 12px;color:var(--muted);font-size:12px}
 .plan-help>summary{cursor:pointer;width:fit-content;padding:6px 0}
 .plan-help .plan-team-legend{margin:8px 0}
 .plan-help .plan-legend{margin:6px 0}
 .responsive-dialog[open]{position:fixed;inset:0;margin:auto;width:min(720px,calc(100vw - 64px));height:auto;max-height:85dvh;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}
 .responsive-dialog.plan-dialog,.responsive-dialog.sales-task-dialog{width:min(560px,calc(100vw - 64px))}
 .responsive-dialog::backdrop{background:#020b15b3}
}
@media(min-width:701px) and (max-width:1000px){
 .home-primary{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* No reserved slots after account/back moved out of the mobile footer. */
@media(max-width:700px){
 .bottom-nav{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));gap:4px}
 .bottom-nav>.nav-button{flex:1 1 0;width:auto;min-width:0;max-width:none;padding-left:4px;padding-right:4px}
}

/* HOME v1.13.83: role-specific work priorities and a separate production desktop dashboard. */
.home-priority-section{margin:18px 0 28px;display:grid;gap:11px}
.home-priority-section .section-heading{margin:0;font-size:18px}
.home-task-list{display:grid;gap:7px}
.home-task-row{width:100%;min-height:66px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:11px 14px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:10px;text-align:left;font-weight:500}
.home-task-row:hover{background:var(--panel2)}
.home-task-identity{min-width:0;display:grid;gap:2px;overflow:hidden}
.home-task-identity strong{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.home-task-title{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-task-right{display:flex;align-items:flex-end;flex-direction:column;flex-shrink:0;gap:3px;text-align:right}
.home-task-stage,.home-task-hold{font-size:11px;color:var(--muted)}
.home-task-hold{color:#e7be80}
.home-task-date{display:grid;gap:0;font-size:12px;color:var(--ink)}
.home-task-date small{font-size:10px;color:var(--muted)}
.home-task-date strong{font-size:13px;white-space:nowrap}
.home-task-date.is-overdue strong,.home-task-date.is-overdue small{color:#ff9fa5}
.home-task-date.is-today strong{color:#ffd18c}
.home-priority-note{margin:1px 0 0;font-size:12px;color:var(--muted)}
.home-priority-section>.secondary{justify-self:start;min-height:40px;padding:8px 13px;font-size:13px}
.home-production-desktop{display:grid;gap:16px;margin:16px 0 32px}
.home-production-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}
.home-production-heading .section-heading{margin:0}
.home-production-heading>button{min-height:40px;font-size:13px}
.home-production-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.home-production-stat{background:var(--panel);border:1px solid var(--line);border-radius:10px;display:flex;gap:8px;align-items:center;padding:12px}
.home-production-stat strong{font-size:26px;line-height:1;color:var(--blue)}
.home-production-stat span{font-size:12px;color:var(--muted)}
.home-production-stat.is-urgent strong{color:#ff9fa5}
.home-production-desktop>.section-heading{margin:5px 0 -7px}
.home-production-board{min-width:0}
/* Menu links must not inherit the global secondary-button card treatment. */
html .user-menu-panel .workspace-menu-group button.menu-link{display:flex;align-items:center;width:100%;min-height:43px;gap:11px;padding:10px 9px;border:0;border-radius:6px;background:transparent;color:var(--ink);font-size:14px;font-weight:550;box-shadow:none;text-align:left}
html .user-menu-panel .workspace-menu-group button.menu-link:hover{background:var(--panel2);border:0;box-shadow:none}
html .user-menu-panel .workspace-menu-group button.menu-link[aria-current=page]{background:transparent;color:var(--blue);font-weight:750;border:0}
html .user-menu-panel>.menu-refresh,html .user-menu-panel>.messages-inbox{background:transparent;border:0;border-radius:6px;box-shadow:none;color:var(--ink);padding:10px 9px;min-height:42px}
html .user-menu-panel>.menu-refresh:hover,html .user-menu-panel>.messages-inbox:hover{background:var(--panel2);border:0}
@media(max-width:900px){
 .home-production-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home-task-row{min-height:64px;padding:10px 12px}
 .home-task-identity strong{font-size:13px}
}

/* Persistent navigation: the same hamburger remains on all views, including mobile drill-down. */
html .site-header{z-index:100}
html .site-header .header-actions{display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto;margin-left:auto;min-width:44px}
html .site-header .user-menu>summary{display:flex;align-items:center;justify-content:center;gap:9px;min-height:44px;padding:0 13px;border:1px solid var(--action-line);border-radius:12px;background:var(--action-bg);color:var(--action-ink);font-size:14px;line-height:1;box-shadow:none}
html .site-header .user-menu>summary:hover,html .site-header .user-menu[open]>summary{background:var(--action-hover);color:var(--action-ink)}
html .site-header .user-menu>summary .menu-toggle-icon{display:block;width:22px;height:22px;flex:0 0 22px}
html .site-header .user-menu>summary:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
/* Resource blocking is a navigation action, not a centered card-button. */
html .user-menu-panel>.order-delete-menu-action,html .user-menu-panel>.resource-block-menu-action{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:43px;gap:11px;padding:10px 9px;border:0;border-radius:6px;background:transparent;color:var(--ink);box-shadow:none;text-align:left;font-size:14px;font-weight:550;line-height:1.4}
html .user-menu-panel>.order-delete-menu-action:hover,html .user-menu-panel>.order-delete-menu-action:focus-visible,html .user-menu-panel>.resource-block-menu-action:hover,html .user-menu-panel>.resource-block-menu-action:focus-visible{background:var(--panel2);border:0}
html .user-menu-panel>.order-delete-menu-action svg,html .user-menu-panel>.resource-block-menu-action svg{display:block;width:18px;height:18px;flex:0 0 18px}
html .user-menu-panel>.order-delete-menu-action span,html .user-menu-panel>.resource-block-menu-action span{min-width:0}
@media(max-width:700px){
 html .mobile-subpage .site-header{justify-content:space-between;padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right));gap:8px}
 html .mobile-subpage .site-header>.header-actions{display:flex;visibility:visible;margin-left:auto}
}
@media(max-width:620px){
 html .site-header .user-menu>summary{width:44px;min-width:44px;height:44px;min-height:44px;padding:0}
}

/* Desktop mounting reports: compact fields, bounded controls and visible actions. */
@media(min-width:701px) and (min-height:501px){
 .completion-dialog:has(.completion-time-fields){width:min(900px,calc(100vw - 64px))}
 .completion-dialog:has(.completion-time-fields) .live-dialog-content{padding-right:6px;scrollbar-gutter:stable}
 .completion-dialog:has(.completion-time-fields) .completion-context{margin:10px 0 16px}
 .completion-dialog .work-form:has(>.completion-time-fields){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px}
 .completion-dialog .work-form:has(>.completion-time-fields)>*{grid-column:1/-1;min-width:0}
 .completion-dialog .work-form:has(>.completion-time-fields)>.completion-time-fields{grid-column:1/3;grid-row:1}
 .completion-dialog .work-form:has(>.completion-time-fields)>.work-field:has(input:not([type])){grid-column:3;grid-row:1}
 .completion-dialog .work-form:has(>.completion-time-fields) .work-field{min-width:0}
 .completion-dialog .work-form:has(>.completion-time-fields) :is(input,textarea,select){max-width:100%;min-width:0}
 .completion-dialog .work-form:has(>.completion-time-fields) .hour-shortcuts{gap:8px}
 .completion-dialog .work-form:has(>.completion-time-fields) textarea{min-height:88px;height:88px}
 .completion-dialog .work-form:has(>.completion-time-fields)>p{margin:0}
 .completion-dialog .work-form:has(>.completion-time-fields) .completion-buttons{position:sticky;bottom:0;background:var(--panel);padding:12px 0 4px;z-index:1}
}

/* LIVE brukerinvitasjoner – ryddig også på smale skjermer. */
.invite-controls{border-top:1px solid var(--line);margin-top:16px;padding-top:14px;display:grid;gap:9px;min-width:0}
.invite-controls>strong{font-size:14px}
.invite-controls p{margin:0;font-size:12px;line-height:1.55}
.invite-controls>small{font-size:12px;line-height:1.5}
.invite-phone-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;min-width:0}
.invite-phone-form label{min-width:160px;flex:1 1 180px;font-size:12px}
.invite-phone-form input{width:100%;min-width:0;margin-top:6px;font-size:14px}
.invite-phone-form button{flex:0 0 auto;min-height:41px}
.invite-controls>button{justify-self:start;min-height:42px}
@media(max-width:520px){.invite-phone-form{display:grid;grid-template-columns:minmax(0,1fr)}.invite-phone-form button{justify-self:start}.invite-controls>button{max-width:100%}}

/* Team directory – internal and external work roles, mobile-first controls. */
.user-admin-body{display:grid;gap:24px}
.user-create-panel{display:flex;flex-direction:column;gap:13px}
.user-create-panel>button{align-self:flex-start}
.user-create-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 18px}
.user-create-form h3,.user-create-form>p{grid-column:1/-1;margin:0}
.user-create-form>button{align-self:end}
.team-user-field{display:grid;gap:5px;font-size:13px;min-width:0}
.team-user-field input,.team-user-field select{width:100%;max-width:100%;min-width:0}
.user-group{display:grid;gap:12px}
.user-group-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.user-group-heading h3{margin:0}
.team-user-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 18px;border-top:1px solid var(--line);padding-top:16px}
.team-user-settings .team-user-field,.team-user-settings>button{grid-column:1/-1}
.team-user-settings>button{justify-self:start;min-height:42px}
.team-user-switch{display:flex;align-items:center;gap:10px;font-size:13px}
.team-user-switch input{flex:none}
@media(max-width:700px){.user-create-form{grid-template-columns:minmax(0,1fr)}.user-create-form h3,.user-create-form>p{grid-column:auto}.user-create-form>button{justify-self:start}}
@media(max-width:430px){.team-user-settings{grid-template-columns:1fr}.team-user-settings .team-user-field,.team-user-settings>button{grid-column:auto}}


/* LIVE user directory: compact overview with unmistakable work role, Admin and login state. */
.access-grid .user-card{min-width:0;padding:19px 20px 15px;margin:0;display:flex;flex-direction:column;gap:0}
.user-card .access-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-wrap:wrap}
.user-card .access-heading h3{font-size:20px;line-height:1.3;margin:0}
.user-card .access-heading .tag{font-size:11px;font-weight:650;line-height:1.35;max-width:100%}
.user-card .access-email{font-size:12px;line-height:1.4;margin:5px 0 13px;overflow-wrap:anywhere}
.user-card-tags{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}
.user-role-tag,.user-admin-tag{display:inline-flex;align-items:center;font-size:12px;line-height:1.3;font-weight:700;min-height:28px;padding:5px 10px;border-radius:8px;border:1px solid var(--line);background:var(--panel2);color:var(--ink)}
.user-admin-tag{font-weight:550;color:var(--muted)}
.user-admin-tag.has-admin{color:var(--ink);border-color:var(--blue)}
.user-card .user-scope-note{font-size:12px;line-height:1.45;margin:9px 0 12px;color:var(--muted)}
.user-quick-rights{display:flex;align-items:center;gap:9px 20px;flex-wrap:wrap;padding:11px 0;margin:0;font-size:12px;color:var(--ink);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.user-quick-rights span{white-space:normal}
.user-card details{min-width:0}
.user-card details>summary{cursor:pointer;font-size:13px;font-weight:700;line-height:1.45;padding:14px 0;min-height:43px;color:var(--ink);overflow-wrap:anywhere}
.user-card details>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:6px}
.user-more-access{margin:0}
.user-more-access .access-rights{margin:0 0 10px}
.user-more-access .access-rights>div{padding:8px 0}
.user-more-access .user-access-subtitle{font-size:12px;color:var(--muted);margin:12px 0 2px}
.user-more-access .access-chips{margin:10px 0 16px}
.user-edit-section,.user-invite-section{border-top:1px solid var(--line);padding:0;margin:0}
.user-edit-section .team-user-settings{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;border:0;padding:0 0 16px;margin:0}
.user-card .team-user-settings .team-user-field{grid-column:auto;width:100%;min-width:0}
.user-card .team-user-settings>button{grid-column:auto;justify-self:start;min-height:40px;max-width:100%}
.user-card .team-user-settings input,.user-card .team-user-settings select{max-width:100%;box-sizing:border-box}
.user-card .team-user-switch{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:12px;padding:12px 13px;margin:0;min-width:0;background:var(--panel2);border:1px solid var(--line);border-radius:10px;cursor:pointer;color:var(--ink);font-weight:400}
.user-card .team-user-switch input[type=checkbox]{appearance:auto;display:block;box-sizing:border-box;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;max-height:18px!important;flex:none;justify-self:start;margin:2px 0 0!important;padding:0!important;accent-color:var(--blue)}
.user-card .team-user-switch input[type=checkbox]:disabled{cursor:not-allowed;opacity:.7}
.user-card .team-user-switch-text{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}
.user-card .team-user-switch-text strong{font-size:13px;line-height:1.4}
.user-card .team-user-switch-text small{font-size:11px;font-weight:400;line-height:1.4;color:var(--muted)}
.user-invite-section .invite-controls{margin:0;padding:0 0 12px;border-top:0;gap:8px}
.user-invite-section .invite-controls>strong{display:none}
.user-invite-section .invite-phone-form{margin:0}
.user-card .user-external-note{font-size:12px;line-height:1.55;margin:12px 0 2px;color:var(--muted)}
@media(max-width:700px){
 .access-grid .user-card{padding:16px}
 .user-card .access-heading{align-items:start}
 .user-card .access-heading h3{font-size:18px}
 .user-card .team-user-settings>button{width:100%}
 .user-quick-rights{gap:6px 14px}
}

/* Second-factor selection and explicit opt-in SMS enrollment. */
.mfa-method-choice{display:grid;grid-template-columns:1fr;gap:10px;margin:17px 0}
.mfa-method-choice button{width:100%;min-height:48px;text-align:center}
#mfa-code-step{min-width:0}
#mfa-other-method{margin-top:10px;width:100%}
.sms-mfa-settings{max-width:660px;margin:16px auto 22px}
.sms-mfa-settings h2{margin:0 0 10px;font-size:20px}
.sms-mfa-settings p{line-height:1.5}
#sms-mfa-enroll-form,#sms-mfa-verify-form{display:grid;gap:11px;margin:16px 0}
#sms-mfa-enroll-form input,#sms-mfa-verify-form input{min-width:0;max-width:100%;box-sizing:border-box}
#sms-mfa-enroll-form button,#sms-mfa-verify-form button{justify-self:start;min-height:43px}
#sms-mfa-close{min-height:40px}
@media(max-width:620px){
 .sms-mfa-settings{margin:12px 0 18px;padding:16px}
 #sms-mfa-enroll-form button,#sms-mfa-verify-form button{width:100%}
}


/* Long-lived errors: stay readable until explicitly dismissed.
 * Success and neutral messages retain the existing 2.5-second auto-dismiss. */
.feedback-persistent{
 display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
 
 max-height:min(40vh,320px);overflow-y:auto;
 box-shadow:0 10px 28px rgba(0,0,0,.24)
}
.feedback-message{display:block;min-width:0;flex:1;white-space:pre-wrap;overflow-wrap:anywhere}
.feedback-dismiss{
 display:inline-flex;align-items:center;justify-content:center;flex:none;
 width:36px;min-width:36px;height:36px;min-height:36px;padding:0;
 border:1px solid currentColor;border-radius:9px;color:inherit;
 background:transparent;font-size:24px;line-height:1;cursor:pointer
}
.feedback-dismiss:hover{background:rgba(255,255,255,.12)}
.feedback-dismiss:focus-visible{outline:3px solid #8cdeff;outline-offset:2px}
.feedback.warning{border-color:#d2a66b;background:#503d22;color:#fff1d4}
@media(max-width:620px){
 .feedback{top:66px;max-height:45dvh;padding:12px 13px}
 .feedback-dismiss{width:34px;min-width:34px;height:34px;min-height:34px}
}

.feedback.success{border-color:#389b83;background:#123e36;color:#cbffee}


/* v1.13.98: personnel overview is a table; all editing lives on actual subpages. */
.team-directory-page{width:100%;max-width:none;margin:0 0 32px;min-width:0}
.team-directory-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 8px}
.team-directory-heading h2{margin:0;font-size:clamp(21px,2.4vw,29px);line-height:1.25}
.team-directory-heading button{min-height:39px;padding:7px 11px}
.team-directory-page>p.muted{margin:0 0 18px;font-size:13px;line-height:1.55}
.team-directory-toolbar{display:flex;justify-content:flex-end;margin:0 0 16px}
.team-directory-toolbar button{min-height:43px}
.team-directory-group{margin:0 0 22px}
.team-directory-group-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 9px}
.team-directory-group-head h3{margin:0;font-size:17px}
.team-directory-group-head .muted{font-size:12px}
.team-directory-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:13px;background:var(--panel);box-shadow:0 2px 9px rgba(0,0,0,.08)}
.team-directory-table{border-collapse:collapse;width:100%;min-width:0;table-layout:fixed}
.team-directory-table th,.team-directory-table td{font-size:13px;line-height:1.35;text-align:left;vertical-align:middle;padding:11px 12px;overflow-wrap:anywhere}
.team-directory-table thead th{font-size:11px;letter-spacing:.025em;font-weight:720;color:var(--muted);background:var(--panel2);border-bottom:1px solid var(--line)}
.team-directory-table tbody tr+tr>*{border-top:1px solid var(--line)}
.team-directory-table tbody tr:hover{background:rgba(91,164,205,.07)}
.team-directory-table .team-col-name{width:26%}
.team-directory-table .team-col-name strong{display:block;font-size:13px;font-weight:750;color:var(--ink)}
.team-directory-table .team-col-name small{display:block;line-height:1.45;margin-top:2px;font-size:11px;word-break:break-word;font-weight:400}
.team-directory-table .team-col-role{width:19%}
.team-directory-table .team-col-status{width:18%}
.team-directory-table .team-col-seen{width:20%;font-variant-numeric:tabular-nums}
.team-directory-table .team-col-action{width:17%;text-align:right}
.team-directory-table .team-col-action button{font-size:12px;min-height:37px;padding:7px 10px;white-space:nowrap}
.team-progress-label{font-size:12px;font-weight:700;color:var(--ink)}
.team-progress-label.is-success{color:var(--green)}
.team-progress-label.is-disabled{color:var(--muted)}
.team-directory-table .team-mobile-meta{display:none!important}
.team-empty-row{text-align:center!important;padding:20px!important;color:var(--muted)}
.team-detail-section{min-width:0;margin:0 0 14px}
.team-detail-section h3{font-size:17px;margin:0 0 12px}
.team-detail-section h4{font-size:13px;margin:18px 0 8px}
.team-milestones{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.team-milestone{min-width:0;border:1px solid var(--line);border-radius:11px;background:var(--panel2);padding:12px;display:flex;flex-direction:column;gap:6px}
.team-milestone-title{color:var(--muted);font-size:11px;font-weight:650}
.team-milestone strong{color:var(--ink);font-size:14px}
.team-milestone.is-done strong{color:var(--green)}
.team-milestone small{font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.team-inactive-note{color:#ffd4be;margin:12px 0 0}
.team-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.team-detail-grid .panel{margin:0}
.team-detail-rights{margin:9px 0}
.team-detail-rights>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:9px 0;border-bottom:1px solid var(--line)}
.team-detail-rights dt,.team-detail-rights dd{font-size:13px;margin:0}
.team-detail-rights dd{font-weight:750}
.team-directory-page .team-user-settings{display:grid;grid-template-columns:minmax(0,1fr);gap:13px;margin:0;min-width:0}
.team-directory-page .team-user-settings .team-user-field{width:100%;min-width:0;display:grid;gap:7px}
.team-directory-page .team-user-settings input:not([type=checkbox]),.team-directory-page .team-user-settings select{max-width:100%;min-width:0}
.team-directory-page .team-user-settings>button{grid-column:auto;justify-self:start;max-width:100%}
.team-directory-page .team-user-switch{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:10px;padding:12px;background:var(--panel2);border:1px solid var(--line);border-radius:10px;min-width:0}
.team-directory-page .team-user-switch input[type=checkbox]{appearance:auto;display:block;box-sizing:border-box;width:18px!important;min-width:18px!important;max-width:18px!important;height:18px!important;min-height:18px!important;max-height:18px!important;padding:0!important;margin:2px 0 0!important;accent-color:var(--blue)}
.team-directory-page .team-user-switch-text{display:grid;gap:4px;min-width:0}
.team-directory-page .team-user-switch-text strong{font-size:13px;font-weight:750}
.team-directory-page .team-user-switch-text small{font-size:11px;line-height:1.5;color:var(--muted);font-weight:400}
.team-directory-page .team-new-user-form{max-width:540px}
.team-invite-slot{border-top:1px solid var(--line);padding-top:14px;margin-top:17px}
.team-invite-slot .invite-controls{max-width:550px}
.team-invite-slot .invite-controls>strong{display:none}
.team-invite-slot .invite-phone-form{max-width:430px}
.team-invite-slot .invite-status-note{margin:10px 0}
@media(max-width:850px){.team-milestones{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 .team-detail-grid{grid-template-columns:minmax(0,1fr)}
 .team-directory-table .team-col-role,.team-directory-table .team-col-seen{display:none}
 .team-directory-table .team-col-name{width:48%}
 .team-directory-table .team-col-status{width:30%}
 .team-directory-table .team-col-action{width:22%}
 .team-directory-table .team-mobile-meta{display:block!important}
 .team-directory-table th,.team-directory-table td{padding:11px 8px}
 .team-directory-table .team-col-action button{padding:7px 9px}
 .team-directory-page .team-user-settings>button{width:100%;justify-self:stretch}
}
@media(max-width:380px){
 .team-directory-table .team-col-name{width:48%}
 .team-directory-table .team-col-status{width:31%}
 .team-directory-table .team-col-action{width:21%}
 .team-directory-table .team-col-action button{font-size:11px;padding:6px}
 .team-milestones{grid-template-columns:minmax(0,1fr)}
}

/* Reversible test-period override; this banner does not imply lower data visibility. */

/* Split installation visits: a small accordion on order cards, separate team tasks. */
.plan-visits-details{min-width:0;border-top:1px solid var(--line);margin-top:7px}
.plan-visits-summary{padding:12px 0;cursor:pointer;font-weight:650;line-height:1.5;min-height:44px;box-sizing:border-box;overflow-wrap:anywhere}
.plan-visits-content{display:grid;gap:10px;padding:4px 0 10px;min-width:0}
.plan-allocation{margin:4px 0;font-size:13px;line-height:1.5}
.plan-detail-row{min-width:0}
.plan-visit-copy{flex:1 1 220px;min-width:0;display:grid;gap:4px;overflow-wrap:anywhere}
.plan-visit-copy>small{display:block;line-height:1.45}
.plan-visit-description{font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;margin:3px 0}
.plan-visit-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:0}
.plan-visit-actions button{min-height:40px}
.k2-visit-list{margin-top:16px}
.k2-visit-list h3{font-size:16px;margin-bottom:8px}
.k2-report-files{margin-top:12px}
.k2-report-files>summary{padding:12px 0;min-height:44px;cursor:pointer;font-weight:650}
@media(max-width:700px){
 .plan-visits-details{margin-top:4px}
 .plan-visits-summary{font-size:14px;padding:12px 2px}
 .plan-visits-content{padding:4px 0 8px;gap:8px}
 .plan-detail-row{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin:0;padding:12px 0}
 .plan-visit-actions{display:flex;gap:8px}
 .plan-visit-actions>button{flex:1 1 auto;min-height:44px;max-width:100%;white-space:normal}
 .plan-form textarea{width:100%;min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}
 .plan-visits-content .plan-estimate-form{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
 .plan-visits-content .plan-estimate-form>*{min-width:0;max-width:100%}
 .k2-visit-list{margin-top:8px}
}

.order-visit-summary{display:block;padding:4px 12px 8px;font-size:12px;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}

/* LIVE 1.13.106: Roomy two-column planning dialog on desktop only.
   No changes to phone/tablet form sizing or touch targets. */
@media (min-width:901px) and (min-height:501px){
 .plan-dialog,.responsive-dialog.plan-dialog{width:min(820px,calc(100vw - 64px));max-width:820px;max-height:88dvh}
 .plan-dialog .plan-form:has(>.plan-field-assignee){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px;row-gap:13px;align-items:start}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>label{min-width:0}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>label :is(input,select,textarea){max-width:100%;min-width:0;box-sizing:border-box}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>.plan-field-assignee{grid-column:1;grid-row:1}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>.plan-field-date{grid-column:2;grid-row:1}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>.plan-field-start{grid-column:1;grid-row:2}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>.plan-field-duration{grid-column:2;grid-row:2}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>.plan-field-description{grid-column:1/-1;grid-row:3}
 .plan-dialog .plan-form>.plan-availability{grid-column:1/-1;grid-row:4}
 .plan-dialog .plan-form:has(>.plan-field-assignee)>.plan-field-description textarea{width:100%;min-height:110px;resize:vertical}
 .plan-dialog .plan-form>small,.plan-dialog .plan-form>.plan-field-confirmed,
 .plan-dialog .plan-form>.plan-end,.plan-dialog .plan-form>.plan-transfer,
 .plan-dialog .plan-form>.details-actions{grid-column:1/-1}
 .plan-dialog .plan-form>.details-actions{display:flex;justify-content:flex-end;gap:10px}
 .plan-dialog .plan-form>.details-actions>button{min-width:150px}
}

/* Compact administrative inventory; detail text is opt-in. */
.system-overview-list{border-top:1px solid var(--line,#d1d5db)}
.system-overview-row{border-bottom:1px solid var(--line,#d1d5db);padding:0;background:transparent}
.system-overview-row>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px;cursor:pointer;list-style:none}
.system-overview-row>summary strong{font-size:14px;font-weight:600}
.system-overview-row>summary::before{content:'›';flex:0 0 10px;transition:transform .15s}
.system-overview-row[open]>summary::before{transform:rotate(90deg)}
.system-overview-row>summary strong{flex:1}
.system-overview-row>summary .tag{flex:0 0 auto;font-size:11px}
.system-overview-copy{padding:0 24px 12px;font-size:13px}
.system-overview-copy p{margin:4px 0}
@media(max-width:600px){.system-overview-row>summary{gap:8px}.system-overview-row>summary strong{font-size:13px}.system-overview-row>summary .tag{max-width:46%;white-space:normal;text-align:right}}


.all-orders-column-sort{flex:0 0 auto;width:calc(100% - 16px);margin:0 8px 8px;min-height:30px;padding:3px 7px;font-size:12px}

/* Resource absence dialog: controls must stop before the inner scrollbar. */
.responsive-dialog.resource-dialog>.live-dialog-content{
 box-sizing:border-box;min-inline-size:0;max-inline-size:100%;width:100%;
 overflow-x:hidden;scrollbar-gutter:stable;
 padding-inline-start:max(16px,env(safe-area-inset-left));
 padding-inline-end:max(30px,env(safe-area-inset-right));
}
.responsive-dialog.resource-dialog .resource-block-body,
.responsive-dialog.resource-dialog .resource-block-form,
.responsive-dialog.resource-dialog .resource-block-form>label{
 box-sizing:border-box;min-inline-size:0;min-width:0;max-width:100%;width:100%;
}
.responsive-dialog.resource-dialog .resource-block-form{
 display:grid;grid-template-columns:minmax(0,1fr);row-gap:12px;
}
.responsive-dialog.resource-dialog .resource-block-form>label{
 display:grid;grid-template-columns:minmax(0,1fr);gap:7px;
}
.responsive-dialog.resource-dialog .resource-block-form :is(input,select,textarea){
 box-sizing:border-box;min-inline-size:0;min-width:0;max-inline-size:100%;width:100%;
}
.responsive-dialog.resource-dialog .resource-block-form .date-input-frame{
 box-sizing:border-box;display:flex;align-items:center;width:100%;min-width:0;max-width:100%;
 padding:8px 12px;border:1px solid var(--line);border-radius:11px;background:var(--input);
}
.responsive-dialog.resource-dialog .resource-block-form .date-input-frame>input[type=date]{
 flex:1 1 0%;display:block;width:0;min-width:0;max-width:100%;padding:0;margin:0;
 min-height:32px;border:0;border-radius:0;background:transparent;outline:none;
}
.responsive-dialog.resource-dialog .resource-block-times{
 min-width:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
}
.responsive-dialog.resource-dialog .resource-block-form>.details-actions{
 width:100%;min-width:0;display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;
}
.responsive-dialog.resource-dialog .resource-block-form>.details-actions>button{
 flex:1 1 145px;min-width:0;max-width:100%;white-space:normal;
}
.responsive-dialog.resource-dialog .resource-block-mode-hint{
 font-size:12px;line-height:1.5;
}
.plan-day-block-tag{
 display:block;margin-top:5px;padding:3px 4px;border-radius:5px;
 color:#2b1b08;background:#ffe0a4;border-left:3px solid #bd7a24;
 font-size:10px;font-weight:750;line-height:1.3;overflow-wrap:anywhere;
}
.plan-block-overlay.plan-block-master{
 right:auto;min-width:0;padding:3px 1px;opacity:.82;
 font-size:10px;overflow-wrap:anywhere;
}
html[data-theme=light] .plan-block-overlay{color:#4d2e0e;background:repeating-linear-gradient(135deg,#fbe5c4,#fbe5c4 7px,#f0d1a4 7px,#f0d1a4 14px);border-color:#b98747}
@media(min-width:701px){
 .responsive-dialog.plan-dialog.resource-dialog{width:min(620px,calc(100vw - 48px));max-width:620px}
}

/* Master calendar: date groups with dedicated resource timelines. */
.plan-master-scroll{max-height:min(900px,calc(100dvh - 235px));min-height:320px;overscroll-behavior:contain;scrollbar-gutter:stable}
.plan-master-week{grid-template-columns:56px repeat(var(--plan-column-count,21),minmax(164px,1fr));grid-template-rows:38px minmax(74px,auto) auto;min-width:calc(56px + var(--plan-column-count,21) * 164px)}
.plan-day-group{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:center;padding:8px 12px;border-right:2px solid var(--line);border-bottom:1px solid var(--line);background:var(--panel2);color:var(--ink);font-size:13px;font-weight:800;text-transform:capitalize}
.plan-master-week .plan-resource-heading{position:sticky;top:38px;z-index:4;background:var(--panel2);border-top:3px solid #61caff}
.plan-master-week .plan-resource-heading.k2{border-top-color:#ffbc70}
.plan-master-week .plan-resource-heading.aana{border-top-color:#b9a0ed}
.plan-master-week .plan-resource-heading strong{font-size:12px}
.plan-master-week .plan-group-start{border-left:2px solid var(--line)}
.plan-master-week .plan-day-group.today{background:var(--input)}
.plan-master-week .plan-corner{position:sticky;left:0;top:0;z-index:7;display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--line)}
.plan-master-week .plan-axis{position:sticky;left:0;z-index:3}
.plan-master-week .plan-card{gap:2px;padding:4px 5px}
.plan-master-week .plan-card>small{display:none}
.plan-master-week .plan-card>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:11px;font-weight:650;line-height:1.2}
.plan-master-week .plan-card[data-short=true]>strong{display:none}
.plan-master-week .plan-card[data-short=true]>span{-webkit-line-clamp:1}
.plan-master-week .plan-day-block-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:700px){.plan-master-scroll{max-height:calc(100dvh - 210px)}}

/* Desktop master is an overview: fit all seven days without horizontal scrolling. */
.plan-master-scroll{box-sizing:border-box;width:100%;min-width:0}
.plan-resource-link{display:block;min-height:0;max-width:100%;margin:0;padding:0;border:0;border-radius:3px;background:none;color:inherit;font-size:12px;font-weight:800;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.plan-resource-link:hover{text-decoration:underline;text-underline-offset:3px}
@media(min-width:901px){
 .plan-master-week{width:100%;min-width:0;grid-template-columns:44px repeat(var(--plan-column-count,21),minmax(0,1fr));grid-template-rows:32px minmax(62px,auto) auto}
 .plan-master-week .plan-day-group{display:block;min-width:0;padding:7px 4px;font-size:11px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .plan-master-week .plan-resource-heading{top:32px;padding:5px 3px;overflow:hidden}
 .plan-master-week .plan-resource-link{font-size:clamp(9px,.7vw,12px)}
 .plan-master-week .plan-resource-heading small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .plan-master-week .plan-day-block-tag{padding:2px;margin-top:4px;font-size:9px;border-left-width:2px}
 .plan-master-week .plan-group-start{border-left-width:1px}
 .plan-master-week .plan-card{padding:3px 2px;border-width:1px}
 .plan-master-week .plan-card>strong{display:none}
 .plan-master-week .plan-card>span{font-size:10px;-webkit-line-clamp:3;overflow-wrap:anywhere}
 .plan-master-week .plan-card[data-short=true]>span{-webkit-line-clamp:1}
 .plan-master-week .plan-block-overlay{padding:3px 2px;border-left-width:2px;font-size:10px}
}

/* Keep complete text lines inside the scheduled height, without compressing glyphs. */
.plan-card>strong,.plan-card>span,.plan-card>small{flex:0 0 auto;min-width:0;margin:0}
.plan-card>strong{line-height:12px}
.plan-card>span{line-height:14px}
.plan-card>small{line-height:12px}
.plan-card[data-density=medium]>span,.plan-card[data-density=compact]>span{-webkit-line-clamp:1}
.plan-card[data-density=medium]>.plan-event-description,
.plan-card[data-density=compact]>small,
.plan-card[data-density=short]>strong,.plan-card[data-density=short]>small,
.plan-card[data-density=tiny]>strong,.plan-card[data-density=tiny]>small{display:none}
.plan-week .plan-card[data-density=short]{padding:2px 4px;border-width:1px}
.plan-card[data-density=short]>span,.plan-card[data-density=tiny]>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:12px}
.plan-week .plan-card[data-density=tiny]{padding:0 3px;border-width:0 1px}
.plan-week .plan-card[data-density=tiny]>span{font-size:9px;line-height:9px}
@media(min-width:901px){
 .plan-master-week .plan-card>span{line-height:12px}
 .plan-master-week .plan-card[data-density=compact]>span{-webkit-line-clamp:2}
 .plan-master-week .plan-card[data-density=tiny]>span{line-height:9px}
}

/* One week-span preference for the master, resource and list calendars. */
.plan-week:not(.plan-master-week){grid-template-columns:56px repeat(var(--plan-column-count,7),minmax(0,1fr));min-width:calc(56px + var(--plan-column-count,7) * 132px)}
.plan-toolbar .plan-week-span{width:145px;min-width:0;min-height:40px;padding:8px 12px;margin:0;font-size:14px}
@media(max-width:700px){
 .plan-toolbar .plan-calendar-filter{grid-column:1;grid-row:3}
 .plan-toolbar .plan-week-span{grid-column:2;grid-row:3;width:130px;min-height:44px;font-size:16px;padding:8px}
}

/* Desktop: use existing history-aware header back control, leaving mobile untouched. */
@media(min-width:701px){
 .site-header>.mobile-header-back:not(.hidden){display:inline-flex;align-items:center;justify-content:center;gap:7px;order:2;margin-left:16px;min-height:38px;padding:6px 13px;border:1px solid var(--action-line);border-radius:9px;background:var(--action-bg);color:var(--action-ink);font-size:14px;font-weight:700;white-space:nowrap}
 .site-header>.mobile-header-back:not(.hidden):hover:not(:disabled):not([aria-disabled=true]){background:var(--action-hover)}
 .site-header>.mobile-header-back .desktop-back-label{font-size:13px}
 .site-header>.brand{order:1}
 .site-header>.header-actions{order:3;margin-left:auto}
 .bottom-nav>.bottom-back{display:none}
}
@media(max-width:700px){.mobile-header-back .desktop-back-label{display:none}}

@media(min-width:701px){.alex-drawer{position:fixed;right:0;top:62px;bottom:0;width:min(460px,42vw);z-index:110;background:var(--panel);border-left:1px solid var(--line);box-shadow:-16px 0 42px #0005;display:flex;flex-direction:column;overflow:hidden}.alex-drawer-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line)}.alex-drawer-heading h2{font-size:1.05rem;margin:0}.alex-drawer-body{flex:1;overflow:auto;padding:14px 18px 28px}.alex-drawer-body .alex-panel{margin:0 0 14px}.alex-drawer-body .alex-form textarea{width:100%}.alex-drawer-open #app-view{margin-right:min(460px,42vw)}}
.plan-card.completed{opacity:.8;background:#244b3d;border-color:#79bd93;border-style:solid}.plan-agenda.completed{background:#19392f;border-color:#79bd93;opacity:.85}.order-billing-stamp{display:flex;gap:6px;flex-wrap:wrap}.completed-orders-search{width:100%;max-width:760px;margin-bottom:12px;padding:12px}.completed-orders .order-list{display:grid;gap:10px}.completed-orders>button{margin-top:14px}

/* Keep installation appointment actions together at every screen width. */
.plan-form .plan-editor-actions{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px;align-items:stretch;width:100%}
.plan-form .plan-editor-actions>button{min-width:0;min-height:44px;margin:0;padding:10px 8px;white-space:normal;overflow-wrap:anywhere}

/* Compact ALEX composer; readiness and help do not compete with the task. */
.alex-panel .alex-form{margin-top:0;gap:10px}.alex-form>.muted{margin:0;font-size:.8rem}.alex-drawer-body .alex-panel{padding:0;border:0;background:none;box-shadow:none}

/* Kjell's optional production workspace. */
.simple-workspace-toggle{display:flex;gap:6px;justify-content:flex-end;padding:8px 0;flex-shrink:0}
.site-header #simple-workspace-toggle{display:flex;align-items:center;gap:4px;margin:0 10px 0 0;padding:0;flex:0 0 auto}
.site-header #simple-workspace-toggle button{min-height:36px;margin:0;padding:7px 11px;font-size:12px;line-height:1.2;white-space:nowrap}
@media(max-width:420px){.site-header #simple-workspace-toggle{margin-right:2px;gap:3px}.site-header #simple-workspace-toggle button{min-height:38px;padding:6px;font-size:10px}}
.simple-order-picker{display:flex;align-items:center;gap:12px;margin-bottom:12px;font-weight:600}
.simple-order-picker select{flex:1;min-width:0;max-width:100%;padding:10px}
.order-detail-simple .order-operations{display:block}
.order-detail-simple .work-dropzones{grid-template-columns:minmax(0,1fr)}
@media(max-width:700px){.simple-order-picker{align-items:stretch;flex-direction:column;gap:6px}.simple-workspace-toggle button{min-height:44px}}

/* Integration status colors are scoped to administration; order tags keep their existing meaning. */
.connection-status-legend{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0 18px}
.connection-status-legend .tag{font-size:11px;font-weight:650}
.tag.connection-status.ready{background:#133e35;color:#9de6bc;border-color:#2d6b53}
.tag.connection-status.draft{background:#59492c;color:#ffe1a7;border-color:#b28d42}
.tag.connection-status.error{background:#522b32;color:#ffc1c7;border-color:#ad5864}
.tag.connection-status.neutral{background:#283643;color:#c4d0da;border-color:#607182}
.tag.connection-status.checking{background:#183c58;color:#bce4ff;border-color:#4e89b4}
html[data-theme=light] .tag.connection-status.ready{background:#e4f4eb;color:#216947;border-color:#a4ceb7}
html[data-theme=light] .tag.connection-status.draft{background:#fff3d9;color:#78541b;border-color:#dfc28a}
html[data-theme=light] .tag.connection-status.error{background:#fde8eb;color:#972d40;border-color:#e3a5af}
html[data-theme=light] .tag.connection-status.neutral{background:#edf0f3;color:#455564;border-color:#bbc5ce}
html[data-theme=light] .tag.connection-status.checking{background:#e5f1fa;color:#205d83;border-color:#adcce0}

@media(min-width:701px){
 .team-directory-internal .team-col-name{width:23%}
 .team-directory-internal .team-col-role{width:16%}
 .team-directory-internal .team-col-status{width:17%}
 .team-directory-internal .team-col-sms{width:14%}
 .team-directory-internal .team-col-seen{width:18%}
 .team-directory-internal .team-col-action{width:12%}
}
@media(max-width:700px){.team-directory-table .team-col-sms{display:none}}

/* Compact search results, shared by Kanban and list views. */
.workflow-tools .list-search{position:relative;min-width:min(420px,100%);flex:1}
.order-search-popover{position:absolute;left:0;top:100%;width:max(100%,min(620px,calc(100vw - 40px)));z-index:80;margin-top:6px;padding:12px;background:var(--panel,#0d2538);border:1px solid var(--line,#34576d);border-radius:10px;box-shadow:0 14px 36px #0008;color:var(--text,#e7f2fa)}
.order-search-popover[hidden]{display:none}
.order-search-popover>p{margin:0 6px 8px;font-size:.85rem}
.order-search-options{max-height:min(60vh,520px);overflow:auto;display:flex;flex-direction:column;gap:3px}
.order-search-result{display:grid;grid-template-columns:24px minmax(0,1fr);gap:3px 9px;width:100%;padding:11px 9px;border:0;border-radius:6px;background:transparent;text-align:left;color:inherit;cursor:pointer}
.order-search-result strong{font-size:.95rem;line-height:1.4;overflow-wrap:anywhere;font-weight:600}
.order-search-result small{grid-column:2;font-size:.82rem;line-height:1.5}
.order-search-result-icon{grid-row:1 / 3;font-size:1.4rem;color:var(--muted,#a4bacb)}
.order-search-result:hover,.order-search-result[aria-selected="true"]{background:var(--panel2,#11354f)}
.order-search-more{margin-top:10px;width:100%}
@media(max-width:700px){.workflow-tools .list-search{width:100%;min-width:0}.order-search-popover{width:100%;max-width:calc(100vw - 32px);padding:8px}.order-search-result{padding:10px 6px}.report-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Checkbox selection controls the number of resource columns per day. */
.plan-toolbar .plan-montor-picker{position:relative;width:190px;padding:0;align-self:center;z-index:8}
.plan-montor-picker>summary{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:8px 12px;box-sizing:border-box;cursor:pointer;list-style:none;border:1px solid var(--line);border-radius:8px;background:var(--panel2);color:var(--ink)}
.plan-montor-picker>summary:after{content:'▾'}
.plan-montor-choices{position:absolute;top:100%;left:0;min-width:220px;padding:8px;margin-top:5px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--ink);box-shadow:0 8px 24px #0005}
.plan-montor-option{display:flex;align-items:center;gap:10px;padding:10px 8px;min-height:44px;box-sizing:border-box;cursor:pointer}
.plan-montor-option input[type=checkbox]{width:20px;height:20px;margin:0;accent-color:#146ca2}
.plan-montor-choices>button{width:100%;margin:6px 0 0}
@media(max-width:700px){.plan-toolbar .plan-montor-picker{width:100%;padding:0}.plan-montor-picker>summary{min-height:44px}.plan-montor-choices{max-width:calc(100vw - 48px)}}

/* Resize planned visits from either edge; order estimates remain separate. */
.plan-resize-handle{position:absolute;z-index:3;height:10px;min-height:0;min-width:0;padding:0;margin:0;border:0;border-radius:4px;background:transparent;color:var(--ink);cursor:ns-resize;touch-action:none;user-select:none;opacity:.6}
.plan-resize-handle:before{content:'';position:absolute;left:20%;right:20%;top:50%;transform:translateY(-50%);border-top:2px solid currentColor;border-radius:3px;filter:drop-shadow(0 1px 1px #000)}
.plan-resize-handle:hover,.plan-resize-handle:focus-visible,.plan-resize-handle.resizing{opacity:1;background:#ffffff30}
.plan-resize-handle:focus-visible{outline:2px solid var(--ink);outline-offset:1px}
.plan-resize-preview{position:absolute;z-index:6;width:max-content;max-width:260px;padding:6px 9px;border:1px solid var(--line);border-radius:6px;background:var(--panel);color:var(--ink);font-size:12px;font-weight:700;pointer-events:none;box-shadow:0 4px 14px #0006}
.plan-resize-preview[hidden]{display:none}

@media print{
 .mk-summary-heading{display:flex;justify-content:space-between}.mk-summary-groups{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
 .mk-summary-group{break-inside:avoid}.mk-summary-values>strong{font-size:22px}.mk-summary-hero .mk-summary-values>strong{font-size:28px}.mk-summary-metric{margin:10px 0}.mk-summary-label small,.mk-summary-no-trend{display:block;font-size:10px}.mk-summary-source{font-size:10px}.mk-summary-contact{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.mk-summary-icon{display:none}
}
/* Keep real time proportions while making short visits readable. */
.plan-week{--plan-slot-height:26px}
.plan-week .plan-card[data-density=short]{padding:0 3px}
.plan-week .plan-card[data-density=short]>.plan-event-title{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:10px;line-height:10px}
.plan-week .plan-card[data-density=short]>:is(.plan-event-time,.plan-event-meta,.plan-event-description){display:none}
.plan-week .plan-card[data-density=tiny]{padding:0 2px}
.plan-week .plan-card[data-density=tiny]>.plan-event-title{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;font-size:9px;line-height:9px}
.plan-week .plan-card[data-density=tiny]>:is(.plan-event-time,.plan-event-meta,.plan-event-description){display:none}

/* Full wall-time footprint while moving, without changing stored appointments. */
.plan-drop-preview{position:absolute;left:0;width:100%;z-index:6;box-sizing:border-box;pointer-events:none;border:2px dashed #7ee4ff;border-radius:4px;background:#28a7df55;color:var(--ink);padding:2px 3px;font-size:11px;font-weight:700;line-height:1.15;overflow:hidden;overflow-wrap:anywhere;box-shadow:inset 0 0 0 1px #071d2c}
.plan-drop-preview.invalid{border-color:#ff9a83;background:#b54a3355}

/* Day boundaries are heavier than the resource boundaries inside each day. */
.plan-week{--plan-day-divider:#83a9bc;--plan-resource-divider:#54778c}
.plan-week .plan-day{border-right:1px solid var(--plan-resource-divider);box-sizing:border-box}
.plan-master-week .plan-day.plan-group-start,.plan-master-week .plan-resource-heading.plan-group-start{border-left:3px solid var(--plan-day-divider)}
.plan-master-week .plan-day-group{border-left:3px solid var(--plan-day-divider);border-right:0}
.plan-day[data-resource=Lukasz]{--plan-resource-tint:#4cb8ee0a}
.plan-day[data-resource=K2]{--plan-resource-tint:#ffb86b12}
.plan-day[data-resource=Åna]{--plan-resource-tint:#bb9aef12}
.plan-day>.plan-slot{background-image:linear-gradient(var(--plan-resource-tint,transparent),var(--plan-resource-tint,transparent))}
html[data-theme=light] .plan-week{--plan-day-divider:#456d83;--plan-resource-divider:#91acba}

.plan-week:not(.plan-master-week)>.plan-day,.plan-week:not(.plan-master-week)>.plan-day-heading{border-left:2px solid var(--plan-day-divider)}

/* Keep values at a common start position even when only one cell has source notes. */
.mk-channel .mk-metrics>div{justify-content:flex-start}
.mk-channel .mk-metrics dd{text-align:left;font-variant-numeric:tabular-nums;line-height:1.25}
.mk-compact-channels{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.mk-channel-group-compact{min-width:0}
.mk-channel-group-compact>.mk-channel-grid{grid-template-columns:minmax(0,1fr)}
.mk-channel-group-compact .mk-channel{padding:16px}
.mk-channel-group-compact .mk-channel-heading{margin-bottom:10px}
.mk-channel-group-compact .mk-channel-icon{width:34px;height:34px;border-radius:10px;font-size:15px}
.mk-channel-group-compact .mk-channel-hero{padding:12px 0 10px;margin-bottom:8px}
.mk-channel-group-compact .mk-channel-hero .mk-value{font-size:30px}
.mk-channel-group-compact .mk-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}
.mk-channel-group-compact .mk-metrics>div{padding:10px;gap:4px}
.mk-channel-group-compact .mk-metrics dd{font-size:18px}
@media(max-width:900px){.mk-compact-channels{grid-template-columns:minmax(0,1fr)}}
@media(max-width:480px){.mk-channel-group-compact .mk-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Main and supporting metrics share one compact row on wider cards. */
.mk-channel-grid>.mk-channel{display:flex;flex-direction:column;gap:0;grid-row:auto}
.mk-channel .mk-channel-main{display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,2.3fr);gap:16px;align-items:start;width:100%;margin:12px 0}
.mk-channel-main>.mk-channel-hero{margin:0;padding:12px 0;border:0;min-width:0}
.mk-channel .mk-channel-main>.mk-metrics{margin:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.mk-channel .mk-channel-main>.mk-metrics>div{padding:10px;min-width:0}
.mk-channel .mk-channel-main>.mk-metrics dd{font-size:18px}
.mk-channel .mk-channel-main>.mk-metrics dt{overflow-wrap:anywhere}.mk-channel .mk-channel-main>.mk-metrics small{overflow-wrap:anywhere}
.mk-channel-main .mk-value{font-size:clamp(24px,2.5vw,34px);overflow-wrap:anywhere}
.mk-channel .mk-channel-body{width:100%}.mk-channel .mk-channel-body>p{margin:4px 0 10px;font-size:12px}
.mk-channel .mk-details{align-self:stretch;margin:0}
.mk-insight>small{display:block;margin-top:7px}
.mk-change-unit{font-size:12px;color:var(--muted,#96aac0);margin-left:6px}.mk-insight>.mk-value{font-size:30px}.mk-insight .mk-details{margin:7px 0 0}.mk-source-info .mk-source-time{display:block;margin:5px 0}
@media(max-width:480px){.mk-channel .mk-channel-main{grid-template-columns:minmax(85px,.8fr) minmax(0,2fr);gap:10px}.mk-channel .mk-channel-main>.mk-metrics{gap:6px}.mk-channel .mk-channel-main>.mk-metrics>div{padding:8px}.mk-channel-main .mk-value{font-size:25px}.mk-channel-main .mk-label{font-size:12px}.mk-channel-main .mk-trend{font-size:11px}}
@media(max-width:360px){.mk-channel .mk-channel-main{grid-template-columns:1fr}.mk-channel-main>.mk-channel-hero{padding:0}}

/* Weekly work: four scannable rows; provenance stays available on demand. */
.mk-dashboard{width:100%;max-width:none;min-width:0;margin:0;gap:16px}
.mk-dashboard>*{min-width:0}.mk-dashboard .panel{margin-bottom:0}
.mk-dashboard .mk-cadence{margin:0}.mk-dashboard .panel h2{font-size:19px;margin:2px 0 10px}
.mk-overview{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start;min-width:0}
.mk-overview>section{min-width:0}
.mk-overview .mk-report-latest{flex-direction:column;align-items:stretch;gap:10px}.mk-overview .mk-report-latest .details-actions{margin:0}.mk-overview .mk-report-row{flex-wrap:wrap;gap:10px}
.mk-dashboard .mk-channel-group>h2{margin-top:0}.mk-dashboard .mk-channels{gap:16px}
@media(min-width:1100px){.mk-overview{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}}
@media(max-width:600px){.mk-dashboard .mk-heading{align-items:flex-start;flex-direction:column;gap:8px}.mk-dashboard .mk-heading .details-actions{margin:0}.mk-dashboard .mk-kpi{padding:14px}.mk-dashboard .panel{padding:14px}.mk-overview{gap:12px}}
@media print{.mk-overview{display:block}.mk-overview>section{margin:16px 0}}
.mk-week-nav{margin:10px 0;gap:7px;align-items:center}.mk-week-nav strong{font-size:14px}.mk-week>.muted{font-size:12px;margin:8px 0}.mk-week .mk-plan-compact{padding:11px 14px;margin:12px 0 8px;gap:12px;flex-direction:row;align-items:center;font-size:13px}.mk-plan-compact>.muted{font-size:12px}.mk-week .mk-plan-table th,.mk-week .mk-plan-table td{padding:10px 6px}.mk-week .mk-plan-table td:nth-child(2),.mk-week .mk-plan-table td:nth-child(3){font-size:18px;font-variant-numeric:tabular-nums}.mk-week-state{font-size:12px;font-weight:600}.mk-week-warning{color:#e2b85e}.mk-week-through{font-size:11px;white-space:nowrap}.mk-week-footer{display:flex;align-items:baseline;gap:8px 18px;flex-wrap:wrap;font-size:11px;margin:10px 0}.mk-week-sources{margin:0;flex:1;min-width:180px}.mk-week-sources>summary{text-align:right}.mk-week-sources[open]{flex-basis:100%}.mk-week-sources[open]>summary{text-align:left;margin:6px 0 12px}.mk-week-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mk-week-source{padding:12px;border:1px solid var(--line,#ccd4dc);border-radius:9px;min-width:0}.mk-week-source p{margin:5px 0;font-size:12px}.mk-week-manual h3{font-size:13px;margin:12px 0 4px}.mk-week-manual .mk-preserve{margin:4px 0}.mk-week [role=status]:empty{display:none}.mk-week>div>button{margin-top:4px}.mk-week .mk-note{margin:0}.mk-week .mk-plan-table{table-layout:fixed}.mk-week .mk-plan-table th:first-child{width:24%}.mk-week .mk-plan-table th:nth-child(2){width:18%}.mk-week .mk-plan-table th:nth-child(3){width:12%}
@media(max-width:600px){.mk-week .mk-plan-compact{align-items:flex-start;flex-direction:column;gap:4px}.mk-week-through{display:block;white-space:normal}.mk-week-source-grid{grid-template-columns:1fr}.mk-week-nav{gap:6px}.mk-week-nav strong{font-size:12px}.mk-week .mk-plan-table{font-size:12px}.mk-week .mk-plan-table td:nth-child(2),.mk-week .mk-plan-table td:nth-child(3){font-size:17px}.mk-week-state{font-size:11px}}

/* Existing footer: compact desktop row, horizontally scrollable on small screens. */
.bottom-nav{overflow-x:auto;overscroll-behavior-x:contain;justify-content:flex-start}
.bottom-nav>.nav-button{flex:1 0 88px;max-width:none}
@media(min-width:701px){
 main.container:has(#app-view:not(.hidden))>.bottom-nav{padding-top:3px;padding-bottom:3px}
 .bottom-nav>.nav-button{min-height:36px;flex-direction:row;gap:7px;padding:5px 10px;font-size:12px;border-radius:8px}
 .bottom-nav>.nav-button .icon{width:18px;height:18px;flex-shrink:0}
}
@media(max-width:700px){.bottom-nav>.nav-button{flex:1 0 72px}}

/* Appointment status stays visible inside the existing calendar geometry. */
@media screen{
 :is(.plan-week .plan-card,.plan-agenda).tentative:not(.completed){background-image:repeating-linear-gradient(135deg,transparent 0 6px,var(--ui-calendar-tentative-stripe) 6px 9px);border-style:dashed}
 :is(.plan-week .plan-card,.plan-agenda).confirmed{border-style:solid}
 .plan-week .plan-card:not(.completed)>.plan-event-title{display:block;white-space:normal;-webkit-line-clamp:unset}
 .plan-event-status{display:block;font-size:10px;line-height:12px;font-weight:800;white-space:nowrap}
 .plan-master-week .plan-event-status{font-size:9px;font-weight:700;letter-spacing:-.1px}
 .plan-master-week .plan-event-status-symbol{display:none}
 .plan-master-week .plan-card:not(.completed){padding-left:1px;padding-right:1px}
 .plan-event-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .plan-week .plan-card:is([data-density=compact],[data-density=medium]) .plan-event-name{-webkit-line-clamp:1}
 .plan-master-week .plan-card[data-density=compact]>.plan-event-time{display:none}
 .plan-week:not(.plan-master-week) .plan-card[data-density=compact]>.plan-event-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .plan-week:not(.plan-master-week) .plan-card[data-density=compact] :is(.plan-event-status,.plan-event-name){display:inline}
 .plan-week:not(.plan-master-week) .plan-card[data-density=compact] .plan-event-status{margin-right:4px}
 .plan-week .plan-card[data-density=short]{padding:0 2px}
 .plan-week .plan-card[data-density=short] :is(.plan-event-status,.plan-event-name){display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px;line-height:9px}
 .plan-week .plan-card[data-density=tiny]>.plan-event-title{display:block;white-space:nowrap;line-height:9px}
 .plan-week .plan-card[data-density=tiny] :is(.plan-event-status,.plan-event-name){display:inline;font-size:9px;line-height:9px}
 .plan-week .plan-card[data-density=tiny] .plan-event-status{display:inline-block;vertical-align:top;margin-right:4px}
}

/* K2 home uses the same compact controls and agenda structure as installers. */
.k2-workspace-body{display:grid;gap:20px;min-width:0}.k2-workspace .workflow-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.k2-workspace .workflow-tools input{max-width:360px;min-width:0}.k2-calendar-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.k2-calendar-controls label{display:flex;gap:8px;align-items:center}.k2-calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;min-width:0}.k2-calendar-day{min-width:0;padding:12px;margin:0}.k2-calendar-day h3{margin:0 0 12px}.k2-calendar-day .k2-order-row{width:100%;margin-bottom:8px;white-space:normal;overflow-wrap:anywhere;padding:10px}.k2-calendar-day.is-today{outline:2px solid var(--accent);outline-offset:-2px}.k2-visit-completed{opacity:1}.k2-workspace .quick-section{min-width:0}.k2-workspace .k2-order-row{white-space:normal;overflow-wrap:anywhere}@media(max-width:1100px){.k2-calendar-week{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.k2-calendar-week{grid-template-columns:minmax(0,1fr)}.k2-workspace .workflow-tools input{width:100%;max-width:none}.k2-calendar-controls label{flex-wrap:wrap}}

.finance-month-nav{display:flex;gap:8px;flex-wrap:nowrap;margin:0}.finance-period .finance-month-nav button{width:46px;min-width:46px;padding:8px;font-size:22px}

/* v2.0.196: completion belongs to the individual visit, never the parent order. */
.k2-workspace .k2-order-row.k2-visit-completed,
.k2-visit-list .plan-detail-row.k2-visit-completed{border:1px solid #267a61;background:#154b42;color:#e6fff5;opacity:1}
.k2-workspace .k2-order-row.k2-visit-completed:hover{background:#1c6355;border-color:#42ae83}
.k2-visit-list .plan-detail-row.k2-visit-completed{padding:12px 14px;border-radius:11px}
.k2-workspace .k2-order-row.k2-visit-completed .muted,
.k2-visit-list .plan-detail-row.k2-visit-completed .muted{color:#b3e9d2}
html[data-theme=light] .k2-workspace .k2-order-row.k2-visit-completed,
html[data-theme=light] .k2-visit-list .plan-detail-row.k2-visit-completed{border-color:#a2cbb1;background:#e5f4eb;color:#245f3d}
html[data-theme=light] .k2-workspace .k2-order-row.k2-visit-completed:hover{background:#d2ebdd;border-color:#7ab795}
html[data-theme=light] .k2-workspace .k2-order-row.k2-visit-completed .muted,
html[data-theme=light] .k2-visit-list .plan-detail-row.k2-visit-completed .muted{color:#367551}


/* Shared installation report: compact, legible in both themes and screen sizes. */
.installation-report-overview{width:min(880px,calc(100vw - 24px))}
.installation-report-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:15px 0}
.installation-report-stat{min-width:0;display:grid;gap:5px;padding:13px;border:1px solid var(--ui-border,var(--line));background:var(--ui-surface,var(--panel2));border-radius:var(--ui-radius-md,12px)}
.installation-report-stat strong{font-size:1.24rem;font-variant-numeric:tabular-nums}
.installation-report-visits{display:grid;gap:13px}
.installation-report-visit{border:1px solid var(--ui-border,var(--line));border-radius:var(--ui-radius-md,12px);padding:14px;min-width:0}
.installation-report-visit-heading,.installation-report-entry-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:8px}
.installation-report-entry{border-top:1px solid var(--ui-border,var(--line));padding-top:12px;margin-top:12px;min-width:0}
.installation-report-entry.is-focused{border-left:3px solid var(--ui-accent,var(--accent));padding-left:10px}
.installation-report-entry .muted{display:block;margin:6px 0}
.installation-report-comment{white-space:pre-wrap;overflow-wrap:anywhere;padding:11px 12px;background:var(--ui-surface,var(--panel2));border-radius:8px;line-height:1.55}
.installation-report-history{margin:10px 0}.installation-report-revision{padding:9px 0;border-top:1px solid var(--ui-border,var(--line))}.installation-report-revision p{overflow-wrap:anywhere;white-space:pre-wrap}
.installation-report-actions{margin-top:15px;flex-wrap:wrap}.installation-report-reopen{display:contents}
.comment-report-heading{display:block;margin:6px 0;font-size:.93rem}.comment-report-open{margin-top:8px}
@media(max-width:600px){.installation-report-visit{padding:12px}.installation-report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.installation-report-actions button{min-height:44px}}
