.daily-app-view{display:block;min-height:100dvh;background:#f3f5f7;}
.daily-app-view>.sidebar,.daily-app-view .content>.topbar,.daily-app-view #sourceNotice,.daily-app-view .two-col>.panel>.panel-head{display:none;}
.daily-app-view>.content{padding:0;display:block;max-width:940px;margin:auto;}
.daily-app-view .two-col{display:block;}
.daily-app-view .two-col>.panel{border:0;border-radius:0;background:none;box-shadow:none;}
.daily-app-view #taskList.work-board{padding:0 20px calc(92px + env(safe-area-inset-bottom));}
.work-app-header{display:grid;grid-template-columns:1fr auto;gap:16px 12px;padding:22px 0 20px;}
.work-app-brand{display:flex;align-items:center;gap:10px;}.work-app-logo{background:#d31525;color:#fff;width:34px;height:34px;display:grid;place-items:center;border-radius:7px;font-weight:700;font-size:23px;}
.work-app-brand strong{font-size:16px;color:#202b3a;}.work-app-brand small{display:block;font-size:11px;font-weight:400;color:#788393;margin-top:2px;}
.work-app-identity{grid-column:1/-1;}.work-app-identity h1{font-size:21px;line-height:1.35;margin:0;color:#202b3a;letter-spacing:0;}.work-app-identity>span{display:block;color:#7a8492;font-size:12px;margin-top:5px;}
.work-icon-button{border:1px solid #dde2e9;background:white;display:grid;place-items:center;width:42px;height:42px;padding:9px;border-radius:7px;color:#5f6b7a;cursor:pointer;}.work-icon-button svg{width:20px;height:20px;}.work-icon-button:disabled{opacity:.35;cursor:default;}
.work-cabinet-label{grid-column:1/-1;font-size:11px;color:#7a8492;}.work-cabinet-label select{width:100%;border:1px solid #dce1e8;border-radius:6px;background:#fff;color:#4e5a6b;font-size:12px;padding:10px;margin-top:5px;}
.daily-app-view .work-app-toolbar{display:grid;grid-template-columns:minmax(230px,1.1fr) minmax(170px,1fr) minmax(130px,.7fr);gap:10px;padding:12px 0;margin:0;align-items:end;position:sticky;top:0;z-index:10;background:#f3f5f7;}
.daily-app-view .work-app-toolbar>label{min-width:0;}.work-date-switch{display:flex;align-items:end;gap:6px;}.work-date-switch label{flex:1;min-width:0;font-size:11px;color:#788393;}.work-date-switch input{min-height:42px;}
.daily-app-view .work-toolbar input,.daily-app-view .work-toolbar select{font-size:14px;min-height:42px;}
.work-date-switch[hidden],.work-task-report label[hidden]{display:none!important;}
.daily-app-view .work-board[data-mode=clients] .work-search,.daily-app-view .work-board[data-mode=stands] .work-search{grid-column:1/-1;}
.work-file-label>span{display:flex;gap:7px;align-items:center;}
.daily-app-view .work-feedback{margin:4px 0;min-height:12px;font-size:12px;}
.work-app-day-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:14px 0;}.work-app-day-heading h2{font-size:17px;line-height:1.4;margin:0;color:#303c4b;}.work-app-day-heading span{font-size:12px;color:#7a8492;text-align:right;}
.work-stops{display:grid;gap:10px;}.work-stop{border:1px solid #e0e5ec;background:white;border-radius:8px;overflow:hidden;}.work-stop.is-open{border-color:#d79ca3;}.work-stop.is-done{border-left:3px solid #247a55;}
.work-stop-toggle{display:flex;gap:11px;align-items:start;border:0;background:transparent;width:100%;padding:17px;text-align:left;color:#202b3a;cursor:pointer;}
.work-stop-order{font-size:12px;color:#88929f;min-width:19px;line-height:23px;}.work-stop-copy{flex:1;min-width:0;}.work-stop-copy>strong{display:block;font-size:15px;line-height:1.45;overflow-wrap:anywhere;}.work-stop-address{display:block;font-size:12px;color:#84909d;line-height:1.5;margin-top:5px;}.work-stop-types{display:block;font-size:12px;color:#5b6879;line-height:1.5;margin-top:6px;}
.work-stop-result{display:flex;gap:8px;align-items:center;font-size:12px;color:#7e8995;padding-top:2px;}.work-stop-result b{font-weight:500;}.work-stop-result b.failed{color:#b83836;}.work-stop-result svg{width:17px;height:20px;transition:transform .15s;}.is-open .work-stop-result svg{transform:rotate(90deg);}
.work-stop-address,.work-stop-types{font-weight:400;}
.work-photo-client{display:block;flex-basis:100%;font-size:12px;color:#7a8492;font-weight:400;line-height:1.5;}
.daily-app-view .work-task-type:has(.work-photo-client){flex-wrap:wrap;}
.work-stop-details{border-top:1px solid #eceff3;}.daily-app-view .work-task{grid-template-columns:130px minmax(0,1fr) minmax(220px,1fr);padding:18px;gap:15px;}.daily-app-view .work-task-type{font-size:14px;color:#313d4d;}.daily-app-view .work-task-action p{font-size:14px;}.daily-app-view .work-task-report label{font-size:12px;}
.work-result-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px 0;}.work-result-choices button{border:1px solid #dce1e7;background:white;color:#697787;border-radius:6px;min-height:46px;font-size:12px;line-height:1.3;padding:8px 3px;cursor:pointer;}.work-result-choices button[aria-pressed=true]{background:#edf5f1;color:#256346;border-color:#91b8a5;}.work-result-choices button[data-value="Не выполнено"][aria-pressed=true]{background:#fff1ef;color:#ab3831;border-color:#e9b2ad;}.work-result-choices button[data-value="В работе"][aria-pressed=true]{background:#eff5fb;color:#326c93;border-color:#a9c2d7;}
.daily-app-view .work-task-report select,.daily-app-view .work-task-report textarea{font-size:15px;min-height:44px;border-radius:6px;}.daily-app-view .work-save{width:100%;min-height:46px;font-size:14px;margin-top:7px;}
.daily-app-view .work-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.daily-app-view .work-file-label{position:relative;min-height:48px;display:flex;gap:7px;align-items:center;justify-content:center;margin:0;color:#516272;font-size:13px;}.work-file-label svg{width:20px;height:20px;flex-shrink:0;}.daily-app-view .work-file-label input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;}.work-file-label:focus-within{outline:2px solid #b42937;outline-offset:2px;}.daily-app-view .work-photo-link{min-height:44px;}
.daily-app-view .work-bottom-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:min(940px,100%);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;z-index:30;padding:7px 12px calc(7px + env(safe-area-inset-bottom));margin:0;border:0;border-top:1px solid #e1e6ed;background:rgba(255,255,255,.98);}
.daily-app-view .work-bottom-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:5px;min-height:51px;color:#8a929e;border:0;border-radius:6px;font-size:11px;}.work-bottom-nav svg{width:22px;height:22px;}.daily-app-view .work-bottom-nav [aria-selected=true]{background:#fff1f3;color:#ba2230;}
.daily-app-view .work-directory-tools .work-segments{display:none;}.daily-app-view .work-directory-tools{padding-top:12px;}.daily-app-view .work-table-scroll{background:white;}
@media(max-width:720px){.daily-app-view #taskList.work-board{padding:0 14px calc(85px + env(safe-area-inset-bottom));}.daily-app-view .work-app-toolbar{grid-template-columns:minmax(0,1fr) minmax(125px,.7fr);}.work-date-switch{grid-column:1/-1;}.daily-app-view .work-app-header{padding-top:17px;}.work-app-identity h1{font-size:19px;}.work-app-day-heading{align-items:start;}.work-app-day-heading span{max-width:165px;font-size:11px;}.work-stop-toggle{padding:15px 12px;gap:8px;}.work-stop-result{gap:3px;}.daily-app-view .work-task{grid-template-columns:minmax(0,1fr);padding:15px;gap:10px;}.daily-app-view .work-task-type{display:flex;justify-content:space-between;gap:10px;}.daily-app-view .work-task-action,.daily-app-view .work-task-report{min-width:0;overflow-wrap:anywhere;}.daily-app-view .work-task-report .work-status{display:none;}.daily-app-view .work-task-report:has(.work-result-choices)>label:has(select[name=status]){display:none;}.daily-app-view .work-route-table,.daily-app-view .work-route-table tbody{display:block;}.daily-app-view .work-route-table thead{display:none;}.daily-app-view .work-route-table tr{display:block;border-bottom:1px solid #e4e8ee;padding:14px;}.daily-app-view .work-route-table td{display:block;border:0;width:auto!important;min-width:0!important;padding:3px 0;overflow-wrap:anywhere;}.daily-app-view .work-route-table td:last-child{font-size:12px;color:#7a8492;}.daily-app-view .work-analytics dl{grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}
@media(prefers-reduced-motion:reduce){.work-stop-result svg{transition:none;}}

/* Shared workspace appearance, loaded after the cabinet styles. */
:root {
  --bg: #f4f5f7;
  --ink: #191d24;
  --muted: #525c68;
  --line: #dce0e6;
  --accent: #c61926;
  --accent-dark: #9d1420;
  --workspace-black: #17181b;
  --workspace-blue: #e9f0fa;
  --workspace-green: #e8f4ec;
  --workspace-gray: #eef0f3;
}

button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #235bb4;
  outline-offset: 2px;
}

.login-screen { background: var(--bg); }
.login-panel { padding: 0; box-shadow: 0 6px 20px #16191c0d; }
.login-panel .brand {
  margin: 0; padding: 16px 22px; background: var(--workspace-black); color: #fff;
  border-radius: 7px 7px 0 0; border-bottom: 4px solid var(--accent);
}
.login-panel h1 { font-size: 24px; }
.login-panel .brand p { color: #e3e5e9; font-size: 13px; margin-top: 3px; }
.login-form { padding: 22px 22px 0; }
.login-panel .demo-access { margin: 10px 22px 22px; }
.login-error:empty { display: none; }

.dashboard:not(.daily-app-view) { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.dashboard:not(.daily-app-view) > .sidebar {
  position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 14px;
  align-items: center; padding: 0 20px; background: var(--workspace-black);
  border-bottom: 1px solid var(--line);
}
.sidebar .brand.small { margin: 0; padding: 10px 0; gap: 10px; }
.sidebar .brand-mark, .work-app-logo { width: 34px; height: 34px; font-size: 22px; border-radius: 6px; }
.sidebar .brand h2 { font-size: 19px; }
.sidebar .brand p { font-size: 12px; color: #d8dbe1; margin-top: 2px; }
.sidebar .user-box { border: 0; padding: 0; font-size: 0; }
.sidebar .user-box strong { font-size: 13px; color: #f1f2f5; }
.sidebar #logoutButton { grid-column: 3; grid-row: 1; padding: 7px 12px; min-height: 34px; font-size: 13px; }
.dashboard:not(.daily-app-view) .sidebar #managerNav {
  grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: stretch;
  padding: 7px 20px; margin: 0 -20px; width: auto; max-width: none; gap: 5px;
  background: #fafafb; border-top: 4px solid var(--accent); overflow: visible;
}
.sidebar #managerNav .nav-item {
  width: auto; min-height: 35px; padding: 5px 10px; font-size: 13px; line-height: 1.25;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 5px;
}
.sidebar #managerNav .nav-item:hover { background: var(--workspace-blue); }
.sidebar #managerNav .nav-item[aria-current] {
  background: var(--workspace-black); color: #fff; border-color: var(--workspace-black);
  box-shadow: inset 0 -2px var(--accent);
}
.sidebar #managerNav small { font-size: 10px; font-weight: 400; }

.dashboard:not(.daily-app-view) > .content { padding: 16px 20px; gap: 12px; min-width: 0; }
.content > .topbar { gap: 10px; }
.topbar h2 { font-size: 24px; line-height: 1.25; }
.topbar .eyebrow { letter-spacing: 0; font-size: 11px; margin-bottom: 4px; }
.topbar .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.topbar-actions button, .date-chip { padding: 7px 10px; min-height: 34px; font-size: 13px; border-radius: 5px; }
.dashboard .source-notice { padding: 8px 0; margin: 0; font-size: 12px; }
.dashboard .source-notice-title { gap: 4px 12px; }
.dashboard .source-dates { margin-top: 4px; }
.branch-dashboard.daily-work-dashboard .two-col > .panel:first-child {
  border: 0; border-radius: 0; background: none; box-shadow: none;
}
.branch-dashboard.daily-work-dashboard .two-col > .panel:first-child > .panel-head { padding: 4px 0 9px; border: 0; }
.branch-dashboard.daily-work-dashboard .two-col > .panel:first-child > .panel-head h3 { font-size: 16px; }
.branch-dashboard #taskList:has(.workspace-group) {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px;
  overflow: visible; max-height: none; padding: 0;
}
.branch-overview #taskList:has(.workspace-group) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.branch-overview .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.branch-overview .metric { padding: 9px 11px; background: #f5f8fc; }
.branch-overview .metric strong { margin: 2px 0 0; font-size: 21px; color: #214e84; }
.workspace-group { min-width: 0; }
.workspace-group > h3 {
  font-size: 14px; line-height: 1.35; padding: 8px 10px; border: 1px solid #d1dce9;
  border-radius: 6px 6px 0 0; background: var(--workspace-blue);
}
.workspace-group:nth-child(2) > h3 { background: var(--workspace-green); border-color: #d4e4d8; }
.workspace-group:nth-child(3) > h3 { background: var(--workspace-gray); border-color: var(--line); }
.workspace-rows { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: #fff; }
.workspace-rows .branch-card {
  position: relative; display: block; min-height: 0; padding: 9px 34px 9px 10px; margin: 0;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none;
  background: #fff; transition: background .15s ease; transform: none;
}
.workspace-rows .branch-card:nth-child(even) { background: #fafbfc; }
.workspace-rows .branch-card:last-child { border: 0; border-radius: 0 0 5px 5px; }
.workspace-rows .branch-card:hover { background: #edf3fc; box-shadow: none; transform: none; }
.workspace-rows .branch-card:focus-visible { outline: 2px solid #235bb4; outline-offset: -2px; }
.workspace-rows .branch-card .client-card-main { display: block; min-height: 0; }
.workspace-rows .branch-card-copy { display: block; overflow-wrap: anywhere; }
.workspace-rows .branch-card-copy strong { font-size: 14px; }
.workspace-rows .branch-card-copy p, .workspace-rows .branch-card-copy small {
  margin: 3px 0 0; font-size: 12px; line-height: 1.35; color: var(--muted); font-weight: 400;
}
.workspace-rows .branch-action-label, .workspace-rows .branch-icon { display: none; }
.workspace-rows .branch-card::after {
  content: ''; position: absolute; right: 15px; top: calc(50% - 4px); width: 7px; height: 7px;
  border: solid #596476; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg);
}

.oct-table thead th, .work-route-table thead th, .native-table thead th, .assignment-table thead th { background: #edf1f6; color: #283544; font-size: 12px; }
:is(.oct-table, .work-route-table, .native-table, .assignment-table) { font-variant-numeric: tabular-nums; }
.oct-table th, .oct-table td, .work-route-table th, .work-route-table td, .native-table th, .native-table td, .assignment-table th, .assignment-table td { padding: 7px 10px; }
.oct-table tbody tr:nth-child(even) td:not([class^="mail-grt-"]) { background: #fafbfc; }
.oct-table tbody .oct-total td:not([class^="mail-grt-"]) { background: #edf3fa; }
.oct-table tbody tr:hover td:not([class^="mail-grt-"]) { background: #f1f5fb; }
.modal-panel > .panel-head { padding: 10px 14px; background: #fbfcfd; border-bottom: 1px solid var(--line); }
.modal-panel > .panel-head h3 { font-size: 17px; }
.modal-panel > .panel-head .close-button { min-height: 34px; padding: 6px 10px; }

.daily-app-view > .content { max-width: none; }
.daily-work-dashboard.daily-app-view #taskList.work-board { padding: 0 0 24px; }
.work-app-header { padding: 0; gap: 0; grid-template-columns: minmax(0, 1fr); }
.work-app-masthead {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px max(16px, calc((100% - 1240px) / 2)); background: var(--workspace-black);
  border-bottom: 4px solid var(--accent); color: #fff;
}
.work-app-masthead .work-app-brand strong { color: #fff; }
.work-app-masthead .work-app-brand small { color: #d8dbe1; }
.work-app-masthead .work-icon-button { height: 36px; width: 36px; padding: 7px; }
.work-app-identity, .work-cabinet-label, .daily-app-view .work-app-toolbar,
.daily-app-view .work-feedback, .daily-app-view .work-content, .daily-app-view .work-bottom-nav {
  width: min(1240px, calc(100% - 32px)); margin-inline: auto;
}
.work-app-identity { padding: 13px 0 6px; }
.work-app-identity h1 { font-size: 22px; overflow-wrap: anywhere; }
.work-cabinet-label { padding: 4px 0 10px; }
.work-cabinet-label select { max-width: 380px; display: block; }
.daily-app-view .work-app-toolbar { margin: 0 auto; padding: 8px 0; background: var(--bg); }
.daily-app-view .work-feedback { min-height: 0; margin: 4px auto; }
.daily-app-view .work-feedback:empty { margin: 0 auto; }
.work-app-day-heading {
  border: 1px solid #d1dce9; border-radius: 6px 6px 0 0; background: var(--workspace-blue);
  padding: 8px 10px; margin-top: 8px;
}
.work-app-day-heading h2 { font-size: 15px; }
.work-app-day-heading span, .work-stop-address { color: var(--muted); }
.work-stops { gap: 0; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: #fff; }
.work-stops .work-stop { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.work-stops .work-stop:last-child { border-bottom: 0; border-radius: 0 0 5px 5px; }
.work-stop:nth-child(even) { background: #fafbfc; }
.work-stops .work-stop.is-open { box-shadow: inset 3px 0 var(--accent); }
.work-stops .work-stop.is-done { box-shadow: inset 3px 0 #247a55; }
.work-stop-toggle { padding: 10px 12px; border-radius: 0; }
.work-stop-toggle:hover { background: #edf3fc; }
.work-stop-toggle:focus-visible { outline-offset: -2px; }
.work-stop-copy > strong { font-size: 14px; }
.work-stop-address, .work-stop-types { margin-top: 3px; }
.work-tags:empty { display: none; }
.work-stop-details { background: #fff; }

@media (min-width: 721px) {
  .daily-app-view .work-bottom-nav {
    position: static; transform: none; display: flex; gap: 5px; padding: 6px 0;
    margin: 4px auto 0; border: 0; border-bottom: 1px solid var(--line); background: transparent;
  }
  .daily-app-view .work-bottom-nav button {
    flex-direction: row; min-height: 34px; padding: 4px 10px; gap: 6px;
    background: #fff; color: var(--ink); font-size: 13px; border: 1px solid var(--line); border-radius: 5px;
  }
  .daily-app-view .work-bottom-nav svg { width: 16px; height: 16px; }
  .daily-app-view .work-bottom-nav button[aria-selected=true] {
    color: #fff; background: var(--workspace-black); border-color: var(--workspace-black); box-shadow: inset 0 -2px var(--accent);
  }
  .daily-app-view .work-app-toolbar { grid-template-columns: minmax(200px, .9fr) minmax(180px, 1.5fr) minmax(128px, .55fr); }
}

@media (max-width: 900px) {
  .branch-dashboard #taskList:has(.workspace-group) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .daily-work-dashboard.daily-app-view #taskList.work-board { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .daily-app-view .work-bottom-nav { width: 100%; }
  .daily-app-view .work-app-header { padding: 0; }
  .work-app-identity h1 { font-size: 19px; }
  .work-stop-toggle { min-height: 44px; }
  .work-stop-result { flex-shrink: 0; }
}
@media (max-width: 560px) {
  .dashboard:not(.daily-app-view) > .sidebar { padding-inline: 12px; }
  .sidebar .user-box { display: none; }
  .dashboard:not(.daily-app-view) .sidebar #managerNav { margin-inline: -12px; padding-inline: 12px; }
  .dashboard:not(.daily-app-view) > .content { padding: 12px; }
  .branch-dashboard #taskList:has(.workspace-group) { grid-template-columns: minmax(0, 1fr); }
  .branch-overview .metrics { grid-template-columns: minmax(0, 1fr); }
  .branch-overview .metric { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
  .branch-overview .metric strong { font-size: 17px; }
  .topbar .topbar-actions { justify-content: flex-start; }
  .topbar h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .workspace-rows .branch-card { transition: none; }
}
