/* «Диспетчер»: единый вид сайта. Загружается последним, после themes.css.
   Цвета берутся из переменных темы, поэтому светлая и тёмная темы и выбор цвета продолжают работать.
   Описание — ТЗ «Диспетчер — ТЗ на интерфейс и логику», раздел 11.7. */
:root{
  --ui-corner:14px;
  --card-corner:22px;
  --pill:999px;
  --cta:#FF7A1A;
  --cta-hover:#F26B0A;
  --cta-ink:#ffffff;
  --cta-soft:#FFF1E5;
  --cta-soft-ink:#B4480A;
  --ok:#12A150;
  --ok-ink:#0B7A3B;
  --ok-soft:#E6F6EC;
  --violet:#7C3AED;
  --violet-soft:#F1EAFE;
  --switch-on:var(--ink);
  --switch-on-ink:var(--surface);
  --hero-from:color-mix(in srgb,var(--accent) 82%,#ffffff);
  --hero-to:var(--accent-dark);
  --shadow:0 1px 2px rgba(16,24,40,.04),0 8px 24px rgba(16,24,40,.06);
  --shadow-small:0 1px 2px rgba(16,24,40,.08);
  --shadow-float:0 10px 30px rgba(15,27,45,.16),0 1px 2px rgba(15,27,45,.06);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}
:root[data-color-mode="dark"]{
  --cta-soft:#3A2412;
  --cta-soft-ink:#FFB37A;
  --ok:#4ADE80;
  --ok-ink:#86EFAC;
  --ok-soft:#12331F;
  --violet-soft:#2A1F45;
  --switch-on:var(--button-bg);
  --switch-on-ink:var(--button-ink);
  --hero-from:var(--button-bg);
  --hero-to:var(--button-hover);
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.28);
  --shadow-float:0 10px 30px rgba(0,0,0,.45);
}
body{background:var(--bg)}
/* Экран получает фокус программно после перехода; рамка вокруг всего содержимого не нужна. */
#main:focus,#main:focus-visible{outline:0}
h1{font-weight:800;letter-spacing:-.8px}
h2{font-weight:700;letter-spacing:-.3px}
h3{font-weight:700;letter-spacing:-.2px}

/* ---------- шапка ---------- */
#app>.header{background:var(--surface);max-width:none;padding-inline:max(24px,calc((100% - 1160px)/2 + 24px));gap:16px}
.logo{font-size:24px;font-weight:800;letter-spacing:-.5px;gap:10px;color:var(--ink)}
.header .logo .brand-mark{--brand-mark-size:40px}
.location{padding:8px 12px;border-radius:var(--pill);background:var(--bg);color:var(--muted);font-weight:500;min-height:40px}
.demo-pill{border:0;background:var(--accent-soft);color:var(--accent);font-weight:600}
.iconbtn{border:0;background:var(--bg);color:var(--ink)}
.iconbtn:hover{background:var(--soft)}
.header [data-action="notifications"][data-unread="true"]{color:var(--ink)}
.header [data-action="notifications"][data-unread="true"]::before{inset:auto;top:8px;right:9px;width:10px;height:10px;border:2px solid var(--surface);background:var(--cta);border-radius:50%}
.header .iconbtn[data-action="notifications"][data-unread="true"]::before{inset:-1px;width:auto;height:auto;border:2px solid var(--cta);background:transparent;border-radius:50%}
.header [data-action="notifications"][data-unread="true"] .notification-bell-shape{fill:none}
/* Unread: pulse and ring, keeping the current theme's outline bell. */
@media(prefers-reduced-motion:no-preference){
  [data-action="notifications"][data-unread="true"] .notification-bell-swing{animation:notification-bell-ring 2.8s ease-in-out infinite}
  [data-action="notifications"][data-unread="true"] .notification-bell-waves{animation:notification-bell-waves 2.8s ease-in-out infinite;opacity:.8}
  .header [data-action="notifications"][data-unread="true"]::before{animation:dispatcher-unread-pulse 2.8s ease-out infinite}
  .nav [data-action="notifications"][data-unread="true"]>svg{animation:dispatcher-nav-bell-ring 2.8s ease-in-out infinite;transform-box:fill-box;transform-origin:50% 15%}
  .nav [data-action="notifications"][data-unread="true"]::after{animation:dispatcher-unread-pulse 2.8s ease-out infinite}
  @keyframes dispatcher-nav-bell-ring{0%,44%,100%{transform:rotate(0) scale(1)}8%{transform:rotate(-12deg) scale(1.08)}16%{transform:rotate(12deg) scale(1.08)}24%{transform:rotate(-9deg) scale(1.08)}32%{transform:rotate(6deg) scale(1)}}
  @keyframes dispatcher-unread-pulse{0%,65%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--cta) 0%,transparent)}30%{box-shadow:0 0 0 7px color-mix(in srgb,var(--cta) 22%,transparent)}}
}
@media(prefers-reduced-motion:reduce){[data-action="notifications"] .notification-bell-swing,[data-action="notifications"] .notification-bell-waves{animation:none}}
.avatar{background:linear-gradient(135deg,var(--hero-from),var(--hero-to));color:#fff;font-weight:700}
.header[data-role="worker"] .avatar,.avatar.worker{background:linear-gradient(135deg,#22C55E,#12A150)}
.dot{background:var(--cta)}
.header .header-signin{min-height:40px;padding:8px 16px;border:0;border-radius:var(--pill);background:var(--button-bg);color:var(--button-ink)}
.header .header-signin:hover{background:var(--button-hover)}

.brand-logo,.brand-entry-splash{color:var(--ink)}
.brand-logo{font-weight:800;letter-spacing:-.5px}

/* ---------- режим «Заказать / Заработать» ---------- */
#app>.role-wrap{background:var(--surface);max-width:none;padding-inline:max(24px,calc((100% - 1160px)/2 + 24px));border-bottom:1px solid var(--line)}
.roles{background:var(--bg);border:0;border-radius:var(--pill);padding:4px;box-shadow:none}
.roles button{border-radius:var(--pill);font-weight:600;min-height:42px;color:var(--muted)}
.roles .active{background:var(--switch-on);color:var(--switch-on-ink);box-shadow:var(--shadow-small)}

/* ---------- меню ---------- */
.nav button{border-radius:var(--pill);font-weight:500;position:relative}
.nav .active{background:var(--accent-soft);color:var(--accent);font-weight:600}
.header .nav [data-action="notifications"][data-unread="true"]::before{content:none}
.nav [data-action="notifications"][data-unread="true"]::after{content:"";position:absolute;top:8px;left:calc(50% + 4px);width:9px;height:9px;border:2px solid var(--surface);border-radius:50%;background:var(--cta)}
.badge-count{background:var(--cta);color:#fff}

/* ---------- кнопки ---------- */
.primary{border-radius:var(--ui-corner);font-weight:700;min-height:52px;box-shadow:none}
.primary:hover{transform:none}
.secondary{border-radius:var(--ui-corner);border:1px solid var(--line);background:var(--surface);font-weight:600;color:var(--ink)}
.secondary:hover{background:var(--soft)}
.textbtn{color:var(--accent);font-weight:600}
a.primary,a.secondary{text-decoration:none}
.textbtn.danger{color:var(--danger)}
/* Оранжевая кнопка — главное действие экрана, на экране она одна. */
.primary.cta,.create-submit,.customer-orders .empty .primary{background:var(--cta);color:var(--cta-ink);box-shadow:0 8px 20px rgba(255,122,26,.28)}
.primary.cta:hover,.create-submit:hover,.customer-orders .empty .primary:hover{background:var(--cta-hover)}

/* ---------- поля ---------- */
.input{border-radius:var(--ui-corner);min-height:52px;background:var(--surface)}
.input:focus,.input:focus-visible{border-color:var(--accent)}
.description{border-radius:var(--ui-corner);background:var(--surface)}
.search{border-radius:18px;border-color:var(--line);height:56px;box-shadow:var(--shadow-small)}
.label{font-weight:600}

/* ---------- метки ---------- */
.chip{border-radius:var(--pill);border-color:var(--line);font-weight:500;background:var(--surface)}
.chip svg{color:var(--accent)}
.chip:hover{border-color:var(--accent);background:var(--accent-soft)}
.chip.active{background:var(--switch-on);border-color:var(--switch-on);color:var(--switch-on-ink)}
.chip.active svg{color:inherit}
.tag{border-radius:var(--pill);padding:5px 10px;background:var(--bg);font-weight:500;font-size:13px}
.tag svg{width:14px;height:14px}
.tag.new{background:var(--accent-soft);color:var(--accent)}
.tag.warm{background:var(--cta-soft);color:var(--cta-soft-ink)}
.status{background:var(--accent-soft);color:var(--accent);font-weight:600}
.status::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;flex:none}
.status.gray{background:var(--bg);color:var(--muted)}
.status.warm{background:var(--cta-soft);color:var(--cta-soft-ink)}
.status.ok{background:var(--ok-soft);color:var(--ok-ink)}
.count-badge{display:inline-grid;place-items:center;min-width:26px;height:24px;padding:0 8px;border-radius:var(--pill);background:var(--accent-soft);color:var(--accent);font-size:13px;font-weight:700;line-height:1}

/* Переключатель из двух-трёх положений: «Список / Карта», вкладки заказов. */
.segmented{display:inline-flex;align-items:center;gap:2px;padding:4px;border-radius:var(--pill);background:var(--surface);box-shadow:var(--shadow-small)}
.segmented>button{min-height:36px;padding:6px 14px;border:0;border-radius:var(--pill);background:transparent;color:var(--muted);font-size:14px;font-weight:500;white-space:nowrap}
.segmented>button.active{background:var(--switch-on);color:var(--switch-on-ink);font-weight:600}
.segmented>button:not(.active):hover{background:var(--soft);color:var(--ink)}

/* ---------- карточки ---------- */
.panel,.formcard,.task,.order-row,.empty,.feature,.help-card{border:0;border-radius:var(--card-corner);box-shadow:var(--shadow);background:var(--surface)}
.note{border:0;box-shadow:none;background:var(--accent-soft);border-radius:var(--ui-corner)}
.offer{box-shadow:none;border:1px solid var(--line);border-radius:18px}
.order-symbol{border-radius:14px;background:var(--accent-soft);color:var(--accent)}
.order-thumbnail,.task-thumbnail{border-radius:14px}
.price{font-size:22px;font-weight:800;letter-spacing:-.5px}
.price.task-negotiable-price,.task-body .price.task-negotiable-price{font-size:15px;font-weight:600;color:var(--accent);letter-spacing:0}
.save{border-radius:50%;background:var(--bg);width:40px;height:40px;min-width:40px;min-height:40px;display:grid;place-items:center;color:var(--muted)}
.save svg{width:19px;height:19px}
.save.saved{background:var(--accent-soft);color:var(--accent)}
.save.saved svg{fill:currentColor}
.empty .empty-icon{border-radius:20px;background:var(--accent-soft);color:var(--accent)}
.section-title h2{font-size:22px}

/* ---------- лента заданий ---------- */
.hero{position:relative;margin-bottom:16px;padding:26px 28px;border-radius:var(--card-corner);background:linear-gradient(135deg,var(--hero-from),var(--hero-to));color:#fff;box-shadow:0 14px 30px color-mix(in srgb,var(--hero-to) 30%,transparent);overflow:hidden}
.hero::after{content:"";position:absolute;right:-70px;top:-90px;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.09);pointer-events:none}
.hero.worker-heading{display:block}
.hero :is(h1,#worker-hero-title){position:relative;max-width:11.4em;font-size:clamp(28px,3.2vw,40px);line-height:1.12;color:#fff}
.hero .lead{position:relative;margin-top:10px;max-width:34em;font-size:16px;color:rgba(255,255,255,.9)}
.hero .search{position:relative;z-index:1;margin-top:18px;max-width:620px;height:58px;padding:0 7px 0 16px;border:0;border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:0 8px 20px rgba(15,27,45,.16)}
.hero .search>svg{color:var(--muted)}
.hero .search input{color:var(--ink)}
.search-submit{flex:none;min-height:44px;padding:8px 18px;border-radius:12px;font-size:15px;box-shadow:none}
.worker-journey{border:0;border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
.feed-title{justify-content:flex-start;gap:10px;margin:6px 0 4px}
.feed-title h2{white-space:nowrap}
.feed-title .segmented{margin-left:auto}
.feed-title .count-badge{font-size:13px;color:var(--accent)}
.feed-scope{margin:0 0 14px}
.task{position:relative;overflow:visible}
.task.task-tile{overflow:hidden}
.task:hover{box-shadow:var(--shadow);outline:2px solid var(--accent-soft)}
.task-body{gap:12px}
.task-head{display:flex;align-items:flex-start;gap:12px}
.task-head-copy{flex:1;min-width:0;display:grid;gap:2px}
.task-body .task-head-copy h3{max-width:none;font-size:17px;line-height:1.3;overflow-wrap:anywhere}
.task-open{display:inline;padding:0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:left}
.task-open::after{content:"";position:absolute;inset:0;border-radius:var(--card-corner)}
.task-open:focus-visible{outline:0}
.task-open:focus-visible::after{outline:3px solid var(--focus);outline-offset:2px}
.task .save,.task .task-foot .primary{position:relative;z-index:1}
.task-category{font-size:13px;line-height:1.35;color:var(--muted)}
.task-category.own{color:var(--accent);font-weight:600}
.task-icon{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:14px;background:color-mix(in srgb,var(--cat,var(--accent)) 13%,var(--surface));color:var(--cat,var(--accent))}
.task-icon svg{width:22px;height:22px}
/* An order without a photo shows the pictogram of its category on a tile of the category colour. */
.category-art{stroke-width:1.5}
.task-icon .category-art{width:28px;height:28px}
.order-symbol .category-art{width:30px;height:30px}
.order-row.compact-order-row .order-symbol .category-art{width:34px;height:34px}
.history-task .order-symbol[data-category]{color:var(--order-icon);background:var(--order-tile)}
.task-tile-picture[data-category]{background:linear-gradient(140deg,color-mix(in srgb,var(--cat) 20%,var(--surface)),color-mix(in srgb,var(--cat) 7%,var(--surface)));color:var(--cat)}
.task-tile-picture .category-art{width:44%;height:44%;max-width:88px;max-height:88px}
.task-head .task-thumbnail{width:46px;height:46px}
.task p{color:var(--muted)}
.task-meta{gap:8px}
.task-meta .tag{gap:5px}
.task-foot{padding-top:12px;border-top:1px dashed var(--line);gap:10px}
.task-body .task-foot .primary{min-height:44px;padding:10px 16px;font-size:15px}
/* Цвет значка по виду работы. */
[data-category="garden"],[data-category="pets"],[data-category="sport"]{--cat:#12A150;--order-icon:#157348;--order-tile:#e2f4e9}
[data-category="clean"],[data-category="care"],[data-category="beauty"]{--cat:#0E9AA7;--order-icon:#087a86;--order-tile:#d7f2f2}
[data-category="repair"],[data-category="plumbing"],[data-category="electrical"],[data-category="appliances"],[data-category="construction"],[data-category="sewing"]{--cat:#E8590C;--order-icon:#a84406;--order-tile:#ffead9}
[data-category="move"],[data-category="transport"],[data-category="delivery"],[data-category="machinery"],[data-category="auto"]{--cat:#7C3AED;--order-icon:#7539cf;--order-tile:#eee5ff}
[data-category="computer"],[data-category="digital"],[data-category="learning"],[data-category="photo"]{--cat:#2563EB;--order-icon:#245cdb;--order-tile:#e7efff}
[data-category="events"],[data-category="legal"],[data-category="accounting"]{--cat:#C026D3;--order-icon:#942a9b;--order-tile:#f9e7f9}
[data-category="other"]{--cat:#667085;--order-icon:#48576a;--order-tile:#e9edf2}
:root[data-color-mode="dark"] [data-category]{--cat:var(--accent)}

/* ---------- мои заказы, моя работа ---------- */
.orders-title-row{gap:10px;flex-wrap:wrap}
.limit-line{margin-top:8px;padding:8px 12px;border-radius:var(--ui-corner);background:var(--cta-soft);color:var(--cta-soft-ink);font-weight:600}
.orders-title-row .orders-create-cta{margin-left:auto;min-height:46px;padding:10px 18px;font-size:15px}
.order-counters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.order-counter{display:grid;align-content:start;gap:4px;min-width:0;padding:14px;border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
.order-counter strong{font-size:24px;font-weight:800;line-height:1;letter-spacing:-.5px}
.order-counter span{font-size:12px;line-height:1.3;color:var(--muted);overflow-wrap:anywhere}
.order-counter.warm strong{color:var(--cta)}
.order-counter.ok strong{color:var(--ok)}
.filterbar.segmented{display:inline-flex;width:auto;max-width:100%;margin:0 0 16px;padding:4px;overflow:auto}
.filterbar.segmented .chip{min-height:38px;padding:6px 14px;border:0;background:transparent;color:var(--muted);font-size:14px}
.filterbar.segmented .chip.active{background:var(--switch-on);color:var(--switch-on-ink);font-weight:600}
.order-row.compact-order-row{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:start;gap:12px 14px;padding:18px}
.order-row.compact-order-row .order-symbol{width:52px;height:52px}
.order-row.compact-order-row .order-thumbnail{width:52px;height:52px;object-fit:cover}
.compact-order-row .compact-order-copy{gap:8px}
.compact-order-tags{display:flex;flex-wrap:wrap;gap:6px}
.order-row.compact-order-row .status{padding:5px 10px;font-size:12px}
.compact-order-tags .tag{font-size:12px}
.compact-order-bottom{padding-top:12px;border-top:1px dashed var(--line);justify-content:flex-start;gap:10px}
.order-row.compact-order-row .amount{margin-left:0;font-size:18px;font-weight:800;letter-spacing:-.3px;text-align:left}
.order-step{font-size:13px;color:var(--muted)}
.order-row>svg{display:none}

/* ---------- страница заказа ---------- */
.order-detail-v2{display:grid;gap:14px;max-width:760px}
.order-detail-v2 .back{justify-self:start;margin-bottom:0}
.order-detail-v2>.panel{min-width:0;margin:0}
.order-detail-v2 .order-detail-v2-card{display:block;padding:clamp(18px,3vw,26px);border-radius:var(--card-corner)}
.order-detail-v2-heading{gap:14px}
.order-detail-v2-meta{gap:8px}
.order-detail-v2 .order-detail-v2-meta .status{padding:5px 10px;border-radius:var(--pill);background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600}
.order-detail-v2 .order-detail-v2-meta .status.gray{background:var(--bg);color:var(--muted)}
.order-detail-v2 .order-detail-v2-meta .status.warm{background:var(--cta-soft);color:var(--cta-soft-ink)}
.order-detail-v2 .order-detail-v2-meta .status.ok{background:var(--ok-soft);color:var(--ok-ink)}
.order-detail-v2-meta .status::before{width:6px;height:6px}
.order-detail-v2-meta .tag svg{color:var(--cat,var(--muted))}
/* Значки под названием заказа — сохранить и поделиться: квадратные кнопки со скруглением, как карточки рядом. */
.order-detail-v2-tools{display:flex;flex-wrap:wrap;gap:10px}
.order-detail-v2 .order-detail-v2-tools+.order-stepper{margin-top:16px}
.order-detail-v2-tools :is(.save,.order-tool){display:grid;place-items:center;width:46px;height:46px;min-width:46px;min-height:46px;border:1px solid var(--line);border-radius:var(--ui-corner);background:var(--surface);color:var(--accent);box-shadow:var(--shadow-small)}
.order-detail-v2-tools :is(.save,.order-tool) svg{width:21px;height:21px}
.order-detail-v2-tools .save.saved{border-color:transparent;background:var(--accent-soft)}
@media(hover:hover){.order-detail-v2-tools :is(.save,.order-tool):hover{background:var(--accent-soft)}}
.order-detail-v2 .detail-title{font-size:clamp(22px,3.4vw,30px);line-height:1.18;letter-spacing:-.5px}
.order-stepper{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:2px 0 0;padding:0;list-style:none}
.order-stepper li{position:relative;display:grid;justify-items:center;align-content:start;gap:7px;min-width:0;font-size:11px;line-height:1.25;color:var(--muted);text-align:center}
.order-stepper li::before{content:"";position:absolute;top:10px;left:-50%;width:100%;height:2px;background:var(--line)}
.order-stepper li:first-child::before{display:none}
.order-stepper li.done::before,.order-stepper li.current::before{background:var(--accent)}
.order-stepper i{position:relative;z-index:1;display:grid;place-items:center;width:22px;height:22px;border:2px solid var(--line);border-radius:50%;background:var(--surface);color:var(--on-accent)}
.order-stepper i svg{width:12px;height:12px;stroke-width:3}
.order-stepper li.done i{border-color:var(--accent);background:var(--accent)}
.order-stepper li.current i{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.order-stepper li.current{color:var(--accent);font-weight:700}
/* After a notification the circle of the step where the order stands pulses three times in the brand orange (#ff7a1a, --cta). Without motion it stays orange for those seconds. */
.order-stepper li.order-step-pulse i{border-color:#ff7a1a;box-shadow:0 0 0 4px #ff7a1a33;animation:order-step-pulse 1.2s ease-out 3}
.order-stepper li.order-step-pulse:focus{outline:0}
@keyframes order-step-pulse{0%{box-shadow:0 0 0 0 #ff7a1ab3}75%{box-shadow:0 0 0 14px #ff7a1a00}100%{box-shadow:0 0 0 0 #ff7a1a00}}
/* A finished order stands on its last step for good: that circle is green. These rules come after the pulse, so a notification pulses round the green circle in orange and leaves it green. */
.order-stepper li.finished{color:var(--ok-ink)}
.order-stepper li.finished i{border-color:var(--ok);background:var(--ok);box-shadow:0 0 0 4px var(--ok-soft)}
/* The other notifications mark the card they spoke of: an orange line round the card that repeats its corners, with the same three pulses. The line is a shadow, which follows round corners in every browser; the card keeps its own shadow. Without motion the line stands still for those seconds. */
.notice-pulse{animation:notice-pulse 1.2s ease-out 3 forwards}
.notice-pulse:not(.panel){border-radius:var(--ui-corner)}
.notice-pulse:focus{outline:0}
@keyframes notice-pulse{0%{box-shadow:0 0 0 2px #ff7a1a,0 0 0 2px #ff7a1ab3,var(--shadow)}75%,100%{box-shadow:0 0 0 2px #ff7a1a,0 0 0 14px #ff7a1a00,var(--shadow)}}
@media(prefers-reduced-motion:reduce){.notice-pulse{box-shadow:0 0 0 2px #ff7a1a,var(--shadow)!important}}
.order-stepper span{white-space:nowrap}
.large-text .order-stepper li{font-size:13px}
.order-detail-v2-budget-summary{justify-items:start;margin:0;text-align:left}
.order-detail-v2-budget-line{justify-content:flex-start}
.order-detail-v2-budget{border-radius:var(--pill);font-size:18px;font-weight:800;letter-spacing:-.3px}
.order-detail-v2-budget-negotiable{padding-block:7px;font-size:15px;font-weight:700;letter-spacing:0}
.order-quick-action{padding-top:0}
.order-quick-action .secondary{min-height:44px;padding:9px 16px;font-size:15px}
.order-detail-v2 .order-detail-v2-actions h3,.order-detail-v2 .order-detail-v2-actions h2,.order-detail-where h2,.order-detail-when h2,.order-detail-v2-description h2{font-size:18px;letter-spacing:-.3px}
.order-detail-v2 .compact-detail-customer{padding:16px 18px;border-top:0}
.order-detail-v2 button.compact-detail-customer{width:100%;text-align:left}
.order-detail-where,.order-detail-when{display:grid;gap:12px}
/* Карточка места заказа: знак, подпись, название места, адрес или пояснение, карта с отметкой и маршрут. */
.order-detail-where .order-detail-v2-map{border:1px solid var(--line);border-radius:18px}
.order-place-head{display:flex;align-items:center;gap:14px;min-width:0}
.order-place-head>div{min-width:0}
.order-place-sign{display:grid;place-items:center;flex:none;width:52px;height:52px;border:1px solid color-mix(in srgb,var(--accent) 18%,transparent);border-radius:16px;background:var(--accent-soft);color:var(--accent)}
.order-place-sign svg{width:24px;height:24px}
.order-place-label{margin:0 0 3px;color:var(--muted);font-size:11px;font-weight:700;line-height:1.3;letter-spacing:.14em;text-transform:uppercase}
.order-detail-where .order-place-head h2{margin:0;font-size:19px;line-height:1.25;overflow-wrap:anywhere}
.order-detail-where>:is(.order-private-location,.order-place-note){margin:0;font-size:14px;line-height:1.45}
.order-detail-where>.order-private-location+.order-private-location{margin-top:-8px}
.order-detail-where>.order-route-action{justify-self:start;gap:8px;min-height:44px;margin:-4px 0;padding:0;font-size:15px;font-weight:700}
.large-text .order-place-label{font-size:13px}
.large-text .order-detail-where>:is(.order-private-location,.order-place-note){font-size:17px}
.order-detail-v2-facts>div:last-child{border-bottom:0}
.compact-detail-followup{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;padding:0 4px}
.compact-detail-followup>.textbtn{margin-top:0}

/* ---------- аватары ---------- */
.avatar.green{background:linear-gradient(135deg,var(--hero-from),var(--hero-to));color:#fff}
.avatar-camera{background:var(--surface);color:var(--accent);box-shadow:var(--shadow-small)}

/* ---------- сообщения ---------- */
.message-heading{display:flex;align-items:center;gap:10px}
.count-badge.warm{background:var(--cta-soft);color:var(--cta-soft-ink)}
.message-card{padding:14px;border-radius:var(--card-corner);background:var(--surface);box-shadow:var(--shadow)}
.message-search{border:0;border-radius:var(--ui-corner);background:var(--bg)}
.message-filters button{min-height:38px;padding:6px 14px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.message-filters button[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:600}
.message-list .order-row.message-open{grid-template-columns:48px minmax(0,1fr);border-radius:var(--ui-corner);background:transparent;box-shadow:none}
.message-list .order-row.message-open:hover{background:var(--soft)}
.message-list .message-avatar{width:48px;height:48px;min-width:48px;font-size:18px}
.message-list .message-row::after{left:60px}
.message-list .message-name{font-size:16px;font-weight:700}
.message-list .message-order,.message-list .message-preview{font-size:14px}
.message-list .chat-unread{background:var(--cta);color:#fff}
.chat-view .chat-order-link{border-color:var(--line);background:var(--bg)}

/* ---------- профиль ---------- */
.profile-view .profile-grid>.panel:has(>.profile-identity){position:relative;padding-top:56px;overflow:hidden}
.profile-view .profile-grid>.panel:has(>.profile-identity)::before{content:"";position:absolute;inset:0 0 auto;height:88px;background:linear-gradient(135deg,var(--hero-from),var(--hero-to))}
.profile-view .profile-identity{position:relative;align-items:flex-end;gap:14px}
.profile-view .profile-identity .avatar.big{box-sizing:content-box;width:76px;height:76px;border:4px solid var(--surface);font-size:30px}
.profile-view .profile-identity h2{font-size:20px}
.profile-view .profile-identity+input+.divider,.profile-view .profile-identity+.divider{border-color:transparent;margin-block:8px}
.profile-stats>*{padding:12px 8px;border-radius:16px;background:var(--bg)}
.profile-stats strong{font-weight:800}
.profile-stats>.profile-stat-link>span{color:var(--muted)}
.profile-stats>.profile-stat-link>strong{color:var(--accent)}
.settings-row>svg:first-child{color:var(--accent)}
.profile-section h2{font-size:19px}

/* ---------- отказ от задания ---------- */
.refusal-note{display:grid;gap:4px;margin-bottom:14px;padding:12px 14px;border-radius:var(--ui-corner);background:var(--cta-soft);color:var(--ink)}
.refusal-note strong{font-size:14px;color:var(--cta-soft-ink)}
.refusal-note p{overflow-wrap:anywhere}
/* Пока изменение идёт на сервер, прозрачное окно поверх всего не даёт нажать что-то второй раз.
   Надпись появляется, только если ответ задержался. */
dialog.save-shield{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0 0 calc(96px + var(--app-safe-bottom));border:0;background:transparent;overflow:hidden}
dialog.save-shield[open]{display:grid;place-items:end center}
dialog.save-shield::backdrop{background:transparent}
dialog.save-shield:focus{outline:none}
.save-shield-status{padding:10px 18px;border-radius:999px;background:var(--ink);color:var(--surface);font-size:15px;font-weight:600;box-shadow:var(--shadow-float,0 8px 30px rgb(0 0 0 / .18));opacity:0;animation:save-shield-in .2s ease-out .7s forwards}
@keyframes save-shield-in{to{opacity:1}}
@media(prefers-reduced-motion:reduce){.save-shield-status{animation-duration:.01s}}
/* Срок заказа прошёл: заказчику нужно продлить заказ или снять его. */
.stale-note{display:grid;gap:8px;margin-bottom:14px;padding:12px 14px;border-radius:var(--ui-corner);background:var(--cta-soft);color:var(--ink)}
.stale-note strong{font-size:15px;color:var(--cta-soft-ink)}
.stale-note p{overflow-wrap:anywhere}
.stale-note .dialog-actions{margin-top:2px}
.extend-order-options{display:grid;gap:8px;margin-top:12px}
.rework-limit{overflow-wrap:anywhere}
.rework-left{margin-top:4px}
.refusal-again{margin-bottom:10px}
.compact-detail-next .compact-detail-refuse{min-height:44px;margin-top:8px;font-size:14px}
.primary.danger-action{background:var(--danger);color:#fff}
:root[data-color-mode="dark"] .primary.danger-action{color:var(--on-accent)}

/* ---------- срок проверки результата ---------- */
.review-deadline{display:flex;align-items:flex-start;gap:8px;margin-top:12px;padding:10px 12px;border-radius:var(--ui-corner);background:var(--cta-soft);color:var(--ink);line-height:1.45}
.review-deadline svg{flex:none;width:18px;height:18px;margin-top:1px;color:var(--cta-soft-ink)}
.auto-accepted{margin-top:6px}

/* ---------- изменение цены ---------- */
.price-proposal{display:grid;gap:6px;margin-top:14px;padding:12px 14px;border-radius:var(--ui-corner);background:var(--accent-soft);color:var(--ink)}
.price-proposal strong{font-size:15px;line-height:1.4}
.price-proposal p{overflow-wrap:anywhere}
.price-change-line{white-space:nowrap;color:var(--accent)}
.price-proposal .textbtn{justify-self:start;min-height:40px}
.price-proposal-actions{margin-top:6px}
.compact-detail-next .price-change-open{min-height:46px}

/* ---------- окна и подсказки ---------- */
dialog{border:0;border-radius:24px}
dialog::backdrop{background:rgba(15,27,45,.45)}
.dialog-head .iconbtn{background:var(--bg)}
#toast{background:var(--ink);color:var(--surface);border-radius:16px}
.toggle{background:#CBD2DE}
.toggle.on{background:var(--accent)}
.timeline>div.done:before{background:var(--accent);border-color:var(--accent)}
.appearance-choice{border-color:var(--line)}

/* ---------- вход ---------- */
.auth-entry{background:var(--bg)}
.auth-entry .auth-main{width:min(100%,480px);padding:calc(18px + env(safe-area-inset-top)) 16px calc(28px + var(--app-safe-bottom))}
.auth-entry .auth-topline{margin-bottom:16px}
.auth-entry .auth-brand,.auth-entry .auth-topline .auth-brand{color:var(--ink);font-size:24px;font-weight:800;letter-spacing:-.5px}
.auth-entry .auth-topline .brand-mark{width:36px;height:36px}
.auth-intro{position:relative;margin-bottom:14px;padding:20px 18px 18px;border-radius:var(--card-corner);background:linear-gradient(135deg,var(--hero-from),var(--hero-to));color:#fff;box-shadow:0 14px 30px color-mix(in srgb,var(--hero-to) 30%,transparent);overflow:hidden}
.auth-intro-pill{display:inline-flex;align-items:center;gap:8px;margin:0 0 14px;padding:7px 12px;border:1px solid rgba(255,255,255,.3);border-radius:var(--pill);background:rgba(255,255,255,.14);font-size:13px;font-weight:600;line-height:1.3}
.auth-intro-pill svg{width:16px;height:16px}
.auth-intro h1{max-width:11em;font-size:26px;line-height:1.14;letter-spacing:-.6px;color:#fff}
.auth-intro-lead{margin-top:10px;font-size:15px;line-height:1.5;color:rgba(255,255,255,.92)}
.auth-intro-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}
.auth-intro-card{display:grid;align-content:start;gap:6px;min-width:0;padding:14px;border-radius:18px;background:var(--surface);color:var(--ink);text-decoration:none;box-shadow:0 6px 16px rgba(15,27,45,.12)}
.auth-intro-card strong{font-size:15px;line-height:1.3}
.auth-intro-card>span:not(.auth-intro-icon){font-size:13px;line-height:1.45;color:var(--muted)}
.auth-intro-card b{display:inline-flex;align-items:center;gap:6px;margin-top:4px;font-size:15px;font-weight:700;color:var(--accent)}
.auth-intro-card b svg{width:16px;height:16px}
.auth-intro-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--accent-soft);color:var(--accent)}
.auth-intro-icon svg{width:20px;height:20px}
.auth-intro-earn .auth-intro-icon{background:var(--ok-soft);color:var(--ok)}
.auth-intro-earn b{color:var(--ok-ink)}
.large-text .auth-intro-card strong,.large-text .auth-intro-card b{font-size:18px}
.auth-entry .auth-content{padding:22px 20px;border-radius:var(--card-corner);background:var(--surface);box-shadow:var(--shadow)}
.auth-login-page .auth-login-title{font-size:24px;font-weight:800;letter-spacing:-.5px;scroll-margin-top:16px}
.auth-entry .auth-link.cta,.auth-entry .auth-link.cta:visited{color:var(--cta-ink)}
.auth-phone-entry .primary:not(:disabled){background:var(--cta);color:var(--cta-ink);box-shadow:0 8px 20px rgba(255,122,26,.28)}
.auth-phone-entry .primary:not(:disabled):hover{background:var(--cta-hover)}
.auth-pin-entry summary{border-color:var(--line);background:var(--surface);color:var(--accent)}
@media(max-width:360px){.auth-intro-cards{grid-template-columns:1fr}}

/* ---------- компьютер ---------- */
@media(width > 650px){
  .nav .nav-notice,.nav .nav-profile,.nav .nav-short{display:none}
  .nav .nav-create{order:-1;background:var(--cta);color:#fff;font-weight:700}
  .nav .nav-create:hover,.nav .nav-create.active{background:var(--cta-hover);color:#fff}
  .roles{width:320px}
}

/* ---------- телефон ---------- */
@media(max-width:650px){
  #app>.header,.compact-title-view #app>.header,:is(.customer-home,.worker-home) #app>.header,#app>.header:has(+.role-wrap>.roles .active[data-role="worker"]){padding:12px 16px 10px;gap:10px;min-height:62px}
  .logo,.compact-title-view .header .logo{display:flex;font-size:21px;gap:9px}
  .header .logo .brand-mark{--brand-mark-size:38px}
  .compact-title-view .profile-header-title{display:none}
  /* Форма заказа — отдельный шаг: в шапке кнопка «Назад» и название. */
  .customer-home .header .logo{display:none}
  .customer-home.compact-title-view .profile-header-title{display:block;font-size:20px;font-weight:800}
  /* Город в шапке телефона нужен только на ленте заданий. */
  .header .location{display:none}
  .worker-home .header .location{display:inline-flex;margin-left:auto;max-width:42%;padding:6px 10px;font-size:12px;min-height:36px}
  .worker-home .header .location>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .header-right,.compact-title-view .header .header-right{margin-left:auto;gap:8px}
  .worker-home .header .location+.header-right{margin-left:0}
  .header-right .avatar{display:grid;place-items:center;width:40px;height:40px;font-size:15px}
  .header-right .iconbtn,.compact-title-view .header .header-right .iconbtn,:is(.worker-home,.worker-orders).compact-title-view .header .header-right .iconbtn{width:40px;height:40px}
  /* У заказчика уведомления открывает пункт «События» в нижнем меню. */
  .header[data-role="customer"] .header-right [data-action="notifications"]{display:none}
  #app>.role-wrap,.compact-title-view #app>.role-wrap:has(>.roles .active[data-role]),:is(.worker-home,.worker-orders).compact-title-view #app>.role-wrap:has(>.roles .active[data-role]),.customer-orders.compact-title-view #app>.role-wrap:has(>.roles .active[data-role]),.messages-view.compact-title-view #app>.role-wrap:has(>.roles .active[data-role]){padding:0 16px 12px;border-bottom:1px solid var(--line)}
  .customer-home.compact-title-view #app>.role-wrap:has(>.roles .active[data-role]){padding:0;border:0}
  .roles{width:100%;border-radius:var(--pill)}
  .roles button{min-height:42px;font-size:15px}
  #app>.main,.compact-title-view #app>.main,.customer-orders.compact-title-view #app>.main{padding:18px 16px calc(112px + var(--app-safe-bottom))}
  .customer-orders.compact-title-view #app>:is(.header,.role-wrap:has(>.roles .active[data-role])){padding-inline:16px}
  body.customer-home{--create-bottom-clearance:calc(112px + var(--app-safe-bottom))}
  body.customer-home.large-text{--create-bottom-clearance:calc(122px + var(--app-safe-bottom))}
  body.map-view .map-main{padding-bottom:0}
  h1{font-size:26px;letter-spacing:-.5px}
  .heading{margin-bottom:16px}
  .lead{margin-top:6px;font-size:15px}
  .orders-title-view #main>.heading h1,.messages-view.compact-title-view #main>.heading,.profile-view #main>.heading{display:block}
  .orders-title-view #main>.heading .eyebrow,.profile-view #main>.heading .eyebrow{display:none}
  .orders-title-view #main>.heading,.customer-orders #main>.heading{margin-bottom:14px}
  .orders-title-row .orders-create-cta{display:none}

  /* Сообщения: заголовок и переключатель режима видны, как на остальных экранах. */
  body.messages-view .roles{display:flex}
  .messages-view .message-inbox>.heading,.messages-view.compact-title-view #main .message-inbox>.heading{display:flex;margin-bottom:12px}
  .message-card{padding:12px}
  .profile-view .profile-grid{row-gap:14px}

  /* нижнее меню: плавающая панель */
  .nav,body:not(.chat-view) .nav{left:12px;right:12px;bottom:calc(10px + var(--app-safe-bottom));padding:6px;border:0;border-radius:24px;background:var(--surface);box-shadow:var(--shadow-float);backdrop-filter:none;-webkit-backdrop-filter:none;gap:2px;align-items:center}
  .nav button{min-height:52px;padding:5px 2px;font-size:11px;font-weight:500;gap:3px;border-radius:16px;color:var(--muted)}
  .nav .active{background:transparent;color:var(--accent);font-weight:600}
  .nav svg{width:22px;height:22px}
  .nav .nav-wide{display:none}
  .nav button.nav-create{flex:0 0 54px;width:54px;height:54px;min-height:54px;margin:-20px 4px 0;border-radius:18px;background:var(--cta);color:#fff;box-shadow:0 10px 22px rgba(255,122,26,.4)}
  .nav button.nav-create span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .nav button.nav-create svg{width:26px;height:26px;stroke-width:2.2}
  .nav button.nav-create.active{background:var(--cta);color:#fff}
  .large-text .nav button{font-size:13px;min-height:58px}
  .demo-foot{margin:0 16px calc(112px + var(--app-safe-bottom));border-top:0}
  #toast{bottom:calc(92px + var(--app-safe-bottom))}

  /* На телефоне окно выезжает снизу. */
  dialog{inset:auto 0 0 0;width:100%;max-width:100%;max-height:92dvh;margin:0;padding:22px 20px calc(20px + var(--app-safe-bottom));border-radius:24px 24px 0 0;overflow:auto}
  dialog:not(.welcome-dialog):not(:has(.brand-order-created))::before{content:"";display:block;width:40px;height:4px;margin:-8px auto 12px;border-radius:2px;background:var(--line)}
  .panel,.formcard{padding:18px;border-radius:var(--card-corner)}
  .hero{margin-bottom:14px;padding:20px 18px;border-radius:var(--card-corner)}
  .hero :is(h1,#worker-hero-title),.worker-home .worker-heading>h1{display:block;font-size:24px;line-height:1.17}
  .hero .lead{font-size:14px;margin-top:8px}
  .hero .search{height:54px;margin-top:14px}
  .worker-home .worker-heading{display:block;margin-bottom:14px}
  .worker-home #main>.filterbar,.worker-home.compact-title-view .filterbar{margin:14px -16px 12px;padding:0 16px 4px}
  .task-body{padding:16px}
  .task-body .price{font-size:22px}
  .section-title h2{font-size:19px}
  .feed-title .segmented>button{min-height:34px;padding:5px 12px;font-size:13px}
  .order-row.compact-order-row{grid-template-columns:48px minmax(0,1fr);padding:16px}
  .order-stepper li{font-size:10px;letter-spacing:-.1px}
  .order-row.compact-order-row .order-symbol,.order-row.compact-order-row .order-thumbnail{width:48px;height:48px}
  .order-counter{padding:12px}
  .order-counter strong{font-size:22px}
  .orders-title-view #main>.filterbar.segmented,.customer-orders #main>.filterbar.segmented{margin:0 0 14px;padding:4px}
}
