/* Shell of every page: colour tokens --app-* (light and body.theme-dark), header, footer, cards, fields, buttons,
   chips, bidi text, plaques in the dark theme. Linked by dashboard_base.html (cabinet) and base.html (login, legal, 404)
   at the place of their own <style>, so page and cabinet rules after it keep winning. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* Wide blocks scroll inside their own card (.table-responsive / .overflow-x-auto), the page is not clipped.
   Column layout of .content (chat) lives in custom.css — base.html uses it too. */
.content {
    flex-grow: 1;
    min-width: 0;
    max-width: 100vw;
    padding: 10px;
}
/* In the .content column an auto-margin page wrapper is not stretched and would grow to its widest table;
   full width (capped by its max-w-*) lets that table scroll inside its card instead. */
.content > .mx-auto {
    width: 100%;
}
@media (max-width: 768px) {
    .navbar-nav .nav-link span {
        display: none; /* Скрыть текст */
    }
    .navbar-nav .nav-link i {
        margin-right: 0; /* Убрать отступы между иконками и текстом */
    }
}
@media (max-width: 768px) {
    .back-button span {
        display: none; /* Скрываем текст */
    }
    .back-button i {
        margin-right: 0; /* Убираем отступ */
    }
}
/* Таблицы ведут себя аккуратно и не выпирают */
.content .table-responsive {
max-width: 100%;
overflow-x: auto;          /* если не влезает — скролл внутри, а не у страницы */
}

/* Если внутри .content используем .row без .container — убираем отрицательные отступы */
.content > .row {
margin-left: 0;
margin-right: 0;
}
.content > .row > [class^="col"] {
padding-left: .5rem;
padding-right: .5rem;
}

.footer {
    background: var(--app-surface);
    color: var(--app-muted);
    border-top: 1px solid var(--app-surface-border);
    padding: 10px;
    text-align: center;
    width: 100%;
}
.footer a { color: inherit; }
.footer a:hover { color: var(--app-text); }

/* Product palette aligned with landing mocks (--p-* in landing.css). */
:root {
--app-bg: #F3F5F9;
--app-text: #2B3A4F;
--app-muted: #5F6B7D;
--app-nav-bg: #F3F5F9;
--app-nav-border: #E3E8EF;
--app-surface: #ffffff;
--app-surface-border: #E3E8EF;
--app-sidebar-bg: #22314B;
--app-sidebar-hover: rgba(255, 255, 255, 0.08);
--app-link: #2B3A4F;
--app-link-hover: #0E6B66;
--app-button-hover: rgba(17, 128, 122, 0.08);
--app-dropdown-bg: #ffffff;
--app-dropdown-border: #E3E8EF;
--app-dropdown-hover: #E2F3F1;
--app-dropdown-text: #2B3A4F;
--app-dropdown-muted: #5F6B7D;
--app-input-bg: #ffffff;
--app-input-border: #E3E8EF;
--app-input-text: #2B3A4F;
--app-input-placeholder: #5F6B7D;
--app-accent: #11807A;
--app-button-primary: #11807A;
--app-radius: 8px;
}

body.theme-dark {
color-scheme: dark;
--app-bg: #0b1220;
--app-text: #e2e8f0;
--app-muted: #94a3b8;
--app-nav-bg: #0b1220;
--app-nav-border: rgba(30, 41, 59, 0.6);
--app-surface: #0f172a;
--app-surface-border: #1f2a44;
--app-sidebar-bg: #22314B;
--app-sidebar-hover: rgba(255, 255, 255, 0.08);
--app-link: #E2F3F1;
--app-link-hover: #ffffff;
--app-button-hover: rgba(17, 128, 122, 0.18);
--app-dropdown-bg: rgba(15, 23, 42, 0.98);
--app-dropdown-border: #1f2a44;
--app-dropdown-hover: #1f2a44;
--app-dropdown-text: #e2e8f0;
--app-dropdown-muted: #cbd5f5;
--app-input-bg: #0f172a;
--app-input-border: #1f2a44;
--app-input-text: #e2e8f0;
--app-input-placeholder: #64748b;
--app-accent: #2AA8A0;
--app-radius: 8px;
--app-button-primary: #11807A;
}

body {
background: var(--app-bg);
color: var(--app-text);
}

a {
text-decoration: none;
}
a:hover {
text-decoration: none;
}

.text-link {
color: var(--app-link);
display: inline-flex;
align-items: center;
gap: .4rem;
}
.text-link:hover {
color: var(--app-link-hover);
}

.text-button {
display: inline-flex;
align-items: center;
gap: .5rem;
padding: .35rem .6rem;
border-radius: var(--app-radius);
color: var(--app-link);
background: transparent;
border: none;
}
.text-button:hover {
color: var(--app-link-hover);
background: var(--app-button-hover);
}

/* Cabinet header: one control. Icon and word, link colour, no filled button. */
.app-nav .nav-action {
display: inline-flex;
align-items: center;
gap: .45rem;
padding: 0;
margin: 0;
border: 0;
outline: none;
box-shadow: none;
appearance: none;
background: transparent;
color: var(--app-link);
font: inherit;
font-weight: 600;
line-height: 1.2;
cursor: pointer;
text-decoration: none;
}
.app-nav .nav-action:focus,
.app-nav .nav-action:focus-visible {
outline: none;
box-shadow: none;
}
.app-nav .nav-action i {
width: 1.05rem;
text-align: center;
font-size: 1rem;
}
.app-nav .nav-action:hover {
color: var(--app-link-hover);
background: transparent;
}

.app-nav {
position: relative;
z-index: 40;
background: var(--app-nav-bg);
border-bottom: 1px solid var(--app-nav-border);
}

.app-brand {
color: var(--app-link);
}
.app-brand:hover {
color: var(--app-link-hover);
}

.app-dropdown {
background: var(--app-dropdown-bg);
border: 1px solid var(--app-dropdown-border);
}
.app-dropdown a {
color: var(--app-dropdown-text);
}
.app-dropdown a span {
color: var(--app-dropdown-text);
}
.app-dropdown a:hover {
background: var(--app-dropdown-hover);
}

.card {
background: var(--app-surface);
border: 1px solid var(--app-surface-border);
border-radius: var(--app-radius);
padding: 1rem;
}

/* Nested block inside a card. Bootstrap .border is !important and ignores Tailwind border colours. */
.subcard {
background: var(--app-surface);
border: 1px solid var(--app-surface-border);
border-radius: var(--app-radius);
padding: .75rem;
}

/* Hebrew / Arabic text inside the LTR layout: put on the text element only, never on layout containers.
   The line keeps the alignment of its parent (left in the LTR layout). */
.bidi-text,
.cs-bidi :is(h1,h2,h3,p,.cs-label,.cs-hint,.cs-ct,.cs-cs,.cs-err,.gt,.gs,[role=status],#csSaveError,.cs-dirty span,textarea,input[type=text],input[type=email],input:not([type])),
.ob-bidi :is(h1,h2,p,label,.ob-q,[role=status],[role=alert]),
.doc-bidi :is(h1,h2,h3,p,li) {
unicode-bidi: plaintext;
text-align: match-parent;
}

.section-title {
color: var(--app-text);
}

.muted-text {
color: var(--app-muted);
}

.input-base {
width: 100%;
background: var(--app-input-bg);
border: 1px solid var(--app-input-border);
color: var(--app-input-text);
border-radius: var(--app-radius);
padding: .65rem .9rem;
font-size: 1rem;
font-weight: 600;
}

.input-base::placeholder {
color: var(--app-input-placeholder);
}

.input-base:focus {
outline: none;
border-color: var(--app-accent);
box-shadow: 0 0 0 2px rgba(17, 128, 122, 0.25);
}

body.theme-dark .input-base:focus {
box-shadow: none;
border-color: var(--app-accent);
}

body.theme-dark input[type="file"]::file-selector-button,
body.theme-dark input[type="file"]::-webkit-file-upload-button {
background: var(--app-input-bg);
color: var(--app-text);
border: 1px solid var(--app-input-border);
border-radius: var(--app-radius);
padding: .35rem .75rem;
margin-inline-end: .6rem;
}

body.theme-dark input[type="date"]::-webkit-calendar-picker-indicator,
body.theme-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator {
opacity: .55;
}

.button-primary {
background: var(--app-button-primary);
color: #fff;
border: none;
border-radius: var(--app-radius);
padding: 0 1.1rem;
font-weight: 600;
display: inline-flex;
align-items: center;
justify-content: center;
gap: .4rem;
height: 36px;
line-height: 1;
box-sizing: border-box;
}

.button-primary:hover {
filter: brightness(1.05);
color: #fff;
}

/* WTForms SubmitField → <input type="submit">: flex does not center the label. */
input.button-primary,
input[type="submit"].button-primary {
display: inline-block;
line-height: 36px;
padding: 0 1.1rem;
vertical-align: middle;
text-align: center;
-webkit-appearance: none;
appearance: none;
}

.button-secondary {
background: var(--app-surface);
color: var(--app-text);
border: 1px solid var(--app-input-border);
border-radius: var(--app-radius);
padding: 0 .9rem;
font-weight: 600;
display: inline-flex;
align-items: center;
justify-content: center;
gap: .4rem;
height: 36px;
line-height: 1;
box-sizing: border-box;
}

input.button-secondary,
input[type="submit"].button-secondary {
display: inline-block;
line-height: 34px;
padding: 0 .9rem;
vertical-align: middle;
text-align: center;
-webkit-appearance: none;
appearance: none;
}

.button-secondary:hover {
background: var(--app-button-hover);
color: var(--app-text);
}

.button-secondary:disabled {
opacity: .6;
cursor: not-allowed;
}

.action-item {
height: 36px;
padding: 0 .75rem;
border-radius: var(--app-radius);
}

.action-danger {
color: #dc2626;
}

.action-danger:hover {
color: #b91c1c;
}

a.action-item.action-danger,
button.action-item.action-danger {
background: #dc2626;
color: #fff;
border: none;
display: inline-flex;
align-items: center;
justify-content: center;
font-weight: 600;
text-decoration: none;
height: 36px;
padding: 0 .9rem;
border-radius: var(--app-radius);
box-sizing: border-box;
line-height: 1;
}

a.action-item.action-danger:hover,
button.action-item.action-danger:hover {
color: #fff;
filter: brightness(1.05);
}

/* Section tabs (hr_section_tabs): chips, touch target >= 32 px */
.tab-chip {
display: inline-flex;
align-items: center;
min-height: 32px;
padding: 0 14px;
border-radius: 999px;
border: 1px solid var(--app-surface-border);
background: var(--app-surface);
color: var(--app-text);
font-size: 13px;
font-weight: 500;
text-decoration: none;
}
.tab-chip:hover {
background: var(--app-button-hover);
color: var(--app-text);
}
.tab-chip[aria-current="page"], .tab-chip[aria-pressed="true"], .tab-chip[aria-selected="true"] {
background: #0f172a;
border-color: #0f172a;
color: #fff;
font-weight: 600;
}
body.theme-dark .tab-chip[aria-current="page"], body.theme-dark .tab-chip[aria-pressed="true"],
body.theme-dark .tab-chip[aria-selected="true"] {
background: #e2e8f0;
border-color: #e2e8f0;
color: #0b1220;
}

/* Plaques (rose / emerald / amber, settings pattern) in the dark theme — soft tints, AA text. */
body.theme-dark .bg-rose-50 { background-color: rgba(244, 63, 94, .12); }
body.theme-dark .bg-emerald-50 { background-color: rgba(16, 185, 129, .12); }
body.theme-dark .bg-amber-50 { background-color: rgba(245, 158, 11, .12); }
body.theme-dark .border-rose-200, body.theme-dark .border-rose-300 { border-color: rgba(244, 63, 94, .35); }
body.theme-dark .border-emerald-200 { border-color: rgba(16, 185, 129, .35); }
body.theme-dark .border-amber-200 { border-color: rgba(245, 158, 11, .35); }
body.theme-dark .text-rose-700, body.theme-dark .text-rose-800,
body.theme-dark .text-rose-900 { color: #fda4af; }
body.theme-dark .text-emerald-700, body.theme-dark .text-emerald-800,
body.theme-dark .text-emerald-900 { color: #6ee7b7; }
body.theme-dark .text-amber-700, body.theme-dark .text-amber-800,
body.theme-dark .text-amber-900 { color: #fcd34d; }
body.theme-dark .hover\:bg-rose-50:hover { background-color: rgba(244, 63, 94, .12); }
body.theme-dark .bg-brand-50, body.theme-dark .bg-brand-100 { background-color: rgba(17, 128, 122, .18); }
body.theme-dark .text-brand-700, body.theme-dark .text-brand-800 { color: #5eead4; }

/* Month / period switcher — one look for Finance, HR and the company dashboard. */
.app-period-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.app-period-nav button,
.app-period-nav .app-period-btn {
  border: 1px solid var(--app-surface-border);
  background: var(--app-surface);
  color: var(--app-text);
  border-radius: var(--app-radius);
  min-width: 2rem;
  height: 2rem;
  padding: 0 .55rem;
  cursor: pointer;
  line-height: 1;
  font: inherit;
}
.app-period-nav button:hover,
.app-period-nav .app-period-btn:hover {
  background: var(--app-surface-border);
}
.app-period-nav .app-period-label {
  font-size: 1.05rem;
  font-weight: 650;
  min-width: 7rem;
  text-align: center;
}
/* Alias kept for existing finance markup */
.fin-period-nav { display: flex; align-items: center; gap: .5rem; }
.fin-period-nav button {
  border: 1px solid var(--app-surface-border);
  background: var(--app-surface);
  color: var(--app-text);
  border-radius: var(--app-radius);
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  line-height: 1;
}
.fin-period-nav button:hover { background: var(--app-surface-border); }
.fin-period-label {
  font-size: 1.05rem;
  font-weight: 650;
  min-width: 7rem;
  text-align: center;
}

/* Company dashboard: one hero figure, quiet stats, crew meters. Tokens only. */
.dash-hero {
  padding: 1.35rem 1.4rem 1.15rem;
}
.dash-hero-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .dash-hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.7fr);
    gap: 2rem;
    align-items: end;
  }
}
.dash-kicker {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.dash-hero-line {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-top: 0.35rem;
}
.dash-hero-num {
  font-size: clamp(2.7rem, 6vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--app-text);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
a.dash-hero-num:hover { color: var(--app-text); }
.dash-currency {
  font-size: 1rem;
  font-weight: 650;
  color: var(--app-muted);
}
.dash-hero-fact {
  margin-top: 0.55rem;
  color: var(--app-muted);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.dash-tracks {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.15rem;
}
.dash-track-label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--app-muted);
}
.dash-track {
  height: 8px;
  border-radius: 999px;
  background: var(--app-button-hover);
  overflow: hidden;
}
.dash-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.dash-track .is-in { background: var(--app-accent); }
.dash-track .is-out { background: var(--app-text); opacity: 0.28; }
.dash-side { display: grid; align-content: end; }
a.dash-stat, .dash-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--app-surface-border);
  color: var(--app-text);
  text-decoration: none;
  font-size: 0.92rem;
}
a.dash-stat:hover { color: var(--app-text); background: transparent; }
.dash-stat b {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
}
.dash-crews {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 800px) {
  .dash-crews { grid-template-columns: 1fr 1fr; }
}
.dash-crew {
  border: 1px solid var(--app-surface-border);
  border-radius: var(--app-radius);
  padding: 0.95rem 1rem 0.8rem;
  background: var(--app-bg);
}
.dash-crew-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.dash-result {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dash-crew-meta {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--app-muted);
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8.5rem;
  grid-auto-flow: dense;
  gap: .75rem;
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: .85rem .95rem .75rem;
  background: var(--app-surface);
  border: 1px solid var(--app-surface-border);
  border-radius: var(--app-radius);
  cursor: grab;
}
.dash-tile.span-w-2 { grid-column: span 2; }
.dash-tile.span-h-2 { grid-row: span 2; }
.dash-tile.is-dragging { opacity: .55; }
.dash-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.dash-k {
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.dash-n {
  margin-top: .35rem;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: inherit;
  text-decoration: none;
}
.dash-sub { margin-top: .25rem; font-size: .75rem; color: var(--app-muted); }
.dash-lines { margin-top: .45rem; min-height: 0; overflow: auto; }
.dash-lines .dash-stat { padding: .28rem 0; font-size: .8rem; }
.dash-x {
  border: 0;
  background: transparent;
  color: var(--app-muted);
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  padding: 0 .1rem;
}
.dash-x:hover { color: var(--app-text); }
.dash-picker { padding: .2rem 0; }
.dash-picker label {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0;
  padding: .5rem .95rem;
  border-top: 1px solid var(--app-surface-border);
  cursor: pointer;
}
.dash-picker label:first-of-type { border-top: 0; }

/* Help center article / FAQ body (no page-local <style>) */
.prose-help p { margin: .5rem 0; }
.prose-help ul, .prose-help ol { margin: .5rem 0; padding-inline-start: 1.25rem; }
.prose-help h1, .prose-help h2, .prose-help h3, .prose-help h4 { font-weight: 600; margin: 1rem 0 .5rem; }
.prose-help table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: .5rem 0; }
.prose-help th, .prose-help td { border: 1px solid var(--app-surface-border); padding: .35rem .5rem; text-align: start; }
.prose-help blockquote { border-inline-start: 3px solid var(--app-surface-border); padding-inline-start: .75rem; color: var(--app-muted); }
.prose-help figure.help-shot { margin: 1rem 0; max-width: 52rem; }
.prose-help figure.help-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--app-surface-border);
  border-radius: .5rem;
  background: var(--app-surface, #fff);
}
.prose-help figure.help-shot figcaption {
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--app-muted);
  line-height: 1.35;
}

/* Floating «?» → Ask Yomit messenger thread; unread badge like Zendesk launcher */
.help-fab {
  position: fixed;
  inset-inline-end: 1.15rem;
  bottom: 1.15rem;
  z-index: 45;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--app-button-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
  text-decoration: none;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  /* relative positioning context for unread badge */
  isolation: isolate;
}
.help-fab:hover,
.help-fab:focus-visible {
  color: #fff;
  filter: brightness(0.94);
  outline: 2px solid var(--app-accent);
  outline-offset: 2px;
}
body.theme-dark .help-fab {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.help-fab__badge {
  position: absolute;
  top: -0.15rem;
  inset-inline-end: -0.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 9999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  box-shadow: 0 0 0 2px var(--app-surface, #fff);
}
@media (max-width: 640px) {
  .help-fab {
    inset-inline-end: 0.85rem;
    bottom: 0.85rem;
  }
}

/* Task card. Same rules as the old <style> in task_overview.html, limited to this page
   so names like .pill and .muted do not restyle the rest of the cabinet. */
#taskOverviewRoot .work-card{border:1px solid var(--app-surface-border);border-radius:var(--app-radius);padding:.7rem;margin-bottom:.6rem;background:var(--app-surface)}
#taskOverviewRoot .badge-floor{display:inline-block;border:1px solid var(--app-surface-border);border-radius:.35rem;padding:.05rem .35rem;font-size:.75rem;background:var(--app-input-bg);margin-left:.35rem}
#taskOverviewRoot .muted{color:var(--app-muted)}
#taskOverviewRoot .user-pill{cursor:pointer;border:1px solid var(--app-surface-border);border-radius:999px;padding:.35rem .6rem;background:var(--app-surface);color:var(--app-text);display:inline-flex;align-items:center;gap:.4rem}
#taskOverviewRoot .user-pill.active{background:var(--app-accent);color:#fff;border-color:var(--app-accent)}
#taskOverviewRoot .leaflet-routing-container{display:none!important}
#taskOverviewRoot .task-head #taskHeadActions :is(a, button).action-item{
  height:36px;
  min-height:36px;
  padding:0 .9rem;
  font-size:.875rem;
  font-weight:600;
  line-height:1;
  border-radius:var(--app-radius);
  box-sizing:border-box;
}
#taskOverviewRoot .pdf-lang-menu{
  position:absolute;
  top:calc(100% + .35rem);
  inset-inline-end:0;
  z-index:40;
  min-width:11rem;
  padding:.35rem;
  display:flex;
  flex-direction:column;
  gap:.35rem;
  background:var(--app-surface);
  border:1px solid var(--app-surface-border);
  border-radius:var(--app-radius);
  box-shadow:0 8px 24px rgba(15,23,42,.12);
}
#taskOverviewRoot .pdf-lang-menu.hidden{display:none}
#taskOverviewRoot .pdf-lang-opt{
  display:flex;
  align-items:center;
  height:36px;
  padding:0 .9rem;
  border-radius:var(--app-radius);
  border:1px solid var(--app-input-border);
  background:var(--app-surface);
  color:var(--app-text);
  font-size:.875rem;
  font-weight:600;
  text-decoration:none;
}
#taskOverviewRoot .pdf-lang-opt:hover{background:var(--app-button-hover);color:var(--app-text)}
#taskOverviewRoot .task-map-frame{
  width:100%;
  height:220px;
  border-radius:var(--app-radius);
  overflow:hidden;
  border:1px solid var(--app-surface-border);
}
#taskOverviewRoot .task-map-chip,
#taskOverviewRoot #task-header-map-warning{
  border-radius:var(--app-radius);
}
#taskOverviewRoot .task-map-chip{
  display:inline-flex;
  align-items:center;
  height:36px;
  padding:0 .9rem;
  border:1px solid var(--app-surface-border);
  background:var(--app-surface);
  color:var(--app-text);
  font-size:.875rem;
  font-weight:600;
}
#taskOverviewRoot .leaflet-bar{
  border-radius:var(--app-radius);
  overflow:hidden;
}
#taskOverviewRoot .leaflet-bar a:first-child{
  border-top-left-radius:var(--app-radius);
  border-top-right-radius:var(--app-radius);
}
#taskOverviewRoot .leaflet-bar a:last-child{
  border-bottom-left-radius:var(--app-radius);
  border-bottom-right-radius:var(--app-radius);
}
#taskOverviewRoot button.task-map-mode.ring-mode{
  outline:none;
  background:var(--app-button-primary);
  color:#fff;
  border-color:transparent;
}
#taskOverviewRoot .leaflet-emp-pin-label{
  background:rgba(255,255,255,.95)!important;
  border:1px solid var(--app-surface-border, #ccc)!important;
  border-radius:var(--app-radius)!important;
  padding:2px 8px!important;
  font-size:11px!important;
  font-weight:600!important;
  color:var(--app-text,#111)!important;
  box-shadow:0 1px 4px rgba(0,0,0,.12)!important;
  white-space:nowrap!important;
}
#taskOverviewRoot .leaflet-emp-pin-label::before{display:none!important}
#taskOverviewRoot .task-head{
  position:sticky;top:0;z-index:30;
  background:var(--app-bg);
  padding:.75rem 0;
  border-bottom:1px solid var(--app-surface-border);
}
/* Title column must not shrink to a few letters so the buttons can stay on the same row. */
#taskOverviewRoot .task-head > .flex{align-items:flex-start}
#taskOverviewRoot .task-head > .flex > .min-w-0{
  flex:1 1 18rem;
  min-width:min(100%, 18rem);
}
#taskOverviewRoot #taskSubtitle,
#taskOverviewRoot #taskDates,
#taskOverviewRoot #taskWindow{white-space:nowrap}
#taskOverviewRoot .progress-ring{transform:rotate(-90deg)}
#taskOverviewRoot .progress-ring circle{fill:none;stroke-width:6;stroke-linecap:round}
#taskOverviewRoot .progress-ring .ring-bg{stroke:var(--app-surface-border)}
#taskOverviewRoot .progress-ring .ring-fg{stroke:var(--app-accent);transition:stroke-dasharray .4s ease}
#taskOverviewRoot .pill{display:inline-flex;align-items:center;gap:.35rem;border-radius:999px;padding:.15rem .6rem;font-size:.75rem;font-weight:600;border:1px solid transparent}
#taskOverviewRoot .pill.hidden{display:none}
#taskOverviewRoot .pill-done{background:#dcfce7;color:#166534;border-color:#bbf7d0}
#taskOverviewRoot .pill-work{background:#dbeafe;color:#1e40af;border-color:#bfdbfe}
#taskOverviewRoot .pill-todo{background:#f1f5f9;color:#475569;border-color:#e2e8f0}
#taskOverviewRoot .pill-warn{background:#fef3c7;color:#92400e;border-color:#fde68a}
#taskOverviewRoot .pill-bad{background:#ffe4e6;color:#9f1239;border-color:#fecdd3}
#taskOverviewRoot .pill-reported{background:#ecfdf5;color:#0f766e;border-color:#0f766e}
body.theme-dark #taskOverviewRoot .pill-done{background:rgba(16,185,129,.14);color:#6ee7b7;border-color:rgba(16,185,129,.35)}
body.theme-dark #taskOverviewRoot .pill-work{background:rgba(99,102,241,.16);color:#c7d2fe;border-color:rgba(99,102,241,.4)}
body.theme-dark #taskOverviewRoot .pill-todo{background:var(--app-input-bg);color:var(--app-muted);border-color:var(--app-surface-border)}
body.theme-dark #taskOverviewRoot .pill-warn{background:rgba(245,158,11,.14);color:#fcd34d;border-color:rgba(245,158,11,.35)}
body.theme-dark #taskOverviewRoot .pill-bad{background:rgba(244,63,94,.14);color:#fda4af;border-color:rgba(244,63,94,.35)}
body.theme-dark #taskOverviewRoot .pill-reported{background:rgba(16,185,129,.14);color:#6ee7b7;border-color:rgba(16,185,129,.45)}
#taskOverviewRoot .task-sep{border-top:1px solid var(--app-surface-border)}
#taskOverviewRoot input[type=file]{color:var(--app-text)}
#taskOverviewRoot input[type=file]::file-selector-button{margin-inline-end:.6rem;border:1px solid var(--app-input-border);border-radius:var(--app-radius);background:var(--app-surface);color:var(--app-text);padding:.2rem .7rem;font:inherit;cursor:pointer}
#taskOverviewRoot .chain-node{display:flex;gap:.6rem;align-items:flex-start;padding:.45rem 0}
#taskOverviewRoot .chain-dot{flex:0 0 auto;width:.6rem;height:.6rem;border-radius:999px;background:var(--app-accent);margin-top:.4rem}
#taskOverviewRoot .chain-rail{border-inline-start:2px solid var(--app-surface-border);padding-inline-start:.75rem;margin-inline-start:.28rem}
#taskOverviewRoot .photo-tile{position:relative;aspect-ratio:1;border-radius:.6rem;overflow:hidden;border:1px solid var(--app-surface-border);background:var(--app-input-bg)}
#taskOverviewRoot .photo-tile img{width:100%;height:100%;object-fit:cover;display:block}
#taskOverviewRoot .item-row-done{background:rgba(22,163,74,.06)}
#taskOverviewRoot .fact-label{font-size:.72rem;font-weight:700;color:var(--app-muted);line-height:1.2}
#taskOverviewRoot .fact-value{font-size:.9rem;font-weight:600;color:var(--app-text);line-height:1.35}
#taskOverviewRoot .fact-sub{font-size:.75rem;color:var(--app-muted);line-height:1.35}
#taskOverviewRoot .card-title{font-size:.78rem;font-weight:700;letter-spacing:.02em;color:var(--app-text)}
#taskOverviewRoot .card{padding:.7rem .85rem}
#taskOverviewRoot .table-compact th{font-size:.74rem;font-weight:700;padding-bottom:.25rem}
#taskOverviewRoot .table-compact td{font-size:.82rem;padding-top:.28rem;padding-bottom:.28rem}
#taskOverviewRoot .input-base{font-size:1rem;font-weight:600;color:var(--app-text);padding:.55rem .75rem;min-height:2.5rem}
#taskOverviewRoot :is(a,button).text-link.action-item{
  background:var(--app-button-primary);
  color:#fff;
  border:none;
  border-radius:var(--app-radius);
  height:36px;
  padding:0 .9rem;
  font-weight:600;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
#taskOverviewRoot .exec-mode.text-link:not(.button-primary){
  background:var(--app-surface);
  color:var(--app-text);
  border:1px solid var(--app-input-border);
}
#taskOverviewRoot :is(a,button).action-item.action-danger{
  background:#dc2626;
  color:#fff;
  border:none;
}
#taskOverviewRoot :is(a,button).text-link.action-item:hover{filter:brightness(1.05);color:#fff}
#taskOverviewRoot .exec-mode.text-link:not(.button-primary):hover,
#taskOverviewRoot :is(a,button).action-item.action-danger:hover{filter:brightness(1.05);color:#fff}
#taskOverviewRoot .task-head .pill{
  border-radius:var(--app-radius);
  height:36px;
  padding:0 .9rem;
  font-size:.875rem;
  font-weight:600;
  line-height:1;
  display:inline-flex;
  align-items:center;
}
#taskOverviewRoot .task-head .pill.hidden{display:none}
#taskOverviewRoot .user-pill{font-size:.78rem;padding:.25rem .55rem}
#taskOverviewRoot .crew-member{display:inline-flex;align-items:center;gap:.35rem;border:1px solid var(--app-surface-border);border-radius:999px;padding:.2rem .55rem;font-size:.78rem;font-weight:600;background:var(--app-input-bg)}
#taskOverviewRoot .crew-lead{border-color:var(--app-accent);color:var(--app-accent)}
#taskOverviewRoot #taskMainCol{display:flex;flex-direction:column;gap:1rem}
#taskOverviewRoot #taskMainCol > *{margin-top:0}
#taskOverviewRoot.is-task #taskDescCard{order:-1}
#taskOverviewRoot .desc-title-task{display:none}
#taskOverviewRoot.is-task .desc-title-report{display:none}
#taskOverviewRoot.is-task .desc-title-task{display:inline}
#taskOverviewRoot.task-fill #factsCardHead,
#taskOverviewRoot.task-fill #factsGrid,
#taskOverviewRoot.task-fill #btnEditHeader,
#taskOverviewRoot.task-fill #btnSaveHeader,
#taskOverviewRoot.task-fill #btnSaveExecutor,
#taskOverviewRoot.task-fill #btnSaveObject,
#taskOverviewRoot.task-fill #objectPickerHint,
#taskOverviewRoot.task-fill #hdrClientWrap,
#taskOverviewRoot.task-fill [data-object-recent-wrap],
#taskOverviewRoot.task-fill [data-object-summary],
#taskOverviewRoot.task-fill [data-object-city-wrap]{display:none}
#taskOverviewRoot.task-fill #factsCard{display:flex;flex-direction:column;gap:.75rem}
#taskOverviewRoot.task-fill #headerEditor{order:1}
#taskOverviewRoot.task-fill #executorEditor{order:2}
#taskOverviewRoot.task-fill #objectPickerWrap{order:3}
#taskOverviewRoot.task-fill #taskPlaceFacts{order:4}
#taskOverviewRoot.task-fill #taskCardSave{order:5}
#taskOverviewRoot.task-fill #objectPickerWrap{
  margin-top:0;
  padding-top:0;
  border-top:0;
}
#taskOverviewRoot.task-fill #headerEditor,
#taskOverviewRoot.task-fill #executorEditor{
  margin-top:0;
  padding-top:0;
  border-top:0;
}
#taskOverviewRoot.task-fill .object-picker{display:flex;flex-direction:column;gap:.75rem}
#taskOverviewRoot.task-fill .object-picker > *{margin-top:0}
#taskOverviewRoot.task-fill .object-picker [data-object-filters]{order:-1;display:flex;flex-direction:column;gap:.5rem}
#taskOverviewRoot.task-fill .object-picker [data-object-client-wrap]{order:1}
.object-picker [data-client-create-link]{display:none}
.object-picker .picker-field-label{display:none}
#taskOverviewRoot.task-fill .object-picker [data-client-create-link]{display:inline-flex}
#taskOverviewRoot.task-fill .object-picker .picker-field-label{display:block}
#taskOverviewRoot.task-fill .object-picker [data-object-field-row]{margin-top:.25rem}
#taskOverviewRoot select.input-base,
#taskOverviewRoot [data-object-browse-btn]{
  appearance:none;-webkit-appearance:none;
  height:40px;min-height:40px;box-sizing:border-box;
  padding:0 2.2rem 0 .75rem;line-height:40px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right .85rem center;background-size:.7rem .45rem;
}
body.theme-dark #taskOverviewRoot select.input-base,
body.theme-dark #taskOverviewRoot [data-object-browse-btn]{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2l5 5 5-5' fill='none' stroke='%23cbd5e1' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#taskOverviewRoot.task-fill .object-picker [data-client-create-link],
#taskOverviewRoot.task-fill .object-picker [data-object-create-link]{
  height:40px;flex:0 0 16.5rem;width:16.5rem;white-space:nowrap;
}
