/* TaskTimer 3.11.31 visual language shared by Timer / Pool / Calendar */
.tw-ui-shell,.tw-ui-shell *{box-sizing:border-box}
.tw-ui-shell{position:relative;z-index:19;display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;padding:12px max(18px,calc((100% - 1240px)/2));background:#fff;border-bottom:1px solid #dfe5f1;color:#172347;font:inherit;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.tw-ui-brand{display:inline-flex;align-items:center;gap:9px;white-space:nowrap;color:inherit;text-decoration:none;min-width:0}
.tw-ui-brand strong{display:block;font-size:16px;line-height:1.2;font-weight:800}
.tw-ui-brand small{display:block;font-size:10px;line-height:1.3;color:#68758d}
.tw-ui-logo{display:grid;place-items:center;width:38px;height:38px;background:#19264a;color:#fff;border-radius:11px;font-size:29px;font-weight:700;line-height:1}
.tw-ui-nav{display:flex;justify-content:center;gap:6px;flex-wrap:wrap}
.tw-ui-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 15px;border:1px solid #dbe3f1;border-radius:11px;background:#fff;color:#293753;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap}
.tw-ui-nav a:hover{background:#eef2ff;border-color:#c5d0f2}
.tw-ui-nav a.is-active{background:#283972;border-color:#283972;color:#fff}
.tw-ui-tools{display:flex;gap:6px;align-items:center}
.tw-ui-tools button,.tw-ui-tools a{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;padding:0;border:1px solid #dbe3f1;border-radius:11px;background:#fff;color:#253556;font:700 20px/1 Arial,sans-serif;text-decoration:none;cursor:pointer}
.tw-ui-tools button:hover,.tw-ui-tools a:hover{background:#eef2ff}
html.dark .tw-ui-shell,body.dark .tw-ui-shell{background:#19202d;border-color:#333e55;color:#f0f4fc}
html.dark .tw-ui-brand small,body.dark .tw-ui-brand small{color:#a6b3ca}
html.dark .tw-ui-nav a,html.dark .tw-ui-tools>*,body.dark .tw-ui-nav a,body.dark .tw-ui-tools>*{background:#242f41;color:#eef3fc;border-color:#39445b}
html.dark .tw-ui-nav a.is-active,body.dark .tw-ui-nav a.is-active{background:#5b67dc;border-color:#5b67dc;color:#fff}
@media(max-width:800px){.tw-ui-shell{gap:9px;padding:10px 12px;flex-wrap:wrap}.tw-ui-nav{order:3;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.tw-ui-nav a{padding:8px 4px;font-size:12px}.tw-ui-brand strong{font-size:15px}.tw-ui-tools{margin-left:auto}.tw-ui-brand small{display:none}}
/* local controls already represented in unified bar; preserve functional buttons in DOM */
body .tt-header-nav #tt-taskpool-link,body .tt-header-nav #tt-calendar-link{display:none!important}
body .tt-header-tools>.tt-header-tool[title="Тёмная тема"],body .tt-header-tools>.tt-header-tool[title="Светлая тема"]{display:none!important}
body .pool-back-link,body .pool-timer-button,body #themeBtn{display:none!important}
body .calendar-header__nav .calendar-nav-link,body #calendar-theme{display:none!important}
/* Pool: restrained light surface, denser controls, collapsible side panel and filters */
body:not(.dark) .app{--bg:#f8fafc;--soft:#f6f8fc;--accent:#4338ca;--accent2:#3830b3;--border:#dfe5f0;--text:#18243d;--shadow:0 4px 18px rgba(15,23,42,.035)}
body .app{min-height:calc(100vh - 64px)}
body .app .card{border-radius:14px;box-shadow:var(--shadow)}
body .app .quick-add-card{background:var(--panel);border-color:var(--border)}
body .app .task{border-radius:12px}
body .app .main{min-width:0}
body.tw-side-collapsed .app{grid-template-columns:minmax(0,1fr)}
body.tw-side-collapsed .app>.side{display:none}
.tw-pool-head-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
body .tw-pool-head-tools .btn{font-size:12px;padding:8px 12px}
body .tw-pool-head-tools .btn:hover{border-color:var(--accent)}
body #twFilterCard.tw-filter-collapsed #filtersWrap{display:none!important}
body #twFilterCard.tw-filter-collapsed{padding:10px 14px;margin-bottom:0}
body .tw-filter-collapsed #resetView{display:none}
body .tw-filter-head{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:0}
body #twFilterCard:not(.tw-filter-collapsed) .tw-filter-head{margin-bottom:12px}
body .tw-quick-add-extra{display:flex;justify-content:flex-end;padding-top:8px}
body .tw-quick-add-extra .btn{font-size:12px;padding:7px 11px}
body .quick-add-card.tw-quick-compact .quick-field{display:none!important}
body .quick-add-card.tw-quick-compact .row{grid-template-columns:minmax(0,1fr) 150px}
body .quick-add-card.tw-quick-compact .row>*{min-width:0}
body .quick-add-card.tw-quick-compact textarea{min-height:45px;height:45px}
body .quick-add-card.tw-quick-compact .row>div:last-child{align-self:end}
@media(max-width:780px){body .quick-add-card.tw-quick-compact .row{grid-template-columns:minmax(0,1fr)}body .quick-add-card.tw-quick-compact textarea{height:70px}body .tw-pool-head-tools{width:100%;justify-content:flex-start}}
/* Calendar: TaskTimer palette without flattening timeline/event colors */
html:not(.dark){--cal-bg:#f8fafc;--cal-panel:#fff;--cal-soft:#f1f4fa;--cal-soft-2:#f8fafc;--cal-border:#dfe5f0;--cal-accent:#283972;--cal-accent-text:#fff;--cal-text:#17233b;--cal-muted:#66758e;--cal-shadow:0 5px 22px rgba(15,23,42,.055)}
html.dark{--cal-bg:#131925;--cal-panel:#1c2431;--cal-soft:#242d3b;--cal-soft-2:#1b2330;--cal-border:#364257;--cal-accent:#5b67dc;--cal-accent-text:#fff;--cal-text:#f2f5fc}
.calendar-shell .calendar-brand__icon{background:#283972;box-shadow:none}
.calendar-shell .calendar-card,.calendar-shell .planner-strip{border-radius:15px;box-shadow:var(--cal-shadow)}
.calendar-shell .calendar-button,.calendar-shell .calendar-icon-button{border-radius:11px}
@media(max-width:700px){.tw-ui-shell+.calendar-shell{width:min(100% - 20px,1540px)} }

.tt-delete-pool-action{padding:5px 8px;border:1px solid #e3c9c9;border-radius:8px;background:transparent;color:#a13737;font:500 11px/1.3 Inter,Arial,sans-serif;cursor:pointer;white-space:nowrap;align-self:center}
.tt-delete-pool-action:hover{background:#feecec;border-color:#d48a8a;color:#8f1f1f}
html.dark .tt-delete-pool-action{border-color:#6b4545;color:#ffc5c5}

/* v3.11.32: remove duplicate local controls, compact Pool and consistent header */
.tw-ui-logo{font-size:0}.tw-ui-logo svg{width:27px;height:27px;color:white}
.tw-ui-tools button{font-size:unset;line-height:1}.tw-ui-tools button svg{width:20px;height:20px}
body .tt-header-tools>.tt-header-tool[title="Личный кабинет"]{display:none!important}
body .calendar-brand__icon{display:none!important}
body .calendar-header__nav .tt-auth-link-mini{display:none!important}
body .pool-brand-row #themeBtn{display:none!important}
body .tw-pool-page-head{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
body .tw-pool-page-head .tw-heading{flex:1 1 260px;min-width:0}
body .tw-pool-head-tools{display:none!important}
body .tw-side-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
body .tw-side-switch{padding:5px 7px;font-size:11px;white-space:nowrap}
body .tw-pool-page-head>.tw-side-switch{order:5;margin-left:auto;font-size:12px;padding:8px 12px}
body .tw-pool-filters-row{display:block;margin:0 0 10px;padding:0;min-height:0}
body .tw-pool-filters-row #twFilterCard{width:100%;min-height:0;box-sizing:border-box}
body .tw-pool-filters-row #twFilterCard.tw-filter-collapsed{padding:7px 10px;margin:0}
body .tw-pool-filters-row #twFilterCard.tw-filter-collapsed .tw-filter-head{margin:0}
body .tw-pool-filters-row #twFilterCard.tw-filter-collapsed #twToggleFilters{padding:7px 11px}
body .tw-header-stat{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:0 1 auto;min-width:0}
body .tw-header-stat-title{font-size:12px;color:var(--muted);font-weight:650;white-space:nowrap}
body .tw-header-stat .stats{display:flex;align-items:center;gap:3px;padding:3px;border-radius:11px;box-shadow:none;max-width:100%}
body .tw-header-stat .stat{min-width:74px;display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 9px;border-radius:8px;font-size:11px}
body .tw-header-stat .stat .k{font-size:11px;white-space:nowrap}
body .tw-header-stat .stat .v{font-size:13px;font-weight:800;margin:0}
body .tw-header-stat .stat-wide{width:100%;min-width:210px}
body .tw-header-stat .stat-wide.month-total{padding:6px 8px}
body .tw-header-stat .stat-wide.selected-total{display:flex}
body .tt-account-sync-actions{margin-top:18px;padding-top:12px}
@media(max-width:920px){body .tw-header-stat{flex:1 1 100%;justify-content:flex-start}body .tw-header-stat-title{min-width:100%}}
@media(max-width:640px){body .tw-header-stat .stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}body .tw-header-stat .stat{min-width:0;padding:8px 5px;gap:3px;flex-wrap:wrap}body .tw-header-stat .stat .k{font-size:10px}body .tw-header-stat .stat .v{font-size:12px}}

/* TaskTimer 3.11.33: regression cleanup and harmonised compact controls */
body .tt-app-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
body .tt-app-header .tt-header-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px;margin-left:auto;flex-wrap:wrap}
body .tt-header-action{appearance:none;border:1px solid #dfe5f0;background:#fff;color:#263651;border-radius:10px;padding:9px 13px;font-family:inherit;font-size:13px;font-weight:500;line-height:1.3;white-space:nowrap;cursor:pointer}
body .tt-header-action:hover{background:#f3f5ff;border-color:#c3cbee}
body.dark .tt-header-action,html.dark .tt-header-action{background:#242f41;color:#f4f7fb;border-color:#3d4960}
body .tt-account-sync-actions .tt-sync-button{font-family:inherit;font-size:12px!important;font-weight:500;line-height:1.4;min-height:32px;padding:6px 10px}
/* Pool directions before statistics; muted caption BELOW status counters */
body .tw-pool-head-controls{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin-left:auto;min-width:0;flex-wrap:wrap}
body .tw-side-toggle-anchor{display:flex;align-items:center}
body .tw-pool-page-head .tw-header-stat{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex:0 1 auto}
body .tw-header-stat-title{font-size:11px;font-weight:400;line-height:1.2;color:var(--muted);text-align:right}
body .tw-pool-page-head .tw-header-stat .stats{display:flex;flex-wrap:wrap;gap:3px}
body .tw-pool-page-head>.tw-side-switch{order:initial;margin-left:0}
/* Create record: same input baseline with a compact toggle for optional fields */
body .quick-add-card .row{grid-template-columns:minmax(0,1.8fr) minmax(170px,.6fr) minmax(170px,.6fr) max-content;gap:10px;align-items:start}
body .quick-add-card .row>*{min-width:0}
body .quick-add-card .row>div:last-child{align-self:start;min-width:145px}
body .quick-add-card .row>div:last-child .btn{min-height:46px;white-space:nowrap}
body .quick-add-card .row label{display:block;min-height:19px;margin-bottom:4px;line-height:19px}
body .quick-add-card .row textarea{display:block;height:46px;min-height:46px;max-height:180px;box-sizing:border-box;resize:vertical}
body .quick-add-card.tw-quick-compact .row{grid-template-columns:minmax(0,1fr) max-content;align-items:start}
body .quick-add-card.tw-quick-compact .row>div:last-child{align-self:start}
body .quick-add-card.tw-quick-compact .row .btn{height:46px}
body .tw-project-combo{position:relative;min-width:0}
body .tw-project-combo input{width:100%;padding-right:36px}
body .tw-project-arrow{position:absolute;right:4px;top:4px;width:32px;height:calc(100% - 8px);border:none;background:transparent;border-radius:8px;color:var(--muted);cursor:pointer;font-size:20px;line-height:1}
body .tw-project-arrow:hover{background:rgba(100,116,139,.11)}
body .tw-project-options{position:absolute;z-index:70;top:calc(100% + 5px);left:0;right:0;max-height:260px;overflow:auto;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:0 14px 30px rgba(13,26,53,.2);padding:5px}
body .tw-project-options[hidden]{display:none!important}
body .tw-project-option{display:block;width:100%;border:0;border-radius:8px;background:transparent;color:inherit;font:500 13px/1.4 Inter,Arial,sans-serif;text-align:left;padding:9px 10px;cursor:pointer}
body .tw-project-option:hover,body .tw-project-option:focus-visible{background:rgba(85,105,214,.14);outline:none}
body .tw-project-option[aria-selected="true"]{font-weight:700}
body .tw-project-option-empty{color:var(--muted);padding:10px;font-size:12px}
@media(max-width:1100px){body .quick-add-card:not(.tw-quick-compact) .row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}body .quick-add-card .row>div:last-child{align-self:start}}
@media(max-width:760px){body .tw-pool-page-head{align-items:flex-start}body .tw-pool-head-controls{width:100%;justify-content:space-between;margin-left:0}body .tw-pool-page-head .tw-header-stat{align-items:flex-end}body .quick-add-card .row,body .quick-add-card.tw-quick-compact .row{grid-template-columns:minmax(0,1fr)}body .quick-add-card .row>div:last-child{width:100%}body .quick-add-card .row>div:last-child .btn{width:100%;min-height:43px}body .tt-app-header{flex-wrap:wrap}body .tt-app-header .tt-header-tools{width:100%;justify-content:flex-end;gap:6px}body .tt-header-action{padding:8px 10px;font-size:12px}}
@media(max-width:450px){body .tw-pool-head-controls{flex-wrap:wrap;justify-content:flex-start}body .tw-pool-page-head .tw-header-stat{width:100%;align-items:flex-start}body .tt-app-header .tt-header-tools{justify-content:flex-start}}

/* TaskTimer 3.11.34 — scope directions collapse to sidebar content; keep data and footer visible */
body.tw-directions-collapsed .side #twDirectionsBody,
body.tw-directions-collapsed .side #twDirectionsRelated{display:none!important}
body.tw-directions-collapsed .side .tw-direction-card{margin-bottom:12px}
body .side .tw-side-title{margin-bottom:0}
body .side #twDirectionsBody{margin-top:10px}
body .side .tw-side-switch{min-width:62px;font-weight:600}
body .tw-header-stat-title{font-weight:400}
/* Consistent accessible comboboxes: project and rubric, no black native focus ring */
body .tw-project-combo input{background:var(--soft);border:1px solid var(--border);outline:none;box-shadow:none}
body .tw-project-combo input:focus-visible{border-color:#5366d6;outline:2px solid #b7c5f4;outline-offset:1px;box-shadow:0 0 0 3px rgba(83,102,214,.09)}
body .tw-project-arrow{display:grid;place-items:center}
body .tw-project-arrow svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body .tw-project-options{min-width:100%;max-width:100%}
/* The common navigation already includes the Calendar; eliminate the duplicate heading strip. */
body .calendar-shell > .calendar-header{display:none!important}
body .calendar-shell .tw-planner-status-row{display:flex;align-items:center;flex-wrap:wrap;gap:9px 16px;margin-bottom:4px}
body .calendar-shell .tw-planner-status-row .tt-auth-status-pill{color:var(--cal-muted,#53657d);font-weight:500;font-size:12px;text-transform:none;letter-spacing:normal}
@media(max-width:640px){body .calendar-shell .tw-planner-status-row{gap:6px 10px}body .calendar-shell .tw-planner-status-row .tt-auth-status-pill{font-size:11px}}

/* v3.11.35 — same single-hex TaskWeb logo as Auth */
.tw-ui-logo{background:transparent;border-radius:0}
.tw-ui-logo img{display:block;width:38px;height:38px;object-fit:contain}
