/* Task ERP 21.04. Full-page staff chrome; auth, overlay and orders keep their layouts. */
body.cabinet-mode:not(.auth-mode):not(.overlay-mode){
  --staff-line:var(--tg-line);--staff-satin:var(--tg-accent);
  --tg-border:var(--tg-line);--tg-panel:var(--tg-surface);
  --pb-surface:var(--tg-surface);--pb-field:var(--tg-field);--pb-ink:var(--tg-text);
  --pb-muted:var(--tg-muted);--pb-line:var(--tg-line);--pb-accent:var(--tg-accent);
  --pb-selected:color-mix(in srgb,var(--tg-accent) 14%,var(--tg-surface));
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  background:var(--tg-field);color:var(--tg-text);color-scheme:light;
  max-width:none;min-height:100dvh;margin:0;padding:0;line-height:1.5;
}
:root[data-chat-theme=dark] body.cabinet-mode:not(.auth-mode):not(.overlay-mode){color-scheme:dark}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(.staff-texture,.team-footer,.team-brand){display:none!important}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header{background:var(--tg-surface);border-bottom:1px solid var(--tg-line);box-shadow:none;backdrop-filter:none}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header:not([hidden]){display:block!important}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header-inner{width:min(1120px,calc(100% - 32px));min-height:60px;padding:8px 0;margin:auto;display:flex;align-items:center;gap:12px 24px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-title{display:block;flex:none;width:auto;text-align:left}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-title p{font-size:15px;font-weight:600;letter-spacing:0;line-height:24px;margin:0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav{margin:0 0 0 auto;padding:0;border:0;min-width:0;max-width:100%;gap:0 18px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav:not([hidden]){display:flex!important}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-nav::-webkit-scrollbar{display:none}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav :is(a,span){flex:none;font-size:13px;min-height:38px;padding:8px 0;white-space:nowrap;letter-spacing:0;color:var(--tg-muted);text-decoration:none}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav>span{display:flex!important;align-items:center;flex-direction:row;gap:6px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-nav small{border:0;background:var(--tg-field);color:var(--tg-muted);border-radius:6px;padding:2px 5px;font-size:9px;letter-spacing:0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav a[aria-current=page]{color:var(--tg-accent);border-bottom:2px solid var(--tg-accent)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #voice-panel{width:min(1120px,calc(100% - 32px));max-width:none;height:auto;padding:14px 0 32px;margin:0 auto;background:transparent;border:0;box-shadow:none}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #voice-panel>:is(h1,p:first-of-type){display:none}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #workspace>.row{padding:0 0 12px;margin:0 0 18px;min-height:38px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;border-bottom:1px solid var(--tg-line);background:transparent}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #person{font-size:12px;line-height:1.4;color:var(--tg-muted);width:auto;min-width:0;margin-right:auto;overflow-wrap:anywhere}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #workspace>.row :is(a,button){font-size:12px;white-space:nowrap;min-height:32px;padding:5px 9px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #frd-theme-toggle{display:grid;place-items:center;width:32px;min-width:32px;height:32px;min-height:32px;padding:6px;background:transparent;border:0;border-radius:9px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #frd-theme-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-theme{display:none}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(button,input,textarea,select){color:var(--tg-text);font-family:inherit;max-width:100%;box-sizing:border-box}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) button{background:var(--tg-field);color:var(--tg-accent);border:1px solid var(--tg-line);border-radius:9px;font-size:14px;min-height:38px;padding:8px 12px;cursor:pointer}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) button:hover{background:var(--tg-hover)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(input,select,textarea){background:var(--tg-field);border:1px solid var(--tg-line);border-radius:9px;font-size:16px;min-height:40px;min-width:0;padding:8px 10px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) textarea{line-height:1.45}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) input:is([type=checkbox],[type=radio]){width:18px;height:18px;min-height:18px;padding:0;margin:0;flex:none;accent-color:var(--tg-accent)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--tg-accent);outline-offset:3px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) a{color:var(--tg-accent)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) label{font-size:13px;line-height:1.45;color:var(--tg-text);margin:10px 0 6px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) h2{font-size:20px;font-weight:600;line-height:1.3;letter-spacing:0;margin:0 0 14px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) h3{font-size:16px;font-weight:600;line-height:1.35;letter-spacing:0;margin:0 0 10px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) p{font-size:14px;margin:8px 0 12px;overflow-wrap:anywhere}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(.muted,small){color:var(--tg-muted);font-size:12px;line-height:1.5}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #message{font-size:12px;color:var(--tg-muted);min-height:0;margin:0 0 10px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(#employee-profile,#phone-book-section,#erp-access,#admin){padding:0;margin:0 0 20px;border:0;min-width:0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(#note-section,#journal-section){padding:20px;background:var(--tg-surface);border:1px solid var(--tg-line);border-radius:14px;margin:0 0 18px;max-width:none;min-width:0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #note-section>p{font-size:14px;line-height:1.6;max-width:780px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #note-section>:is(p.muted,p:last-child){font-size:12px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #note-form{margin-top:18px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(#record,#save-audio,.frd-auth-primary){background:var(--tg-accent);border-color:var(--tg-accent);color:var(--tg-surface);font-weight:600}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #record[data-recording=true]{background:var(--tg-active);color:#fff}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #record-time{color:var(--tg-muted)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #review-recording{padding:14px;border:1px solid var(--tg-line);background:var(--tg-field);border-radius:11px;margin-top:16px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) audio{color-scheme:inherit;accent-color:var(--tg-accent)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #notes{gap:12px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #notes article{background:var(--tg-field);border:1px solid var(--tg-line);border-radius:11px;padding:14px;margin:0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(.note-head,.note-report){border-color:var(--tg-line)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .note-state{background:var(--tg-surface);color:var(--tg-muted);border:1px solid var(--tg-line);border-radius:7px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(.note-pictures,#image-previews) img{border-color:var(--tg-line);border-radius:7px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #note-images{font-size:16px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #frd-staff-microphone{background:var(--tg-accent)!important;color:var(--tg-surface)!important;border-color:var(--tg-line)!important;box-shadow:var(--tg-shadow)!important}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-card{background:var(--pb-surface);color:var(--pb-ink);border:1px solid var(--pb-line);border-radius:14px;padding:16px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-card :is(section,article){border-color:var(--pb-line)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-card article{background:var(--pb-field);border-radius:10px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-contact{background:var(--pb-surface)!important;color:var(--pb-ink);border-color:var(--pb-line);border-radius:10px;min-height:54px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-contact[data-selected=true]{background:var(--pb-selected)!important;color:var(--pb-accent)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-chips label{background:var(--pb-field);color:var(--pb-ink);border:1px solid var(--pb-line);margin:4px 0;gap:7px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-card blockquote{color:var(--pb-muted);border-color:var(--pb-accent);background:var(--pb-field);border-radius:0 7px 7px 0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-status{color:var(--pb-muted)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-toolbar input{min-width:min(220px,100%)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-grid{gap:14px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-card pre{font-family:inherit;color:var(--pb-ink)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) dialog{background:var(--tg-surface);color:var(--tg-text);border:1px solid var(--tg-line);border-radius:14px;max-width:calc(100% - 24px);box-shadow:var(--tg-shadow)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) dialog::backdrop{background:var(--tg-overlay)}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .frd-member-access-row{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;padding:14px 16px;margin:10px 0;background:var(--tg-surface);border:1px solid var(--tg-line);border-radius:12px}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .frd-member-access-name{font-size:14px;font-weight:600;min-width:0;overflow-wrap:anywhere}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .frd-member-access-state{font-size:12px;color:var(--tg-muted);margin-right:auto}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .frd-member-access-switch{display:inline-flex;align-items:center;gap:8px;margin:0}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #admin .frd-member-access-switch input{margin:0}
@media(max-width:720px){
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header-inner{flex-wrap:wrap;gap:0 14px;padding:7px 0}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-title{width:100%}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav{width:100%;margin:0;gap:0 16px}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .team-header .team-nav :is(a,span){font-size:12px;min-height:36px}
}
@media(max-width:650px){
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(.team-header-inner,#voice-panel){width:calc(100% - 24px)}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) #voice-panel{padding-top:10px}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) :is(#note-section,#journal-section){padding:14px}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .pb-card{padding:12px}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .frd-member-access-row{padding:12px}
  body.cabinet-mode:not(.auth-mode):not(.overlay-mode) .frd-member-access-name{width:100%}
}
/* Recorder keeps its compact page, with the shared palette and controls. */
body.cabinet-mode:not(.auth-mode):not(.overlay-mode).recorder-mode .team-header{display:none!important}
body.cabinet-mode:not(.auth-mode):not(.overlay-mode).recorder-mode #voice-panel{width:min(540px,calc(100% - 32px));max-width:540px;padding:18px 0 24px}
/* Journal tools belong to the remarks screen. */
body.cabinet-mode.team-mode:not(.auth-mode):not(.overlay-mode) #refresh,
body.cabinet-mode.team-mode:not(.auth-mode):not(.overlay-mode) #export { display: none !important; }
