/* =========================================================================
   OnTrack Scout — HTML-прототип
   Токены и компоненты 1:1 с core/resources/app_colors.dart,
   core/resources/app_style.dart, core/theme/theme.dart
   ========================================================================= */

@font-face{font-family:'Inter';src:url('../assets/fonts/Inter_18pt-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:block}
@font-face{font-family:'Inter';src:url('../assets/fonts/Inter_18pt-Medium.ttf') format('truetype');font-weight:500;font-style:normal;font-display:block}
@font-face{font-family:'Inter';src:url('../assets/fonts/Inter_18pt-SemiBold.ttf') format('truetype');font-weight:600;font-style:normal;font-display:block}
@font-face{font-family:'Inter';src:url('../assets/fonts/Inter_18pt-Bold.ttf') format('truetype');font-weight:700;font-style:normal;font-display:block}

:root{
  /* --- Primary --- */
  --primary900:#0D1722; --primary800:#192E44; --primary700:#264567; --primary600:#325C89;
  --primary500:#3F73AB; --primary400:#4A86C7; --primary300:#8CABCD; --primary200:#B2C7DD;
  --primary100:#D9E3EE; --primary50:#ECF1F7;
  /* --- Accent --- */
  --accent500:#EA5D31; --accent400:#F75F2F; --accent300:#F29E83; --accent100:#FBDFD6;
  /* --- Text & Icons --- */
  --text900:#1D2126; --text800:#3F464E; --text700:#576674; --text600:#86919D;
  --text500:#B6BBC2; --text400:#D3D9E0; --text300:#EBECF0; --icons200:#F6F6F6;
  /* --- Notifications --- */
  --green:#42A162; --yellow:#EAB631; --red:#EA4C42; --brown:#C3803A;
  --green10:#E9F5EC; --yellow10:#FDF7E9; --red10:#FDEBEA; --brown10:#F9F2EB;
  --default10:#EBECEC; --default5:#F5F6F6; --defaultColor:#3F464E;
  /* --- Status --- */
  --statusInfo:#193E84; --statusInfoBg:rgba(88,135,221,.25);
  --statusSuccess:#254D25; --statusSuccessBg:#42A162; --statusSuccessBorder:#45A248;
  --statusWarning:#7E4203; --statusWarningBg:#EAB631; --statusWarningBorder:#DC7D13;
  --statusDanger:#7D1D2E; --statusDangerBg:#EA4C42; --statusDangerBorder:#EB4B59;
  --statusDefault:#44404C; --statusDefaultBg:#3F464E; --statusDefaultBorder:#888491;
  --statusPink:#673052; --statusPinkBg:#CE60A5;
  --statusViolet:#473376; --statusVioletBg:#9374E5;
  --statusPersian:#0E4755; --statusPersianBg:#3C95AB;
  --statusAvocado:#3B471B; --statusAvocadoBg:#7C9332;
  --statusBrown:#593B11; --statusBrownBg:#BA7E23;
  /* --- Background --- */
  --bgLight50:#F6F8F9; --bgLight:#EDF1F2; --bgBorder:#E6EEF3; --bgB2:#E4E5EC;
  --bgGray30:#DEE6E8; --backGrounLight:#EAF1F5; --surfaceBright:#ECEAEF;
  --taskSuccessBg:rgba(69,162,72,.25); --taskWarningBg:rgba(220,125,19,.25);
  --taskDangerBg:rgba(235,75,89,.25); --taskNeutralBg:#EBECF0;
  --driverCircleBg:#B8D5C2;
  /* --- Semantic --- */
  --surface:var(--bgB2);          /* scaffoldBackgroundColor */
  --onSecondary:var(--text900);
  --onTertiary:var(--text600);
  --onSurface:var(--text700);
  --secondary:var(--text300);
  --white:#fff;

  --toolbar-shadow:0 4px 18.1px rgba(0,0,0,.25);
}

*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;background:#20242b;color:var(--text900);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  overflow:hidden;
}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
input{font:inherit;color:inherit}
ul{margin:0;padding:0;list-style:none}

/* ---------- Типографика (app_style.dart) ---------- */
.h1{font-size:18px;font-weight:600;line-height:1.35;color:var(--text900)}
.h2{font-size:16px;font-weight:600;line-height:1.35;color:var(--text900)}
.h3{font-size:14px;font-weight:600;line-height:1.35;color:var(--text900)}
.h4{font-size:12px;font-weight:600;line-height:1.40;color:var(--text900)}
.h5{font-size:11px;font-weight:600;line-height:1.50;color:var(--text900)}
.h6{font-size:10px;font-weight:600;line-height:1.55;color:var(--text900)}
.p1m{font-size:16px;font-weight:500;line-height:1.35}
.p2m{font-size:14px;font-weight:500;line-height:1.35;color:var(--text900)}
.p3m{font-size:12px;font-weight:500;line-height:1.35;color:var(--text900)}
.p4m{font-size:11px;font-weight:500;line-height:1.30;color:var(--text900)}
.p5m{font-size:10px;font-weight:500;line-height:1.40;color:var(--text900)}
.p1{font-size:16px;font-weight:400;line-height:1.35;color:var(--text900)}
.p2{font-size:14px;font-weight:400;line-height:1.35;color:var(--text900)}
.p3{font-size:12px;font-weight:400;line-height:1.35;color:var(--text900)}
.p4{font-size:11px;font-weight:400;line-height:1.40;color:var(--text900)}
.p5{font-size:10px;font-weight:400;line-height:1.50;color:var(--text900)}
.c600{color:var(--text600)} .c700{color:var(--text700)} .c900{color:var(--text900)}
.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.clamp2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* ---------- Устройство ---------- */
.stage{height:100%;display:flex;align-items:center;justify-content:center;padding:16px}
.device{
  width:393px;height:852px;background:var(--surface);border-radius:44px;
  box-shadow:0 0 0 11px #0b0d10,0 0 0 13px #2b3038,0 40px 80px rgba(0,0,0,.55);
  position:relative;display:flex;flex-direction:column;overflow:hidden;
}
.device__screen{position:relative;flex:1;display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}
.device__homebar{position:absolute;left:0;right:0;bottom:0;height:24px;display:flex;align-items:flex-start;justify-content:center;pointer-events:none;z-index:60}
.device__homebar span{display:block;width:140px;height:5px;border-radius:3px;background:#1D2126;opacity:.85}
.statusbar{
  height:54px;flex:0 0 54px;display:flex;align-items:flex-end;justify-content:space-between;
  padding:0 30px 6px;background:var(--white);font-size:15px;font-weight:600;letter-spacing:.2px;z-index:40;
}
.statusbar__icons{display:flex;align-items:center;gap:5px}
.app{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;background:var(--surface);overflow:hidden}
.overlays{position:absolute;inset:0;z-index:50;pointer-events:none}
.toasts{position:absolute;left:0;right:0;top:60px;z-index:70;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none}

/* Настоящий мобильный экран — приложение во весь экран, без рамки */
@media (max-width:800px){
  .stage{padding:0}
  .device{width:100%;height:100%;border-radius:0;box-shadow:none}
  .device__homebar{display:none}
}
/* Низкое десктопное окно — рамка телефона остаётся (393px), ужимается по высоте.
   Раньше здесь тоже был полноэкранный режим (через «или») — на широком мониторе
   с окном ниже 900px приложение растягивалось на всю ширину. */
@media (min-width:801px) and (max-height:900px){
  .stage{padding:10px}
  .device{height:calc(100vh - 20px)}
}

/* ---------- Иконки (маска = ColorFilter srcIn) ---------- */
.ic{
  display:inline-block;flex:0 0 auto;background-color:currentColor;
  -webkit-mask-image:var(--ic);mask-image:var(--ic);
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
  -webkit-mask-position:center;mask-position:center;
  -webkit-mask-size:contain;mask-size:contain;
}
.ic-raw{display:inline-block;flex:0 0 auto;object-fit:contain}

/* ---------- Экран (Scaffold) ----------
   Базовый экран воркспейса живёт в потоке колонки #app и делит её с
   .bottomnav; экраны, «запушенные» роутером, накрывают всё абсолютом. */
.screen{position:relative;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:var(--surface);overflow:hidden}
.screen--overlay{position:absolute;inset:0;flex:none}
.screen--white{background:var(--white)}
.screen__body{position:relative;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}
.scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.scroll::-webkit-scrollbar{display:none}

/* ---------- AppBar (custom_app_bar.dart) ---------- */
.appbar{background:var(--white);flex:0 0 auto;z-index:20}
.appbar__row{height:40px;display:flex;align-items:center;gap:4px;padding:0 12px}
.appbar__leading{width:40px;height:40px;display:flex;align-items:center;justify-content:center;flex:0 0 40px;border-radius:8px}
.appbar__leading:active{background:rgba(0,0,0,.06)}
.appbar__title{flex:1;font-size:16px;font-weight:600;line-height:1.35;color:var(--text900);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.appbar__actions{display:flex;align-items:center;gap:8px}
.appbar__tabs{height:36px;display:flex;align-items:stretch;gap:0;padding:0 12px;overflow-x:auto;scrollbar-width:none}
.appbar__tabs::-webkit-scrollbar{display:none}
.tab{
  height:31px;margin-top:5px;padding:0 8px;display:flex;align-items:center;white-space:nowrap;
  font-size:14px;font-weight:500;line-height:1.35;color:var(--text600);
  border-bottom:2px solid transparent;flex:0 0 auto;
}
.tab--active{color:var(--text900);border-bottom-color:var(--primary400);border-top-left-radius:8px;border-top-right-radius:8px}

/* ---------- BottomNavBar (ot_bottom_nav_bar.dart) ---------- */
.bottomnav{background:var(--white);flex:0 0 auto;padding:4px 24px calc(8px + 22px);z-index:20}
.bottomnav__row{height:54px;display:flex;align-items:stretch}
.navitem{
  flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;border-radius:100px;color:var(--text600);
}
.navitem--active{color:var(--primary400)}
.navitem__label{font-size:11px;font-weight:500;line-height:1.30;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.navitem:active{background:rgba(0,0,0,.05)}

/* ---------- Плавающий тулбар (ot_tool_bar.dart) ---------- */
.toolbar{
  position:absolute;left:0;right:0;bottom:20px;display:flex;align-items:center;justify-content:center;
  gap:8px;padding:0 12px;z-index:15;pointer-events:none;
}
.toolbar>*{pointer-events:auto}
.pill{background:var(--white);border-radius:90px;box-shadow:var(--toolbar-shadow)}
.toolbar__actions{display:flex;align-items:center;justify-content:center;padding:4px 12px}
.toolbar__action{
  min-width:54px;min-height:62px;padding:8px 4px 6px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:2px;border-radius:100px;position:relative;
}
.toolbar__action:active{background:rgba(0,0,0,.05)}
.toolbar__action .lbl{font-size:10px;font-weight:500;line-height:1.4;color:var(--text700);white-space:nowrap}
.iconbadge{position:relative;display:inline-flex}
.iconbadge__dot{
  position:absolute;right:-6px;top:-6px;width:20px;height:20px;border-radius:100px;background:#000;
  border:1px solid #fff;display:flex;align-items:center;justify-content:center;
  font-size:10px;font-weight:500;line-height:1.4;color:#fff;
}
.iconbadge__dot--empty{font-size:0}
.toolbar__single{display:flex;align-items:center;justify-content:center;padding:12px;border-radius:100px}
.toolbar__single--label{padding:12px 20px;gap:8px}
.toolbar__append{min-height:48px;min-width:38px;padding:5px 16px;display:flex;align-items:center;justify-content:center;gap:4px;border-radius:100px}
.toolbar__search{flex:1;display:flex;align-items:center;min-height:62px;padding:4px 12px;gap:8px}
.toolbar__search input{flex:1;border:0;outline:0;background:transparent;font-size:14px;color:var(--text900)}
.toolbar__search input::placeholder{color:var(--text600)}

/* ---------- Карточка (ot_list_card.dart) ---------- */
.card{background:var(--white);border-radius:12px;padding:12px;overflow:hidden;position:relative}
.card--tap:active{background:#F7F8F9}
.card--danger{box-shadow:inset 0 0 0 2px var(--statusDangerBorder)}
.list{padding:12px 12px 100px;display:flex;flex-direction:column;gap:8px}
.list--tight{gap:4px}

/* ---------- Разделители ---------- */
.dashed{height:9px;display:flex;align-items:center;justify-content:space-between;overflow:hidden}
.dashed::after{
  content:"";display:block;height:1px;width:100%;
  background-image:linear-gradient(to right,var(--bgBorder) 0 5px,transparent 5px 10px);
  background-size:10px 1px;background-repeat:repeat-x;
}
.divider{height:1px;background:rgba(117,126,38,.11)}

/* ---------- Чипы и статусы ---------- */
.chip{display:inline-flex;align-items:center;max-width:100%;border-radius:6px;padding:5.5px 5.5px;gap:4px}
.chip .lbl{font-size:14px;font-weight:500;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip--sm{border-radius:4px;padding:2.5px 2.5px}
.status-pill{display:inline-flex;align-items:center;padding:5.5px 8px;border-radius:6px;font-size:10px;font-weight:500;line-height:1.4;color:var(--text900);white-space:nowrap}
.wrapstatus{display:flex;flex-wrap:wrap;gap:4px}

/* ---------- Аватары ---------- */
.avatar{border-radius:50%;background:#000;color:#fff;display:flex;align-items:center;justify-content:center;flex:0 0 auto;font-weight:500}
.avatar--24{width:24px;height:24px;font-size:9px;line-height:1.35}
.avatar--36{width:36px;height:36px;font-size:13.5px;line-height:1.35}
.avatar--40{width:40px;height:40px;font-size:12px;line-height:1.35}

/* ---------- Строка сотрудника ---------- */
.employee{display:flex;align-items:center;gap:6px;min-width:0}
.employee__col{min-width:0;display:flex;flex-direction:column;justify-content:center}

/* ---------- Кнопки ---------- */
.btn-outline{
  display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;
  padding:13.5px 12px;border-radius:8px;border:1px solid var(--taskNeutralBg);
  font-size:14px;font-weight:500;line-height:1.35;color:var(--text900);background:transparent;
}
.btn-outline:active{background:#FAFBFC}
.btn-primary{
  width:100%;height:46px;border-radius:8px;background:var(--primary500);color:#fff;
  font-size:16px;font-weight:500;line-height:1.35;display:flex;align-items:center;justify-content:center;
}
.btn-primary:active{background:var(--primary600)}
.btn-action{display:inline-flex;align-items:center;gap:8.5px;padding:6px;border-radius:8px;flex:0 0 auto}
.btn-action .lbl{font-size:14px;font-weight:500;line-height:1.35;white-space:nowrap}
.hscroll{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:0 12px}
.hscroll::-webkit-scrollbar{display:none}
.icon-btn{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:var(--text300);color:var(--text700);flex:0 0 auto}
.round-btn{width:32px;height:32px;border-radius:8px;border:1px solid var(--bgGray30);background:#fff;display:flex;align-items:center;justify-content:center;color:var(--text700);flex:0 0 auto}

/* ---------- Плейсхолдеры ---------- */
.placeholder{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;gap:0}
.placeholder img{width:96px;height:96px;object-fit:contain}
.placeholder__title{margin-top:16px;font-size:16px;font-weight:600;line-height:1.35;text-align:center}
.placeholder__text{margin-top:16px;font-size:14px;font-weight:500;line-height:1.35;color:var(--text700);text-align:center}

/* ---------- Прогресс-бары ---------- */
.pbar{height:6px;border-radius:3px;background:var(--backGrounLight);display:flex;overflow:hidden}
.pbar>span{display:block;height:100%}

/* ---------- Сегментированный переключатель (ot_pill_segmented_switch) ---------- */
.segmented{display:inline-flex;background:var(--bgLight);border-radius:100px;padding:2px}
.segmented button{padding:4px 12px;border-radius:100px;font-size:12px;font-weight:500;color:var(--text600)}
.segmented button.on{background:#fff;color:var(--text900);box-shadow:0 1px 2px rgba(0,0,0,.08)}

/* ---------- Bottom sheet ---------- */
.scrim{position:absolute;inset:0;background:rgba(0,0,0,.45);opacity:0;transition:opacity .22s ease;pointer-events:auto}
.scrim.on{opacity:1}
.sheet{
  position:absolute;left:0;right:0;bottom:0;max-height:calc(100% - 40px);
  background:#fff;border-radius:24px 24px 0 0;display:flex;flex-direction:column;overflow:hidden;
  transform:translateY(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1);pointer-events:auto;
}
.sheet.on{transform:translateY(0)}
.sheet__grab{width:36px;height:5px;border-radius:8px;background:var(--text300);margin:4px auto}

/* --- CustomBottomSheet (custom_bottom_sheet.dart) --- */
.cbs{display:flex;flex-direction:column;min-height:0;padding:0 12px calc(22px);max-height:100%}
.cbs__header{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.cbs__step{font-size:10px;font-weight:500;line-height:1.40;color:#5E5A66}
.cbs__title{font-size:16px;font-weight:600;line-height:1.35;color:var(--text900)}
.cbs__subtitle{font-size:14px;font-weight:500;line-height:1.35;color:var(--text600)}
.cbs__close{width:40px;height:40px;margin:8px 0;padding:8px;border:1px solid var(--secondary);
  border-radius:8px;display:flex;align-items:center;justify-content:center;flex:0 0 40px}
.cbs__body{overflow-y:auto;min-height:0;scrollbar-width:none}
.cbs__body::-webkit-scrollbar{display:none}
.cbs__actions{padding:8px 0;display:flex;flex-direction:column;gap:8px}
.cbs__toolbar{display:flex;align-items:center;justify-content:center;gap:8px}

/* Строка выбора в шите (ot_select_bottom_sheet) */
.select-row{display:flex;align-items:center;gap:12px;padding:12px 8px;border-radius:8px;width:100%}
.select-row:active{background:var(--default5)}

/* Карточка задачи в шите */
.task-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.task-row>span{font-size:12px;font-weight:500;line-height:1.35;color:var(--text700)}
.task-row>span:last-child{text-align:right;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-people{padding:12px;border:1px solid var(--bgGray30);border-radius:8px}
.task-people__lbl{font-size:12px;font-weight:500;line-height:1.35;color:var(--text700)}
.btn-secondary{height:46px;border-radius:8px;background:var(--text300);color:var(--text900);
  font-size:14px;font-weight:500;display:flex;align-items:center;justify-content:center}

/* Предпросмотр машины (machine_preview.dart) */
.mp-avatar{width:96px;height:96px;padding:8px;border-radius:8px;flex:0 0 96px;
  display:flex;align-items:center;justify-content:center}
.tel-row{display:flex;align-items:center;gap:4px}
.tel-row__lbl{font-size:12px;font-weight:400;line-height:1.35;color:var(--text600)}
.tel-row__val{margin-left:auto;font-size:12px;font-weight:400;line-height:1.35;color:var(--text900)}
.icon-row{display:flex;align-items:center;gap:8px}
.circ-icon{width:36px;height:36px;border-radius:100px;background:var(--primary50);
  display:flex;align-items:center;justify-content:center;flex:0 0 36px}
.driver-circ{width:36px;height:36px;border-radius:50%;background:var(--driverCircleBg);
  display:flex;align-items:center;justify-content:center;flex:0 0 36px;
  font-size:12px;font-weight:500;color:var(--text900)}
.equip-sq{width:36px;height:36px;border-radius:8px;background:var(--driverCircleBg);
  display:flex;align-items:center;justify-content:center;flex:0 0 36px}
/* OtButton.activator */
.btn-activator{width:100%;padding:12px;border-radius:8px;border:1px solid var(--bgGray30);
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-size:14px;font-weight:500;line-height:1.35;color:var(--text900)}
.btn-activator:active{background:var(--default5)}

/* Глобальное меню — не CustomBottomSheet, свой каркас */
.gm{padding:0 12px calc(22px);overflow-y:auto;scrollbar-width:none}
.gm::-webkit-scrollbar{display:none}

/* Глобальное меню */
.gm__user{display:flex;align-items:center;gap:8px;padding:8px 0}
.gm__close{width:40px;height:40px;border:1px solid var(--secondary);border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--text900)}
.gm__company{display:flex;align-items:center;gap:8px;padding:12px;border:1px solid var(--secondary);
  border-radius:8px;background:#F6F6F6;width:100%}
.gm__modules{display:flex;justify-content:space-evenly;gap:8px;padding:8px 0}
.module-btn{width:110px;height:110px;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.module-btn.on{background:var(--primary100)}
.module-btn__icon{width:60px;height:60px;border-radius:16px;background:var(--primary400);display:flex;align-items:center;justify-content:center;color:#fff}
.module-btn__label{font-size:12px;font-weight:600;line-height:1.40;color:var(--text700);text-align:center}
.menu-option{display:flex;align-items:center;gap:8px;padding:6px 12px;width:100%;color:var(--text700);border-radius:8px}
.menu-option:active{background:var(--default5)}
.menu-option .lbl{font-size:14px;font-weight:500;line-height:1.35;color:var(--text700)}
.gm__footer{display:flex;align-items:center;padding:8px}
.gm__version{flex:1;font-size:11px;font-weight:400;color:var(--text600)}
.gm__logout{display:flex;align-items:center;gap:6px;color:var(--red);font-size:14px;font-weight:500}

/* Тоаст */
.toast{
  pointer-events:none;background:rgba(29,33,38,.94);color:#fff;border-radius:10px;
  padding:10px 16px;font-size:13px;font-weight:500;max-width:80%;
  animation:toastIn .22s ease both;box-shadow:0 6px 20px rgba(0,0,0,.3);
}
.toast--success{background:rgba(66,161,98,.96)}
.toast--error{background:rgba(234,76,66,.96)}
@keyframes toastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}

/* Popup-меню долгого нажатия */
.popmenu{
  position:absolute;background:#fff;border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.28);
  padding:6px 0;min-width:200px;pointer-events:auto;
}
.popmenu button{display:block;width:100%;text-align:left;padding:12px 16px;font-size:14px;font-weight:500}
.popmenu button:active{background:var(--default5)}

/* ---------- Карта (map_master_widget.dart) ---------- */
.map{position:absolute;inset:0;overflow:hidden;background:#F8F4F0}

/* --- MapLibre-хост (js/map-gl.js): живёт в .device__screen ПОД #app --- */
#mapGlHost{position:absolute;overflow:hidden;background:#101418}
#mapGlHost .maplibregl-canvas{outline:none}
/* «Окно» в приложении: на экране карты #app прозрачен и пропускает жесты,
   интерактив возвращаем контролам. pointer-events наследуется, поэтому
   контейнерам хватает точечного auto (.toolbar сам none, его дети auto). */
.map--gl{background:transparent}
.app--maphole{background:transparent;pointer-events:none}
.app--maphole .screen{background:transparent}
.app--maphole .map__ctl,
.app--maphole .map__legend,
.app--maphole .bottomnav{pointer-events:auto}
/* DOM-маркеры на MapLibre: подписи полей, нас. пункты, пины, геопозиция */
.mapgl-fieldlbl{font-size:12px;font-weight:600;color:#fff;white-space:nowrap;pointer-events:none;
  text-shadow:0 1px 3px rgba(0,0,0,.95),0 0 2px rgba(0,0,0,.8)}
.mapgl-place{font-size:11px;font-weight:500;color:#F2F4F6;white-space:nowrap;pointer-events:none;
  text-shadow:0 1px 3px rgba(0,0,0,.9),0 0 2px rgba(0,0,0,.75);opacity:.9}
.mapgl-pin{width:30px;height:36px;pointer-events:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.4))}
.mapgl-pin--dim{opacity:.35}
.mapgl-me{width:16px;height:16px;border-radius:50%;background:#1A73E8;border:2.5px solid #fff;
  box-shadow:0 0 0 6px rgba(26,115,232,.22),0 1px 4px rgba(0,0,0,.3)}
.map__scene{position:absolute;inset:0}
.map__svg{position:absolute;inset:0;width:100%;height:100%}
.map__label{font-size:12px;font-weight:600;fill:#1D2126;text-anchor:middle;paint-order:stroke;
  stroke:rgba(255,255,255,.85);stroke-width:3px;stroke-linejoin:round}
.map__place{font-size:11px;font-weight:500;fill:#5B5B5B;text-anchor:middle}
.map__pin{position:absolute;width:30px;height:36px;transform:translate(-50%,-100%);pointer-events:none}
.map__me{position:absolute;width:16px;height:16px;border-radius:50%;background:#1A73E8;border:2.5px solid #fff;
  box-shadow:0 0 0 6px rgba(26,115,232,.22),0 1px 4px rgba(0,0,0,.3);transform:translate(-50%,-50%)}

/* SuperButton (super_button.dart): 45×45, radius 8, белый */
.superbtn{
  height:45px;min-width:45px;border-radius:8px;background:#fff;color:var(--text900);
  display:flex;align-items:center;justify-content:center;gap:2px;padding:0 10px;
  box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.superbtn:active{background:#f2f4f6}
/* В приложении top:60 — карта лежит под системным статус-баром; здесь
   статус-бар отдельный элемент над #app, поэтому отступ меньше. */
.map__ctl{position:absolute;top:12px;z-index:10;display:flex;gap:10px}
.map__ctl--left{left:10px}
.map__ctl--right{right:10px}
.map__attr{position:absolute;right:4px;bottom:2px;font-size:9px;color:#4a5560;
  background:rgba(255,255,255,.65);padding:1px 4px;border-radius:3px}

/* Легенда активного слоя */
.map__legend{position:absolute;left:10px;top:116px;z-index:10;border-radius:12px;color:#fff;
  transition:width .25s ease}
.map__legend--compact{width:24px;padding:10px 8px;background:rgba(0,0,0,.72);
  display:flex;flex-direction:column;align-items:center;gap:6px}
.map__legend--full{width:200px;padding:10px 12px;background:rgba(0,0,0,.82)}
.map__legend-title{font-size:13px;font-weight:600;letter-spacing:.1px;margin-bottom:8px}
.map__legend-row{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.map__legend-row:last-child{margin-bottom:0}
.map__legend-dot{width:8px;height:8px;border-radius:50%;flex:0 0 8px;
  border:.5px solid rgba(255,255,255,.25)}
.map__legend-lbl{font-size:12px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Тулбар карты: _LayerSwitcher — padding bottom 16 от низа body */
.toolbar--map{bottom:16px}

/* --- Мини-карта паспорта посева: таб «Карта» (js/map-gl.js → cropMiniSync) ---
   Слот .cropmap__map занимает весь таб; MapLibre монтируется в .cropmap__gl
   внутрь него, и тогда офлайн-фолбэк .cropmap__svg скрывается. Тёмный фон —
   тот же, что у #mapGlHost, чтобы не мигало белым до первых тайлов. */
.cropmap{position:relative;flex:1;min-height:0}
.cropmap__map{position:absolute;inset:0;overflow:hidden;background:#101418}
.cropmap__gl{position:absolute;inset:0}
.cropmap__gl .maplibregl-canvas{outline:none}
.cropmap__svg{position:absolute;inset:0;width:100%;height:100%}
.cropmap__map--gl .cropmap__svg{display:none}
/* Без подложки нет и правообладателя тайлов: в офлайн-фолбэке атрибуция скрыта */
.cropmap__map:not(.cropmap__map--gl)+.map__attr{display:none}

/* ---------- Настройки (settings_card_wrapper.dart) ---------- */
.settings-card{background:#fff;border-radius:8px;padding:16px;display:flex;flex-direction:column;gap:16px}
.settings-card__title{font-size:11px;font-weight:700;line-height:1.5;color:var(--text900)}
/* CustomSelect activator = OutlinedButton из темы: 46px, белый, border bgGray30 */
.select-activator{height:46px;width:100%;padding:12px;border-radius:8px;border:1px solid var(--bgGray30);
  background:#fff;display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-size:14px;font-weight:500;line-height:1.35;color:var(--text900);text-align:left}
.select-activator:active{background:var(--default5)}
.select-activator>span:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* OtSwitch: Material Switch, height 24, activeTrack primary400, inactive outline */
.ot-switch{display:flex;align-items:center;justify-content:space-between;gap:12px}
.switch{width:40px;height:24px;border-radius:100px;background:var(--text400);position:relative;
  transition:background .18s ease;flex:0 0 auto}
.switch::after{content:"";position:absolute;top:4px;left:4px;width:16px;height:16px;border-radius:50%;
  background:#fff;transition:transform .18s ease}
.switch.on{background:var(--primary400)}
.switch.on::after{transform:translateX(16px)}

/* ---------- Экран синхронизации (sync_page.dart) ---------- */
.sync{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:12px;
  padding:24px 16px;overflow-y:auto;scrollbar-width:none}
.sync::-webkit-scrollbar{display:none}
.sync__notice{background:rgba(195,128,58,.1);border-radius:12px;padding:12px;
  font-size:12px;font-weight:600;line-height:1.4;color:var(--brown)}
.sync__tasks{height:300px;background:rgba(63,70,78,.05);border-radius:12px;padding:12px;overflow-y:auto;
  display:flex;flex-direction:column;gap:4px;scrollbar-width:none}
.sync__tasks::-webkit-scrollbar{display:none}
.sync__task{display:flex;align-items:center;gap:4px}

/* ---------- Авторизация ---------- */
.auth{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;padding:0 12px;background:var(--bgB2)}
.auth__logo{height:60px;object-fit:contain}
.auth__card{width:100%;background:#fff;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:8px;box-shadow:0 5px 10px rgba(0,0,0,.15)}
/* AppFormFields.formAuth — hint-плейсхолдер, а не floating label */
.field{position:relative}
.field input{
  width:100%;padding:12px;border-radius:8px;border:1.5px solid #E0E0E0;
  background:#fff;font-size:14px;font-weight:500;line-height:1.35;color:var(--text900);outline:0;
}
.field--pass input{padding-right:48px}
.field input::placeholder{font-size:16px;font-weight:500;color:#9E9E9E}
.field input:focus{border-color:#BDBDBD;border-width:1.8px}
.field__suffix{position:absolute;right:0;top:0;bottom:0;width:48px;display:flex;align-items:center;justify-content:center}
.auth__server{background:var(--bgB2);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:4px}
.auth__link{height:32px;font-size:11px;font-weight:500;color:var(--primary500);text-align:center}
.dropdown{
  height:44px;border-radius:8px;border:1px solid var(--bgGray30);background:#fff;
  display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:14px;width:100%;
}

/* =========================================================================
   AI-ассистент: 9 вариантов точки входа
   ========================================================================= */
.mascot{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0}
.mascot--thinking .mascot__dots circle{animation:astDots 1.1s infinite}
.mascot--thinking .mascot__dots circle:nth-child(2){animation-delay:.15s}
.mascot--thinking .mascot__dots circle:nth-child(3){animation-delay:.3s}
@keyframes astDots{0%,60%,100%{opacity:.25}30%{opacity:1}}

.ast-badge{
  position:absolute;top:-2px;right:-2px;min-width:18px;height:18px;padding:0 4px;border-radius:100px;
  background:var(--accent500);border:2px solid #fff;color:#fff;
  font-size:10px;font-weight:600;line-height:14px;text-align:center;
}
.ast-badge--sm{min-width:14px;height:14px;line-height:10px;font-size:9px;border-width:1.5px;top:-3px;right:-3px}

/* 2 / 3 — плавающая мордашка */
.ast-fab{
  position:absolute;width:56px;height:56px;border-radius:50%;background:#fff;z-index:16;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 18.1px rgba(0,0,0,.25);touch-action:none;
}
.ast-fab:active{transform:scale(.94)}
.ast-fab--drag{cursor:grab}
.ast-fab--drag::after{
  content:"";position:absolute;inset:-6px;border-radius:50%;
  border:1.5px dashed var(--primary300);opacity:.55;
}

/* 1 — иконка в AppBar */
.ast-appbar{position:relative;height:28px}

/* 4 — кнопка справа от пилюли */
.ast-append{position:relative;gap:4px;padding:5px 12px}
.ast-append .lbl{font-size:10px;font-weight:500;color:var(--text700);white-space:nowrap}

/* 5 — центральная кнопка нижней навигации */
.ast-navitem{position:relative;flex:0 0 60px}
.ast-navitem__bubble{
  position:relative;width:44px;height:44px;border-radius:50%;background:var(--primary50);
  display:flex;align-items:center;justify-content:center;margin-top:-14px;
  box-shadow:0 2px 8px rgba(63,115,171,.25);border:2px solid #fff;
}
.ast-navitem .navitem__label{color:var(--primary400)}

/* 6 — язычок у края + свайп */
.ast-edge{
  position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:16;
  display:flex;align-items:center;padding:14px 0 14px 10px;
}
.ast-edge__bar{width:4px;height:48px;border-radius:4px 0 0 4px;background:var(--primary300);opacity:.9}
.ast-edge__peek{
  position:absolute;right:-16px;width:38px;height:38px;border-radius:50%;background:#fff;
  display:flex;align-items:center;justify-content:center;box-shadow:0 2px 10px rgba(0,0,0,.2);
  opacity:0;transition:opacity .2s ease,right .2s ease;
}
.ast-edge:active .ast-edge__peek{opacity:1;right:4px}

/* 9 — свёрнутый composer над навигацией */
.ast-composer{
  position:absolute;left:12px;right:12px;bottom:calc(66px + 22px);height:44px;z-index:16;
  display:flex;align-items:center;gap:8px;padding:0 12px;border-radius:100px;background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.14);border:1px solid var(--bgGray30);
}
.ast-composer__hint{flex:1;font-size:14px;font-weight:400;color:var(--text600)}

/* Мини-режим чата */
.ast-mini{
  position:absolute;left:12px;right:12px;bottom:calc(66px + 22px);z-index:17;
  display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:14px;background:#fff;
  box-shadow:0 4px 18.1px rgba(0,0,0,.25);
}
.ast-mini__close{width:32px;height:32px;display:flex;align-items:center;justify-content:center;
  border-radius:8px;flex:0 0 32px}

/* Сдвиг плавающей пилюли, когда низ занят composer'ом / мини-режимом */
.ast-shift-toolbar .toolbar{bottom:76px}
.ast-shift-toolbar .toolbar--map{bottom:72px}

/* 8 — контекстная кнопка на объекте */
.ast-ctx{gap:6px}

/* ---------- 10 / 11 — верхняя кромка экрана ----------
   Реальный статус-бар рисует ОС: приложение может лечь ПОД него
   (edge-to-edge), но не поверх часов/иконок, и тапы туда не доходят.
   Поэтому тап-зона — ниже кромки, в шапке приложения. */
.toplayer{position:absolute;left:0;right:0;top:0;height:150px;z-index:45;pointer-events:none}
.toplayer>*{pointer-events:auto}
.ast-topmode .statusbar{background:transparent;position:relative;z-index:46}
.ast-topmode .app{margin-top:-54px;padding-top:54px}

/* Контур зоны, которой владеет ОС (Dynamic Island / вырез, часы, иконки) */
.ast-notch{
  position:absolute;left:50%;top:8px;transform:translateX(-50%);
  width:118px;height:34px;border-radius:18px;border:1.5px dashed rgba(234,76,66,.55);
  pointer-events:none;
}
.ast-notch::after{
  content:"зона ОС";position:absolute;left:50%;top:100%;transform:translateX(-50%);
  margin-top:2px;font-size:8px;color:rgba(234,76,66,.75);white-space:nowrap;
}

/* Peek: мордашка выглядывает из-под верхней кромки */
.ast-peek{
  position:absolute;left:50%;transform:translateX(-50%);top:30px;
  width:46px;height:46px;border-radius:50%;background:#fff;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 16px rgba(0,0,0,.22);
  transition:top .28s cubic-bezier(.2,.8,.2,1);
  animation:astPeek 4.5s ease-in-out infinite;
}
.ast-peek--out{top:42px;animation:none}
@keyframes astPeek{0%,88%,100%{top:30px}92%{top:36px}}

/* Ambient-«бровь» под статус-баром */
.ast-brow{position:absolute;left:0;right:0;top:54px;height:16px;display:flex;align-items:flex-start;justify-content:center}
.ast-brow__line{
  display:block;width:100%;height:3px;background:var(--text400);opacity:.55;
  transition:background .25s ease,opacity .25s ease;
}
.ast-brow--on .ast-brow__line{
  background:linear-gradient(90deg,transparent,var(--primary400) 20%,var(--accent500) 50%,var(--primary400) 80%,transparent);
  opacity:1;animation:astBrow 2.2s ease-in-out infinite;
}
@keyframes astBrow{0%,100%{filter:brightness(1)}50%{filter:brightness(1.45)}}
.ast-brow__dot{
  position:absolute;right:12px;top:-2px;width:24px;height:24px;border-radius:50%;background:#fff;
  display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.18);
}

/* Баллон наблюдения */
.ast-bubble-top{
  position:absolute;left:12px;right:12px;background:#fff;border-radius:14px;padding:12px;
  box-shadow:0 8px 26px rgba(0,0,0,.22);animation:astBubbleIn .22s ease both;
}
.ast-bubble-top::before{
  content:"";position:absolute;top:-6px;left:50%;transform:translateX(-50%) rotate(45deg);
  width:12px;height:12px;background:#fff;border-radius:2px;
}
.ast-bubble-top--right::before{left:auto;right:20px;transform:rotate(45deg)}
.ast-bubble-top__text{font-size:14px;font-weight:500;line-height:1.35;color:var(--text900)}
.ast-bubble-top__row{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}
.ast-bubble-top__ghost{padding:8px 12px;border-radius:8px;font-size:13px;font-weight:500;color:var(--text600)}
.ast-bubble-top__cta{padding:8px 14px;border-radius:8px;background:var(--primary500);color:#fff;
  font-size:13px;font-weight:500}
@keyframes astBubbleIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* ---------- Чат ассистента ---------- */
.sheet.sheet--full{max-height:100%}
.ast-chat{display:flex;flex-direction:column;min-height:0;max-height:100%;padding:0 12px calc(22px);height:70vh}
.sheet--full .ast-chat{height:100%}
.ast-chat__head{display:flex;align-items:center;gap:10px}
.ast-chat__mini{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:8px}
.ast-ctx-chip{
  display:flex;align-items:center;gap:6px;margin:10px 0 8px;padding:6px 10px;border-radius:100px;
  background:var(--primary50);color:var(--primary600);font-size:11px;font-weight:500;
}
.ast-chat__body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;
  padding:4px 0 8px;scrollbar-width:none}
.ast-chat__body::-webkit-scrollbar{display:none}
.ast-msg{display:flex;align-items:flex-end;gap:6px}
.ast-msg--me{justify-content:flex-end}
.ast-bubble{
  max-width:80%;padding:10px 12px;border-radius:14px;background:var(--default5);
  font-size:14px;font-weight:400;line-height:1.35;color:var(--text900);
}
.ast-msg--me .ast-bubble{background:var(--primary50)}
.ast-bubble--typing{display:flex;align-items:center;gap:4px;padding:12px}
.ast-bubble--typing span{width:6px;height:6px;border-radius:50%;background:var(--text500);
  animation:astDots 1.1s infinite}
.ast-bubble--typing span:nth-child(2){animation-delay:.15s}
.ast-bubble--typing span:nth-child(3){animation-delay:.3s}
.ast-quick{display:flex;gap:6px;overflow-x:auto;padding:4px 0 10px;scrollbar-width:none}
.ast-quick::-webkit-scrollbar{display:none}
.ast-quick__chip{
  flex:0 0 auto;padding:7px 12px;border-radius:100px;border:1px solid var(--bgGray30);
  background:#fff;font-size:12px;font-weight:500;color:var(--text700);white-space:nowrap;
}
.ast-composer-row{display:flex;align-items:center;gap:8px}
.ast-composer-row input{
  flex:1;min-width:0;height:40px;padding:0 12px;border-radius:100px;border:1px solid var(--bgGray30);
  background:#fff;font-size:14px;outline:0;
}
.ast-composer-row input::placeholder{color:var(--text600)}
.ast-send{width:40px;height:40px;border-radius:50%;background:var(--primary500);
  display:flex;align-items:center;justify-content:center;flex:0 0 40px}

/* ---------- Демо-панель переключения вариантов ---------- */
#astPanel{
  position:fixed;left:12px;bottom:12px;z-index:200;width:262px;border-radius:14px;overflow:hidden;
  background:rgba(20,23,28,.94);color:#E8EAED;font-size:12px;
  box-shadow:0 12px 40px rgba(0,0,0,.5);backdrop-filter:blur(6px);
}
#astPanel .astp__head{display:flex;align-items:center;justify-content:space-between;
  padding:10px 12px;cursor:pointer;background:rgba(255,255,255,.05)}
#astPanel.collapsed .astp__body{display:none}
#astPanel.collapsed .astp__chev{transform:rotate(-90deg)}
.astp__chev{transition:transform .2s ease}
.astp__body{padding:8px}
.astp__list{display:flex;flex-direction:column;gap:2px}
.astp__list button{
  display:flex;align-items:center;gap:8px;width:100%;text-align:left;padding:6px 8px;border-radius:8px;
  color:#C8CDD4;
}
.astp__list button i{
  width:18px;height:18px;border-radius:5px;background:rgba(255,255,255,.1);
  display:flex;align-items:center;justify-content:center;font-style:normal;font-size:10px;flex:0 0 18px;
}
.astp__list button:hover{background:rgba(255,255,255,.07)}
.astp__list button.on{background:var(--primary500);color:#fff}
.astp__list button.on i{background:rgba(255,255,255,.22)}
.astp__hint{padding:8px;color:#8A939F;line-height:1.35}
.astp__states{display:flex;gap:4px;padding:0 8px 8px}
.astp__states button{flex:1;padding:6px 4px;border-radius:8px;background:rgba(255,255,255,.08);
  color:#C8CDD4;font-size:11px}
.astp__states button.on{background:var(--accent500);color:#fff}
.astp__note{padding:0 8px 10px;color:#6F7885;font-size:11px;line-height:1.4}
#astPanel.collapsed{width:auto;max-width:220px}
#astPanel.collapsed .astp__head b::after{content:" · " attr(data-cur)}
@media (max-width:900px){ #astPanel{left:6px;bottom:6px} #astPanel:not(.collapsed){right:6px;width:auto} }

/* ---------- Прочее ---------- */
.total-line{padding:20px 24px 8px;font-size:14px;font-weight:600;line-height:1.35}
.section-title{padding:16px 16px 8px;font-size:14px;font-weight:600}
.kv{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:6px 0}
.kv .k{font-size:12px;font-weight:500;color:var(--text600);line-height:1.35}
.kv .v{font-size:12px;font-weight:500;color:var(--text900);line-height:1.35;text-align:right}
.stale{background:var(--yellow10);padding:8px 12px;display:flex;align-items:center;gap:8px;color:var(--statusWarning);font-size:12px;font-weight:500}
.kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.kpi{background:#fff;border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:4px}
.kpi__val{font-size:18px;font-weight:600;line-height:1.35}
.kpi__lbl{font-size:11px;font-weight:500;color:var(--text600);line-height:1.3}
.bar-chart{display:flex;align-items:flex-end;gap:8px;height:120px;padding-top:8px}
.bar-chart__col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;height:100%}
.bar-chart__bar{width:100%;border-radius:4px 4px 0 0;min-height:4px}
.bar-chart__lbl{font-size:10px;font-weight:500;color:var(--text600)}
.legend{display:flex;flex-wrap:wrap;gap:12px;padding-top:12px}
.legend__item{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:500;color:var(--text700)}
.legend__dot{width:10px;height:10px;border-radius:3px}
.donut{display:flex;align-items:center;gap:16px}
.donut__ring{width:110px;height:110px;border-radius:50%;flex:0 0 auto;position:relative}
.donut__hole{position:absolute;inset:22px;background:#fff;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center}
.fadein{animation:fade .22s ease both}
@keyframes fade{from{opacity:0}to{opacity:1}}
.slidein{animation:slide .26s cubic-bezier(.2,.8,.2,1) both}
@keyframes slide{from{opacity:.2;transform:translateX(28px)}to{opacity:1;transform:none}}
.spinner{width:36px;height:36px;border-radius:50%;border:3px solid var(--primary100);border-top-color:var(--primary500);animation:spin .9s linear infinite;margin:auto}
@keyframes spin{to{transform:rotate(360deg)}}
.center{flex:1;display:flex;align-items:center;justify-content:center}

/* =========================================================================
   Паспорт посева → таб «Инфо» (business_process_crop_info_tab_page.dart)
   ========================================================================= */
/* SingleChildScrollView(padding 12/12/12/100) + Column(spacing: 8) */
.crop-info{padding:12px 12px 100px;display:flex;flex-direction:column;gap:8px}

/* CropGeoCard: SizedBox(height 140) + ClipRRect(8) + Container(color background) */
.crop-geo{height:140px;width:100%;border-radius:8px;overflow:hidden;background:var(--bgLight)}
.crop-geo svg{display:block;width:100%;height:100%}

/* Строка «подпись / значение» из CropDetailInfo._row и CropActivity._row */
.crop-row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.crop-row>span:first-child{flex:0 1 auto}
.crop-row>span:last-child{flex:0 1 auto;min-width:0}

/* OtExpandableContainer: border onPrimaryContainer, radius 8, fade + шеврон */
.crop-expand{
  position:relative;border:1px solid var(--bgGray30);border-radius:8px;overflow:hidden;
  transition:max-height .38s cubic-bezier(.4,0,.2,1);
}
.crop-expand--open{max-height:2000px}
.crop-expand .card{border-radius:8px}
.crop-expand__fade{
  position:absolute;left:0;right:0;bottom:0;padding:8px;display:flex;justify-content:center;
  background:linear-gradient(to top,rgba(255,255,255,.95),rgba(255,255,255,.6) 45%,rgba(255,255,255,0));
  pointer-events:none;
}

/* CropObservationsMade: строка padding 12/14.5, radius 8, border backgroundGray30 */
.crop-obs{
  display:flex;align-items:center;width:100%;padding:14.5px 12px;border-radius:8px;
  border:1px solid var(--bgGray30);background:transparent;text-align:left;
}
.crop-obs:active{background:var(--default5)}

/* Видимая ошибка рендера вместо молчаливого «ничего не произошло» */
.render-error{
  position:absolute;left:12px;right:12px;bottom:12px;z-index:120;padding:12px;border-radius:12px;
  background:var(--red);color:#fff;font-size:12px;font-weight:500;line-height:1.4;
  box-shadow:0 8px 26px rgba(0,0,0,.3);
}
.render-error span{opacity:.85;font-weight:400}

/* =========================================================================
   Метео-экраны: Прогноз · Исторические данные · Планирование работ
   ========================================================================= */
.meteo-body{background:var(--surfaceBright)}
.meteo-appbar{background:#fff}
.meteo-appbar__row{height:45px;display:flex;align-items:center;padding:0 5px 0 8px}
.meteo-appbar__title{display:flex;align-items:center;gap:4px;flex:1;min-width:0;padding:0 8px}
.meteo-appbar__bell{width:48px;height:45px;display:flex;align-items:center;justify-content:center}

/* ForecastCard */
.fcard{background:#fff;border-radius:12px}
.fcard--uniform{margin:12px;padding:12px}
.fcard--standard{margin:0 12px 12px;padding:12px}
.fcard--vertical{margin:0 12px 12px;padding:8px 0}
.fcard--daily{margin:0 12px 12px;padding:4px 0}

/* WeatherSummaryCard */
.wsum__sun{padding:8px 16px}
.wsum__sunrow{display:flex;align-items:center;gap:8px}
.wsum__track{position:relative;flex:1;height:24px;display:flex;align-items:center}
.wsum__dash{display:block;width:100%;height:1.5px;
  background-image:linear-gradient(to right,var(--text400) 0 4px,transparent 4px 9px);
  background-size:9px 1.5px;background-repeat:repeat-x}
.wsum__sunicon{position:absolute;width:24px;height:24px}
.wsum__labels{display:flex;justify-content:space-between}
.wsum__temps{display:flex;align-items:center;justify-content:space-between;padding:0 46px}
.wsum__col{display:flex;flex-direction:column;align-items:center}
.wsum__cur{display:flex;align-items:center}
.wsum__big{font-size:54px;font-weight:600;line-height:1.1;color:var(--text900)}
.wsum__cond{display:flex;align-items:center;justify-content:center;gap:12px}
.wsum__wind{display:inline-flex;align-items:center;padding:4px 10px;border-radius:6px;
  background:rgba(66,161,98,.25)}

/* Insights */
.wtags{display:flex;flex-wrap:wrap;gap:4px}
.wtag{padding:4px 8px;border-radius:8px;font-size:12px;font-weight:500;line-height:1.35}

/* HourlyTemperatureChart */
.hchart{display:flex;flex-direction:column}
.hrow{position:relative;height:34px;display:flex;align-items:center;padding:0 12px}
.hrow::after{content:"";position:absolute;left:42px;right:12px;bottom:0;height:1.5px;
  background-image:linear-gradient(to right,var(--text300) 0 4px,transparent 4px 8px);
  background-size:8px 1.5px;background-repeat:repeat-x}
.hrow--last::after{display:none}
.hrow__bar{width:18px;height:34px;flex:0 0 18px}
.hrow--first .hrow__bar{border-radius:8px 8px 0 0}
.hrow--last .hrow__bar{border-radius:0 0 8px 8px}
.hrow__hour{margin-left:10px;width:44px;flex:0 0 44px}
.hrow__desc{flex:0 0 56px;width:56px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text900)}
.hrow__val{position:absolute;top:50%;transform:translateY(-50%);white-space:nowrap}

/* DailyWeatherForecast */
.dday__row{display:flex;align-items:center;width:100%;padding:8px 12px;text-align:left}
.dday__label{width:58px;flex:0 0 58px}
.dday__icon{position:relative;margin:0 12px 0 7px;display:flex;flex:0 0 16px}
.dday__drop{position:absolute;right:-3px;bottom:-2px;width:6px;height:6px;border-radius:50%;border:1px solid #fff}
.dday__bar{position:relative;flex:1;height:11px;margin-left:8px}
.dday__fill{position:absolute;top:0;height:11px;border-radius:8px}
.dday__min,.dday__max{position:absolute;top:-3px;white-space:nowrap}
.dday__divider{margin:0 12px;height:1.5px;
  background-image:linear-gradient(to right,var(--text300) 0 3px,transparent 3px 7px);
  background-size:7px 1.5px;background-repeat:repeat-x}
.dday__hourly{padding:8px 0}

/* Тулбар прогноза (ForecastToolbarWidget) */
.toolbar--forecast{bottom:20px;padding:0 22px;gap:8px;justify-content:center}
.toolbar--static{position:static;padding:0 12px}
.forecast-back{display:flex;align-items:center;justify-content:center;padding:12px;border-radius:100px;flex:0 0 auto}
.forecast-pill{max-width:70%;min-height:62px;overflow:hidden;display:flex;align-items:center}
.forecast-actions{display:flex;overflow-x:auto;padding:3px 10px;scrollbar-width:none}
.forecast-actions::-webkit-scrollbar{display:none}
.forecast-action{min-width:53px;min-height:62px;padding:8px 4px 6px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:2px;flex:0 0 auto}
.forecast-action .lbl{font-size:10px;font-weight:500;line-height:1.4;color:var(--text700);white-space:nowrap}
.forecast-action.on .lbl{color:var(--primary400)}

/* --- Исторические данные --- */
.fact{padding:12px;display:flex;flex-direction:column;gap:8px}
.fact__cards{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:0 12px}
.fact__cards::-webkit-scrollbar{display:none}
/* Тач тянет ряд сам, мышь — через hscroll() (js/ui.js); во время протяжки
   курсор и подавление клика вешаются классом .hs-drag */
.hs-drag{cursor:grabbing;user-select:none}
.fact-card{flex:0 0 auto;display:flex;flex-direction:column;justify-content:space-between;gap:8px;
  box-shadow:inset 0 0 0 1px var(--text300)}
.fact-card--layers{width:172px}
.fact-card__value{display:flex;align-items:baseline;gap:2px;margin-top:4px}
.fact-card__num{font-size:24px;font-weight:700;line-height:1.2}
.fact-card__unit{font-size:16px;font-weight:600}
.fact-card__deltas{display:flex;flex-direction:column;gap:3px}
.fact-delta{font-size:11px;font-weight:700;margin-right:2px}
.fact-dlabel{font-size:11px;font-weight:500;color:var(--text700)}
.fact-dash{height:1px;margin:4px 0;
  background-image:linear-gradient(to right,var(--text300) 0 4px,transparent 4px 7px);
  background-size:7px 1px;background-repeat:repeat-x}
.layer-row{display:flex;align-items:center}
.layer-row__label{width:58px;flex:0 0 58px;font-size:11px;font-weight:500;color:var(--text700)}
.layer-row__val{font-size:16px;font-weight:600;color:var(--primary900)}
.layer-row__unit{font-size:14px;font-weight:600}

.chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.chart-badge{display:inline-flex;align-items:center;gap:4px;padding:2px 4px;border-radius:4px;
  background:#fff;box-shadow:0 4px 20px rgba(0,0,0,.15)}
.chart-badge__dot{width:8px;height:8px;border-radius:2px;flex:0 0 8px}
.chart-svg{display:block;width:100%;height:88px}
.chart-legend{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 8px}
.chart-legend__item{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:500}
.chart-legend__item i{width:10px;height:10px;border-radius:3px;flex:0 0 10px}
.sat-badge{padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600}

.heat{margin-top:8px}
.heat__sprouts{display:flex;justify-content:space-between;padding:0 2px 3px}
.heat__row{display:flex;align-items:center;gap:6px;margin-bottom:3px}
.heat__badge{flex:0 0 46px;height:14px;border-radius:4px;background:var(--text300);
  font-size:9px;font-weight:600;color:var(--text700);display:flex;align-items:center;justify-content:center}
.heat__cells{position:relative;flex:1;height:20px;display:flex;border-radius:4px;overflow:hidden}
.heat__cells i{display:block;height:100%}
.heat__cursor{position:absolute;top:0;bottom:0;width:1.5px;background:#1D2126;opacity:.75}
.heat__value{position:absolute;right:4px;top:50%;transform:translateY(-50%);
  font-size:10px;font-weight:600;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.55)}
.heat__legend{display:flex;align-items:center;gap:3px;margin-top:8px}
.heat__legend i{flex:1;height:10px;border-radius:2px}

.fact__footer{flex:0 0 auto;padding-bottom:calc(8px + 22px)}
.timeline{padding:0 20px;position:relative}
.timeline__track{position:relative;height:26px;display:flex;align-items:center}
.timeline__track::before{content:"";position:absolute;left:0;right:0;height:4px;border-radius:2px;background:var(--text300)}
.timeline__fill{position:absolute;left:0;height:4px;border-radius:2px;background:var(--primary400)}
.timeline__knob{position:absolute;height:22px;padding:0 8px;border-radius:11px;background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.22);display:flex;align-items:center;
  font-size:11px;font-weight:600;color:var(--text700);white-space:nowrap}
.timeline__ends{display:flex;justify-content:space-between;margin-top:2px}
.timeline input[type=range]{position:absolute;left:20px;top:0;height:26px;width:calc(100% - 40px);opacity:0;margin:0}

/* --- Планирование работ --- */
.wplan{padding:16px 16px 100px}
.wcard{background:#fff;border-radius:18px;padding:16px}
.wcard__title{font-size:18px;font-weight:600;line-height:1.35;color:var(--text900)}
.wth__row{display:flex;align-items:center;padding:6px 0;gap:8px}
.wth__dash{height:1.5px;background-image:linear-gradient(to right,var(--text300) 0 4px,transparent 4px 8px);
  background-size:8px 1.5px;background-repeat:repeat-x}
.wday{display:flex;align-items:flex-start;width:100%;padding:5px 0;margin-bottom:10px;text-align:left}
.wday__left{display:flex;flex-direction:column;align-items:center;flex:0 0 auto;margin-right:16px}
.wday__right{flex:1;min-width:0}
.wday__scale{position:relative;display:block;height:20px}
.wday__tick{position:absolute;transform:translateX(-8px);display:flex;flex-direction:column;align-items:center}
.wday__tick span{font-size:11px;color:var(--text600);line-height:1.2}
.wday__tick i{display:block;width:1px;height:4px;background:var(--text600)}
.wday__bar{display:flex;height:6px;margin-top:5px}
.wday__bar i{flex:1;height:6px}
.wday__bar i:first-child{border-radius:100px 0 0 100px}
.wday__bar i:last-child{border-radius:0 100px 100px 0}
.wplan__select{display:flex;align-items:center;gap:8px;padding:16px;min-height:62px;max-width:70%}
.btn-outlined{height:46px;width:100%;padding:0 12px;border-radius:8px;border:1px solid var(--bgGray30);
  background:#fff;display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--text900)}
.btn-outlined:active{background:var(--default5)}

/* Уточнения после проверки: левая часть почасовой строки = 140px (как в исходнике) */
.hrow__left{width:140px;flex:0 0 140px;display:flex;align-items:center}
.hrow__hour{margin-left:10px;width:auto;flex:0 0 auto}
.hrow__desc{margin-left:12px;flex:1;min-width:0;width:auto;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

