/* CityTech: тема кабинета v2 (по макету «Современный дашборд CityTech», строже).
   Перекрывает каркас app (layout_start.php) селекторами с body, разметку app не трогает. */
:root{--ct-navy:#0b1f45;--ct-ink:#33435f;--ct-muted:#5b6b85;--ct-faint:#8a9ab3;--ct-blue:#1462d6;--ct-line:#e3ecf6;--ct-tint:#eaf3fd;--ct-glass:rgba(255,255,255,.78)}
body .cab-page,body .cab-main,body .cab-sidebar{font-family:Manrope,Inter,system-ui,sans-serif}

/* фон: макетная волна и силуэт города справа */
/* фон страниц кабинета задаётся полосой-героем ниже (как на поддержке) */
body .cab-page{background:transparent}
.ct-lay-side .ct-chdr__in{width:min(1400px,100% - 40px)}


/* плитка-значок: одна на весь кабинет */
.ct-tile{flex:none;display:inline-grid;place-items:center;width:48px;height:48px;border-radius:15px;background:var(--ct-tint);box-shadow:inset 0 0 0 1px rgba(20,98,214,.08)}
.ct-tile svg{width:24px;height:24px;fill:none;stroke:var(--ct-blue);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ct-tile--sm{width:38px;height:38px;border-radius:12px}
.ct-tile--sm svg{width:19px;height:19px}

/* заголовок страницы и крошки */
body .cab-main{max-width:1200px;margin:0 auto;padding:30px 20px 60px}
body .cab-breadcrumb{font-size:12.5px;font-weight:600;color:var(--ct-faint);margin-bottom:12px;gap:6px}
body .cab-breadcrumb a{color:var(--ct-muted)}
body .cab-breadcrumb a:hover{color:var(--ct-blue)}
body .cab-breadcrumb .icon--sm{width:13px;height:13px;opacity:.55}
body .cab-header{margin-bottom:24px;align-items:flex-end}
body .cab-header__left h1{font-size:clamp(26px,2.6vw,34px);font-weight:800;color:var(--ct-navy);letter-spacing:-.02em;margin-bottom:6px}
body .cab-header__sub{font-size:15px;color:var(--ct-muted)}

/* карточки-счётчики (свои и app: cab-stat) */
.ct-kpis,body .cab-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0;margin:0 0 22px;padding:0;border:1px solid rgba(20,98,214,.09);border-radius:26px;background:var(--ct-glass);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);box-shadow:0 26px 50px -38px rgba(13,58,130,.5);overflow:hidden}
.ct-kpi,body .cab-stat{position:relative;display:flex;align-items:center;gap:16px;min-height:92px;padding:18px 20px;border:0;border-radius:0;background:none;box-shadow:none;text-decoration:none;color:inherit;transition:background .2s;min-width:0;flex:initial}
.ct-kpi+.ct-kpi,body .cab-stat+.cab-stat{border-left:1px solid var(--ct-line)}
a.ct-kpi:hover{background:rgba(255,255,255,.65)}
.ct-kpi__tx{flex:1;min-width:0}
.ct-kpi__tx b,body .cab-stat__value{display:block;font-size:28px;font-weight:800;line-height:1.1;color:var(--ct-navy);background:none;-webkit-text-fill-color:currentColor;margin:0 0 3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-kpi__tx small,body .cab-stat__label{display:block;font-size:13px;line-height:1.35;color:var(--ct-muted);margin:0}
.ct-kpi--warn .ct-kpi__tx b{color:#b26a00}
.ct-kpi--warn .ct-kpi__tx small{color:#946200}
.ct-kpi__go{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f1f6fc;transition:background .2s}
.ct-kpi__go svg{width:16px;height:16px;fill:none;stroke:var(--ct-navy);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
a.ct-kpi:hover .ct-kpi__go{background:var(--ct-tint)}
/* иконка cab-stat app приводится к плитке */
body .cab-stat__icon{display:grid!important;place-items:center;flex:none;width:48px;height:48px;border-radius:15px;margin:0;background:var(--ct-tint)!important;color:var(--ct-blue)!important;box-shadow:inset 0 0 0 1px rgba(20,98,214,.08)}
body .cab-stat__icon svg,body .cab-stat__icon .icon{width:24px;height:24px;stroke:var(--ct-blue)}
body .cab-stat>div:not(.cab-stat__icon),body .cab-stat__body{min-width:0}
/* строку цифр v1 больше не используем */
body .ct-cab-stats{display:none}

/* блоки-разделы */
.ct-cab-block,body .cab-card{background:rgba(255,255,255,.86);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(20,98,214,.08);border-radius:28px;box-shadow:0 30px 60px -44px rgba(13,58,130,.5);margin-bottom:22px;overflow:visible}
.ct-cab-block{padding:24px 26px}
.ct-cab-block--accent{background:rgba(255,255,255,.92);border-color:rgba(20,98,214,.16)}
.ct-cab-block__head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 16px}
.ct-cab-block__head h2{display:flex;align-items:center;gap:12px;margin:0;font-size:18px;font-weight:800;color:var(--ct-navy);letter-spacing:-.01em}
.ct-cab-block__head a{font-size:14px;font-weight:700;color:var(--ct-blue);text-decoration:none;white-space:nowrap}
body .cab-card{overflow:hidden}
body .cab-card__head{padding:18px 24px;border-bottom:1px solid #eef3f9}
body .cab-card__title{font-size:17px;font-weight:800;color:var(--ct-navy)}
body .cab-card__body{padding:22px 24px}
body .cab-toolbar{padding:12px 24px;border-bottom:1px solid #eef3f9}

/* строки документов */
.ct-doc-list{display:flex;flex-direction:column;gap:10px}
.ct-doc-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto 34px;gap:16px;align-items:center;padding:14px 14px 14px 16px;border-radius:20px;background:#fff;border:1px solid var(--ct-line);text-decoration:none;color:inherit;transition:border-color .2s,box-shadow .2s,transform .2s}
.ct-doc-row:hover{border-color:#c7dcf2;box-shadow:0 14px 30px -24px rgba(13,58,130,.55);transform:translateY(-1px)}
.ct-doc-row__main b{display:block;font-size:15px;font-weight:700;color:var(--ct-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ct-doc-row__main small{display:block;margin-top:3px;font-size:12.5px;color:var(--ct-muted)}
.ct-doc-row__go{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f1f6fc}
.ct-doc-row__go svg{width:16px;height:16px;fill:none;stroke:var(--ct-navy);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* статусы: спокойные, одна высота */
.ct-badge{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border-radius:14px;font-size:12px;font-weight:700;white-space:nowrap;background:#eef4fb;color:var(--ct-ink);justify-self:start}
.ct-badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.8}
.ct-badge--warn{background:#fff6e5;color:#946200}
.ct-badge--ok{background:#eaf7f0;color:#18804f}
.ct-badge--info{background:#eef4fb;color:#2d5a96}
.ct-badge--fail{background:#fdeeee;color:#b23a2e}
.ct-badge--lg{height:32px;font-size:13px;padding:0 14px}

/* пустое состояние */
.ct-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:10px 16px 18px;color:var(--ct-muted)}
.ct-empty__art{width:240px;max-width:80%;height:auto;margin-bottom:10px}
.ct-empty b{font-size:17px;font-weight:800;color:var(--ct-navy);margin-bottom:6px}
.ct-empty p{max-width:440px;margin:0;font-size:14.5px;line-height:1.55}

/* вкладки видов документов */
.ct-tabs{display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;margin:0 0 18px;border-radius:16px;background:rgba(255,255,255,.8);border:1px solid var(--ct-line)}
.ct-tab{padding:9px 16px;border-radius:12px;font-size:14px;font-weight:600;color:var(--ct-ink);text-decoration:none;border:0;background:none}
.ct-tab:hover{color:var(--ct-navy);background:#f4f8fc}
.ct-tab.is-active{background:#fff;color:var(--ct-navy);box-shadow:0 4px 14px -8px rgba(13,58,130,.45)}

/* карточка документа */
.ct-doc-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:20px;align-items:start}
.ct-dl{display:grid;grid-template-columns:120px 1fr;gap:12px 16px;margin:0 0 18px;font-size:14.5px}
.ct-dl dt{color:var(--ct-muted)}.ct-dl dd{margin:0;color:var(--ct-navy);font-weight:700}
.ct-file{display:inline-flex;align-items:center;gap:10px;height:42px;padding:0 16px;border-radius:13px;border:1px solid var(--ct-line);background:#fff;font-size:14px;font-weight:700;color:var(--ct-navy);text-decoration:none}
.ct-file:hover{border-color:#c7dcf2}
.ct-file svg{width:18px;height:18px;fill:none;stroke:var(--ct-blue);stroke-width:2}
.ct-sign-box p{color:var(--ct-muted)}
.ct-back{display:inline-flex;margin-bottom:8px;font-size:13.5px;font-weight:700;color:var(--ct-muted);text-decoration:none}
.ct-back:hover{color:var(--ct-blue)}

/* проекты */
.ct-proj__head h2{display:flex;align-items:center;gap:12px;font-size:18px}

/* поля и кнопки app внутри кабинета */
body .cab-main .form-field__input,body .cab-main .input{border:1px solid #dbe8f5;border-radius:12px;background:#fbfdff}
body .cab-main .form-field__input:focus,body .cab-main .input:focus{border-color:var(--ct-blue);box-shadow:0 0 0 4px rgba(20,98,214,.1);background:#fff}
body .cab-main .form-field__label{font-size:12.5px;font-weight:700;color:#3d4d68}
body .cab-main .btn--primary,body .cab-main .btn-primary{background:linear-gradient(135deg,#3b8cf5 0%,#1462d6 55%,#0e4fb5 100%);border:0;border-radius:12px;box-shadow:0 12px 24px -14px rgba(20,98,214,.95);color:#fff}
body .cab-main .btn--secondary,body .cab-main .btn--outline,body .cab-main .btn-outline{background:#fff;border:1px solid #dbe8f5;border-radius:12px;color:var(--ct-navy);box-shadow:none}
body .cab-main .btn--secondary:hover,body .cab-main .btn--outline:hover,body .cab-main .btn-outline:hover{border-color:#b9d3ee}

/* ===== вид «меню сверху» (по умолчанию) ===== */
body .cab-topbar,body .cab-menu-btn,body .cab-overlay{display:none!important}

/* ===== меню слева: часть страницы, без отдельной карточки (стиль CityTech: плитки-значки, активный пункт синей кнопкой) ===== */
.ct-lay-side body .cab-wrap{display:grid;grid-template-columns:260px minmax(0,1fr);gap:8px;max-width:1440px;margin:0 auto;padding:0 20px;min-height:0}
.ct-lay-side body .cab-sidebar{position:sticky;top:96px;align-self:start;margin:28px 0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;gap:0}
.ct-lay-side body .cab-main{max-width:none;margin:0;padding:28px 12px 60px 20px}
body .cab-nav{display:flex;flex-direction:column;gap:4px}
body .cab-nav__item{position:relative;display:flex;align-items:center;gap:12px;padding:6px 12px 6px 6px;border-radius:16px;font-size:14.5px;font-weight:600;line-height:1.25;color:var(--ct-ink);text-decoration:none;background:none;box-shadow:none;transition:background .2s,color .2s,box-shadow .2s}
body .cab-nav__item>svg{flex:none;width:40px;height:40px;padding:10px;border-radius:13px;background:rgba(255,255,255,.75);box-shadow:inset 0 0 0 1px rgba(20,98,214,.1);fill:none;stroke:var(--ct-blue);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;box-sizing:border-box;transition:background .2s,stroke .2s}
body .cab-nav__item:hover{background:rgba(255,255,255,.7);color:var(--ct-navy)}
body .cab-nav__item.is-active,body .cab-nav__item.is-active:hover{background:linear-gradient(135deg,#3b8cf5 0%,#1462d6 55%,#0e4fb5 100%);color:#fff;font-weight:700;box-shadow:0 16px 30px -18px rgba(20,98,214,.95)}
body .cab-nav__item.is-active::before{display:none}
body .cab-nav__item.is-active>svg{background:rgba(255,255,255,.18);box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);stroke:#fff}
body .cab-nav__counter{margin-left:auto;min-width:22px;height:22px;padding:0 7px;border-radius:11px;background:var(--ct-blue);color:#fff;font-size:11px;font-weight:800;display:inline-grid;place-items:center;box-sizing:border-box}
body .cab-nav__item.is-active .cab-nav__counter{background:#fff;color:var(--ct-blue)}
body .cab-nav__sep{height:1px;background:var(--ct-line);margin:10px 8px}
body .cab-nav__item--danger{color:#c0392b}
body .cab-nav__item--danger>svg{background:#fdf1f0;box-shadow:inset 0 0 0 1px rgba(192,57,43,.12);stroke:#c0392b}
body .cab-nav__item--danger:hover{background:#fdf1f0;color:#a93226}

/* телефон: всегда верхняя шапка и выезжающее меню */
@media (max-width:900px){
  body .cab-main{padding:20px 16px 44px}
  .ct-lay-side body .cab-wrap{display:block;padding:0}
  .ct-lay-side body .cab-sidebar{display:none!important}
  .ct-lay-side body .cab-main{padding:20px 16px 44px}
  .ct-kpis,body .cab-stats{grid-template-columns:1fr;border-radius:22px}
  .ct-kpi,body .cab-stat{min-height:74px;padding:14px 16px}
  .ct-kpi+.ct-kpi,body .cab-stat+.cab-stat{border-left:0;border-top:1px solid var(--ct-line)}
  .ct-cab-block{padding:18px 16px;border-radius:24px}
  .ct-doc-row{grid-template-columns:48px minmax(0,1fr) 28px;gap:12px;padding:12px}
  .ct-doc-row .ct-badge{grid-column:2;grid-row:2;margin-top:-4px}
  .ct-doc-row__go{grid-column:3;grid-row:1/3;width:28px;height:28px}
  .ct-doc-grid{grid-template-columns:1fr}
  .ct-tabs{display:flex;overflow-x:auto;flex-wrap:nowrap;max-width:100%}
  .ct-tab{white-space:nowrap}
}
/* карточки app (иконка, число, подпись соседями): плитка слева на две строки */
body .cab-stat{display:grid;grid-template-columns:48px minmax(0,1fr);grid-auto-rows:auto;column-gap:16px;row-gap:2px;align-content:center;align-items:center}
body .cab-stat__icon{grid-row:1/3;grid-column:1}
body .cab-stat__value{grid-column:2;align-self:end}
body .cab-stat__label{grid-column:2;align-self:start}

/* поддержка: карточки контактов в ширину контента, длинные значения мельче */
.ct-sup-cards.ct-kpis{width:min(1200px,100% - 40px);margin:-44px auto 0;box-sizing:border-box}
.ct-sup-cards .ct-kpi__tx b{font-size:18px}

/* ===== общая ширина: шапка, кабинет, подвал, поддержка ===== */
:root{--ct-wrap:min(1600px,100% - 64px)}
@media (max-width:900px){:root{--ct-wrap:calc(100% - 32px)}}
.ct-chdr__in,.ct-lay-side .ct-chdr__in{width:var(--ct-wrap);gap:28px}
.ct-chdr__nav{margin:0 auto}
.ct-chdr__act{margin-left:auto}
body .cab-main{max-width:none;width:var(--ct-wrap);margin:0 auto;padding-left:0;padding-right:0;box-sizing:border-box}
.ct-lay-side body .cab-wrap{max-width:none;width:var(--ct-wrap);padding:0;grid-template-columns:272px minmax(0,1fr);gap:28px}
.ct-lay-side body .cab-main{width:auto;padding:28px 0 60px}
.ct-cft__in,.ct-sup-in,.ct-sup-cards.ct-kpis{width:var(--ct-wrap)}

/* пустое состояние: иллюстрация в полный размер (старое правило .ct-empty svg её сжимало) */
.ct-empty svg.ct-empty__art{width:260px;max-width:80%;height:auto;fill:initial;stroke:none;margin-bottom:12px}

/* вкладки на телефоне: плавная прокрутка без полосы */
.ct-tabs{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;scroll-behavior:smooth;scroll-snap-type:x proximity}
.ct-tabs::-webkit-scrollbar{display:none}
.ct-tab{scroll-snap-align:start;flex:none}

/* ===== единый вид страниц кабинета как у поддержки: полоса с фото, надпись-раздел, крупный заголовок ===== */
html body:has(.cab-page){background:#fff;position:relative}
html body:has(.cab-page)::before{content:"";position:absolute;left:0;right:0;top:0;height:404px;z-index:0;pointer-events:none;
  background:linear-gradient(90deg,#f4faff 0%,rgba(244,250,255,.94) 36%,rgba(244,250,255,.38) 68%,rgba(244,250,255,.08) 100%),
             linear-gradient(0deg,#fff 0%,rgba(255,255,255,0) 34%),
             var(--ct-hero) right 40%/max(62%,680px) auto no-repeat,#eaf5fd}
body .cab-page{position:relative;z-index:1;background:transparent}
body .cab-main{padding-top:58px}
.ct-lay-side body .cab-main{padding-top:58px}
body .cab-breadcrumb{font-size:12.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--ct-blue);margin-bottom:14px;gap:8px;align-items:center}
body .cab-breadcrumb::before{content:"";width:18px;height:2px;border-radius:2px;background:currentColor}
body .cab-breadcrumb a,body .cab-breadcrumb span{color:var(--ct-blue)}
body .cab-breadcrumb a:hover{color:var(--ct-navy)}
body .cab-breadcrumb .icon--sm{width:12px;height:12px;opacity:.7}
body .cab-header{margin-bottom:46px}
body .cab-header__left h1{font-size:clamp(30px,3.4vw,46px);line-height:1.1;margin-bottom:10px}
body .cab-header__sub{font-size:16px;color:#46566f}
.ct-back{display:none}
.ct-logout{flex:none;align-self:center;display:inline-flex;align-items:center;gap:9px;height:44px;padding:0 20px;border-radius:14px;background:rgba(255,255,255,.9);border:1px solid #f1d3cf;color:#c0392b;font:700 14.5px Manrope,Inter,sans-serif;text-decoration:none;transition:background .2s,border-color .2s}
.ct-logout svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ct-logout:hover{background:#fdf3f3;border-color:#e8b4ae;color:#c0392b}
.ct-lay-side body .cab-sidebar{margin-top:58px}
/* шапка кабинета: часть полосы с фото, без своей белой подложки; стекло появляется только при прокрутке */
body .ct-chdr{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom-color:transparent;transition:background .25s,box-shadow .25s,border-color .25s}
body .ct-chdr.is-scrolled{background:rgba(255,255,255,.86);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px)}
body .ct-chdr__bell{background:rgba(255,255,255,.75);box-shadow:inset 0 0 0 1px rgba(20,98,214,.1)}
body .ct-user__btn{background:rgba(255,255,255,.75);border-color:rgba(20,98,214,.1)}
.ct-cmob .ct-navlink--danger,.ct-cmob .ct-navlink--danger span{color:#c0392b}
.ct-cmob .ct-navlink__cnt{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:8px;padding:0 6px;border-radius:10px;background:var(--ct-blue);color:#fff;font-size:11px;font-weight:800;box-sizing:border-box}
@media (max-width:900px){
  html body:has(.cab-page)::before{top:0;height:364px;background:linear-gradient(180deg,rgba(244,250,255,.7) 0%,rgba(244,250,255,.85) 55%,#fff 100%),var(--ct-hero) 70% center/cover no-repeat,#eaf5fd}
  body .cab-main,.ct-lay-side body .cab-main{padding-top:30px}
  body .cab-header{margin-bottom:26px}
  body .cab-header:has(>.ct-badge){flex-direction:column;align-items:flex-start;gap:12px}
}

/* вход: та же полоса с фото, карточка-стекло */
html body:has(.auth-layout){background:#fff;position:relative}
html body:has(.auth-layout)::before{content:"";position:absolute;left:0;right:0;top:0;height:594px;z-index:0;pointer-events:none;
  background:linear-gradient(90deg,#f4faff 0%,rgba(244,250,255,.9) 34%,rgba(244,250,255,.3) 66%,rgba(244,250,255,.05) 100%),
             linear-gradient(0deg,#fff 0%,rgba(255,255,255,0) 40%),
             var(--ct-hero) right center/auto 100% no-repeat,#eaf5fd}
body .auth-layout{position:relative;z-index:1;background:transparent!important;min-height:calc(100vh - 74px - 150px);display:flex;align-items:center;justify-content:center;padding:56px 16px}
body .auth-card{width:min(460px,100%);padding:36px 34px 30px;border-radius:28px;background:rgba(255,255,255,.88);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(20,98,214,.1);box-shadow:0 34px 70px -40px rgba(13,58,130,.55);font-family:Manrope,Inter,system-ui,sans-serif}
body .auth-card__title{font-size:32px;font-weight:800;color:var(--ct-navy);letter-spacing:-.02em}
body .auth-card__subtitle{color:var(--ct-muted);font-size:15px}
body .auth-card .ecp-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:14px;border:1px solid #dbe8f5!important;border-radius:18px!important;background:#fff!important;color:var(--ct-navy)!important;box-shadow:0 12px 26px -22px rgba(13,58,130,.6);transition:border-color .2s,box-shadow .2s,transform .2s}
body .auth-card .ecp-btn:hover{border-color:var(--ct-blue)!important;transform:translateY(-1px);box-shadow:0 18px 34px -22px rgba(20,98,214,.6)}
body .auth-card .ecp-btn>svg{flex:none;width:48px!important;height:48px!important;padding:12px;border-radius:15px;background:var(--ct-tint);stroke:var(--ct-blue);box-sizing:border-box}
body .auth-card .app-card__note{color:var(--ct-muted)}
@media (max-width:900px){html body:has(.auth-layout)::before{top:0;height:484px;background:linear-gradient(180deg,rgba(244,250,255,.55) 0%,rgba(244,250,255,.85) 60%,#fff 100%),var(--ct-hero) 70% center/cover no-repeat,#eaf5fd}}
