/* v6.2 additions: preserve the existing brand and give infrequent actions a home. */
:root{--kf-blue:#153d64;--kf-orange:#e98632;--kf-soft:#fff5e9}
.kf-dialog{border:0;border-radius:16px;padding:0;width:min(850px,calc(100vw - 28px));max-width:100%;max-height:92dvh;box-shadow:0 24px 80px #10223555;color:#172b3a;background:#fff;overflow:auto}
.kf-dialog::backdrop{background:#10223699}.kf-dialog.kf-wide{width:min(1200px,calc(100vw - 24px))}
.kf-dialog header{position:sticky;top:0;z-index:12;background:var(--kf-blue);color:white;padding:16px 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:3px solid var(--kf-orange)}
.kf-dialog header h2{margin:0;font-size:20px;color:white}.kf-dialog header button{color:white;background:#ffffff15;border:1px solid #ffffff66;border-radius:7px;cursor:pointer;padding:8px 12px;white-space:nowrap}
.kf-body{padding:20px}.kf-body p{line-height:1.5}.kf-body label{display:block;font-weight:600;font-size:14px;margin:0 0 5px}.kf-body .input{width:100%;box-sizing:border-box;min-height:42px}
.kf-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.kf-full{grid-column:1/-1}.kf-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px;align-items:center}.kf-help{font-size:13px;line-height:1.5;color:#556575}.kf-note{padding:12px 14px;border:1px solid #ebd0aa;border-left:4px solid var(--kf-orange);background:var(--kf-soft);border-radius:7px;margin:12px 0;line-height:1.5}.kf-error{color:#9d2034;background:#fff1f3;padding:12px;border-radius:6px;margin:10px 0;white-space:pre-wrap}.kf-success{background:#eef6f1;border:1px solid #b5d1c0;padding:13px;border-radius:6px}.kf-row{padding:12px 0;border-bottom:1px solid #e6edf1;display:flex;align-items:center;justify-content:space-between;gap:14px}.kf-row:last-child{border-bottom:0}
.kf-check{display:flex!important;align-items:flex-start;gap:9px;font-weight:400!important;line-height:1.5;margin:10px 0!important}.kf-check input{margin-top:4px;flex-shrink:0;accent-color:var(--kf-blue)}
.kf-more{position:relative}.kf-more summary{list-style:none;cursor:pointer}.kf-more[open]{width:100%}.kf-more .kf-more-items{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0}.kf-schedule-note{font-size:13px;color:#5c6977;margin:8px 0}.kf-slots{display:grid;grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:8px;margin-top:15px}.kf-slots button{text-align:left;padding:12px;white-space:normal}.kf-slots button small{display:block;line-height:1.4;margin-top:5px}.kf-date-line{display:flex;gap:7px}.kf-date-line .input{min-width:0;flex:1}.kf-date-line button{flex:0 0 auto}.kf-date-pop{position:relative;background:white;border:1px solid #bccad5;border-radius:10px;box-shadow:0 8px 25px #14344822;padding:12px;margin-top:8px;z-index:5;max-width:320px}.kf-date-pop[hidden]{display:none}.kf-month-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;gap:8px}.kf-month-head button{padding:6px 10px}.kf-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.kf-date-grid button{border:0;border-radius:5px;padding:9px 0;background:#f1f5f8;color:#173755;cursor:pointer}.kf-date-grid button:hover,.kf-date-grid button:focus{background:#ffdfbd;outline:2px solid #d67828}.kf-date-grid button[aria-selected=true]{background:#153d64;color:white}.kf-date-grid span{text-align:center;font-size:12px;color:#586b7b;padding:5px 0}.kf-embed{width:100%;height:440px;border:1px solid #d5dfe7;border-radius:8px}.kf-pdf{width:100%;height:68dvh;border:1px solid #ccd9e3;display:block}.kf-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}.kf-attention{border-top:3px solid var(--kf-orange)}.kf-attention .section-h{background:#fff9f1}.kf-attention-banner{padding:12px 20px;font-size:14px;background:#f4f8fb;border-bottom:1px solid #dbe5ed}.kf-event{display:block;width:100%;text-align:left;cursor:pointer;white-space:normal;border:1px solid #c6d5e1!important;line-height:1.45}.kf-event .kf-tag{display:inline-block;font-size:11px;letter-spacing:.02em;margin-top:7px;padding:2px 6px;border-radius:4px;background:#fff8ef;color:#5b3818}.kf-plain-link{color:#174f7d;text-decoration:underline;cursor:pointer}.kf-route-day{background:#f5f8fa;border:1px solid #dce5ec;border-radius:10px;padding:16px;margin:15px 0}.kf-route-stop{padding:10px 0;border-bottom:1px solid #dce4eb}.kf-route-stop:last-child{border:0}.kf-route-fixed{color:#526778}.kf-chip{display:inline-block;font-size:12px;border-radius:5px;background:#e9f0f6;padding:3px 7px}.kf-legacy-date{margin:5px 0}.kf-public{font-family:system-ui,-apple-system,sans-serif;margin:0;background:#edf3f7;color:#1b344c}.kf-public main{max-width:720px;margin:32px auto;background:white;border-radius:16px;box-shadow:0 12px 40px #16304c12;overflow:hidden}.kf-public header{background:var(--kf-blue);border-bottom:4px solid var(--kf-orange);padding:28px;color:white}.kf-public header h1{font-size:26px;margin:8px 0}.kf-public .btn{display:inline-flex;align-items:center;justify-content:center;padding:11px 17px;border-radius:7px;border:1px solid #b8c9d5;background:white;color:#143d62;font-size:15px;font-weight:600;cursor:pointer;text-decoration:none}.kf-public .btn.primary{background:var(--kf-blue);color:white;border-color:var(--kf-blue)}.kf-public .input{display:block;border:1px solid #b7c8d5;border-radius:7px;padding:10px;font:inherit}.kf-public fieldset{border:1px solid #dce6ed;border-radius:10px;padding:16px;margin:18px 0}.kf-public legend{font-weight:700;color:var(--kf-blue);padding:0 5px}.kf-date-options{display:grid;grid-template-columns:repeat(2,1fr);gap:0 16px}.kf-public textarea{min-height:100px}.kf-public .kf-help{font-size:14px}.kf-public hr{border:0;border-top:1px solid #e2e9ef}.kf-badge{font-size:11px;font-weight:700;background:#fff0dd;color:#75470e;border-radius:20px;padding:4px 8px;margin:5px;display:inline-block}
@media(max-width:600px){.kf-form{grid-template-columns:1fr}.kf-full{grid-column:auto}.kf-body{padding:16px}.kf-dialog header{padding:13px 16px}.kf-dialog header h2{font-size:18px}.kf-dialog{max-height:94dvh}.kf-row{align-items:flex-start}.kf-public main{margin:12px;border-radius:12px}.kf-public header{padding:22px 18px}.kf-date-options{grid-template-columns:1fr}.kf-actions>.btn{flex:1 1 auto}.kf-embed{height:340px}.kf-date-pop{max-width:100%;box-sizing:border-box}.kf-toolbar .btn{flex:1 1 auto}.week-grid{grid-template-columns:1fr!important}.calendar-toolbar{align-items:flex-start;flex-direction:column}.kf-slots{grid-template-columns:1fr 1fr}}

.kf-routes-intro,.kf-two-week-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #e2e9ef}.kf-two-week-head{margin-top:10px;background:#f8fafc;border-top:1px solid #e2e9ef}.kf-two-week-head h3{margin:0 0 3px;color:var(--kf-blue)}.kf-two-week-grid{display:grid;grid-template-columns:repeat(7,minmax(145px,1fr));gap:10px;padding:14px;overflow-x:auto}.kf-planning-day{min-width:145px;border:1px solid #dce5ec;border-radius:10px;background:#fff;overflow:hidden}.kf-planning-day>header{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:9px 10px;background:#f5f8fa;border-bottom:1px solid #dfe7ed}.kf-planning-day>header div{display:flex;flex-direction:column}.kf-planning-day>header span{font-size:12px;color:#607080}.kf-quote-day{border-top:3px solid var(--kf-orange)}.kf-quote-day>header{background:#fff8ef}.kf-planning-today{box-shadow:0 0 0 2px #173d63 inset}.kf-confirm-by{padding:7px 9px;font-size:11px;font-weight:700;color:#7a4a18;background:#fff5e9}.kf-mini-event{display:flex;flex-direction:column;gap:2px;padding:8px 9px;border-bottom:1px solid #edf1f4;font-size:12px}.kf-mini-event strong{color:#183c5f}.kf-empty-day{padding:10px 9px;color:#7b8792;font-size:12px}.kf-pref-list{padding:8px 9px;background:#f3f8fc;border-top:1px solid #e1eaf1;font-size:12px}.kf-pref-list strong,.kf-pref-list span{display:block}.kf-pref-list span{margin-top:3px}.kf-day-actions{display:flex;gap:5px;padding:9px;flex-wrap:wrap}.kf-day-actions .btn{flex:1 1 auto}.kf-day-actions .primary{background:var(--kf-orange);border-color:var(--kf-orange);color:#fff}@media(max-width:900px){.kf-two-week-grid{grid-template-columns:repeat(2,minmax(155px,1fr));overflow:visible}.kf-routes-intro,.kf-two-week-head{align-items:flex-start;flex-direction:column}}@media(max-width:560px){.kf-two-week-grid{grid-template-columns:1fr}.kf-day-actions .btn{flex:1 1 45%}}
.kf-calendar-role-row{display:grid;grid-template-columns:minmax(220px,1fr) minmax(280px,1.15fr);gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid #edf1f4}.kf-calendar-role-row:last-of-type{border-bottom:0}.kf-calendar-role-row .kf-check{margin:0!important}.kf-calendar-role-row select{margin:0}@media(max-width:700px){.kf-calendar-role-row{grid-template-columns:1fr}.kf-calendar-role-row select{width:100%}}

/* 6.2.5 operational polish */
.kf-next-appointment{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 14px;padding:10px 12px;border:1px solid #d9e4ee;border-left:4px solid #ef7f1a;border-radius:9px;background:#fffaf5}
.kf-next-appointment span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#687887}.kf-next-appointment strong{display:block;margin-top:2px}
.kf-loose-address{position:relative}.kf-address-pop{position:absolute;z-index:9999;left:0;right:0;top:100%;background:#fff;border:1px solid #cbd6df;border-radius:8px;box-shadow:0 12px 28px rgba(15,34,52,.18);max-height:240px;overflow:auto}.kf-address-pop[hidden]{display:none}.kf-address-choice{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #edf0f3;background:#fff;padding:9px 10px;cursor:pointer}.kf-address-choice:hover{background:#f5f8fb}
.kf-event{border-left-width:5px!important;border-left-style:solid!important}
@media(max-width:640px){.kf-next-appointment{align-items:flex-start;flex-direction:column}}


/* KINGDOM CRM v6.4.0 — mobile/touch polish */
.kf-clickable-timeline{cursor:pointer;border-radius:10px;transition:background .15s ease,transform .15s ease}
.kf-clickable-timeline:hover,.kf-clickable-timeline:focus{background:#f3f7fb;outline:2px solid rgba(36,79,155,.15);outline-offset:2px}
.kf-search-results{display:grid;gap:8px;margin-top:10px;max-height:55vh;overflow:auto}
.kf-search-choice{width:100%;text-align:left;border:1px solid #dfe5eb;border-radius:10px;background:#fff;padding:12px;display:grid;gap:3px}
.kf-search-choice span{font-size:12px;color:#6a7682}
.kf-stage-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.kf-aerial-editor{overflow:auto;text-align:center;background:#eef2f6;border:1px solid #dfe5eb;border-radius:12px;padding:12px;margin:12px 0}
.kf-aerial-editor img{max-width:100%;height:auto;transform-origin:center center;transition:transform .2s ease}
@media(max-width:760px){
  button,.btn,input,select,textarea{min-height:44px}
  .kf-stage-choices{grid-template-columns:1fr}
  .kf-actions{gap:8px;flex-wrap:wrap}
  .kf-actions>.btn,.kf-actions>button,.kf-actions>a.btn{flex:1 1 auto;justify-content:center;text-align:center}
  .detail-modal,.modal-card,.kf-dialog{max-width:calc(100vw - 16px)!important;margin:8px!important}
  .timeline .tl{padding:12px 8px}
  .fieldy-card{padding:12px}
  .kf-search-results{max-height:48vh}
}

/* KINGDOM CRM v6.4.0 consolidated follow-up refinements */

/* KINGDOM CRM v6.4.2 — navigation, timeline, calendar and imagery usability */
.kf-customer-picker{position:relative}.kf-customer-results{display:grid;gap:6px;margin-top:7px;max-height:48vh;overflow:auto;border-radius:10px}.kf-customer-choice{width:100%;text-align:left;border:1px solid #dbe4eb;border-radius:10px;background:#fff;padding:11px 12px;display:grid;gap:2px;cursor:pointer}.kf-customer-choice:hover,.kf-customer-choice:focus{background:#f4f8fb;border-color:#9fb8cb;outline:none}.kf-customer-choice span{font-size:12px;color:#687787}
.kf-timeline-button,.kf-fieldy-button{width:100%;border:0;background:#fff;text-align:left;padding:10px;border-radius:10px;cursor:pointer}.kf-timeline-button{display:grid;grid-template-columns:34px 1fr;gap:10px}.kf-timeline-button:hover,.kf-timeline-button:focus,.kf-fieldy-button:hover,.kf-fieldy-button:focus{background:#f4f8fb;outline:2px solid rgba(36,79,155,.12)}.kf-timeline-button time{display:block;font-size:11px;color:#8d99a4;margin-top:2px}.kf-timeline-preview{display:block;color:#5d6b77;font-size:12px;white-space:pre-wrap;margin-top:4px}.kf-fieldy-button{display:grid;gap:3px;border-bottom:1px solid #edf0f3}.kf-fieldy-button span{font-size:12px;color:#687787}.kf-system-history{margin-top:12px;border-top:1px solid #e8edf1;padding-top:10px}.kf-system-history>summary{cursor:pointer;color:#607080;font-size:12px;font-weight:700}.kf-system-history .timeline{margin-top:8px}.kf-transcript{white-space:pre-wrap;line-height:1.55;border:1px solid #dfe6ec;border-radius:10px;padding:12px;background:#fafcfd;max-height:58vh;overflow:auto}
.kf-property-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.kf-property-viewer{min-height:260px;border:1px solid #dce5ec;border-radius:12px;overflow:hidden;background:#eef3f6;position:relative}.kf-live-map{height:360px;width:100%}.kf-property-frame{height:360px;border:0;border-radius:0}.kf-property-loading{min-height:260px;display:grid;place-items:center;color:#6c7b88}.kf-map-controls{display:flex;gap:8px;padding:8px;background:#fff;border-top:1px solid #e1e8ed}.kf-sync-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.kf-sync-grid>div{border:1px solid #dde5eb;border-radius:10px;padding:10px}.kf-sync-grid p{margin:4px 0 0;color:#5f6d78}.toast{max-width:min(520px,calc(100vw - 40px));cursor:pointer;box-shadow:0 12px 36px rgba(0,0,0,.22)}
#kfQuickFindBtn{white-space:nowrap}
@media(max-width:760px){.kf-live-map,.kf-property-frame{height:300px}.kf-sync-grid{grid-template-columns:1fr}.kf-property-actions>.btn,.kf-property-actions>a.btn{flex:1 1 45%;text-align:center}.kf-timeline-button{padding:12px 6px}.topbar #kfQuickFindBtn{font-size:0;padding:10px 12px}.topbar #kfQuickFindBtn:after{content:'Find';font-size:13px}.kf-customer-results{max-height:44vh}}

/* v6.4.3 click-through affordance */
.kf-timeline-button strong:after,.kf-fieldy-button strong:after{content:'  ›';color:#6d7f8e;font-weight:800}.kf-timeline-button,.kf-fieldy-button{touch-action:manipulation}.kf-timeline-button:active,.kf-fieldy-button:active{background:#eaf2f8}

/* v6.4.4 notes / attention */
.kf-note-priority{display:grid;grid-template-columns:minmax(180px,1fr) minmax(220px,1fr);gap:12px;margin:12px 0}
.kf-attention-note-body{padding:14px;border:1px solid var(--line);border-radius:10px;background:#fffaf3;white-space:pre-wrap;font-size:15px;line-height:1.5}
@media(max-width:760px){.kf-note-priority{grid-template-columns:1fr}.kf-note-priority .kf-date-line{grid-template-columns:1fr auto}}

/* KINGDOM CRM v6.4.5 — explicit timeline actions */
.kf-timeline-card,.kf-fieldy-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;border-bottom:1px solid #edf0f3;padding:3px 0}.kf-timeline-main,.kf-fieldy-main{border:0;background:#fff;text-align:left;padding:10px;border-radius:10px;cursor:pointer;min-width:0}.kf-timeline-main{display:grid;grid-template-columns:34px 1fr;gap:10px}.kf-timeline-main:hover,.kf-timeline-main:focus,.kf-fieldy-main:hover,.kf-fieldy-main:focus{background:#f4f8fb;outline:2px solid rgba(36,79,155,.12)}.kf-timeline-main time{display:block;font-size:11px;color:#8d99a4;margin-top:2px}.kf-fieldy-main{display:grid;gap:3px}.kf-fieldy-main span{font-size:12px;color:#687787}.kf-open-detail{white-space:nowrap}@media(max-width:760px){.kf-timeline-card,.kf-fieldy-card{grid-template-columns:1fr}.kf-open-detail{justify-self:start;margin:0 0 8px 44px}.kf-fieldy-card .kf-open-detail{margin-left:10px}}

/* v6.5 durable history + media */
.kf-history-list{display:grid;gap:2px}.kf-history-row{width:100%;border:0;border-bottom:1px solid #edf0f3;background:#fff;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;padding:11px 8px;cursor:pointer;border-radius:8px}.kf-history-row:hover,.kf-history-row:focus{background:#f5f8fb;outline:2px solid rgba(36,79,155,.12)}.kf-history-copy{display:grid;min-width:0}.kf-history-copy time{font-size:11px;color:#8b97a2}.kf-history-copy>span{font-size:12px;color:#5d6975;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:3px}.kf-history-open{font-size:12px;font-weight:800;color:var(--blue2);white-space:nowrap}.kf-detail-text,.kf-transcript,.kf-note-detail{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55}.kf-transcript{background:#f7f9fb;border:1px solid var(--line);border-radius:10px;padding:14px;max-height:55vh;overflow:auto}.kf-media-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin-top:12px}.kf-media-preview{grid-template-columns:repeat(4,minmax(0,1fr))}.kf-media-tile{border:1px solid var(--line);background:#fff;border-radius:10px;padding:0;overflow:hidden;cursor:pointer;min-width:0;text-align:left}.kf-media-tile img{display:block;width:100%;aspect-ratio:1;object-fit:cover;background:#edf1f4}.kf-media-tile span{display:block;padding:7px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kf-media-file-icon{aspect-ratio:1;display:grid;place-items:center;background:#eef3f7;font-weight:900;color:#536575}.kf-media-full{display:block;max-width:100%;max-height:70vh;margin:auto;object-fit:contain;border-radius:8px}.kf-media-video{width:100%;max-height:70vh}.kf-media-audio{width:100%;margin:18px 0}.kf-media-pdf{width:100%;height:70vh;border:1px solid var(--line);border-radius:8px}.kf-media-meta{color:var(--muted);font-size:12px;margin:10px 0}.kf-gallery-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.kf-messenger-thread{display:grid;gap:8px;max-height:55vh;overflow:auto;padding:6px}.kf-msg{max-width:78%;border-radius:12px;padding:9px 11px;background:#eef3f7;display:grid;gap:3px}.kf-msg.out{justify-self:end;background:#e7efff}.kf-msg small{color:#71808c;font-size:10px}.kf-integration-group{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fbfdff;display:grid;gap:7px}.kf-integration-group h3{margin:0;color:var(--blue2)}
@media(max-width:760px){.kf-history-row{grid-template-columns:32px minmax(0,1fr)}.kf-history-open{grid-column:2}.kf-media-preview{grid-template-columns:repeat(3,minmax(0,1fr))}.kf-media-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.kf-gallery-head{display:block}.kf-msg{max-width:90%}}

/* v6.5.1 — make base-rendered customer history explicitly interactive even if progressive enhancement fails. */
.kf-base-click-row{width:100%;border:0;border-bottom:1px solid #edf0f3;background:#fff;display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:left;padding:12px 8px;cursor:pointer;border-radius:8px;color:inherit;font:inherit}.kf-base-click-row:hover,.kf-base-click-row:focus{background:#f5f8fb;outline:2px solid rgba(36,79,155,.14)}.kf-base-copy{display:grid;min-width:0}.kf-base-copy time{font-size:12px;color:#8b97a2;margin-top:2px}.kf-base-preview{font-size:13px;color:#5d6975;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:4px}.kf-base-open{font-size:12px;font-weight:900;color:var(--blue2);white-space:nowrap}.fieldy-card.kf-base-click-row{padding:12px 8px;margin:0;border-radius:8px}.fieldy-card.kf-base-click-row p{margin:0}@media(max-width:760px){.kf-base-click-row{grid-template-columns:32px minmax(0,1fr)}.kf-base-open{grid-column:2;margin-top:3px}}

/* KINGDOM CRM v6.7.0 — operations flow */
.kf-attention-row{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(260px,1.8fr) auto;gap:16px;align-items:center;border-radius:12px;margin:7px 0;padding:13px 14px;border:1px solid #e1e6ec;background:#fff}
.kf-attention-row.kf-attention-sale{background:#effaf3;border-color:#82d6a0;box-shadow:inset 5px 0 0 #138a45}
.kf-attention-row.kf-attention-message{background:#eef6ff;border-color:#91bff0;box-shadow:inset 5px 0 0 #1668b2}
.kf-attention-row.kf-attention-urgent{background:#fff0f0;border-color:#efaaaa;box-shadow:inset 5px 0 0 #c62828}
.kf-attention-row.kf-attention-followup{background:#fff8e9;border-color:#efd28c;box-shadow:inset 5px 0 0 #d18b00}
.kf-alert-label{display:inline-block;font-size:.7rem;font-weight:900;letter-spacing:.06em;border-radius:999px;padding:4px 8px;margin-right:8px;background:#173f67;color:#fff;vertical-align:middle}
.kf-attention-sale .kf-alert-label{background:#138a45}.kf-attention-message .kf-alert-label{background:#1668b2}.kf-attention-urgent .kf-alert-label{background:#c62828}.kf-attention-followup .kf-alert-label{background:#d18b00}
.kf-attention-name strong{font-size:1rem}.kf-attention-reason{line-height:1.35}
.kf-schedule-status{margin:14px 0;padding:15px 18px;border-radius:14px;display:flex;gap:16px;align-items:center;justify-content:space-between;border:1px solid #dce3eb;background:#f8fafc}
.kf-schedule-status span{display:block;font-size:.72rem;font-weight:900;letter-spacing:.055em;margin-bottom:3px}.kf-schedule-status strong{display:block;font-size:1.15rem}
.kf-schedule-install{background:#f2ecff;border-color:#bca5f2;box-shadow:inset 5px 0 0 #6f42c1}.kf-schedule-sold{background:#effaf3;border-color:#82d6a0;box-shadow:inset 5px 0 0 #138a45}.kf-schedule-estimate{background:#eef6ff;border-color:#91bff0;box-shadow:inset 5px 0 0 #1668b2}
.kf-arc-project{border:1px solid #dfe5eb;border-radius:14px;padding:14px;margin:14px 0;background:#fff}.kf-arc-project h3,.kf-arc-project h4{margin:5px 0 9px}.kf-arc-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 0;border-bottom:1px solid #edf0f3}.kf-arc-row:last-child{border-bottom:0}
.kf-route-picker-head{align-items:center;margin-top:14px}.kf-route-customers{max-height:430px;overflow:auto;border:1px solid #dfe5eb;border-radius:12px;margin:9px 0 14px;background:#fff}.kf-route-customer{display:flex;gap:10px;padding:11px 12px;border-bottom:1px solid #edf0f3;cursor:pointer}.kf-route-customer:last-child{border-bottom:0}.kf-route-customer>input{margin-top:4px}.kf-route-customer span{display:flex;flex-direction:column;gap:2px}.kf-route-customer small{color:#64748b}.kf-route-customer em{font-style:normal;color:#0e679c;font-size:.84rem}.kf-route-customer em.kf-flexible{color:#6b7280}.kf-route-customer:has(input:checked){background:#f0f7ff}
.pipeline-board .col-h,.board .col-h,#pipelineBoard .col-h{position:sticky;top:0;z-index:4;background:#f7f9fb;box-shadow:0 1px 0 #dde4eb}
.kf-move-stage{margin-top:9px;font-size:.82rem;padding:7px 8px;min-height:34px}.kf-card-install{font-weight:800;color:#5f38a6}
.cal-event.kf-cal-estimate{border-left-color:#2563eb!important;background:#eff6ff!important}.cal-event.kf-cal-install.kf-cal-agricultural{border-left-color:#d3a500!important;background:#fff9d9!important}.cal-event.kf-cal-install.kf-cal-residential{border-left-color:#7c3aed!important;background:#f4edff!important}.cal-event.kf-cal-install.kf-cal-other{border-left-color:#dc2626!important;background:#fff0f0!important}.cal-event.kf-cal-install.kf-cal-commercial{border-left-color:#dc2626!important;background:#fff0f0!important}
.kf-loading{padding:22px;text-align:center;color:#64748b}.kf-success{padding:12px;border-radius:10px;background:#effaf3;border:1px solid #82d6a0}
@media(max-width:760px){.kf-attention-row{grid-template-columns:1fr;gap:8px}.kf-attention-row .btn{justify-self:start}.kf-schedule-status{align-items:flex-start;flex-direction:column}.kf-arc-row{align-items:flex-start;flex-direction:column}.kf-route-customers{max-height:50vh}}

/* KINGDOM CRM v6.8.0 — crew/install operations + reporting */
.kf-crew-jobs{display:grid;gap:12px;padding:14px}.kf-crew-card{border:1px solid #dce5ec;border-radius:14px;background:#fff;padding:15px;box-shadow:0 4px 14px rgba(28,53,76,.05)}.kf-crew-card.ready{border-color:#7fc896;box-shadow:inset 5px 0 0 #138a45}.kf-crew-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.kf-crew-head>div{display:grid;gap:3px}.kf-crew-head span{font-size:12px;font-weight:900;letter-spacing:.04em;color:#ef7f1a;text-transform:uppercase}.kf-crew-head strong{font-size:1.08rem;color:#173f67}.kf-crew-head small{color:#64748b}.kf-crew-head b{font-size:12px;border-radius:999px;background:#eef3f7;padding:5px 9px;color:#40566a;white-space:nowrap}.kf-crew-card.ready .kf-crew-head b{background:#e8f7ee;color:#11713a}.kf-crew-scope{margin:12px 0;color:#425466}.kf-crew-checks{display:grid;gap:8px;margin:14px 0}.kf-crew-check{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #dfe6ec;border-radius:10px;background:#fff;cursor:pointer}.kf-crew-check:has(input:checked){background:#eef9f2;border-color:#90cfaa}.kf-crew-check input{width:20px;height:20px}.kf-crew-photo-box{border:1px dashed #b8c8d6;border-radius:12px;padding:13px;margin:14px 0;background:#f8fbfd}.kf-ready-invoice{margin:15px 0;padding:13px;border:1px solid #84c99d;border-radius:10px;background:#effaf3;font-weight:800}.kf-report-kpis{margin-bottom:14px}
@media(max-width:760px){.kf-crew-jobs{padding:10px}.kf-crew-head{flex-direction:column}.kf-crew-head b{white-space:normal}.kf-crew-card .kf-actions{display:grid;grid-template-columns:1fr}.kf-crew-card .kf-actions .btn{width:100%}.kf-report-kpis{grid-template-columns:1fr 1fr}}

/* v6.8.1 iPhone/Safari: prevent focus auto-zoom without disabling pinch zoom accessibility. */
@media (max-width:760px){
  input,select,textarea,.input{
    font-size:16px!important;
  }
  html,body{
    -webkit-text-size-adjust:100%;
  }
}

/* In-CRM document pages and crew ETA composer. */
.kf-crew-dialog{width:min(960px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:14px;overflow:auto;color:#142b42;background:#fff}
.kf-crew-dialog::backdrop{background:rgba(0,0,0,.55)}
.kf-crew-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;position:sticky;top:0;background:#fff;z-index:1;border-bottom:1px solid #ddd}
.kf-crew-dialog-body{padding:16px;min-width:0}
.kf-crew-dialog label{display:block;margin-bottom:14px}
.kf-crew-dialog .input{font-size:16px;width:100%;box-sizing:border-box}
.kf-doc-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0}
.kf-doc-scroll{overflow:auto;max-height:65dvh;background:#eee;overscroll-behavior:contain}
.kf-doc-scroll img{display:block;max-width:none;width:100%;height:auto}
.kf-doc-page{position:relative;width:100%}.kf-doc-links{position:absolute;inset:0;pointer-events:none}.kf-doc-hotspot{position:absolute;pointer-events:auto;cursor:pointer;border:2px solid #e98632;background:rgba(233,134,50,.12);padding:0;min-width:0;min-height:0;border-radius:4px}.kf-photo-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:10px;margin:12px 0}.kf-photo-gallery img{width:100%;height:100px;object-fit:cover}

.kf-camera-photo{display:block;width:100%;height:auto;max-height:70dvh;object-fit:contain;background:#f1f3f5}

.kf-file-drop{margin:14px 0;padding:20px;border:2px dashed #b8c4ce;border-radius:12px;display:flex;align-items:center;flex-direction:column;gap:8px;text-align:center;transition:background .15s,border-color .15s}.kf-file-drop.is-dragging{background:#e8f4ed;border-color:#26864b}.kf-file-drop>span{color:#657381;font-size:14px}.kf-file-drop input[type=file]{position:absolute;width:1px;height:1px;opacity:0}.kf-file-drop:focus-within{outline:2px solid #26864b;outline-offset:2px}.kf-file-drop .kf-help{overflow-wrap:anywhere;max-width:100%}

.kf-pipeline-scroll-nav{position:sticky;top:68px;z-index:6;display:flex;align-items:center;gap:10px;background:#fff;padding:10px 0;border-bottom:1px solid #dce5ee;margin-bottom:10px}.kf-pipeline-top-scroll{flex:1;min-width:0;overflow-x:scroll;overflow-y:hidden;height:24px;scrollbar-color:#647e96 #edf2f6}.kf-pipeline-top-scroll>div{height:1px}.kf-pipeline-top-scroll:focus-visible{outline:2px solid #f58220}.kf-pipeline-scroll-nav .btn{font-size:20px;min-width:42px}

/* Keep desktop stage headings in view within the pipeline scroll area. */
@media(min-width:901px){#pipelineBoard{align-items:stretch}#pipeline .pipeline-wrap{max-height:calc(100dvh - 170px);overflow:auto;overscroll-behavior:contain}#pipelineBoard .col-h{position:sticky;top:0;z-index:4;background:#f7f9fb;box-shadow:0 1px 0 #dde4eb}}

/* Direct dashboard note resolution: desktop and mobile action buttons stay together. */
.kf-attention-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.kf-date-stamps{color:#536777;font-size:.86rem;margin:8px 0 16px}
.kf-record-history{margin-top:18px;border-top:1px solid #dde5ec;padding-top:10px}
.kf-record-history h3{font-size:1rem}.kf-record-history summary{font-size:.86rem;line-height:1.5}
@media(max-width:760px){.kf-attention-actions{justify-content:flex-start}}
.btn.kf-journey-expired{background:#a32626;color:#fff;border-color:#a32626}.btn.kf-journey-expired:hover{background:#801c1c;border-color:#801c1c}.btn.kf-journey-expired:focus-visible{outline:3px solid #f7b3b3;outline-offset:3px}



/* Readable customer timeline: one message with expandable delivery evidence. */
.kf-history-entry{border-bottom:1px solid #e4eaf1;padding:4px 0}
.kf-history-entry .kf-history-row{border-bottom:0;align-items:start;padding:14px 8px}
.kf-history-entry .icon{margin-top:3px}
.kf-history-entry .kf-history-copy{gap:5px;line-height:1.4}
.kf-history-entry .kf-history-copy strong{font-size:14px;overflow-wrap:anywhere}
.kf-history-entry .kf-history-copy time{font-size:12px;color:#64748b}
.kf-history-entry .kf-history-copy .kf-history-channel{font-size:11px;font-weight:700;letter-spacing:.03em;color:#34577a;margin:0}
.kf-history-entry .kf-history-copy .kf-history-status{font-size:11px;color:#25634c;margin:0}
.kf-history-entry .kf-history-copy .kf-history-excerpt{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.5;color:#475569;margin:0}
.kf-history-sources{margin:0 8px 10px 52px;font-size:12px;color:#64748b}
.kf-history-sources summary{cursor:pointer}
.kf-history-sources .btn{display:block;margin-top:6px;white-space:normal;text-align:left;max-width:100%}
.kf-history-entry .kf-history-open{align-self:center}
@media(max-width:760px){.kf-history-entry .kf-history-row{grid-template-columns:26px minmax(0,1fr);gap:8px}.kf-history-entry .kf-history-open{display:none}.kf-history-sources{margin-left:42px}}

/* Compact customer finder; keep other customer pickers unchanged. */
.kf-dialog.kf-quick-find header{background:#244f9b;border-bottom-color:#ff8200}
.kf-quick-find .kf-find-label{display:block;font-size:13px;font-weight:700;color:#244f9b;margin-bottom:6px}
.kf-quick-find #kfQuickFind{box-sizing:border-box;width:100%;font:inherit;border:1px solid #bccbdf;border-radius:8px;padding:11px 12px;background:#fff;color:#172b3a}
.kf-quick-find #kfQuickFind:focus-visible{outline:2px solid #ff8200;outline-offset:2px;border-color:#244f9b}
.kf-quick-find .kf-find-count{font-size:12px;color:#526174;margin:10px 0}
.kf-quick-find .kf-customer-results{gap:0;border:1px solid #dbe4eb;max-height:52vh}
.kf-quick-find .kf-customer-results:empty{display:none}
.kf-quick-find .kf-find-row{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 116px minmax(0,1.3fr) 12px;align-items:center;gap:10px;min-height:48px;padding:10px 12px;border:0;border-bottom:1px solid #e3eaf3;border-radius:0;font:inherit;line-height:1.35;background:#fff;color:#172b3a}
.kf-quick-find .kf-find-row:last-child{border-bottom:0}
.kf-quick-find .kf-find-row>strong,.kf-quick-find .kf-find-row>span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kf-quick-find .kf-find-row>strong{font-size:14px;color:#244f9b}
.kf-quick-find .kf-find-row>span{font-size:12px;color:#526174}
.kf-quick-find .kf-find-row>.kf-find-open{font-size:22px;font-weight:700;color:#d66b00}
.kf-quick-find .kf-find-row:hover{background:#f0f5ff}
.kf-quick-find .kf-find-row:focus-visible{background:#f0f5ff;outline:2px solid #ff8200;outline-offset:-2px}
@media(max-width:650px){
  .kf-quick-find .kf-find-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 12px;gap:3px 10px;min-height:64px}
  .kf-quick-find .kf-find-name{grid-column:1;grid-row:1}
  .kf-quick-find .kf-find-location{grid-column:2;grid-row:1}
  .kf-quick-find .kf-find-phone{grid-column:1;grid-row:2}
  .kf-quick-find .kf-find-email{grid-column:2;grid-row:2}
  .kf-quick-find .kf-find-open{grid-column:3;grid-row:1 / 3}
}

/* Shared scheduling picker — a reliable seven-column month view even when a
   pre-existing form or responsive utility class changes its child display. */
.kf-date-field{min-width:0;position:relative}
.kf-date-line{display:flex;align-items:stretch;gap:8px}
.kf-date-line>.input{min-width:0;flex:1}
.kf-calendar-launch{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;min-height:42px;border-color:#aac6e7;color:#164f92;font-weight:700;background:#f2f7ff}
.kf-calendar-launch[aria-expanded="true"]{background:#e4efff;box-shadow:0 0 0 2px #7cb3ee}
.kf-date-field .kf-date-pop{width:min(100%,355px);max-width:none;box-sizing:border-box;overflow:visible;padding:14px 12px;background:#fff;border:1px solid #cfdbec;border-radius:12px;box-shadow:0 12px 30px rgba(21,59,104,.16);margin-top:9px}
.kf-date-pop .kf-month-head{display:grid;grid-template-columns:34px minmax(0,1fr) 34px auto;align-items:center;column-gap:6px;margin-bottom:8px}
.kf-date-pop .kf-month-head strong{color:#173a70;white-space:nowrap;font-size:clamp(12px,3.2vw,15px);font-weight:750;text-align:center}
.kf-date-pop .kf-month-nav{display:grid;place-items:center;min-height:34px;padding:0;font-size:24px;line-height:1;border:0;background:transparent;color:#2858a1}
.kf-date-pop .kf-month-today{padding:5px 8px;min-height:34px;border-radius:6px;border:1px solid #c8d7e7;background:#f5f9ff;color:#25518e;font-weight:700}
.kf-date-pop .kf-date-grid{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:4px;width:100%;align-items:stretch;justify-items:stretch}
.kf-date-pop .kf-date-grid>.kf-weekday{display:grid;place-items:center;min-width:0;padding:5px 0;color:#667b92;font-size:11px;font-weight:750}
.kf-date-pop .kf-date-grid>button.kf-day{display:grid;place-items:center;box-sizing:border-box;min-width:0;width:100%;min-height:40px;padding:0;border:0;border-radius:8px;background:#f4f7fa;color:#173a70;font:inherit;font-weight:650;cursor:pointer}
.kf-date-pop .kf-date-grid>button.kf-day:hover,.kf-date-pop .kf-date-grid>button.kf-day:focus-visible{background:#e1eaff;outline:2px solid #538bde;outline-offset:0}
.kf-date-pop .kf-date-grid>button.kf-day[aria-current="date"]:not([aria-pressed="true"]){outline:2px solid #f58220;outline-offset:-2px}
.kf-date-pop .kf-date-grid>button.kf-day[aria-pressed="true"]{background:#1556ac;color:#fff;font-weight:800}
.kf-date-pop .kf-date-grid>button.kf-day[aria-pressed="true"]:focus-visible{outline:3px solid #f58220}
@media(max-width:560px){.kf-date-field .kf-date-pop{width:100%;padding:12px 9px}.kf-calendar-launch{padding-inline:10px}.kf-date-pop .kf-date-grid{gap:3px}.kf-date-pop .kf-date-grid>button.kf-day{min-height:42px}}

/* Fit the whole document into the space left by the actual controls. */
.kf-crew-dialog.kf-document-dialog[open]{display:flex;flex-direction:column;height:calc(100dvh - 24px);box-sizing:border-box;overflow:hidden}
.kf-document-dialog>header{position:static;flex-shrink:0}
.kf-document-dialog .kf-crew-dialog-body{display:flex;flex-direction:column;flex:1;min-height:0;gap:8px;padding:12px}
.kf-document-dialog .kf-crew-dialog-body>label{flex-shrink:0;margin:0}
.kf-document-dialog .kf-crew-dialog-body>p{margin:0;max-height:3em;overflow:auto;flex-shrink:0}
.kf-document-dialog .kf-doc-controls{margin:0;gap:6px;flex-shrink:0}
.kf-document-dialog [data-doc="status"]{min-height:1.3em;flex-shrink:0}
.kf-doc-scroll.kf-doc-viewer{height:auto;max-height:none;min-height:0;flex:1}
.kf-doc-viewer .kf-doc-page{margin:0 auto}
.kf-crew-dialog.kf-doc-expanded[open]{width:100dvw;max-width:100dvw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
@media(max-width:600px){.kf-document-dialog header{padding:8px}.kf-document-dialog .kf-crew-dialog-body{padding:8px;gap:6px}.kf-document-dialog .kf-doc-controls .btn{padding:6px 9px}.kf-document-dialog .kf-crew-dialog-body>p{font-size:12px}}

.kf-find-search{display:flex;gap:8px;align-items:center}.kf-find-search .input{min-width:0;flex:1}.kf-find-search .btn{flex-shrink:0}
.kf-find-recent{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.kf-find-recent:empty{display:none}.kf-find-recent>span{width:100%;font-size:12px;font-weight:700;color:#52657a}.kf-find-recent .btn{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.kf-find-install{display:block;color:#175da3;font-size:11px;line-height:1.4;margin-top:3px}

.kf-doc-viewer img[hidden],.kf-document-dialog [data-doc="photos"][hidden]{display:none}
