:root {
  --paper: #f4f6fb;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --ink: #323232;
  --ink-soft: #82888c;
  --line: rgba(50, 50, 50, 0.1);
  --orange: #366fc0;
  --orange-soft: #e7eef9;
  --lime: #8aafe0;
  --blue: #b9ceed;
  --radius-lg: 24px;
  --radius-md: 17px;
  --shadow: 0 24px 70px rgba(50, 66, 92, 0.08);
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); overflow-x: hidden; }
body { font-size: 14px; line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
small, p, td, th, dt, dd, label, button, input, select, textarea { line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #858d98; opacity: 1; }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.ambient { position: fixed; z-index: -1; width: 380px; height: 380px; border-radius: 50%; filter: blur(90px); opacity: .25; pointer-events: none; }
.ambient-one { top: -160px; right: 8%; background: var(--orange-soft); }
.ambient-two { bottom: 8%; left: -180px; background: #c8d9ef; }

.topbar { height: 84px; margin: 0 auto; padding: 0 max(28px, calc((100vw - 1480px) / 2)); display: grid; grid-template-columns: 230px 1fr auto; align-items: center; gap: 26px; border-bottom: 1px solid var(--line); background: rgba(244, 246, 251, .88); backdrop-filter: blur(20px); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; width: fit-content; }
.brand-mark { width: 41px; height: 41px; border-radius: 12px; background: var(--orange); color: white; display: grid; place-items: center; font: 700 14px/1 "Onest", sans-serif; letter-spacing: -.04em; transform: rotate(-4deg); transition: transform .35s ease; }
.brand:hover .brand-mark { transform: rotate(4deg) scale(1.05); }
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy strong { font: 650 15px/1.2 "Onest", sans-serif; }
.brand-copy small { margin-top: 4px; font-size:12px; text-transform: uppercase; letter-spacing: .13em; color: var(--ink-soft); }

.main-nav { display: flex; justify-content: center; align-items: center; gap: 5px; }
.main-nav { min-width: 0; }
.main-nav .nav-link { flex: 0 0 auto; }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px; color: var(--ink-soft); text-decoration: none; font-size: 13px; font-weight: 600; border-radius: 12px; transition: color .25s ease, background .25s ease, transform .25s ease; }
.nav-link:hover { color: var(--ink); background: rgba(255,255,255,.55); transform: translateY(-1px); }
.nav-link.active { color: var(--ink); background: var(--surface-solid); box-shadow: 0 8px 25px rgba(38,38,28,.06); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .profile { border: 1px solid var(--line); background: rgba(255,255,252,.7); cursor: pointer; transition: background .25s ease, transform .25s ease, border-color .25s ease; }
.icon-button:hover, .profile:hover { background: white; border-color: rgba(23,25,21,.18); transform: translateY(-1px); }
.icon-button { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notification-dot { position: absolute; width: 7px; height: 7px; right: 8px; top: 7px; border-radius: 50%; background: var(--orange); border: 2px solid white; box-sizing: content-box; }
.profile { display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 5px; border-radius: 15px; }
.profile > svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--lime); font-size:13px; font-weight: 700; }
.profile-copy { display: grid; text-align: left; line-height: 1.15; }
.profile-copy strong { font-size:13px; }
.profile-copy small { margin-top: 3px; font-size:12px; color: var(--ink-soft); }

/* Сохраняем все разделы навигации видимыми на ноутбуках. */
@media (max-width: 1320px) {
  .topbar { grid-template-columns: 175px minmax(0, 1fr) auto; gap: 14px; padding-left: 20px; padding-right: 20px; }
  .main-nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 10px 11px; font-size: 12px; white-space: nowrap; }
}

.dashboard-shell { width: min(1480px, calc(100% - 56px)); margin: 0 auto; padding: 46px 0 70px; }
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 32px; }
.eyebrow, .panel-kicker { margin: 0; color: var(--ink-soft); font-size:12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.eyebrow span { width: 18px; height: 1px; background: var(--orange); }
h1, h2 { font-family: "Onest", sans-serif; letter-spacing: -.04em; }
h1 { margin: 0; font-size: clamp(35px, 4vw, 55px); font-weight: 500; line-height: .98; }
.hero-subtitle { max-width: 660px; margin: 14px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.hero-controls { display: flex; align-items: flex-end; gap: 10px; }
.period-select { display: grid; gap: 5px; }
.period-select span { color: var(--ink-soft); font-size:12px; text-transform: uppercase; letter-spacing: .12em; }
.period-select select { height: 44px; min-width: 160px; padding: 0 38px 0 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,252,.7); color: var(--ink); outline: none; cursor: pointer; font-size: 12px; }
.primary-button { height: 44px; border: 0; border-radius: 13px; padding: 0 18px; background: var(--ink); color: white; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 11px 25px rgba(23,25,21,.16); transition: transform .25s ease, background .25s ease; }
.primary-button span { display: inline-block; margin-right: 7px; color: var(--lime); font-size: 18px; line-height: 0; }
.primary-button:hover { transform: translateY(-2px); background: #2a2d27; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.metric-card, .panel { border: 1px solid rgba(23,25,21,.075); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.metric-card { min-height: 178px; padding: 21px; border-radius: var(--radius-md); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.metric-dark { color: white; background: var(--ink); position: relative; }
.metric-dark::after { content: ""; width: 130px; height: 130px; border-radius: 50%; position: absolute; right: -45px; top: -45px; border: 25px solid rgba(201,235,85,.1); }
.metric-top, .metric-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.metric-label { color: var(--ink-soft); font-size:13px; font-weight: 600; }
.metric-dark .metric-label { color: rgba(255,255,255,.58); }
.trend { padding: 5px 7px; border-radius: 8px; font-size:12px; font-weight: 700; white-space: nowrap; }
.trend.up { color: #426c00; background: rgba(201,235,85,.28); }
.trend.down { color: #a7462f; background: var(--orange-soft); }
.trend.neutral { color: var(--lime); background: rgba(201,235,85,.12); }
.metric-value { font: 550 44px/1 "Onest", sans-serif; letter-spacing: -.05em; }
.metric-value small { margin-left: 2px; font-size: 20px; color: var(--lime); }
.metric-footer { color: var(--ink-soft); font-size:12px; }
.metric-dark .metric-footer { color: rgba(255,255,255,.5); }
.metric-footer strong { color: var(--lime); }
.mini-bars { height: 23px; display: flex; align-items: end; gap: 3px; }
.mini-bars i { display: block; width: 4px; border-radius: 3px; background: var(--orange); opacity: .24; }
.mini-bars i:nth-child(1) { height: 7px; }.mini-bars i:nth-child(2) { height: 12px; }.mini-bars i:nth-child(3) { height: 9px; }.mini-bars i:nth-child(4) { height: 17px; }.mini-bars i:nth-child(5) { height: 14px; }.mini-bars i:nth-child(6) { height: 20px; }.mini-bars i:nth-child(7) { height: 23px; opacity: 1; }
.progress-track { height: 4px; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.12); }
.progress-track span { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: var(--lime); animation: grow-bar 1.2s .45s cubic-bezier(.2,.8,.2,1) both; }
.activity-split { width: 56px; height: 5px; display: flex; gap: 2px; }
.activity-split i { border-radius: 5px; background: var(--orange); }.activity-split i:first-child { width: 73%; }.activity-split i:last-child { width: 27%; background: var(--blue); }
.people-stack { display: flex; }
.people-stack i { width: 24px; height: 24px; display: grid; place-items: center; margin-right: -6px; border: 2px solid white; border-radius: 50%; background: var(--paper); color: var(--ink); font-style: normal; font-size:12px; font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 14px; }
.panel { padding: 24px; border-radius: var(--radius-lg); min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.panel-kicker { margin-bottom: 7px; color: var(--orange); }
.panel h2 { margin: 0; font-size: 19px; font-weight: 600; }
.performance-panel { grid-column: span 2; }
.actions-panel { grid-column: span 2; }
.legend { display: flex; gap: 14px; color: var(--ink-soft); font-size:12px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend-line { width: 14px; height: 2px; display: inline-block; border-radius: 3px; }
.legend-line.primary { background: var(--orange); }.legend-line.muted { background: #b8b9b2; }
.chart-wrap { position: relative; margin: 23px 0 0 30px; }
.chart-axis { position: absolute; left: -30px; top: 2px; height: calc(100% - 25px); display: flex; flex-direction: column; justify-content: space-between; color: #a2a49c; font-size:12px; }
.line-chart { width: 100%; height: 220px; overflow: visible; }
.grid-lines line { stroke: rgba(23,25,21,.07); stroke-width: 1; stroke-dasharray: 4 6; }
.area { fill: url(#chartFill); opacity: 0; animation: fade-area .8s .7s ease forwards; }
.current-line, .previous-line { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw-line 1.5s .45s ease forwards; }
.current-line { stroke: var(--orange); stroke-width: 3; }.previous-line { stroke: #bec0b8; stroke-width: 1.5; stroke-dasharray: 7 7; }
.chart-points circle { fill: white; stroke: var(--orange); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart-labels { display: flex; justify-content: space-between; color: #999b94; font-size:12px; }

.more-button { padding: 0; border: 0; background: none; color: var(--ink-soft); cursor: pointer; letter-spacing: 2px; }
.donut-layout { display: flex; align-items: center; justify-content: center; gap: 25px; margin: 25px 0; }
.donut { width: 144px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--orange) 0 24.2%, var(--ink) 24.2% 64.8%, var(--lime) 64.8% 100%); display: grid; place-items: center; position: relative; animation: donut-in .8s .5s ease both; }
.donut::before { content: ""; position: absolute; inset: 16px; border-radius: inherit; background: var(--surface-solid); }
.donut-center { position: relative; display: grid; text-align: center; }
.donut-center strong { font: 600 28px/1 "Onest", sans-serif; }.donut-center span { margin-top: 5px; color: var(--ink-soft); font-size:12px; }
.donut-legend { display: grid; gap: 12px; flex: 1; }
.donut-legend div { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; font-size:12px; color: var(--ink-soft); }
.donut-legend i { width: 7px; height: 7px; border-radius: 50%; }.donut-legend i.orange { background: var(--orange); }.donut-legend i.ink { background: var(--ink); }.donut-legend i.lime { background: var(--lime); }
.donut-legend strong { color: var(--ink); font-size:13px; }
.focus-note { padding: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; border-radius: 13px; background: rgba(201,235,85,.18); }
.focus-note p { margin: 0; color: var(--ink-soft); font-size:12px; line-height: 1.5; }.focus-note strong { color: var(--ink); font-size:12px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #91bd05; box-shadow: 0 0 0 0 rgba(145,189,5,.4); animation: pulse 2s infinite; }
.focus-note button { border: 0; background: transparent; font-size:12px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.quiet-label { color: var(--ink-soft); font-size:12px; }
.region-list { display: grid; gap: 20px; margin-top: 28px; }
.region-row { display: grid; grid-template-columns: 22px minmax(130px, 1fr) auto 30px; gap: 10px; align-items: center; }
.rank { color: #b2b4ad; font: 500 9px/1 "Onest", sans-serif; }
.region-row > div { display: grid; gap: 7px; }
.region-row strong { font-size:12px; font-weight: 600; }
.region-row b { font-size:12px; font-weight: 600; }.region-row em { color: var(--ink-soft); font-size:12px; font-style: normal; text-align: right; }
.region-bar { height: 4px; border-radius: 8px; background: rgba(23,25,21,.06); overflow: hidden; }
.region-bar i { display: block; width: var(--width); height: 100%; border-radius: inherit; background: var(--orange); animation: grow-bar 1s .7s ease both; }
.region-row:nth-child(2) .region-bar i { background: var(--ink); }.region-row:nth-child(3) .region-bar i { background: #a9d523; }.region-row:nth-child(4) .region-bar i { background: #9a9d94; }

.attention-count { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #a63b23; background: var(--orange-soft); font-size:13px; font-weight: 700; }
.action-list { margin-top: 17px; display: grid; }
.action-item { width: 100%; display: grid; grid-template-columns: 38px 1fr auto 22px; align-items: center; gap: 11px; padding: 12px 5px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; transition: padding .25s ease, background .25s ease; }
.action-item:hover { padding-left: 10px; background: rgba(244,244,239,.65); }
.company-symbol { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size:12px; font-weight: 700; }.company-symbol.coral { background: var(--orange-soft); }.company-symbol.blue { background: #e0eeff; }.company-symbol.green { background: #e5f3bc; }
.action-item > span:nth-child(2) { display: grid; gap: 4px; }.action-item strong { font-size:12px; }.action-item small { color: var(--ink-soft); font-size:12px; }
.owner { color: var(--ink-soft); font-size:12px; }.arrow { font-size: 14px; transition: transform .2s ease; }.action-item:hover .arrow { transform: translate(2px,-2px); }
.text-button { margin-top: 17px; padding: 0; border: 0; background: none; font-size:12px; font-weight: 700; cursor: pointer; }.text-button span { margin-left: 5px; color: var(--orange); }

.equipment-summary { margin-top: 25px; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 15px; }
.equipment-summary > div { display: flex; align-items: flex-end; gap: 8px; }
.equipment-number { font: 600 40px/.9 "Onest", sans-serif; letter-spacing: -.05em; }.equipment-number + span { color: var(--ink-soft); font-size:12px; line-height: 1.4; }
.equipment-wave { width: 100%; height: 70px; overflow: visible; }.equipment-wave path:first-child { fill: none; stroke: var(--orange); stroke-width: 2.5; vector-effect: non-scaling-stroke; }.wave-shadow { fill: url(#none); opacity: .08; }
.equipment-brands { margin-top: 25px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.equipment-brands span { padding: 10px 5px; display: grid; gap: 5px; text-align: center; border-radius: 10px; background: rgba(244,244,239,.85); }.equipment-brands b { font-size:12px; }.equipment-brands small { color: var(--ink-soft); font-size:12px; }

.reveal { opacity: 0; transform: translateY(18px); animation: reveal .65s var(--delay, 0ms) cubic-bezier(.2,.8,.2,1) forwards; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; padding: 11px 16px; border-radius: 12px; color: white; background: rgba(23,25,21,.94); box-shadow: 0 15px 40px rgba(0,0,0,.18); font-size:13px; opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Фирменная палитра Artmark: синий, графит и холодные нейтральные оттенки. */
.avatar { background: var(--orange-soft); color: var(--orange); }
.primary-button { background: var(--orange); box-shadow: 0 11px 25px rgba(54,111,192,.22); }
.primary-button span { color: white; }
.primary-button:hover { background: #2f62aa; }
.metric-dark { background: linear-gradient(135deg, #366fc0, #285691); }
.metric-dark::after { border-color: rgba(255,255,255,.09); }
.trend.up { color: #285691; background: rgba(54,111,192,.12); }
.trend.down { color: #596b83; background: #edf1f7; }
.trend.neutral { color: white; background: rgba(255,255,255,.13); }
.metric-value small, .metric-footer strong { color: #d9e7f8; }
.progress-track span { background: white; }
.people-stack i { background: var(--orange-soft); color: var(--orange); }
.donut { background: conic-gradient(var(--orange) 0 24.2%, var(--ink) 24.2% 64.8%, #a9c4e8 64.8% 100%); }
.focus-note { background: rgba(54,111,192,.09); }
.pulse-dot { background: var(--orange); box-shadow: 0 0 0 0 rgba(54,111,192,.4); }
.region-row:nth-child(2) .region-bar i { background: #5f83b8; }
.region-row:nth-child(3) .region-bar i { background: #91acd2; }
.region-row:nth-child(4) .region-bar i { background: #b8c8df; }
.attention-count { color: var(--orange); }
.company-symbol.coral { color: var(--orange); }
.company-symbol.blue { background: #dfe9f7; color: #315f9e; }
.company-symbol.green { background: #edf1f7; color: #627189; }

@keyframes reveal { to { opacity: 1; transform: none; } }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fade-area { to { opacity: 1; } }
@keyframes grow-bar { from { width: 0; } }
@keyframes donut-in { from { opacity: 0; transform: rotate(-70deg) scale(.8); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(54,111,192,0); } 100% { box-shadow: 0 0 0 0 rgba(54,111,192,0); } }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: auto 1fr auto; }.brand-copy { display: none; }.profile-copy { display: none; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr 1fr; }.performance-panel, .actions-panel { grid-column: span 2; }
}

@media (max-width: 780px) {
  .topbar { height: auto; min-height: 72px; padding: 12px 18px; grid-template-columns: auto 1fr; }.main-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; order: 3; padding-bottom: 2px; }.header-actions { justify-self: end; }.nav-link { white-space: nowrap; padding: 9px 12px; }
  .dashboard-shell { width: min(100% - 28px, 680px); padding-top: 30px; }.hero { display: grid; align-items: start; }.hero-controls { width: 100%; }.period-select { flex: 1; }.period-select select { width: 100%; }.primary-button { margin-top: 15px; }
  .dashboard-grid { grid-template-columns: 1fr; }.performance-panel, .actions-panel { grid-column: auto; }.metrics-grid { grid-template-columns: 1fr 1fr; }.legend { display: none; }
}

@media (max-width: 520px) {
  .icon-button:first-child, .profile svg { display: none; }.metrics-grid { grid-template-columns: 1fr; }.hero-controls { align-items: stretch; flex-direction: column; }.primary-button { margin-top: 0; }.metric-card { min-height: 160px; }
  .panel { padding: 19px; }.chart-wrap { margin-left: 24px; }.line-chart { height: 180px; }.donut-layout { flex-direction: column; }.donut-legend { width: 100%; }.action-item { grid-template-columns: 38px 1fr 18px; }.owner { display: none; }.equipment-brands { grid-template-columns: repeat(3, 1fr); }.region-row { grid-template-columns: 18px 1fr auto; }.region-row em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
