:root{--tyc-blue:#007eb8;--tyc-blue-light:#e9f5fc;--tyc-pink:#e62b78;--tyc-ink:#18334b;--tyc-muted:#64758a;--tyc-border:#dce5ed;--tyc-nav-height:calc(68px + env(safe-area-inset-bottom,0px));--accent:var(--tyc-blue);--primary:var(--tyc-blue)}
body{background:#f4f7fa;color:var(--tyc-ink)}
button{touch-action:manipulation}
.is-authenticated{padding-bottom:var(--tyc-nav-height)}
.login-mark{background:var(--tyc-blue)!important;box-shadow:inset 0 -4px var(--tyc-pink)}
#workplaceNav{position:fixed;z-index:45;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));padding:5px max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom);min-height:var(--tyc-nav-height);background:#fff;border-top:1px solid var(--tyc-border)}
#workplaceNav[hidden],#workplacePage[hidden]{display:none!important}
#workplaceNav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;background:transparent;color:#52657b;min-height:56px;padding:5px 2px;font-size:12px;line-height:1.3;overflow-wrap:anywhere;min-width:0}
#workplaceNav button[aria-current=page]{color:var(--tyc-blue);font-weight:700;background:var(--tyc-blue-light);border-radius:10px}
#workplaceNav svg{width:23px;height:23px;stroke:currentColor;fill:none;stroke-width:1.8}
#workplacePage{position:fixed;z-index:40;inset:0 0 var(--tyc-nav-height);overflow-y:auto;overscroll-behavior:contain;background:#f5f8fb;padding:env(safe-area-inset-top) max(12px,env(safe-area-inset-right)) 24px;min-width:0;color:var(--tyc-ink)}
.wp-inner{width:100%;max-width:880px;margin:auto;min-width:0}
.wp-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:10px;background:#f5f8fb;padding:14px 0;min-width:0;border-bottom:1px solid var(--tyc-border);margin-bottom:16px}
.wp-header h1{font-size:23px;line-height:1.4;margin:0;flex:1;overflow-wrap:anywhere;min-width:0}
.wp-header h1:after{content:'';display:block;width:24px;height:3px;background:var(--tyc-pink);margin-top:5px}
.wp-header button{flex-shrink:0}
#workplacePage button,#workplacePage input,#workplacePage select,#workplacePage textarea{font:inherit;min-height:44px;max-width:100%;box-sizing:border-box}
#workplacePage button{border:1px solid var(--tyc-border);border-radius:10px;padding:10px 14px;background:#fff;color:var(--tyc-ink);cursor:pointer;white-space:normal;overflow-wrap:anywhere}
#workplacePage button.primary{background:var(--tyc-blue);color:white;border-color:var(--tyc-blue)}
#workplacePage button:disabled{opacity:.6;cursor:default}
#workplacePage input,#workplacePage select,#workplacePage textarea{width:100%;border:1px solid var(--tyc-border);border-radius:9px;background:white;padding:11px;font-size:16px;color:var(--tyc-ink);min-width:0}
#workplacePage textarea{min-height:120px;resize:vertical}
.wp-card{display:block;background:white;border:1px solid var(--tyc-border);border-radius:14px;padding:16px;margin:12px 0;min-width:0;overflow-wrap:anywhere}
button.wp-card{width:100%;text-align:start}
.wp-card h2,.wp-card h3{margin:0 0 8px;line-height:1.5;font-size:18px}
.wp-card p{margin:8px 0;white-space:pre-wrap;line-height:1.6}
.wp-muted,.wp-card small{color:var(--tyc-muted);line-height:1.5;overflow-wrap:anywhere}
.wp-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}
#workplacePage .wp-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:96px;background:white;text-align:center;padding:10px 5px;font-size:14px}
.wp-tile span:first-child{font-size:23px;color:var(--tyc-blue)}
.wp-stack{display:flex;flex-direction:column;gap:10px}
.wp-settings-list{background:#fff;border:1px solid var(--tyc-border);border-radius:14px;overflow:hidden}
#workplacePage .wp-setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:68px;padding:14px 16px;text-align:start;border:0;border-bottom:1px solid var(--tyc-border);border-radius:0}
#workplacePage .wp-setting-row:last-child{border-bottom:0}
.wp-setting-copy{display:flex;flex:1;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere}
.wp-setting-copy small{font-size:14px;line-height:1.5;color:var(--tyc-muted)}
.wp-settings-heading{font-size:16px;margin:24px 0 10px;color:var(--tyc-muted)}
.wp-settings-logout{margin-top:28px}
#workplacePage .wp-settings-logout button{width:100%}
.wp-actions,.wp-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.wp-tabs button[aria-pressed=true]{background:var(--tyc-blue)!important;color:white!important}
.wp-badge{display:inline-block;font-size:12px;border-radius:7px;padding:3px 7px;background:#edf3f8;color:#42576c;margin:3px 5px 3px 0;line-height:1.5}
.wp-badge.pending{background:#fff1ce;color:#815000}
.wp-badge.done{background:#e4f5e9;color:#176437}
.wp-badge.overdue{background:#fff0f0;color:#ab2332}
.wp-field{display:block;margin:16px 0;min-width:0}.wp-field>span{display:block;font-weight:600;margin-bottom:7px}
.wp-form-footer{display:flex;gap:8px;position:sticky;bottom:-24px;background:#f5f8fb;padding:14px 0}.wp-form-footer button{flex:1}
.wp-person{display:flex!important;align-items:center;gap:12px;text-align:start;width:100%;min-width:0}.wp-person img,.wp-avatar{width:42px;height:42px;object-fit:cover;border-radius:50%;flex-shrink:0;background:var(--tyc-blue-light)}
.wp-person>span{flex:1;min-width:0;overflow-wrap:anywhere}.wp-person small{display:block}
.wp-error{padding:12px;background:#fff0f0;color:#912837;border-radius:9px;margin:12px 0;overflow-wrap:anywhere}.wp-empty{padding:32px 16px;text-align:center;color:var(--tyc-muted)}
.wp-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}.wp-month button{padding:8px 0!important;min-width:0;position:relative}.wp-month button.selected{background:var(--tyc-blue)!important;color:white!important}.wp-month .has-item:after{content:'•';display:block;height:8px;line-height:8px;color:var(--tyc-pink)}
.wp-pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px}.wp-picker-path{overflow-wrap:anywhere}.wp-list-title{display:flex;gap:10px;justify-content:space-between;align-items:center}
.wp-root-busy{display:flex;gap:8px;flex-wrap:wrap}.wp-root-busy .wp-card{flex:1;min-width:110px}
.wp-logo{color:var(--tyc-blue);font-weight:800;font-size:24px;letter-spacing:.5px}
#workplacePage :focus-visible,#workplaceNav :focus-visible{outline:3px solid #e62b78;outline-offset:2px}
.settings-panel{z-index:60!important}
@media(max-width:760px){.wp-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.is-authenticated:not(.show-workspace){padding-bottom:0}body:has(.is-authenticated:not(.show-workspace)) #workplaceNav:not([data-overlay=true]){display:none}#workplacePage{padding-inline:12px}.wp-header h1{font-size:21px}.friend-directory,.profile-setup-dialog,.employee-card-dialog{max-width:100vw!important}}
@media(max-width:350px){.wp-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#workplaceNav button{font-size:11px}}


/* Keep authenticated chat/workspace content above the fixed five-root navigation.
   The base chat panel historically owns a full viewport height; after the bottom
   navigation was introduced that height must be reduced instead of clipped. */
.app-shell.is-authenticated {
  height: calc(var(--chat-viewport-height, 100dvh) - var(--tyc-nav-height));
  padding-bottom: 0;
}
.app-shell.is-authenticated .workspace-panel,
.app-shell.is-authenticated .chat-panel {
  height: 100%;
  min-height: 0;
}

/* A mobile conversation hides the root navigation, so it uses the full viewport. */
@media(max-width:760px){
  .app-shell.is-authenticated:not(.show-workspace){
    height:var(--chat-viewport-height,100dvh);
  }
}
#workplaceInboxButton{position:relative;width:44px;min-width:44px;max-width:44px;min-height:44px;height:44px;padding:8px;border-radius:12px;border:1px solid var(--tyc-border);background:#fff;color:var(--tyc-blue);font-size:12px;font-weight:700;flex:0 0 44px}
#workplaceInboxButton svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
#workplacePage #workplaceInboxButton{padding:8px;max-width:44px;min-height:44px}
.wp-inbox-count{position:absolute;top:0;right:0;min-width:17px;line-height:17px;padding:0 2px;font-size:10px;background:var(--tyc-pink);color:white;border-radius:9px}
#workplaceInboxButton[data-unread]:not([data-unread="0"]){background:var(--tyc-blue);color:#fff;border-color:var(--tyc-blue)}
#workplaceInboxButton[hidden]{display:none}
.wp-header{flex-wrap:wrap}.wp-inbox-slot,.wp-chat-inbox-slot{flex:0 0 100%;display:flex;justify-content:flex-end;min-width:0;min-height:44px}
.workspace-header.list-toolbar #newChatButton{min-height:44px}
.wp-notification{margin:12px 0;padding:8px;border-radius:12px}.wp-notification.wp-unread{background:var(--tyc-blue-light);border-left:4px solid var(--tyc-blue)}
.wp-inbox-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:12px}.wp-inbox-filters .wp-field{margin:8px 0}.wp-notification small{display:block;overflow-wrap:anywhere}.wp-notification .wp-card{width:100%}
.wp-inline{display:inline-flex;align-items:center;gap:6px;margin:8px;max-width:100%;overflow-wrap:anywhere}.wp-inline input[type=checkbox]{width:24px;min-width:24px;height:24px;flex:0 0 24px}.wp-tracking-issues{padding-inline-start:20px;overflow-wrap:anywhere}#wpTaskState{max-width:100%}
.wp-favorites{margin-block:12px;padding:12px;background:#fff;border:1px solid var(--tyc-border);border-radius:12px}
.wp-favorites-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.wp-favorites-preview .wp-tile{min-width:0;padding:8px;overflow-wrap:anywhere}
.wp-favorite-order{padding-inline-start:24px}.wp-favorite-order li{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-block:8px;overflow-wrap:anywhere}
#workplacePage[data-page=workplace] .wp-agenda-timeline button{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){.wp-favorites-preview{grid-template-columns:repeat(2,minmax(0,1fr))}.wp-favorites-preview .wp-tile{flex-direction:row;min-height:44px;justify-content:flex-start}.wp-favorites .wp-section-heading{align-items:center}.wp-favorites h2{font-size:16px}}

#workplacePage .wp-header button,#workplacePage .wp-tabs button{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}

#workplacePage .wp-header{flex-wrap:wrap}#workplacePage .wp-header h1{flex:1 1 160px}

/* Keep favorites and action counts first; use the desktop width for the agenda and work. */
#workplacePage .wp-dashboard-layout>.wp-favorites,#workplacePage .wp-dashboard-layout>.wp-dashboard-metrics,#workplacePage .wp-dashboard-layout>.wp-planned-services{grid-column:1/-1}
#workplacePage .wp-dashboard-layout>.wp-favorites{margin-block:0}
#workplacePage .wp-dashboard-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){#workplacePage .wp-dashboard-layout{gap:12px}#workplacePage .wp-dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.dispatch-controls{min-inline-size:0;min-width:0;margin:0;padding:0;border:0}
.dispatch-controls input,.dispatch-controls select,.dispatch-controls textarea{min-width:0;max-width:100%}
.ot-segments{display:flex;flex-wrap:wrap;gap:8px}.ot-segments>div{flex:1;min-width:min(220px,100%);padding:12px;background:#edf4ff;border-left:4px solid #2660b1;overflow-wrap:anywhere}.ot-segments>div:nth-child(even){background:repeating-linear-gradient(135deg,#fff0f7,#fff0f7 8px,#fce4f0 8px,#fce4f0 16px);border-color:#ad286d}.ot-result{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}.ot-card label{display:flex;gap:8px;align-items:center}#otForm label{display:flex;flex-direction:column;gap:5px;margin:12px 0}#otForm textarea,#otForm input,#otForm select{max-width:100%;width:100%;min-height:44px}#otForm input[type=checkbox]{width:20px;min-height:20px}#otForm label:has(input[type=checkbox]){flex-direction:row}

.ot-card input[type=checkbox]{width:20px;min-width:20px;height:20px;min-height:20px;flex:0 0 20px}.ot-card label strong{min-width:0;text-align:start}.ot-card .wp-tabs{flex-wrap:wrap}

#otForm fieldset{border:1px solid #cbd8eb;border-radius:10px;min-width:0;margin:12px 0;padding:12px}#otForm legend{padding:0 8px}.ot-filters{display:flex;flex-wrap:wrap;gap:8px}.ot-filters label{flex:1;min-width:min(150px,100%)}.ot-filters input,.ot-filters select{width:100%;max-width:100%;min-height:44px}

#otRates label{display:flex;flex-direction:column;gap:8px;margin:12px 0}#otRates input,#otRates textarea{width:100%;max-width:100%;min-height:44px}
.ot-full-time{display:flex;flex-direction:column;gap:4px;max-width:100%;overflow-wrap:anywhere}.ot-full-time output{white-space:normal;font-size:1rem}.wp-tile[aria-disabled="true"]{opacity:.7}.wp-tile small{white-space:normal;overflow-wrap:anywhere;font-size:.8rem}
