:root {
  --bg: #07101c;
  --bg-soft: #0f1b2f;
  --panel: rgba(11, 20, 37, 0.88);
  --panel-strong: rgba(14, 26, 48, 0.96);
  --panel-alt: rgba(17, 30, 53, 0.82);
  --panel-glow: rgba(82, 157, 255, 0.14);
  --line: rgba(134, 164, 214, 0.14);
  --line-strong: rgba(141, 177, 233, 0.28);
  --text: #eef5ff;
  --muted: #9db1d3;
  --accent: #4ca3ff;
  --accent-strong: #256fe8;
  --accent-soft: rgba(76, 163, 255, 0.18);
  --success: #2cb67d;
  --warning: #f59e0b;
  --danger: #ff6b6b;
  --phase-a: linear-gradient(135deg, #3a7cf3, #6cbcff);
  --phase-b: linear-gradient(135deg, #0ea8a0, #5fd7c0);
  --stage-1: #27b8ae;
  --stage-2: #f6dd29;
  --stage-3: #ff617e;
  --stage-4: #8561f3;
  --stage-5: #ff9744;
  --stage-x: #74839a;
  --day-width: 44px;
  --row-height: 42px;
  --label-width: 392px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.24);
  --radius: 22px;
}

.challenge-view,
.challenge-settings-view {
  min-height: calc(100vh - 150px);
}

.standalone-challenge .page {
  padding: 12px;
}

.standalone-challenge .challenge-view {
  min-height: calc(100vh - 24px);
}

.challenge-shell,
.challenge-settings-shell {
  color: #edf5ff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.challenge-hero,
.challenge-settings-header {
  align-items: center;
  background: linear-gradient(135deg, rgba(18, 32, 55, 0.98), rgba(11, 20, 36, 0.96));
  border: 1px solid rgba(88, 130, 188, 0.36);
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px 22px;
}

.challenge-eyebrow,
.challenge-settings-header span {
  color: #91b6e6;
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.challenge-hero h1,
.challenge-settings-header h1 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.96;
  margin: 0;
}

.challenge-settings-header h1 {
  font-size: clamp(1.9rem, 3vw, 3.2rem);
}

.challenge-hero p,
.challenge-settings-header p {
  color: #b7c7dd;
  font-size: 1rem;
  font-weight: 700;
  margin: 8px 0 0;
}

.challenge-hero-actions,
.challenge-settings-actions {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 210px;
}

.challenge-hero-actions span {
  color: #8fa4bf;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.challenge-warning {
  background: rgba(244, 181, 44, 0.14);
  border: 1px solid rgba(244, 181, 44, 0.45);
  border-radius: 12px;
  color: #ffd681;
  font-weight: 900;
  padding: 12px 14px;
}

.challenge-kpi-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.challenge-kpi {
  background: rgba(14, 27, 47, 0.94);
  border: 1px solid rgba(82, 123, 177, 0.32);
  border-radius: 14px;
  padding: 14px 15px;
}

.challenge-kpi span,
.challenge-kpi p {
  color: #93a9c6;
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.challenge-kpi strong {
  color: #ffffff;
  display: block;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  line-height: 1;
  margin: 8px 0 6px;
}

.challenge-kpi.success {
  border-color: rgba(52, 211, 153, 0.5);
}

.challenge-kpi.blue {
  border-color: rgba(96, 165, 250, 0.5);
}

.challenge-kpi.cyan {
  border-color: rgba(45, 212, 191, 0.5);
}

.challenge-kpi.danger {
  border-color: rgba(248, 113, 113, 0.58);
}

.challenge-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
}

.challenge-podium {
  align-items: end;
  background: rgba(8, 17, 31, 0.86);
  border: 1px solid rgba(74, 114, 168, 0.36);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 220px;
  padding: 14px;
}

.challenge-podium-card {
  background: linear-gradient(180deg, rgba(28, 52, 87, 0.98), rgba(13, 25, 45, 0.98));
  border: 1px solid rgba(98, 145, 205, 0.42);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 150px;
  padding: 15px;
}

.challenge-podium-card.first {
  border-color: rgba(244, 181, 44, 0.78);
  min-height: 190px;
}

.challenge-podium-card.second {
  border-color: rgba(148, 163, 184, 0.68);
}

.challenge-podium-card.third {
  border-color: rgba(251, 146, 60, 0.62);
}

.challenge-podium-card > span {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  display: flex;
  font-size: 1rem;
  font-weight: 1000;
  height: 34px;
  justify-content: center;
  margin-bottom: auto;
  width: 34px;
}

.challenge-podium-card strong {
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.05;
}

.challenge-podium-card p {
  color: #9fb2cc;
  font-size: 0.78rem;
  font-weight: 900;
  margin: 5px 0 10px;
  text-transform: uppercase;
}

.challenge-podium-card em {
  color: #7dd3fc;
  font-size: 1.15rem;
  font-style: normal;
  font-weight: 1000;
}

.challenge-rules,
.challenge-settings-card {
  background: rgba(8, 17, 31, 0.86);
  border: 1px solid rgba(74, 114, 168, 0.36);
  border-radius: 16px;
  padding: 16px;
}

.challenge-rules h2,
.challenge-section-title h2,
.challenge-settings-card h2 {
  color: #ffffff;
  font-size: 1rem;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.challenge-rules ul {
  color: #b9c8dc;
  display: flex;
  flex-direction: column;
  font-size: 0.92rem;
  font-weight: 800;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.challenge-ranking {
  background: rgba(8, 17, 31, 0.86);
  border: 1px solid rgba(74, 114, 168, 0.36);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
}

.challenge-section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.challenge-section-title span {
  color: #91a6c3;
  font-size: 0.82rem;
  font-weight: 900;
}

.challenge-rank-row {
  align-items: center;
  background: rgba(17, 32, 54, 0.86);
  border: 1px solid rgba(71, 105, 153, 0.32);
  border-left: 5px solid #64748b;
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(160px, 1fr) 86px minmax(180px, 0.8fr) minmax(300px, 1.1fr);
  padding: 11px 12px;
}

.challenge-rank-row.good {
  border-left-color: #34d399;
}

.challenge-rank-row.risk {
  border-left-color: #fb7185;
}

.challenge-rank-place {
  align-items: center;
  background: rgba(96, 165, 250, 0.17);
  border: 1px solid rgba(96, 165, 250, 0.38);
  border-radius: 10px;
  color: #ffffff;
  display: flex;
  font-size: 1.2rem;
  font-weight: 1000;
  height: 42px;
  justify-content: center;
}

.challenge-rank-leader strong,
.challenge-rank-score strong {
  color: #ffffff;
  display: block;
  font-size: 1.1rem;
  line-height: 1.05;
}

.challenge-rank-leader span,
.challenge-rank-score span,
.challenge-rank-bars label {
  color: #93a8c5;
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-rank-score {
  text-align: center;
}

.challenge-rank-score strong {
  font-size: 1.65rem;
}

.challenge-mini-bar {
  background: rgba(77, 100, 135, 0.34);
  border-radius: 999px;
  height: 7px;
  margin: 4px 0 7px;
  overflow: hidden;
}

.challenge-mini-bar i {
  background: linear-gradient(90deg, #34d399, #a3e635);
  display: block;
  height: 100%;
}

.challenge-mini-bar.cyan i {
  background: linear-gradient(90deg, #38bdf8, #2dd4bf);
}

.challenge-rank-stats {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.challenge-rank-stats span {
  background: rgba(10, 22, 39, 0.8);
  border: 1px solid rgba(81, 116, 163, 0.3);
  border-radius: 8px;
  color: #a7b8cf;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 7px;
  text-align: center;
  text-transform: uppercase;
}

.challenge-rank-stats b {
  color: #ffffff;
  display: block;
  font-size: 1rem;
}

.challenge-settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
}

.challenge-settings-card.wide {
  grid-column: 1 / -1;
}

.challenge-settings-card p {
  color: #96a9c2;
  font-weight: 800;
  margin: 0 0 12px;
}

.challenge-setting-columns {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.challenge-setting-field,
.challenge-toggle,
.challenge-stage-setting {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.challenge-setting-field.full {
  margin-top: 12px;
}

.challenge-setting-field span,
.challenge-stage-setting span,
.challenge-toggle span {
  color: #c4d3e7;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.challenge-setting-field input,
.challenge-setting-field textarea,
.challenge-stage-setting input {
  background: rgba(12, 24, 42, 0.95);
  border: 1px solid rgba(84, 122, 171, 0.48);
  border-radius: 9px;
  color: #ffffff;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 10px;
}

.challenge-setting-field small {
  color: #8094af;
  font-size: 0.74rem;
  font-weight: 800;
}

.challenge-toggle {
  background: rgba(16, 34, 58, 0.82);
  border: 1px solid rgba(84, 122, 171, 0.36);
  border-radius: 10px;
  justify-content: center;
  min-height: 40px;
  padding: 8px 10px;
}

.challenge-toggle input {
  margin: 0;
}

.challenge-stage-settings {
  display: grid;
  gap: 9px;
}

.challenge-stage-setting {
  background: rgba(16, 32, 54, 0.78);
  border: 1px solid rgba(84, 122, 171, 0.28);
  border-radius: 10px;
  padding: 10px;
}

.challenge-empty {
  color: #93a8c5;
  font-weight: 900;
  padding: 18px;
  text-align: center;
}

.production-report-view {
  min-height: calc(100vh - 150px);
}

.production-report-shell {
  color: #edf5ff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.production-report-header {
  align-items: center;
  background: linear-gradient(135deg, rgba(17, 31, 54, 0.98), rgba(9, 18, 33, 0.96));
  border: 1px solid rgba(88, 130, 188, 0.36);
  border-radius: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 18px 20px;
}

.production-report-header span,
.production-report-filters span,
.production-report-summary span {
  color: #91b6e6;
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.production-report-header h1 {
  color: #ffffff;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
  margin: 6px 0;
}

.production-report-header p {
  color: #b7c7dd;
  font-weight: 800;
  margin: 0;
}

.production-report-actions {
  display: flex;
  gap: 10px;
}

.production-report-filters {
  align-items: end;
  background: rgba(10, 21, 38, 0.9);
  border: 1px solid rgba(74, 114, 168, 0.32);
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: 160px 160px minmax(240px, 1fr) auto auto;
  padding: 12px;
}

.production-report-filters label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.production-report-filters input {
  background: rgba(13, 27, 47, 0.96);
  border: 1px solid rgba(84, 122, 171, 0.48);
  border-radius: 10px;
  color: #ffffff;
  font-weight: 900;
  min-height: 42px;
  padding: 9px 11px;
}

.production-report-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.production-report-summary article {
  background: rgba(14, 27, 47, 0.94);
  border: 1px solid rgba(82, 123, 177, 0.32);
  border-radius: 14px;
  padding: 13px 14px;
}

.production-report-summary strong {
  color: #ffffff;
  display: block;
  font-size: 1.45rem;
  line-height: 1.05;
  margin-top: 5px;
}

.production-report-table-wrap {
  background: rgba(8, 17, 31, 0.86);
  border: 1px solid rgba(74, 114, 168, 0.36);
  border-radius: 16px;
  overflow: auto;
}

.production-report-table {
  border-collapse: collapse;
  min-width: 1120px;
  width: 100%;
}

.production-report-table th {
  background: rgba(15, 29, 51, 0.98);
  border-bottom: 1px solid rgba(127, 166, 224, 0.34);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1;
}

.production-report-table th button {
  background: transparent;
  border: 0;
  color: #dce8fb;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 1000;
  padding: 13px 12px;
  text-align: left;
  text-transform: uppercase;
  width: 100%;
}

.production-report-table td {
  border-bottom: 1px solid rgba(74, 114, 168, 0.18);
  color: #dbe7f8;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 11px 12px;
  vertical-align: middle;
}

.production-report-table tbody tr:nth-child(odd) td {
  background: rgba(15, 29, 51, 0.62);
}

.production-report-table tbody tr:hover td {
  background: rgba(38, 80, 132, 0.36);
}

.production-report-code,
.production-report-duration,
.production-report-late {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 1000;
  padding: 5px 9px;
}

.production-report-code,
.production-report-duration {
  background: rgba(96, 165, 250, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.36);
  color: #dbeafe;
}

.production-report-late.ok {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.42);
  color: #bbf7d0;
}

.production-report-late.late {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.46);
  color: #fecaca;
}

.production-report-late.missing-plan {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.36);
  color: #cbd5e1;
}

.production-report-empty {
  color: #93a8c5;
  font-weight: 900;
  padding: 22px !important;
  text-align: center;
}

@media (max-width: 1100px) {
  .challenge-hero,
  .challenge-settings-header,
  .challenge-layout,
  .challenge-settings-grid {
    grid-template-columns: 1fr;
  }

  .challenge-kpi-grid,
  .challenge-setting-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-report-header,
  .production-report-filters {
    grid-template-columns: 1fr;
  }

  .production-report-actions {
    flex-wrap: wrap;
  }

  .challenge-rank-row {
    grid-template-columns: 42px minmax(0, 1fr) 78px;
  }

  .challenge-rank-bars,
  .challenge-rank-stats {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .challenge-kpi-grid,
  .challenge-podium,
  .challenge-setting-columns,
  .challenge-rank-stats,
  .production-report-summary {
    grid-template-columns: 1fr;
  }

  .challenge-hero,
  .challenge-settings-header,
  .challenge-ranking,
  .challenge-rules,
  .challenge-settings-card {
    border-radius: 12px;
    padding: 12px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(76, 163, 255, 0.18), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(97, 215, 192, 0.1), transparent 18%),
    radial-gradient(circle at bottom right, rgba(110, 105, 255, 0.1), transparent 24%),
    linear-gradient(180deg, #050d18 0%, #091423 46%, #07101c 100%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black 44%, transparent 95%);
  opacity: 0.2;
}

body.tv-mode {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(76, 163, 255, 0.12), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(83, 224, 210, 0.08), transparent 22%),
    linear-gradient(180deg, #050d18 0%, #07101c 100%);
}

body.tv-mode::before {
  opacity: 0.12;
}

.page {
  width: min(1880px, calc(100vw - 16px));
  margin: 8px auto;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(150, 184, 235, 0.14);
  background:
    linear-gradient(180deg, rgba(15, 26, 47, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(8, 16, 30, 0.96), rgba(7, 14, 25, 0.98));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

body.tv-mode .page {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.tv-mode .page::before {
  display: none;
}

body.standalone-dashboard .page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body.standalone-dashboard .stat-dashboard-view {
  max-height: none;
  min-height: calc(100vh - 24px);
  min-height: calc(100dvh - 24px);
  overflow: visible;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 0%, rgba(92, 158, 255, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 16%);
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 10px;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 70%),
    var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.toolbar-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.menu-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.menu-topics {
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.menu-header-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.app-brand {
  display: flex;
  align-items: center;
  width: 156px;
  height: 38px;
  padding: 5px 12px 5px 2px;
  margin-right: 2px;
  border-right: 1px solid rgba(136, 167, 214, 0.18);
}

.app-brand img {
  display: block;
  width: 100%;
  max-height: 30px;
  object-fit: contain;
  object-position: left center;
}

.menu-topic-btn,
.menu-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(120, 152, 205, 0.22);
  background: linear-gradient(180deg, rgba(16, 28, 50, 0.9), rgba(11, 21, 39, 0.86));
  color: #dce9ff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: none;
}

.menu-topic-btn.active,
.menu-btn.active {
  border-color: rgba(92, 173, 255, 0.66);
  background: linear-gradient(180deg, rgba(40, 85, 150, 0.94), rgba(28, 62, 117, 0.92));
  color: #ffffff;
}

.menu-topic-btn[data-menu-topic="admin"] {
  border-color: rgba(255, 105, 105, 0.42);
  background: linear-gradient(180deg, rgba(95, 28, 40, 0.94), rgba(53, 16, 26, 0.9));
  color: #ffdede;
}

.menu-topic-btn[data-menu-topic="admin"].active {
  border-color: rgba(255, 142, 142, 0.82);
  background: linear-gradient(180deg, rgba(219, 55, 73, 0.98), rgba(132, 27, 45, 0.96));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(185, 28, 50, 0.26);
}

.changelog-open-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(92, 173, 255, 0.46);
  background:
    linear-gradient(180deg, rgba(64, 144, 244, 0.92), rgba(34, 91, 168, 0.92));
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 22px rgba(26, 105, 207, 0.24);
}

.changelog-open-btn:hover {
  border-color: rgba(145, 205, 255, 0.82);
  filter: brightness(1.05);
}

.menu-submenu-row {
  min-height: 42px;
}

.menu-submenu {
  display: none;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.menu-submenu.active {
  display: flex;
}

.menu-divider {
  width: 1px;
  height: 26px;
  background: rgba(136, 167, 214, 0.24);
}

.gantt-theme-control {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(120, 152, 205, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 70%),
    rgba(11, 22, 42, 0.82);
}

body.gantt-mode .gantt-theme-control {
  display: inline-flex;
}

.gantt-theme-control span {
  color: #9fb5d8;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gantt-theme-control select {
  min-height: 28px;
  min-width: 112px;
  padding: 0 30px 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(92, 173, 255, 0.4);
  background: rgba(8, 17, 32, 0.9);
  color: #f5f9ff;
  font-size: 0.78rem;
  font-weight: 900;
}

.menu-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.toolbar span,
.field-label,
label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

button,
input,
select {
  font: inherit;
  color: var(--text);
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 31, 54, 0.95), rgba(13, 24, 43, 0.94));
  padding: 0 14px;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

input,
select {
  width: 100%;
}

select option {
  color: #0b1424;
  background: #ffffff;
}

select option:checked {
  color: #ffffff;
  background: #2e7cf0;
}

input:focus,
select:focus,
button:focus {
  outline: none;
  border-color: rgba(62, 160, 255, 0.64);
  background: linear-gradient(180deg, rgba(21, 36, 64, 0.98), rgba(14, 26, 47, 0.98));
  box-shadow: 0 0 0 3px rgba(62, 160, 255, 0.1), 0 12px 24px rgba(7, 16, 30, 0.24);
}

button {
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

button:hover {
  transform: translateY(-1px);
}

.primary-btn {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, #5aaeff, #2e7cf0);
  box-shadow: 0 14px 26px rgba(39, 118, 230, 0.28);
}

.ghost-btn {
  background: linear-gradient(180deg, rgba(22, 36, 61, 0.84), rgba(12, 23, 42, 0.78));
}

.danger-btn {
  color: #ffdede;
  border-color: rgba(255, 107, 107, 0.28);
  background: linear-gradient(180deg, rgba(118, 38, 48, 0.34), rgba(77, 22, 29, 0.2));
}

.board {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 12%),
    linear-gradient(180deg, rgba(8, 15, 27, 0.96), rgba(11, 19, 34, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.table-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 640px;
  padding: 16px;
}

body.standalone-sales .table-view {
  max-height: calc(100vh - 24px);
  min-height: calc(100vh - 24px);
  padding: 16px;
}

.sales-view-header {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 1120px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(134, 164, 214, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 80%),
    rgba(14, 26, 48, 0.82);
}

.sales-refresh-btn {
  margin-left: auto;
  min-height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.sales-view-brand {
  display: flex;
  align-items: center;
  width: 178px;
  min-height: 42px;
  padding-right: 18px;
  border-right: 1px solid rgba(136, 167, 214, 0.2);
}

.sales-view-brand img {
  display: block;
  width: 100%;
  max-height: 36px;
  object-fit: contain;
  object-position: left center;
}

.sales-view-header p {
  margin: 0 0 5px;
  color: #9db1d3;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sales-view-header h1 {
  margin: 0;
  color: #f4f8ff;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.08;
}

.stage-plan-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 640px;
  position: relative;
}

.tv-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 760px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(70, 120, 220, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(20, 190, 160, 0.07), transparent 26%),
    linear-gradient(180deg, rgba(8, 15, 27, 0.985), rgba(10, 18, 34, 0.995));
}

body.tv-mode .tv-view {
  min-height: 100vh;
  max-height: 100vh;
  padding: clamp(10px, 1.1vw, 20px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(70, 120, 220, 0.1), transparent 30%),
    radial-gradient(circle at bottom right, rgba(20, 190, 160, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(5, 11, 21, 0.995), rgba(7, 14, 27, 1));
}

.database-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 720px;
}

.problems-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 640px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 20%),
    linear-gradient(180deg, rgba(7, 13, 25, 0.98), rgba(8, 15, 27, 0.995));
}

.stat-dashboard-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 720px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 22%),
    linear-gradient(135deg, rgba(8, 18, 34, 0.99), rgba(5, 12, 24, 0.995));
}

.components-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 640px;
  padding: 0;
}

.application-settings-view {
  display: none;
  overflow: auto;
  max-height: calc(100vh - 120px);
  min-height: 640px;
  padding: 12px;
}

.table-view.active,
.stage-plan-view.active,
.tv-view.active,
.problems-view.active,
.stat-dashboard-view.active,
.components-view.active,
.application-settings-view.active,
.database-view.active,
.board.active {
  display: block;
}

.board.hidden,
.table-view.hidden,
.stage-plan-view.hidden,
.tv-view.hidden,
.problems-view.hidden,
.stat-dashboard-view.hidden,
.components-view.hidden,
.application-settings-view.hidden,
.database-view.hidden {
  display: none;
}

.application-settings-shell {
  min-height: calc(100vh - 170px);
}

.application-settings-layout {
  display: grid;
  grid-template-columns: minmax(120px, 10%) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.application-settings-sidebar,
.application-settings-panel,
.application-settings-card {
  border: 1px solid rgba(118, 151, 207, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(8, 17, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.application-settings-sidebar {
  min-height: 360px;
  padding: 10px;
  border-radius: 18px;
}

.application-settings-nav {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  border-radius: 12px;
  background: rgba(20, 38, 66, 0.78);
  color: #e9f3ff;
  font-weight: 900;
  text-align: left;
  cursor: default;
}

.application-settings-nav.active {
  border-color: rgba(82, 152, 255, 0.68);
  background: linear-gradient(180deg, rgba(58, 140, 244, 0.46), rgba(24, 64, 122, 0.62));
}

.application-settings-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
}

.application-settings-head,
.application-settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.application-settings-head span,
.application-settings-card-head p,
.app-setting-slot-name span,
.app-setting-inline-label span,
.app-setting-checkbox span {
  color: #97accf;
  font-weight: 850;
}

.application-settings-head span,
.app-setting-inline-label span,
.app-setting-checkbox span {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.application-settings-head h1,
.application-settings-card-head h2 {
  margin: 0;
  color: #f6fbff;
  letter-spacing: 0;
}

.application-settings-head h1 {
  font-size: 1.7rem;
}

.application-settings-head p,
.application-settings-card-head p {
  margin: 4px 0 0;
  color: #97accf;
  font-size: 0.88rem;
  font-weight: 850;
}

.app-settings-message {
  padding: 11px 13px;
  border: 1px solid rgba(54, 214, 134, 0.32);
  border-radius: 14px;
  background: rgba(22, 121, 75, 0.18);
  color: #9cf3bf;
  font-weight: 900;
}

.application-settings-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
}

.app-setting-slot-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1.3fr) minmax(130px, 0.6fr) minmax(160px, 0.8fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(102, 135, 190, 0.16);
  border-radius: 16px;
  background: rgba(10, 21, 39, 0.72);
}

.app-setting-slot-name strong {
  display: block;
  color: #f5f9ff;
  font-size: 0.92rem;
  font-weight: 950;
}

.app-setting-slot-name span {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.app-setting-inline-label {
  display: grid;
  gap: 7px;
}

.app-setting-inline-label input,
.app-setting-inline-label select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  border-radius: 12px;
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  color-scheme: dark;
  font: inherit;
  font-weight: 850;
}

.app-setting-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid rgba(91, 132, 196, 0.24);
  border-radius: 12px;
  background: rgba(16, 31, 55, 0.74);
}

.app-setting-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #4aa3ff;
}

.app-setting-options-list {
  display: grid;
  gap: 8px;
}

.app-setting-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(102, 135, 190, 0.18);
  border-radius: 14px;
  background: rgba(10, 21, 39, 0.7);
}

.app-setting-option-row strong {
  min-width: 0;
  overflow: hidden;
  color: #edf5ff;
  font-size: 0.88rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-setting-empty {
  padding: 12px;
  border: 1px dashed rgba(118, 151, 207, 0.24);
  border-radius: 14px;
  color: #9fb0d0;
  font-weight: 850;
}

.app-setting-add-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.app-setting-add-option input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  border-radius: 12px;
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  color-scheme: dark;
  font: inherit;
  font-weight: 850;
}

.app-setting-add-option input:focus {
  border-color: rgba(83, 171, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.14);
  outline: 0;
}

.simulation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(91, 141, 210, 0.28);
  background:
    linear-gradient(90deg, rgba(38, 103, 179, 0.22), rgba(12, 24, 46, 0.92)),
    rgba(11, 22, 40, 0.96);
}

.simulation-banner.hidden {
  display: none;
}

.simulation-banner-copy {
  min-width: 0;
}

.simulation-banner-copy span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 6px;
  padding: 0 10px;
  border: 1px solid rgba(98, 180, 255, 0.58);
  border-radius: 999px;
  background: rgba(37, 99, 176, 0.26);
  color: #bfe1ff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.simulation-banner-copy h2 {
  margin: 0 0 4px;
  color: #f4f8ff;
  font-size: 1.05rem;
}

.simulation-banner-copy p {
  margin: 0;
  color: #a9bad8;
  font-size: 0.82rem;
}

.simulation-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.simulation-mode .board-layout {
  height: calc(100vh - 218px);
  min-height: 560px;
}

.simulation-copy-card {
  max-width: min(760px, calc(100vw - 48px));
}

.simulation-copy-select-all {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid rgba(116, 154, 211, 0.24);
  border-radius: 12px;
  background: rgba(15, 29, 52, 0.62);
  color: #e5efff;
  font-size: 0.9rem;
}

.simulation-copy-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.simulation-copy-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(116, 154, 211, 0.2);
  border-radius: 12px;
  background: rgba(9, 18, 34, 0.72);
}

.simulation-copy-row strong,
.simulation-copy-row small {
  display: block;
}

.simulation-copy-row strong {
  color: #f2f7ff;
  font-size: 0.95rem;
}

.simulation-copy-row small {
  margin-top: 4px;
  color: #9fb0d0;
  font-size: 0.78rem;
  font-weight: 800;
}

.simulation-copy-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.project-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid rgba(125, 160, 216, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(22, 38, 64, 0.9), rgba(8, 15, 28, 0.98)),
    rgba(8, 15, 28, 0.98);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.project-table-col-project { width: 250px; }
.project-table-col-status { width: 158px; }
.project-table-col-stage { width: 150px; }
.project-table-col-progress { width: 210px; }
.project-table-col-date { width: 116px; }
.project-table-col-delivery { width: 148px; }
.project-table-col-batch { width: 132px; }
.project-table-col-note { width: 142px; }
.project-table-col-action { width: 82px; }

.project-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(24, 39, 65, 0.98), rgba(11, 20, 37, 0.98));
  color: #dbe7ff;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line-strong);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.025);
}

.table-sort-mark {
  display: inline-block;
  margin-left: 4px;
  color: #8091b5;
  font-size: 0.72rem;
  font-weight: 900;
}

.project-table-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-align: left;
  cursor: pointer;
}

.project-table-sort-btn:hover,
.project-table-sort-btn.active {
  color: #ffffff;
}

.project-table-sort-btn:hover .table-sort-mark {
  color: #a9d5ff;
}

.project-table-sort-btn.active .table-sort-mark {
  color: #6bbcff;
}

.project-table tbody td {
  height: 60px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(99, 130, 180, 0.15);
  background: rgba(9, 17, 31, 0.72);
  color: #edf5ff;
  font-size: 0.9rem;
  vertical-align: middle;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.project-table tbody tr:nth-child(even) td {
  background: rgba(13, 24, 42, 0.64);
}

.project-table tbody tr:hover td {
  background: rgba(25, 46, 78, 0.86);
  border-bottom-color: rgba(116, 160, 230, 0.28);
}

.project-table tbody tr:last-child td {
  border-bottom: 0;
}

.project-table-name {
  box-shadow: inset 4px 0 0 rgba(128, 145, 181, 0.2);
}

.project-table-row.status-before .project-table-name {
  box-shadow: inset 4px 0 0 rgba(133, 155, 190, 0.44);
}

.project-table-row.status-active .project-table-name {
  box-shadow: inset 4px 0 0 rgba(78, 205, 196, 0.74);
}

.project-table-row.status-ready .project-table-name {
  box-shadow: inset 4px 0 0 rgba(55, 211, 122, 0.72);
}

.project-table-name strong,
.project-table-name span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-table-name strong {
  color: #f7fbff;
  font-size: 0.98rem;
  font-weight: 900;
}

.project-table-name span {
  margin-top: 4px;
  color: #91a6c8;
  font-size: 0.74rem;
  font-weight: 800;
}

.project-stage-pill,
.project-date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 0 10px;
  border: 1px solid rgba(134, 164, 214, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(12, 23, 42, 0.78);
  color: #dce8fb;
  font-size: 0.78rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-date-chip {
  justify-content: center;
  min-width: 92px;
  color: #f1f6ff;
  font-variant-numeric: tabular-nums;
}

.project-table-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.project-table-progress-head strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.project-table-progress-head span {
  color: #9fb0d0;
  font-size: 0.7rem;
  font-weight: 800;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-progress-track {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(64, 82, 112, 0.34);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.26);
}

.project-progress-track span {
  display: block;
  width: var(--project-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4aa3ff, #53e0d2);
  box-shadow: 0 0 16px rgba(83, 224, 210, 0.22);
}

.project-table-row.status-before .project-progress-track span {
  background: linear-gradient(90deg, #7285a8, #9fb0d0);
  box-shadow: none;
}

.project-table-row.status-ready .project-progress-track span {
  background: linear-gradient(90deg, #37d37a, #8df0b1);
  box-shadow: 0 0 16px rgba(55, 211, 122, 0.24);
}

.project-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(128, 145, 181, 0.42);
  border-radius: 999px;
  background: rgba(128, 145, 181, 0.13);
  color: #d9e6ff;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.project-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.project-status-pill.before {
  border-color: rgba(133, 155, 190, 0.46);
  background: rgba(105, 126, 160, 0.15);
  color: #c8d6ef;
}

.project-status-pill.active {
  border-color: rgba(78, 205, 196, 0.48);
  background: rgba(78, 205, 196, 0.14);
  color: #8df0e8;
}

.project-status-pill.ready {
  border-color: rgba(55, 211, 122, 0.55);
  background: rgba(55, 211, 122, 0.16);
  color: #90f4b6;
}

.project-table input,
.project-table select {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(112, 145, 204, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(12, 24, 44, 0.9);
  color: #f5f9ff;
  color-scheme: dark;
  font-size: 0.8rem;
  font-weight: 850;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.project-table input:focus,
.project-table select:focus {
  border-color: rgba(83, 171, 255, 0.72);
  background: rgba(15, 31, 56, 0.96);
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.14);
  outline: 0;
}

.project-table-date {
  min-width: 126px;
}

.project-table-batch-select {
  min-width: 108px;
}

.project-table-note-input {
  min-width: 120px;
}

.project-table-date-cell {
  display: flex;
  align-items: center;
}

.project-note-col {
  width: 142px;
}

.sales-settlement-col,
.sales-settlement-cell {
  display: none;
}

body.sales-table-mode .sales-settlement-col,
body.sales-table-mode .sales-settlement-cell,
body.standalone-sales .sales-settlement-col,
body.standalone-sales .sales-settlement-cell {
  display: table-cell;
}

body.sales-table-mode .project-table,
body.standalone-sales .project-table {
  min-width: 1600px;
}

body.sales-table-mode .project-table .sales-settlement-col,
body.standalone-sales .project-table .sales-settlement-col {
  width: 82px;
}

.settlement-btn {
  width: 72px;
  min-width: 72px;
  min-height: 32px;
  padding: 0 8px;
  justify-content: center;
  font-size: 0.68rem;
  white-space: nowrap;
}

.sales-settlement-cell {
  text-align: center;
}

.project-table-status-cell,
.project-table-stage-cell,
.project-table-date-static,
.project-table-delivery-cell,
.project-note-cell,
.sales-settlement-cell {
  overflow: hidden;
}

.manager-view {
  padding: 18px;
}

.manager-shell {
  display: grid;
  gap: 16px;
  min-width: 1180px;
}

.manager-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(116, 151, 206, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(29, 53, 88, 0.88), rgba(11, 23, 42, 0.92)),
    rgba(9, 17, 31, 0.94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.manager-page-head span {
  display: block;
  margin-bottom: 5px;
  color: #94c7ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.manager-page-head h1 {
  margin: 0;
  color: #f8fbff;
  font-size: 1.64rem;
  letter-spacing: 0;
}

.manager-page-head p {
  margin: 4px 0 0;
  color: #9fb4d4;
  font-size: 0.88rem;
  font-weight: 750;
}

.manager-filter-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(116, 151, 206, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 31, 55, 0.88), rgba(8, 16, 29, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.manager-filter-bar label {
  display: grid;
  gap: 7px;
  width: min(480px, 100%);
}

.manager-filter-bar label span {
  color: #9fb4d4;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.manager-filter-bar input {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(116, 151, 206, 0.26);
  border-radius: 14px;
  background: rgba(9, 17, 31, 0.82);
  color: #f8fbff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 850;
  outline: none;
  padding: 0 14px;
}

.manager-filter-bar input::placeholder {
  color: rgba(159, 180, 212, 0.62);
}

.manager-filter-bar input:focus {
  border-color: rgba(86, 174, 255, 0.75);
  box-shadow: 0 0 0 3px rgba(86, 174, 255, 0.16);
}

.manager-filter-bar strong {
  min-width: 150px;
  padding: 11px 13px;
  border: 1px solid rgba(86, 174, 255, 0.24);
  border-radius: 999px;
  background: rgba(17, 36, 65, 0.82);
  color: #dceaff;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.manager-table-card {
  overflow-x: auto;
  border-radius: 20px;
}

.manager-table .manager-project-row {
  cursor: pointer;
}

.manager-table .project-date-chip.delivery {
  border-color: rgba(86, 174, 255, 0.28);
  color: #dff0ff;
}

.manager-empty {
  padding: 18px;
  color: #9fb4d4;
  font-weight: 850;
  text-align: center;
}

.manager-empty.large {
  min-height: 180px;
  display: grid;
  place-items: center;
}

.manager-empty.small {
  min-height: 72px;
}

.manager-empty.error {
  color: #ff9aa6;
}

.manager-project-card {
  width: min(1540px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-color: rgba(106, 155, 229, 0.34);
  background:
    radial-gradient(circle at 0 0, rgba(69, 156, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(17, 31, 54, 0.98), rgba(7, 13, 25, 0.99));
}

.manager-project-card .modal-top {
  padding-bottom: 14px;
}

#manager-project-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.archive-view {
  padding: 18px;
}

.archive-shell {
  display: grid;
  gap: 16px;
  min-width: 1180px;
}

.archive-row {
  cursor: pointer;
}

.archive-row:hover .project-stage-pill {
  border-color: rgba(86, 174, 255, 0.42);
  color: #ffffff;
}

.archive-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.archive-modal-actions .primary-btn {
  min-height: 40px;
}

.settlement-card,
.archive-project-card {
  width: min(1460px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-color: rgba(106, 155, 229, 0.34);
  background:
    radial-gradient(circle at 0 0, rgba(69, 156, 255, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(17, 31, 54, 0.98), rgba(7, 13, 25, 0.99));
}

#settlement-content,
#archive-project-content {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.settlement-section {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(116, 151, 206, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(7, 15, 28, 0.62);
}

.settlement-section-head h3 {
  margin: 0;
  color: #f5f9ff;
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settlement-section-head p {
  margin: 4px 0 0;
  color: #9fb4d4;
  font-size: 0.82rem;
  font-weight: 800;
}

.settlement-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settlement-field {
  display: grid;
  gap: 7px;
}

.settlement-field.wide {
  grid-column: span 2;
}

.settlement-field span {
  color: #94a9cc;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.settlement-field input,
.settlement-field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(116, 151, 206, 0.24);
  border-radius: 13px;
  background: rgba(9, 17, 31, 0.82);
  color: #f7fbff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 820;
  outline: none;
  padding: 10px 12px;
}

.settlement-field textarea {
  resize: vertical;
  line-height: 1.4;
}

.settlement-field input:focus,
.settlement-field textarea:focus {
  border-color: rgba(86, 174, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(86, 174, 255, 0.14);
}

.settlement-field input[readonly] {
  color: #9fb4d4;
  background: rgba(22, 34, 52, 0.72);
}

.settlement-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settlement-toggle {
  min-height: 40px;
  padding-inline: 14px;
}

.settlement-toggle.active {
  border-color: rgba(83, 224, 210, 0.64);
  background:
    linear-gradient(135deg, rgba(83, 224, 210, 0.24), rgba(74, 163, 255, 0.18)),
    rgba(11, 25, 45, 0.92);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(83, 224, 210, 0.1);
}

.settlement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
}

.archive-project-body {
  padding-bottom: 4px;
}

.archive-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.archive-summary-grid .manager-info-field {
  min-height: 82px;
  border-color: rgba(83, 224, 210, 0.18);
  background:
    linear-gradient(180deg, rgba(83, 224, 210, 0.07), transparent),
    rgba(10, 20, 37, 0.74);
}

.archive-detail-section {
  border: 1px solid rgba(118, 151, 207, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(7, 15, 28, 0.62);
  overflow: hidden;
}

.archive-detail-section + .archive-detail-section {
  margin-top: 10px;
}

.archive-detail-section > summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.archive-detail-section > summary::-webkit-details-marker {
  display: none;
}

.archive-detail-section > summary strong {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
}

.archive-detail-section > summary span {
  color: #9fb4d4;
  font-size: 0.76rem;
  font-weight: 850;
}

.archive-detail-section[open] > summary {
  border-bottom: 1px solid rgba(118, 151, 207, 0.14);
  background: rgba(18, 33, 56, 0.45);
}

.archive-detail-section > .manager-info-grid,
.archive-detail-section > .manager-components-table-wrap,
.archive-detail-section > .stat-signal-list {
  margin: 12px;
}

@media (max-width: 980px) {
  .archive-shell {
    min-width: 0;
  }

  .settlement-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-summary-grid,
  .archive-project-body .manager-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settlement-field.wide {
    grid-column: 1 / -1;
  }
}

.manager-project-body {
  display: grid;
  gap: 14px;
}

.manager-project-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.5fr);
  gap: 12px;
  align-items: stretch;
}

.manager-project-name,
.manager-info-field,
.manager-stage-panel {
  border: 1px solid rgba(118, 151, 207, 0.19);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    rgba(10, 20, 37, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.manager-project-name {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
}

.manager-project-name span,
.manager-info-field span {
  color: #91a8cc;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.manager-project-name h3 {
  margin: 0;
  color: #ffffff;
  font-size: 1.42rem;
  letter-spacing: 0;
}

.manager-project-name p {
  margin: 0;
  color: #b9c9e3;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.manager-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.manager-project-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.manager-info-field {
  display: grid;
  gap: 5px;
  min-height: 70px;
  padding: 11px 12px;
  border-radius: 14px;
}

.manager-info-field strong {
  color: #f4f8ff;
  font-size: 0.9rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.manager-plan-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(118, 151, 207, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(7, 15, 28, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.028);
}

.manager-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.manager-plan-head h3 {
  margin: 0;
  color: #f4f8ff;
  font-size: 0.94rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manager-plan-head p {
  margin: 3px 0 0;
  color: #8fa5c8;
  font-size: 0.78rem;
  font-weight: 800;
}

.manager-plan-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 10px;
  max-width: 58%;
}

.manager-plan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9fb3d3;
  font-size: 0.66rem;
  font-weight: 850;
  white-space: nowrap;
}

.manager-plan-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--plan-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--plan-color) 34%, transparent);
}

.manager-plan-days {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.manager-plan-day {
  flex: 0 0 118px;
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(118, 151, 207, 0.16);
  border-radius: 13px;
  background: rgba(11, 22, 41, 0.76);
}

.manager-plan-day.selected {
  border-color: rgba(76, 163, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(76, 163, 255, 0.14), inset 0 0 0 1px rgba(76, 163, 255, 0.12);
}

.manager-plan-day.weekend {
  background:
    linear-gradient(180deg, rgba(255, 210, 99, 0.08), transparent),
    rgba(13, 23, 39, 0.78);
}

.manager-plan-day.saturday {
  border-color: rgba(190, 68, 78, 0.5);
  background:
    linear-gradient(180deg, rgba(185, 28, 28, 0.22), rgba(90, 23, 34, 0.08)),
    rgba(18, 18, 32, 0.82);
}

.manager-plan-day.sunday {
  border-color: rgba(190, 150, 35, 0.54);
  background:
    linear-gradient(180deg, rgba(128, 98, 18, 0.26), rgba(90, 70, 19, 0.08)),
    rgba(18, 21, 30, 0.82);
}

.manager-plan-day.saturday header strong {
  color: #ff9aa6;
}

.manager-plan-day.sunday header strong {
  color: #f3e7a5;
}

.manager-plan-day header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.manager-plan-day header span {
  color: #8da4c8;
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.manager-plan-day header strong {
  color: #eef5ff;
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.manager-plan-lane {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
}

.manager-plan-lane-label {
  color: #91a8cc;
  font-size: 0.62rem;
  font-weight: 950;
  text-align: center;
}

.manager-plan-shifts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.manager-plan-shift {
  min-width: 0;
  min-height: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px;
  align-items: center;
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, var(--plan-color) 58%, rgba(255, 255, 255, 0.12));
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--plan-color) 58%, rgba(255, 255, 255, 0.1)), color-mix(in srgb, var(--plan-color) 36%, rgba(5, 12, 23, 0.88)));
  color: #08111f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.manager-plan-shift.empty {
  border-color: rgba(118, 143, 178, 0.24);
  background: rgba(102, 122, 153, 0.28);
  color: #d3def0;
}

.manager-plan-shift em {
  color: inherit;
  font-size: 0.54rem;
  font-style: normal;
  font-weight: 950;
  opacity: 0.8;
  text-transform: uppercase;
}

.manager-plan-shift strong {
  overflow: hidden;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 1000;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-stage-list {
  display: grid;
  gap: 10px;
}

.manager-stage-panel {
  border-radius: 18px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--stage-accent) 42%, rgba(118, 151, 207, 0.19));
}

.manager-stage-panel.open {
  box-shadow:
    inset 4px 0 0 var(--stage-accent),
    0 16px 34px rgba(0, 0, 0, 0.18);
}

.manager-stage-toggle {
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(104px, auto));
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--stage-accent) 18%, transparent), transparent 56%),
    rgba(10, 20, 37, 0.8);
  color: #edf5ff;
  text-align: left;
  cursor: pointer;
}

.manager-stage-toggle:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--stage-accent) 26%, transparent), transparent 60%),
    rgba(16, 31, 55, 0.92);
}

.manager-stage-toggle > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.manager-stage-toggle strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.02em;
}

.manager-stage-toggle small {
  color: #aabbd7;
  font-size: 0.8rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-stage-stats {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-width: 108px;
  padding: 8px 10px;
  border: 1px solid rgba(67, 206, 162, 0.28);
  border-radius: 12px;
  background: rgba(18, 109, 96, 0.18);
}

.manager-stage-stats.progress {
  border-color: rgba(82, 168, 255, 0.36);
  background: rgba(38, 105, 184, 0.2);
}

.manager-stage-stats.problem {
  border-color: rgba(255, 101, 120, 0.34);
  background: rgba(142, 37, 58, 0.2);
}

.manager-stage-stats b {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.manager-stage-stats small {
  color: #a9bada;
  font-size: 0.63rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manager-stage-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.manager-stage-days {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 8px 2px;
  overflow-x: auto;
}

.manager-stage-days.empty {
  color: #8097bd;
  font-size: 0.8rem;
  font-weight: 850;
}

.manager-day-dot {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.manager-day-dot .tablet-stage-day-content strong {
  font-size: 0.61rem;
}

.manager-day-dot .tablet-stage-day-content small {
  font-size: 0.5rem;
}

.manager-components-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(120, 153, 208, 0.16);
  border-radius: 14px;
  background: rgba(5, 12, 23, 0.28);
}

.manager-components-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.manager-components-table th,
.manager-components-table td {
  text-align: left;
  border-bottom: 1px solid rgba(114, 147, 201, 0.14);
}

.manager-components-table th {
  padding: 10px 12px;
  background: rgba(12, 24, 43, 0.92);
  color: #dbe8ff;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.manager-components-table td {
  padding: 9px 12px;
  color: #edf5ff;
  font-size: 0.86rem;
  vertical-align: middle;
}

.manager-components-table tr:last-child td {
  border-bottom: 0;
}

.manager-component-row.status-problem td {
  background: rgba(71, 15, 31, 0.28);
}

.manager-component-row.status-installed td {
  background: rgba(12, 64, 49, 0.2);
}

.manager-component-row.status-in_progress td {
  background: rgba(21, 73, 117, 0.22);
}

.manager-component-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.manager-component-name strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 950;
}

.manager-warehouse-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: #36df92;
  box-shadow:
    0 0 0 3px rgba(54, 223, 146, 0.16),
    0 0 14px rgba(54, 223, 146, 0.46);
}

.manager-component-name span,
.manager-component-name small {
  color: #9fb2d2;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.manager-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(132, 160, 207, 0.28);
  background: rgba(119, 139, 171, 0.12);
  color: #cddaf0;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.manager-status-pill.in_progress {
  border-color: rgba(82, 168, 255, 0.42);
  background: rgba(50, 126, 208, 0.18);
  color: #9fd0ff;
}

.manager-status-pill.installed {
  border-color: rgba(64, 215, 156, 0.42);
  background: rgba(34, 135, 104, 0.2);
  color: #8cf0c3;
}

.manager-status-pill.problem {
  border-color: rgba(255, 105, 124, 0.45);
  background: rgba(154, 43, 64, 0.23);
  color: #ffa4b0;
}

.manager-timing {
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.manager-timing strong {
  color: #eaf3ff;
  font-size: 0.82rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.manager-timing span {
  color: #8fa3c3;
  font-size: 0.7rem;
  font-weight: 800;
}

.manager-timing.active strong {
  color: #91d3ff;
}

.manager-timing.done strong {
  color: #96f2c5;
}

.manager-timing.problem strong {
  color: #ff9dac;
}

.manager-component-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 6px;
  min-width: 300px;
}

.manager-component-actions .tablet-status-btn {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.62rem;
}

.manager-problem-modal {
  z-index: 110;
}

@media (max-width: 1100px) {
  .manager-shell {
    min-width: 0;
  }

  .manager-project-overview {
    grid-template-columns: 1fr;
  }

  .manager-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-plan-head {
    display: grid;
  }

  .manager-plan-legend {
    justify-content: flex-start;
    max-width: none;
  }

  .changelog-item {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}

.table-actions {
  width: 56px;
  text-align: center;
}

.stage-plan-shell {
  min-width: 980px;
}

.tv-shell {
  min-width: 1280px;
  display: grid;
  gap: 12px;
}

body.tv-mode .tv-shell {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - clamp(14px, 1.5vw, 28px));
  display: flex;
  flex-direction: column;
}

.tv-command-center {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(360px, 0.9fr) minmax(360px, 0.86fr) minmax(420px, 1.1fr);
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(138, 165, 210, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 72%),
    rgba(10, 20, 37, 0.96);
  box-shadow: var(--shadow-soft);
}

.tv-command-copy {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 8px;
}

.tv-command-logo {
  display: block;
  width: clamp(138px, 9.6vw, 190px);
  height: auto;
  margin: 0 0 12px;
  object-fit: contain;
  opacity: 0.96;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.28));
}

body.tv-mode .tv-command-center {
  grid-template-columns: minmax(238px, 0.7fr) minmax(350px, 0.88fr) minmax(340px, 0.84fr) minmax(430px, 1.08fr);
  gap: 8px;
  padding: 7px;
  border-radius: 16px;
}

body.tv-mode .tv-command-copy {
  align-content: center;
  gap: 1px;
  padding: 2px 8px;
}

body.tv-mode .tv-command-logo {
  width: clamp(116px, 7.4vw, 152px);
  margin-bottom: 5px;
}

body.tv-mode .tv-command-copy span {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

body.tv-mode .tv-command-copy h1 {
  font-size: clamp(1.32rem, 1.65vw, 1.82rem);
  line-height: 1.02;
}

body.tv-mode .tv-command-copy p {
  font-size: 0.72rem;
}

.tv-command-copy span {
  color: #8fa8ce;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tv-command-copy h1 {
  margin: 0;
  color: #f3f8ff;
  font-size: 1.85rem;
  letter-spacing: 0;
}

.tv-command-copy p {
  margin: 0;
  color: #b8c8e5;
  font-size: 0.92rem;
  font-weight: 800;
}

.tv-command-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: center;
  gap: 6px;
}

.tv-metric {
  display: grid;
  align-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 58px;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(138, 165, 210, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 70%),
    rgba(15, 28, 50, 0.78);
}

body.tv-mode .tv-command-metrics {
  gap: 6px;
}

body.tv-mode .tv-metric {
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 10px;
}

body.tv-mode .tv-metric span {
  font-size: 0.58rem;
}

body.tv-mode .tv-metric strong {
  font-size: 1.35rem;
}

.tv-metric span {
  color: #afc3e4;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-metric strong {
  color: #f4f9ff;
  font-size: 1.58rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tv-metric.progress {
  border-color: rgba(96, 184, 255, 0.34);
}

.tv-metric.installed {
  border-color: rgba(52, 211, 153, 0.34);
}

.tv-metric.problem {
  border-color: rgba(255, 107, 107, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 95, 112, 0.12), transparent 72%),
    rgba(45, 18, 27, 0.78);
}

.tv-date-controls {
  display: grid;
  gap: 8px;
  min-width: 230px;
}

.tv-controls-stack {
  display: grid;
  gap: 6px;
  min-width: 230px;
  align-content: center;
}

.tv-clock-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  align-content: center;
  gap: 16px;
  min-width: 0;
  min-height: 76px;
  padding: 10px 14px;
  border: 1px solid rgba(103, 180, 255, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(74, 163, 255, 0.13), rgba(83, 224, 210, 0.055)),
    rgba(9, 18, 34, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.tv-clock-details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tv-clock-kicker,
.tv-clock-panel p {
  color: #8fa8ce;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.tv-clock-panel strong {
  justify-self: end;
  color: #f7fbff;
  font-size: clamp(3rem, 4.8vw, 5.15rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(83, 224, 210, 0.18);
}

.tv-clock-panel em {
  color: #e2edff;
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 900;
}

.tv-clock-panel p {
  margin: 5px 0 0;
}

.tv-nameday-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tv-nameday-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(107, 194, 255, 0.52);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(90, 171, 255, 0.54), rgba(83, 224, 210, 0.24)),
    rgba(12, 24, 44, 0.95);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 950;
  box-shadow: 0 6px 16px rgba(34, 121, 202, 0.2);
}

body.tv-mode .tv-controls-stack {
  grid-template-columns: minmax(74px, 0.42fr) minmax(180px, 1fr) minmax(124px, 0.68fr);
  align-items: end;
  gap: 6px;
}

body.standalone-tv .tv-controls-stack {
  grid-template-columns: minmax(190px, 1fr) minmax(124px, 0.68fr);
}

body.tv-mode .tv-clock-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 2px;
  align-content: center;
  min-height: 72px;
  padding: 7px 12px;
  border-radius: 12px;
}

body.tv-mode .tv-clock-kicker,
body.tv-mode .tv-clock-panel p {
  font-size: 0.5rem;
}

body.tv-mode .tv-clock-panel strong {
  align-self: center;
  justify-self: end;
  font-size: clamp(3.15rem, 4.25vw, 4.85rem);
}

body.tv-mode .tv-clock-panel em {
  font-size: 0.72rem;
}

body.tv-mode .tv-nameday-list {
  gap: 4px;
}

body.tv-mode .tv-nameday-list span {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.58rem;
}

.tv-back-btn {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  border-color: rgba(107, 194, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(92, 177, 255, 0.95), rgba(57, 126, 241, 0.92));
  color: #06111f;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 14px 28px rgba(61, 150, 255, 0.26);
}

body.tv-mode .tv-back-btn {
  min-height: 32px;
  border-radius: 10px;
  font-size: 0.66rem;
}

.tv-back-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 239, 255, 0.78);
}

.tv-date-controls label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb4d4;
}

body.tv-mode .tv-date-controls {
  gap: 4px;
  min-width: 0;
}

body.tv-mode .tv-date-controls label {
  font-size: 0.58rem;
}

.tv-date-nav {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

body.tv-mode .tv-date-nav {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 5px;
}

body.tv-mode .tv-date-nav input {
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.74rem;
  border-radius: 10px;
}

.tv-nav-btn {
  min-height: 42px;
  padding: 0;
  font-size: 1.1rem;
  border-radius: 14px;
}

body.tv-mode .tv-nav-btn {
  min-height: 32px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.tv-shift-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.tv-mode .tv-shift-switch {
  gap: 5px;
}

.tv-shift-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.tv-mode .tv-shift-btn {
  min-height: 32px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.tv-shift-btn.active {
  color: #08111e;
  border-color: transparent;
  background: linear-gradient(135deg, #6bc2ff, #53e0d2);
  box-shadow: 0 14px 24px rgba(69, 191, 220, 0.24);
}

.tv-status-line {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(138, 165, 210, 0.16);
  background: rgba(14, 26, 46, 0.92);
  color: #bdd0ef;
  font-size: 0.86rem;
  font-weight: 800;
}

.tv-status-line.error {
  border-color: rgba(255, 107, 107, 0.34);
  background: rgba(56, 19, 28, 0.86);
  color: #ffd9dd;
}

.tv-hall {
  position: relative;
  min-height: calc(100vh - 250px);
  display: grid;
  grid-template-columns: minmax(360px, 1.08fr) minmax(250px, 0.72fr) minmax(360px, 1.08fr);
  grid-template-rows: minmax(210px, 1fr) minmax(210px, 1fr) minmax(150px, 0.62fr) 42px;
  grid-template-areas:
    "stage3 stage4 stage2"
    "stage3 stage4 stage2"
    "stage5 stage1 stage2"
    "legend legend legend";
  gap: 12px;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(138, 165, 210, 0.16);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 12%),
    linear-gradient(180deg, rgba(7, 13, 24, 0.985), rgba(8, 15, 27, 0.995));
  background-size: 44px 44px, 44px 44px, auto, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 24px 64px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

body.tv-mode .tv-hall {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.tv-stage-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 13px;
  border-radius: 18px;
  border: 2px solid rgba(138, 165, 210, 0.24);
  border-color: color-mix(in srgb, var(--stage-color) 42%, rgba(210, 226, 255, 0.22));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--stage-color) 14%, transparent), transparent 46%),
    rgba(9, 18, 33, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 16px 36px rgba(0, 0, 0, 0.22);
}

.tv-stage-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stage-color) 18%, transparent);
}

.tv-stage-card.stage-1 {
  grid-area: stage1;
}

.tv-stage-card.stage-2 {
  grid-area: stage2;
}

.tv-stage-card.stage-3 {
  grid-area: stage3;
}

.tv-stage-card.stage-4 {
  grid-area: stage4;
}

.tv-stage-card.stage-5 {
  grid-area: stage5;
}

.tv-stage-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.tv-stage-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tv-stage-head strong {
  color: #f5f9ff;
  font-size: 1.18rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.tv-stage-head span {
  color: #c4d4ee;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-stage-head em {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(138, 165, 210, 0.24);
  border-color: color-mix(in srgb, var(--stage-color) 38%, rgba(255, 255, 255, 0.18));
  background: rgba(5, 12, 22, 0.5);
  color: #dce9ff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
}

.tv-slots {
  display: grid;
  gap: 8px;
  min-height: 0;
}

.tv-stage-card.layout-wide .tv-slots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.tv-stage-card.layout-tower .tv-slots,
.tv-stage-card.layout-stack .tv-slots {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
}

.tv-stage-card.layout-pair .tv-slots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}

.tv-stage-card.layout-row .tv-slots {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
}

.tv-slot {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 14px;
  border: 1px solid rgba(122, 153, 202, 0.14);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 7px;
  padding: 10px;
  color: #edf5ff;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 58%),
    rgba(8, 16, 30, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.tv-slot.occupied {
  border-color: rgba(138, 165, 210, 0.38);
  border-color: color-mix(in srgb, var(--stage-color) 64%, rgba(255, 255, 255, 0.22));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24), inset 4px 0 0 var(--stage-color);
}

.tv-slot.occupied:hover {
  transform: none;
  border-color: rgba(220, 233, 255, 0.62);
  border-color: color-mix(in srgb, var(--stage-color) 78%, #ffffff);
}

.tv-slot.has-problem {
  border-color: rgba(255, 107, 107, 0.72);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24), inset 4px 0 0 #ff5f70;
}

.tv-slot.empty {
  grid-template-rows: 1fr;
  place-items: center;
  color: rgba(210, 225, 248, 0.38);
  background: rgba(18, 30, 51, 0.32);
  border-style: dashed;
  box-shadow: none;
}

.tv-slot.empty span {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-slot-top,
.tv-slot-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.tv-slot-top span {
  color: #8da5cb;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tv-slot-top strong {
  color: #d9e7ff;
  font-size: 0.66rem;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-slot-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tv-slot-main h3 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(0.96rem, 1.1vw, 1.32rem);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.tv-slot-main p {
  margin: 0;
  color: #94a9cc;
  font-size: 0.68rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-slot-main .tv-stage-note {
  display: -webkit-box;
  color: #aec0df;
  line-height: 1.18;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tv-slot-kpi-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 0.56fr);
  gap: 6px;
  margin-top: 5px;
}

.tv-slot-progress-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(22, 95, 156, 0.12)),
    rgba(8, 18, 33, 0.78);
}

.tv-slot-progress-summary.problem {
  border-color: rgba(255, 107, 107, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(162, 38, 56, 0.12)),
    rgba(8, 18, 33, 0.78);
}

.tv-slot-progress-summary span {
  color: #8fb6d6;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tv-slot-progress-summary strong {
  color: #e9fff5;
  font-size: clamp(1.08rem, 1.18vw, 1.42rem);
  font-weight: 950;
  line-height: 1;
}

.tv-slot-progress-summary.problem strong {
  color: #ffe5e8;
}

.tv-component-list {
  display: flex;
  align-content: start;
  align-items: start;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
}

.tv-component-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(145, 167, 204, 0.18);
  background: rgba(32, 45, 68, 0.82);
  color: #cfdbef;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

body.tv-mode .tv-component-list {
  gap: 7px;
}

body.tv-mode .tv-component-chip {
  min-height: 25px;
  padding: 5px 10px;
  font-size: clamp(0.68rem, 0.66vw, 0.82rem);
}

.tv-component-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-component-chip.status-progress,
.tv-slot-status .status-progress,
.tv-legend .status-progress {
  border-color: rgba(80, 180, 255, 0.42);
  background: rgba(22, 95, 156, 0.9);
  color: #dff4ff;
}

.tv-component-chip.status-installed,
.tv-slot-status .status-installed,
.tv-legend .status-installed {
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(16, 117, 84, 0.88);
  color: #dfffee;
}

.tv-component-chip.status-problem,
.tv-slot-status .status-problem,
.tv-legend .status-problem {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(162, 38, 56, 0.9);
  color: #ffe1e5;
}

.tv-component-chip.more {
  border-color: rgba(228, 236, 255, 0.2);
  background: rgba(228, 236, 255, 0.08);
  color: #e6eeff;
}

.tv-components-empty {
  align-self: start;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px dashed rgba(145, 167, 204, 0.16);
  color: #8198bc;
  font-size: 0.66rem;
  font-weight: 800;
}

.tv-slot-status {
  justify-content: start;
  min-height: 20px;
  flex-wrap: wrap;
}

.tv-slot-status span {
  min-height: 18px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
}

.tv-overflow {
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 143, 143, 0.24);
  background: rgba(52, 18, 24, 0.74);
  color: #ffd5da;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.35;
}

.tv-legend {
  grid-area: legend;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 6px;
  color: #9fb2d0;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tv-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tv-legend i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tv-legend .status-planned {
  background: rgba(32, 45, 68, 0.82);
}

.stage-plan-header,
.stage-plan-row {
  display: grid;
  grid-template-columns: 180px minmax(900px, 1fr);
}

.stage-plan-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(11, 20, 37, 0.98);
  border-bottom: 1px solid var(--line-strong);
}

.stage-plan-title,
.stage-plan-label {
  position: sticky;
  left: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 42%),
    rgba(10, 18, 33, 0.98);
  box-shadow: 14px 0 24px rgba(2, 8, 18, 0.24);
  z-index: 7;
}

.stage-plan-title {
  z-index: 10;
}

.stage-plan-title strong,
.stage-plan-label strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dbe7ff;
}

.stage-plan-title span,
.stage-plan-label span {
  color: var(--muted);
  font-size: 0.76rem;
}

.stage-plan-timeline-header {
  overflow: hidden;
  position: relative;
  z-index: 6;
}

.stage-plan-months,
.stage-plan-days,
.stage-lane {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--day-width);
}

.stage-plan-month,
.stage-plan-day {
  border-right: 1px solid rgba(138, 165, 210, 0.14);
  text-align: center;
}

.stage-plan-month {
  padding: 11px 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d2def5;
  background: rgba(10, 22, 40, 0.96);
  border-bottom: 1px solid var(--line);
}

.stage-plan-day {
  padding: 10px 0;
  font-size: 0.76rem;
  color: var(--muted);
  background: rgba(13, 25, 45, 0.88);
  min-height: 40px;
}

.stage-plan-day.weekend {
  background: rgba(20, 35, 58, 0.92);
}

.stage-plan-day.saturday {
  color: #ff7d88;
}

.stage-plan-day.sunday {
  color: #f3e7a5;
}

.stage-plan-day.today,
.day-cell.today,
.resource-cell.today {
  position: relative;
  z-index: 1;
}

.stage-plan-day.today::after,
.day-cell.today::after,
.resource-cell.today::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-left: 2px solid rgba(255, 92, 92, 0.9);
  border-right: 2px solid rgba(255, 92, 92, 0.9);
  pointer-events: none;
}

.stage-plan-body {
  background: rgba(9, 17, 31, 0.86);
}

.stage-plan-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.stage-plan-tracks {
  border-bottom: 1px solid var(--line);
}

.stage-lane {
  position: relative;
  min-height: 28px;
  border-bottom: 1px solid rgba(138, 165, 210, 0.1);
  grid-template-columns: repeat(var(--stage-days, 1), var(--day-width));
  grid-auto-flow: unset;
  grid-auto-columns: unset;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--day-width) - 1px),
    rgba(138, 165, 210, 0.14) calc(var(--day-width) - 1px),
    rgba(138, 165, 210, 0.14) var(--day-width)
  );
}

.stage-lane:last-child {
  border-bottom: 0;
}

.stage-lane.today-column::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--today-column, -10) * var(--day-width));
  width: var(--day-width);
  border-left: 2px solid rgba(255, 92, 92, 0.9);
  border-right: 2px solid rgba(255, 92, 92, 0.9);
  pointer-events: none;
  box-sizing: border-box;
  z-index: 0;
}

.stage-item {
  position: relative;
  grid-row: 1;
  top: auto;
  width: calc((var(--day-width) - 1px) / 2);
  height: calc(100% - 2px);
  margin-top: 1px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 1px;
  color: #14202c;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: none;
  overflow: hidden;
  white-space: normal;
  text-overflow: clip;
  border: 0;
  min-width: 0;
  background-clip: padding-box;
  cursor: pointer;
  align-self: stretch;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1;
  text-align: center;
}

.stage-item:hover {
  transform: rotate(180deg);
}

.stage-item.continuation {
  color: transparent;
}

.stage-item.shift-a {
  justify-self: start;
}

.stage-item.shift-b {
  justify-self: end;
}

.stage-item.shift-full {
  width: calc(var(--day-width) - 1px);
  justify-self: stretch;
}

.stage-track-full {
  color: var(--danger);
  font-weight: 700;
}

.board-layout {
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  align-items: start;
  height: calc(100vh - 120px);
  min-height: 640px;
}

.left-pane {
  min-width: var(--label-width);
  width: var(--label-width);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 16%),
    rgba(9, 17, 31, 0.98);
  box-shadow: 12px 0 24px rgba(2, 8, 18, 0.28);
  z-index: 3;
  scrollbar-width: none;
}

.left-pane::-webkit-scrollbar {
  display: none;
}

.right-pane {
  min-width: 0;
  height: 100%;
  overflow: auto;
}

.gantt-grid {
  display: grid;
  grid-template-columns: minmax(900px, 1fr);
}

.left-header,
.timeline-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 72%),
    rgba(11, 20, 37, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-strong);
}

.left-header {
  padding: 12px 14px;
  z-index: 8;
  display: grid;
  align-content: start;
  gap: 10px;
}

.simulation-load-map {
  display: grid;
  gap: 3px;
  min-width: 100%;
  padding: 8px 0 10px;
  border-bottom: 1px solid rgba(116, 154, 211, 0.18);
  background:
    linear-gradient(180deg, rgba(51, 90, 145, 0.18), rgba(8, 15, 29, 0.2));
}

.simulation-load-map.hidden {
  display: none;
}

.simulation-load-head {
  position: sticky;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  min-height: 22px;
  padding: 0 10px;
  color: #9fb3d8;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simulation-load-head strong {
  color: #e6f0ff;
}

.simulation-load-head span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.load-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.load-dot.ok {
  background: #16a34a;
}

.load-dot.near {
  background: #dcae19;
}

.load-dot.over {
  background: #dc2626;
}

.simulation-load-row {
  position: relative;
  min-height: 22px;
}

.simulation-load-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 58px;
  padding: 0 8px;
  border: 1px solid rgba(116, 154, 211, 0.2);
  border-left: 0;
  background: rgba(8, 16, 31, 0.96);
  color: #e5efff;
  font-size: 0.68rem;
  font-weight: 900;
  pointer-events: none;
}

.simulation-load-label span {
  color: #8fa4c8;
  font-size: 0.58rem;
}

.simulation-load-cells {
  display: grid;
  min-width: 0;
}

.simulation-load-cell {
  min-width: 0;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(5, 12, 24, 0.58);
  border-bottom: 1px solid rgba(5, 12, 24, 0.42);
  color: #f8fbff;
  font-size: 0.56rem;
  font-weight: 900;
  line-height: 1;
}

.simulation-load-cell.empty {
  background: rgba(37, 50, 72, 0.38);
  color: rgba(194, 209, 235, 0.48);
}

.simulation-load-cell.ok {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.76), rgba(21, 128, 61, 0.72));
}

.simulation-load-cell.near {
  background: linear-gradient(180deg, rgba(234, 179, 8, 0.86), rgba(161, 98, 7, 0.78));
  color: #17210e;
}

.simulation-load-cell.over {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.92), rgba(153, 27, 27, 0.86));
}

.simulation-load-map.compact .simulation-load-head span,
.simulation-load-map.compact .simulation-load-cell span,
.simulation-load-row.compact .simulation-load-label span {
  display: none;
}

.simulation-load-map.compact .simulation-load-row {
  min-height: 16px;
}

.simulation-load-map.compact .simulation-load-cell {
  min-height: 16px;
}

.left-header-title {
  min-width: 0;
}

.left-header-title strong {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #dbe7ff;
  margin-bottom: 4px;
}

.left-header-title span {
  color: var(--muted);
  font-size: 0.78rem;
}

.planning-toolbar {
  display: grid;
  gap: 6px;
  width: 100%;
}

.planning-control-group {
  display: grid;
  grid-template-columns: 42px repeat(3, minmax(0, 1fr));
  gap: 5px;
  align-items: center;
  min-width: 0;
}

.planning-control-group:nth-child(2) {
  grid-template-columns: 42px repeat(4, minmax(0, 1fr));
}

.planning-control-group.direction-group {
  grid-template-columns: 42px repeat(2, 42px);
  justify-content: start;
}

.planning-control-label {
  color: #8ea4c9;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.planning-tool-btn {
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
  border-radius: 8px;
  border-color: rgba(120, 152, 205, 0.18);
  background: linear-gradient(180deg, rgba(18, 32, 56, 0.82), rgba(10, 20, 38, 0.74));
  box-shadow: none;
  color: #dce9ff;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-tool-btn.icon {
  width: 42px;
  padding: 0;
  font-size: 0.96rem;
}

.planning-tool-btn.active {
  border-color: rgba(92, 173, 255, 0.76);
  background: linear-gradient(180deg, rgba(41, 91, 165, 0.98), rgba(25, 63, 124, 0.95));
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(38, 119, 229, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.timeline-header {
  overflow: hidden;
}

.resource-row,
.month-row,
.day-row,
.timeline-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--day-width);
}

.resource-cell,
.month-cell,
.day-cell {
  border-right: 1px solid rgba(138, 165, 210, 0.14);
  text-align: center;
}

.resource-cell {
  min-height: 54px;
  padding: 8px 2px;
  background: rgba(14, 27, 49, 0.98);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.66rem;
  color: var(--muted);
}

.resource-metric {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px;
  align-items: start;
}

.resource-label {
  font-size: 0.58rem;
  font-weight: 800;
  color: #84bfff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-value {
  font-weight: 800;
  color: var(--text);
}

.resource-value-stack {
  display: grid;
  gap: 1px;
  justify-items: center;
}

.resource-shift-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.month-cell {
  padding: 11px 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d2def5;
  background: rgba(10, 22, 40, 0.96);
  border-bottom: 1px solid var(--line);
}

.day-cell {
  padding: 10px 0;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(13, 25, 45, 0.88);
  min-height: 40px;
}

.day-cell.weekend {
  background: rgba(20, 35, 58, 0.92);
}

.day-cell.saturday {
  color: #ff7d88;
}

.day-cell.sunday {
  color: #f3e7a5;
}

.day-cell.compact {
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.left-col {
  background: rgba(9, 17, 31, 0.85);
}

.project-form {
  min-height: var(--row-height);
  padding: 3px 5px;
  border-bottom: 1px solid var(--line);
}

.project-card {
  display: grid;
  grid-template-columns: minmax(110px, 1.1fr) minmax(128px, 1fr) minmax(128px, 1fr);
  grid-template-rows: auto auto;
  gap: 3px;
  align-items: center;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(138, 165, 210, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 38%),
    linear-gradient(180deg, rgba(14, 26, 46, 0.98), rgba(11, 20, 37, 0.98));
  box-shadow: var(--shadow-soft);
}

.project-main {
  display: contents;
}

.phase-grid {
  display: contents;
}

.phase-card {
  display: grid;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  border-radius: 9px;
  border: 1px solid rgba(138, 165, 210, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    rgba(16, 29, 52, 0.74);
  min-width: 0;
}

.phase-card.przyczepa {
  box-shadow: inset 0 0 0 1px rgba(62, 160, 255, 0.14);
}

.phase-card.ekran {
  box-shadow: inset 0 0 0 1px rgba(6, 182, 168, 0.14);
}

.phase-header {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d7e6ff;
  font-weight: 800;
  white-space: nowrap;
}

.phase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.phase-dot.przyczepa {
  background: #4da2ff;
  box-shadow: 0 0 0 4px rgba(62, 160, 255, 0.12);
}

.phase-dot.ekran {
  background: #22c7b5;
  box-shadow: 0 0 0 4px rgba(6, 182, 168, 0.12);
}

.phase-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  align-items: center;
  min-width: 0;
}

.project-card input,
.project-card button {
  min-height: 22px;
  padding: 0 5px;
  border-radius: 8px;
}

.project-card input {
  font-size: 0.72rem;
  min-width: 0;
}

.phase-fields input {
  min-width: 0;
}

.project-card .danger-btn {
  min-width: 36px;
  width: 36px;
  font-size: 0.72rem;
  padding: 0;
}

.project-name-field,
.project-name-label {
  grid-column: 1;
  grid-row: 1 / span 2;
  height: 100%;
}

.project-name-label {
  display: grid;
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  justify-content: stretch;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(91, 132, 196, 0.26);
  background: rgba(10, 20, 37, 0.7);
  color: #edf5ff;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-name-title,
.project-name-notes {
  display: block;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-name-notes {
  color: #9fb2d0;
  font-size: 0.62rem;
  font-weight: 700;
}

.project-name-label:hover {
  border-color: rgba(92, 173, 255, 0.54);
  background: rgba(19, 39, 68, 0.86);
  transform: none;
}

.project-card .danger-btn {
  min-width: 24px;
  width: 24px;
  min-height: 18px;
  height: 18px;
  font-size: 0.62rem;
  border-radius: 999px;
  box-shadow: none;
}

.lane-mode-switch {
  grid-column: 1;
  grid-row: 2;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.lane-mode-btn {
  min-width: 24px;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(138, 165, 210, 0.18);
  background: rgba(13, 24, 43, 0.58);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.lane-mode-btn:hover {
  transform: none;
  border-color: rgba(138, 165, 210, 0.28);
}

.lane-mode-btn.active {
  color: #eff6ff;
  border-color: rgba(76, 163, 255, 0.42);
  background: linear-gradient(135deg, rgba(76, 163, 255, 0.26), rgba(37, 111, 232, 0.3));
}

.project-actions {
  grid-column: 1;
  grid-row: 2;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.project-actions .lane-mode-switch {
  grid-column: auto;
  grid-row: auto;
}

.phase-card {
  grid-row: 1 / span 2;
  min-width: 0;
}

.timeline {
  position: relative;
  overflow: hidden;
}

.timeline-row {
  position: relative;
  min-height: var(--row-height);
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(var(--day-width) - 1px),
    rgba(138, 165, 210, 0.14) calc(var(--day-width) - 1px),
    rgba(138, 165, 210, 0.14) var(--day-width)
  );
}

.timeline-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.008), rgba(76, 163, 255, 0.035));
  pointer-events: none;
}

.timeline-row.today-column::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--today-column, -10) * var(--day-width));
  width: var(--day-width);
  border-left: 2px solid rgba(255, 92, 92, 0.9);
  border-right: 2px solid rgba(255, 92, 92, 0.9);
  pointer-events: none;
  box-sizing: border-box;
  z-index: 1;
}

.delivery-date-cell {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--day-width);
  background: rgba(98, 18, 28, 0.72);
  border-left: 1px solid rgba(255, 115, 126, 0.38);
  border-right: 1px solid rgba(255, 115, 126, 0.38);
  box-shadow: inset 0 0 0 1px rgba(65, 9, 18, 0.72);
  pointer-events: none;
  z-index: 0;
}

.project-bar {
  position: absolute;
  z-index: 2;
  height: 18px;
  border-radius: 10px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: #111111;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: grab;
  user-select: none;
  min-width: var(--day-width);
  border: 1px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.project-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.project-bar.dragging {
  cursor: grabbing;
  transform: scale(1.02);
}

.project-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.project-bar.przyczepa {
  background: var(--phase-a);
  z-index: 2;
}

.project-bar.ekran {
  background: var(--phase-b);
  z-index: 1;
}

.project-bar.lane1 {
  top: 10px;
  height: 12px;
}

.project-bar.lane2 {
  top: 24px;
  height: 12px;
}

.project-bar.single-lane {
  top: 14px;
  height: 16px;
}

.resize-handle {
  position: absolute;
  top: 0;
  width: 10px;
  height: 100%;
}

.resize-handle.start {
  left: 0;
  cursor: ew-resize;
}

.resize-handle.end {
  right: 0;
  cursor: ew-resize;
}

body.gantt-theme-2.gantt-mode #gantt-board {
  border-color: rgba(148, 176, 220, 0.18);
  border-radius: 6px;
  background:
    radial-gradient(circle at 14% 0%, rgba(94, 234, 212, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(18, 28, 45, 0.98), rgba(6, 11, 19, 0.995)),
    #07101d;
  box-shadow:
    0 18px 56px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.gantt-theme-2.gantt-mode .board-layout {
  background:
    linear-gradient(90deg, rgba(94, 234, 212, 0.045), transparent 1px) 0 0 / calc(var(--day-width) * 7) 100%,
    linear-gradient(90deg, rgba(5, 12, 22, 0.98), rgba(10, 18, 31, 0.94) 28%, rgba(5, 10, 18, 0.98));
  isolation: isolate;
}

body.gantt-theme-2.gantt-mode .left-pane {
  border-right-color: rgba(96, 132, 184, 0.2);
  background:
    linear-gradient(180deg, rgba(15, 25, 42, 0.96), rgba(6, 12, 22, 0.98));
  box-shadow: 18px 0 34px rgba(0, 0, 0, 0.34);
}

body.gantt-theme-2.gantt-mode .right-pane {
  background: rgba(4, 9, 17, 0.28);
}

body.gantt-theme-2.gantt-mode .left-header,
body.gantt-theme-2.gantt-mode .timeline-header {
  border-bottom-color: rgba(112, 150, 205, 0.22);
  background:
    linear-gradient(90deg, rgba(94, 234, 212, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(19, 32, 53, 0.98), rgba(7, 14, 25, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

body.gantt-theme-2.gantt-mode .left-header {
  gap: 8px;
  padding: 10px 12px;
}

body.gantt-theme-2.gantt-mode .left-header-title {
  position: relative;
  padding: 8px 10px 8px 13px;
  border: 1px solid rgba(116, 154, 211, 0.12);
  border-left: 0;
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(94, 234, 212, 0.12), transparent 46%),
    rgba(5, 12, 22, 0.42);
}

body.gantt-theme-2.gantt-mode .left-header-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #5eead4;
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.5);
}

body.gantt-theme-2.gantt-mode .left-header-title strong {
  margin-bottom: 3px;
  color: #f4f8ff;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

body.gantt-theme-2.gantt-mode .left-header-title span {
  color: #93a8c8;
  font-size: 0.72rem;
}

body.gantt-theme-2.gantt-mode .planning-toolbar {
  gap: 5px;
}

body.gantt-theme-2.gantt-mode .planning-control-group {
  padding: 4px;
  border: 1px solid rgba(116, 154, 211, 0.12);
  border-radius: 2px;
  background: rgba(5, 12, 22, 0.38);
}

body.gantt-theme-2.gantt-mode .planning-tool-btn {
  min-height: 27px;
  border-color: transparent;
  border-radius: 2px;
  background: rgba(22, 34, 54, 0.82);
  color: #c7d7ee;
  font-size: 0.63rem;
}

body.gantt-theme-2.gantt-mode .planning-tool-btn.active {
  border-color: rgba(94, 234, 212, 0.52);
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.32), rgba(18, 68, 82, 0.78));
  color: #f8ffff;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.gantt-theme-2.gantt-mode .gantt-theme-control {
  border-color: rgba(94, 234, 212, 0.2);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(94, 234, 212, 0.08), transparent 44%),
    rgba(5, 12, 22, 0.72);
}

body.gantt-theme-2.gantt-mode .gantt-theme-control select {
  border-color: rgba(94, 234, 212, 0.34);
  border-radius: 1px;
  background: rgba(4, 10, 19, 0.94);
}

body.gantt-theme-2.gantt-mode .resource-cell {
  min-height: 46px;
  padding: 6px 2px;
  border-color: rgba(108, 138, 184, 0.12);
  background:
    linear-gradient(180deg, rgba(16, 28, 46, 0.96), rgba(7, 14, 25, 0.98));
  color: #8da3c5;
  font-size: 0.6rem;
}

body.gantt-theme-2.gantt-mode .resource-label {
  color: #67e8f9;
}

body.gantt-theme-2.gantt-mode .month-cell {
  padding: 9px 0 8px;
  border-color: rgba(108, 138, 184, 0.14);
  background: rgba(6, 13, 24, 0.98);
  color: #e6edf8;
  font-size: 0.72rem;
}

body.gantt-theme-2.gantt-mode .day-cell {
  min-height: 34px;
  padding: 8px 0;
  border-color: rgba(108, 138, 184, 0.12);
  background: rgba(12, 22, 37, 0.88);
  color: #9fb2cf;
  font-size: 0.72rem;
}

body.gantt-theme-2.gantt-mode .day-cell.weekend {
  background: rgba(17, 24, 39, 0.94);
}

body.gantt-theme-2.gantt-mode .day-cell.saturday {
  color: #ff9aa4;
}

body.gantt-theme-2.gantt-mode .day-cell.sunday {
  color: #f4da7b;
}

body.gantt-theme-2.gantt-mode .day-cell.today::after,
body.gantt-theme-2.gantt-mode .resource-cell.today::after {
  inset: 0;
  border-left-color: rgba(94, 234, 212, 0.92);
  border-right-color: rgba(94, 234, 212, 0.92);
  background: rgba(45, 212, 191, 0.07);
}

body.gantt-theme-2.gantt-mode .left-col {
  background: rgba(6, 12, 22, 0.92);
}

body.gantt-theme-2.gantt-mode .project-form {
  padding: 2px 4px;
  border-bottom-color: rgba(105, 133, 176, 0.12);
}

body.gantt-theme-2.gantt-mode .project-form:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

body.gantt-theme-2.gantt-mode .project-card {
  position: relative;
  gap: 3px;
  padding: 3px;
  border-color: rgba(116, 154, 211, 0.12);
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(94, 234, 212, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(20, 32, 50, 0.9), rgba(8, 16, 29, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
}

body.gantt-theme-2.gantt-mode .project-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 1px;
  background: rgba(94, 234, 212, 0.34);
  box-shadow: 3px 0 0 rgba(96, 165, 250, 0.14);
  pointer-events: none;
}

body.gantt-theme-2.gantt-mode .project-form:hover .project-card {
  border-color: rgba(94, 234, 212, 0.24);
  background:
    linear-gradient(90deg, rgba(94, 234, 212, 0.09), transparent 38%),
    linear-gradient(180deg, rgba(22, 37, 58, 0.96), rgba(9, 18, 32, 0.94));
}

body.gantt-theme-2.gantt-mode .project-name-label {
  position: relative;
  min-height: 46px;
  padding-left: 13px;
  border-color: rgba(94, 234, 212, 0.18);
  border-radius: 1px;
  background:
    linear-gradient(90deg, rgba(45, 212, 191, 0.12), transparent 38%),
    rgba(5, 12, 22, 0.68);
  color: #f7fbff;
}

body.gantt-theme-2.gantt-mode .project-name-label::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: #5eead4;
}

body.gantt-theme-2.gantt-mode .project-name-title {
  font-size: 0.76rem;
  font-weight: 950;
}

body.gantt-theme-2.gantt-mode .project-name-notes {
  color: #8fa6c5;
  font-size: 0.58rem;
}

body.gantt-theme-2.gantt-mode .phase-card {
  padding: 3px;
  border-color: rgba(116, 154, 211, 0.12);
  border-radius: 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent),
    rgba(8, 17, 31, 0.58);
}

body.gantt-theme-2.gantt-mode .phase-card.przyczepa {
  border-left: 3px solid rgba(96, 165, 250, 0.7);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}

body.gantt-theme-2.gantt-mode .phase-card.ekran {
  border-left: 3px solid rgba(94, 234, 212, 0.7);
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.1);
}

body.gantt-theme-2.gantt-mode .phase-badge {
  color: #cfe1ff;
  font-size: 0.48rem;
}

body.gantt-theme-2.gantt-mode .phase-dot {
  width: 10px;
  height: 3px;
  border-radius: 0;
}

body.gantt-theme-2.gantt-mode .project-card input {
  min-height: 20px;
  border-color: rgba(116, 154, 211, 0.14);
  border-radius: 1px;
  background: rgba(4, 10, 19, 0.76);
  color: #e9f2ff;
  font-size: 0.66rem;
}

body.gantt-theme-2.gantt-mode .timeline-row {
  border-bottom-color: rgba(105, 133, 176, 0.12);
  background-color: rgba(7, 13, 23, 0.76);
  background-image:
    linear-gradient(90deg, rgba(94, 234, 212, 0.06), transparent 18%, transparent 82%, rgba(96, 165, 250, 0.035)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.018) 0,
      rgba(255, 255, 255, 0.018) calc((var(--day-width) * 7) - 1px),
      rgba(94, 234, 212, 0.12) calc((var(--day-width) * 7) - 1px),
      rgba(94, 234, 212, 0.12) calc(var(--day-width) * 7)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-width) - 1px),
      rgba(108, 138, 184, 0.13) calc(var(--day-width) - 1px),
      rgba(108, 138, 184, 0.13) var(--day-width)
    );
}

body.gantt-theme-2.gantt-mode .timeline-row:nth-child(even) {
  background-color: rgba(11, 20, 34, 0.82);
}

body.gantt-theme-2.gantt-mode .timeline-row:hover {
  background-color: rgba(13, 29, 47, 0.92);
}

body.gantt-theme-2.gantt-mode .timeline-row::after {
  background: linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.022));
}

body.gantt-theme-2.gantt-mode .timeline-row.today-column::before {
  border-left-color: rgba(94, 234, 212, 0.95);
  border-right-color: rgba(94, 234, 212, 0.95);
  background: rgba(45, 212, 191, 0.055);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.08);
}

body.gantt-theme-2.gantt-mode .delivery-date-cell {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 4px, transparent 4px 9px),
    linear-gradient(180deg, rgba(248, 113, 113, 0.22), rgba(127, 29, 29, 0.62));
  border-color: rgba(248, 113, 113, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(70, 14, 24, 0.65),
    inset 2px 0 0 rgba(248, 113, 113, 0.55),
    inset -2px 0 0 rgba(248, 113, 113, 0.32);
}

body.gantt-theme-2.gantt-mode .project-bar {
  height: 16px;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 1px;
  border: 0;
  border-left: 4px solid rgba(255, 255, 255, 0.72);
  color: rgba(3, 6, 12, 0.94);
  font-size: 0.55rem;
  font-weight: 950;
  letter-spacing: 0.045em;
  box-shadow:
    0 8px 14px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  filter: saturate(0.9) brightness(1.02) contrast(1.02);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 0 100%);
}

body.gantt-theme-2.gantt-mode .project-bar::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 10px);
  opacity: 0.72;
}

body.gantt-theme-2.gantt-mode .project-bar::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 3px;
  bottom: 3px;
  width: 1px;
  background: rgba(0, 0, 0, 0.22);
  z-index: 1;
}

body.gantt-theme-2.gantt-mode .project-bar.dragging {
  transform: translateY(-1px);
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.34),
    0 0 0 2px rgba(94, 234, 212, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body.gantt-theme-2.gantt-mode .project-bar:hover {
  filter: saturate(1.02) brightness(1.08) contrast(1.04);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

body.gantt-theme-2.gantt-mode .project-bar span {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 12px);
}

body.gantt-theme-2.gantt-mode .project-bar.przyczepa {
  border-left-color: #0f766e;
}

body.gantt-theme-2.gantt-mode .project-bar.ekran {
  border-left-color: #7c3aed;
}

body.gantt-theme-2.gantt-mode .project-bar.lane1 {
  top: 7px;
  height: 13px;
}

body.gantt-theme-2.gantt-mode .project-bar.lane2 {
  top: 22px;
  height: 13px;
}

body.gantt-theme-2.gantt-mode .project-bar.single-lane {
  top: 11px;
  height: 18px;
}

body.gantt-theme-2.gantt-mode .resize-handle {
  z-index: 3;
  width: 13px;
}

body.gantt-theme-2.gantt-mode .resize-handle.start {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent);
}

body.gantt-theme-2.gantt-mode .resize-handle.end {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.18), transparent);
}

body.gantt-theme-2.gantt-mode .resize-handle.start::after,
body.gantt-theme-2.gantt-mode .resize-handle.end::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(0, 0, 0, 0.32);
}

body.gantt-theme-2.gantt-mode .resize-handle.start::after {
  left: 4px;
}

body.gantt-theme-2.gantt-mode .resize-handle.end::after {
  right: 5px;
}

body.gantt-theme-3.gantt-mode #gantt-board {
  border-color: rgba(216, 180, 254, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 70, 239, 0.17), transparent 28%),
    radial-gradient(circle at 78% 4%, rgba(196, 181, 253, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(29, 20, 48, 0.98), rgba(9, 9, 20, 0.995)),
    #0b0918;
  box-shadow:
    0 24px 72px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(244, 114, 182, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.gantt-theme-3.gantt-mode .board-layout {
  background:
    linear-gradient(90deg, rgba(244, 114, 182, 0.075), transparent 1px) 0 0 / calc(var(--day-width) * 7) 100%,
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 26%),
    linear-gradient(90deg, rgba(14, 10, 29, 0.98), rgba(31, 21, 52, 0.94) 34%, rgba(10, 9, 22, 0.98));
  isolation: isolate;
}

body.gantt-theme-3.gantt-mode .left-pane {
  border-right-color: rgba(216, 180, 254, 0.2);
  background:
    radial-gradient(circle at 0% 8%, rgba(217, 70, 239, 0.13), transparent 38%),
    linear-gradient(180deg, rgba(31, 21, 52, 0.96), rgba(12, 10, 25, 0.98));
  box-shadow: 20px 0 38px rgba(15, 8, 30, 0.54);
}

body.gantt-theme-3.gantt-mode .right-pane {
  background: rgba(9, 8, 20, 0.34);
}

body.gantt-theme-3.gantt-mode .left-header,
body.gantt-theme-3.gantt-mode .timeline-header {
  border-bottom-color: rgba(216, 180, 254, 0.23);
  background:
    linear-gradient(90deg, rgba(244, 114, 182, 0.15), rgba(167, 139, 250, 0.1) 38%, transparent),
    linear-gradient(180deg, rgba(35, 24, 58, 0.98), rgba(13, 11, 27, 0.96));
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 34px rgba(11, 6, 22, 0.38);
}

body.gantt-theme-3.gantt-mode .left-header {
  gap: 8px;
  padding: 10px 12px;
}

body.gantt-theme-3.gantt-mode .left-header-title {
  position: relative;
  padding: 9px 10px 9px 15px;
  border: 1px solid rgba(216, 180, 254, 0.14);
  border-radius: 10px 3px 10px 3px;
  background:
    linear-gradient(120deg, rgba(244, 114, 182, 0.15), rgba(167, 139, 250, 0.08) 52%, transparent),
    rgba(13, 10, 27, 0.54);
  overflow: hidden;
}

body.gantt-theme-3.gantt-mode .left-header-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #f472b6, #c4b5fd);
  box-shadow: 0 0 18px rgba(244, 114, 182, 0.58);
}

body.gantt-theme-3.gantt-mode .left-header-title::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -40px;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(216, 180, 254, 0.12);
  transform: rotate(45deg);
}

body.gantt-theme-3.gantt-mode .left-header-title strong {
  margin-bottom: 3px;
  color: #fff7ff;
  font-size: 0.72rem;
  letter-spacing: 0.13em;
}

body.gantt-theme-3.gantt-mode .left-header-title span {
  color: #d8c9f5;
  font-size: 0.72rem;
}

body.gantt-theme-3.gantt-mode .planning-toolbar {
  gap: 6px;
}

body.gantt-theme-3.gantt-mode .planning-control-group {
  padding: 4px;
  border: 1px solid rgba(216, 180, 254, 0.13);
  border-radius: 12px 3px 12px 3px;
  background: rgba(15, 11, 31, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.gantt-theme-3.gantt-mode .planning-tool-btn {
  min-height: 28px;
  border-color: rgba(216, 180, 254, 0.08);
  border-radius: 8px 2px 8px 2px;
  background: rgba(30, 22, 49, 0.86);
  color: #ded0f7;
  font-size: 0.63rem;
}

body.gantt-theme-3.gantt-mode .planning-tool-btn.active {
  border-color: rgba(244, 114, 182, 0.56);
  background:
    linear-gradient(135deg, rgba(244, 114, 182, 0.82), rgba(167, 139, 250, 0.76));
  color: #16091e;
  box-shadow:
    0 10px 22px rgba(217, 70, 239, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

body.gantt-theme-3.gantt-mode .gantt-theme-control {
  border-color: rgba(244, 114, 182, 0.22);
  border-radius: 13px 3px 13px 3px;
  background:
    linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(167, 139, 250, 0.08)),
    rgba(16, 11, 31, 0.78);
}

body.gantt-theme-3.gantt-mode .gantt-theme-control span {
  color: #f5d0fe;
}

body.gantt-theme-3.gantt-mode .gantt-theme-control select {
  border-color: rgba(216, 180, 254, 0.4);
  border-radius: 9px 2px 9px 2px;
  background: rgba(12, 9, 25, 0.96);
  color: #fff7ff;
}

body.gantt-theme-3.gantt-mode .resource-cell {
  min-height: 46px;
  padding: 6px 2px;
  border-color: rgba(216, 180, 254, 0.12);
  background:
    linear-gradient(180deg, rgba(34, 24, 55, 0.96), rgba(13, 10, 27, 0.98));
  color: #b9a9da;
  font-size: 0.6rem;
}

body.gantt-theme-3.gantt-mode .resource-label {
  color: #f0abfc;
}

body.gantt-theme-3.gantt-mode .month-cell {
  padding: 9px 0 8px;
  border-color: rgba(216, 180, 254, 0.13);
  background:
    linear-gradient(90deg, rgba(244, 114, 182, 0.09), transparent 55%),
    rgba(13, 10, 27, 0.98);
  color: #f8efff;
  font-size: 0.72rem;
}

body.gantt-theme-3.gantt-mode .day-cell {
  min-height: 34px;
  padding: 8px 0;
  border-color: rgba(216, 180, 254, 0.12);
  background: rgba(22, 16, 38, 0.88);
  color: #c9bde8;
  font-size: 0.72rem;
}

body.gantt-theme-3.gantt-mode .day-cell.weekend {
  background:
    linear-gradient(180deg, rgba(244, 114, 182, 0.07), transparent),
    rgba(20, 13, 35, 0.96);
}

body.gantt-theme-3.gantt-mode .day-cell.saturday {
  color: #ff9aa4;
}

body.gantt-theme-3.gantt-mode .day-cell.sunday {
  color: #f4da7b;
}

body.gantt-theme-3.gantt-mode .day-cell.today::after,
body.gantt-theme-3.gantt-mode .resource-cell.today::after {
  inset: 0;
  border-left-color: rgba(244, 114, 182, 0.95);
  border-right-color: rgba(196, 181, 253, 0.95);
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.08), rgba(167, 139, 250, 0.06));
}

body.gantt-theme-3.gantt-mode .left-col {
  background: rgba(13, 10, 27, 0.92);
}

body.gantt-theme-3.gantt-mode .project-form {
  padding: 2px 4px;
  border-bottom-color: rgba(216, 180, 254, 0.1);
}

body.gantt-theme-3.gantt-mode .project-form:nth-child(even) {
  background: rgba(244, 114, 182, 0.018);
}

body.gantt-theme-3.gantt-mode .project-card {
  position: relative;
  gap: 3px;
  padding: 3px;
  border-color: rgba(216, 180, 254, 0.14);
  border-radius: 12px 3px 12px 3px;
  background:
    linear-gradient(120deg, rgba(244, 114, 182, 0.075), rgba(167, 139, 250, 0.045) 44%, transparent),
    linear-gradient(180deg, rgba(35, 25, 56, 0.9), rgba(14, 10, 28, 0.93));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

body.gantt-theme-3.gantt-mode .project-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #f472b6, #a78bfa);
  box-shadow: 0 0 18px rgba(244, 114, 182, 0.35);
  pointer-events: none;
}

body.gantt-theme-3.gantt-mode .project-form:hover .project-card {
  border-color: rgba(244, 114, 182, 0.3);
  background:
    linear-gradient(120deg, rgba(244, 114, 182, 0.115), rgba(167, 139, 250, 0.075) 50%, transparent),
    linear-gradient(180deg, rgba(40, 28, 66, 0.96), rgba(15, 10, 30, 0.94));
}

body.gantt-theme-3.gantt-mode .project-name-label {
  position: relative;
  min-height: 46px;
  padding-left: 14px;
  border-color: rgba(244, 114, 182, 0.2);
  border-radius: 9px 2px 9px 2px;
  background:
    linear-gradient(135deg, rgba(244, 114, 182, 0.14), rgba(167, 139, 250, 0.07) 52%, transparent),
    rgba(12, 9, 25, 0.7);
  color: #fff7ff;
}

body.gantt-theme-3.gantt-mode .project-name-label::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #f472b6, #c4b5fd);
}

body.gantt-theme-3.gantt-mode .project-name-title {
  font-size: 0.76rem;
  font-weight: 950;
}

body.gantt-theme-3.gantt-mode .project-name-notes {
  color: #cbbce9;
  font-size: 0.58rem;
}

body.gantt-theme-3.gantt-mode .phase-card {
  padding: 3px;
  border-color: rgba(216, 180, 254, 0.13);
  border-radius: 9px 2px 9px 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(15, 11, 30, 0.62);
}

body.gantt-theme-3.gantt-mode .phase-card.przyczepa {
  border-left: 3px solid rgba(244, 114, 182, 0.7);
  box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.12);
}

body.gantt-theme-3.gantt-mode .phase-card.ekran {
  border-left: 3px solid rgba(167, 139, 250, 0.78);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.12);
}

body.gantt-theme-3.gantt-mode .phase-badge {
  color: #eadcff;
  font-size: 0.48rem;
}

body.gantt-theme-3.gantt-mode .phase-dot {
  width: 11px;
  height: 4px;
  border-radius: 10px 2px 10px 2px;
}

body.gantt-theme-3.gantt-mode .project-card input {
  min-height: 20px;
  border-color: rgba(216, 180, 254, 0.15);
  border-radius: 7px 2px 7px 2px;
  background: rgba(9, 7, 20, 0.78);
  color: #f8efff;
  font-size: 0.66rem;
}

body.gantt-theme-3.gantt-mode .timeline-row {
  border-bottom-color: rgba(216, 180, 254, 0.1);
  background-color: rgba(11, 9, 22, 0.76);
  background-image:
    linear-gradient(90deg, rgba(244, 114, 182, 0.055), transparent 20%, transparent 82%, rgba(167, 139, 250, 0.045)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent),
    repeating-linear-gradient(
      to right,
      rgba(255, 255, 255, 0.014) 0,
      rgba(255, 255, 255, 0.014) calc((var(--day-width) * 7) - 1px),
      rgba(244, 114, 182, 0.12) calc((var(--day-width) * 7) - 1px),
      rgba(244, 114, 182, 0.12) calc(var(--day-width) * 7)
    ),
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-width) - 1px),
      rgba(216, 180, 254, 0.12) calc(var(--day-width) - 1px),
      rgba(216, 180, 254, 0.12) var(--day-width)
    );
}

body.gantt-theme-3.gantt-mode .timeline-row:nth-child(even) {
  background-color: rgba(19, 14, 33, 0.82);
}

body.gantt-theme-3.gantt-mode .timeline-row:hover {
  background-color: rgba(29, 20, 47, 0.94);
}

body.gantt-theme-3.gantt-mode .timeline-row::after {
  background: linear-gradient(90deg, transparent, rgba(244, 114, 182, 0.028));
}

body.gantt-theme-3.gantt-mode .timeline-row.today-column::before {
  border-left-color: rgba(244, 114, 182, 0.95);
  border-right-color: rgba(196, 181, 253, 0.95);
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.055), rgba(167, 139, 250, 0.05));
  box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.1);
}

body.gantt-theme-3.gantt-mode .delivery-date-cell {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 4px, transparent 4px 9px),
    linear-gradient(180deg, rgba(190, 24, 93, 0.28), rgba(88, 28, 135, 0.58));
  border-color: rgba(244, 114, 182, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(76, 29, 149, 0.62),
    inset 2px 0 0 rgba(244, 114, 182, 0.55),
    inset -2px 0 0 rgba(196, 181, 253, 0.34);
}

body.gantt-theme-3.gantt-mode .project-bar {
  height: 17px;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: rgba(13, 8, 24, 0.95);
  font-size: 0.56rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  box-shadow:
    0 10px 20px rgba(11, 6, 22, 0.34),
    0 0 18px rgba(217, 70, 239, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(88, 28, 135, 0.18);
  filter: saturate(1.08) brightness(1.04) contrast(1.02);
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

body.gantt-theme-3.gantt-mode .project-bar::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.13) 0 1px, transparent 1px 12px);
  opacity: 0.76;
}

body.gantt-theme-3.gantt-mode .project-bar::before {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 2px;
  height: 1px;
  background: rgba(255, 255, 255, 0.26);
  z-index: 1;
}

body.gantt-theme-3.gantt-mode .project-bar.dragging {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(11, 6, 22, 0.42),
    0 0 0 2px rgba(244, 114, 182, 0.22),
    0 0 24px rgba(167, 139, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.gantt-theme-3.gantt-mode .project-bar:hover {
  filter: saturate(1.18) brightness(1.1) contrast(1.04);
  box-shadow:
    0 14px 26px rgba(11, 6, 22, 0.4),
    0 0 22px rgba(244, 114, 182, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

body.gantt-theme-3.gantt-mode .project-bar span {
  position: relative;
  z-index: 2;
  max-width: calc(100% - 14px);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.gantt-theme-3.gantt-mode .project-bar.przyczepa {
  border-color: rgba(244, 114, 182, 0.42);
  border-left: 4px solid #db2777;
}

body.gantt-theme-3.gantt-mode .project-bar.ekran {
  border-color: rgba(196, 181, 253, 0.44);
  border-left: 4px solid #8b5cf6;
}

body.gantt-theme-3.gantt-mode .project-bar.lane1 {
  top: 7px;
  height: 13px;
}

body.gantt-theme-3.gantt-mode .project-bar.lane2 {
  top: 22px;
  height: 13px;
}

body.gantt-theme-3.gantt-mode .project-bar.single-lane {
  top: 11px;
  height: 18px;
}

body.gantt-theme-3.gantt-mode .resize-handle {
  z-index: 3;
  width: 15px;
}

body.gantt-theme-3.gantt-mode .resize-handle.start {
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.28), transparent);
}

body.gantt-theme-3.gantt-mode .resize-handle.end {
  background: linear-gradient(270deg, rgba(88, 28, 135, 0.24), transparent);
}

body.gantt-theme-3.gantt-mode .resize-handle.start::after,
body.gantt-theme-3.gantt-mode .resize-handle.end::after {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(88, 28, 135, 0.38);
}

body.gantt-theme-3.gantt-mode .resize-handle.start::after {
  left: 5px;
}

body.gantt-theme-3.gantt-mode .resize-handle.end::after {
  right: 5px;
}

.footer-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

body.sales-table-mode .footer-note,
body.standalone-sales .footer-note {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 16, 0.72);
  z-index: 40;
}

.modal.open {
  display: flex;
}

.modal.open.print-modal {
  align-items: flex-start;
  overflow: auto;
}

.modal-card {
  width: min(1320px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 16%),
    linear-gradient(180deg, rgba(12, 22, 40, 0.98), rgba(9, 18, 33, 0.98));
  box-shadow: var(--shadow);
}

.print-card {
  width: min(1240px, 100%);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.modal-top h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.modal-top p {
  margin: 0;
  color: var(--muted);
}

.changelog-card {
  width: min(980px, 100%);
  max-height: min(88vh, 880px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.changelog-top {
  margin: 0;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(116, 151, 206, 0.16);
  background:
    radial-gradient(circle at 12% 0%, rgba(86, 174, 255, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(19, 42, 76, 0.92), rgba(8, 16, 30, 0.96));
}

.changelog-top span {
  display: block;
  margin-bottom: 7px;
  color: #94c7ff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.changelog-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(116, 151, 206, 0.14);
  background: rgba(8, 16, 30, 0.54);
}

.changelog-summary > div {
  padding: 13px 14px;
  border: 1px solid rgba(116, 151, 206, 0.18);
  border-radius: 16px;
  background: rgba(14, 27, 49, 0.78);
}

.changelog-summary span {
  display: block;
  margin-bottom: 6px;
  color: #8ca6cc;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.changelog-summary strong {
  display: block;
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 950;
}

.changelog-list {
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 24px;
  background:
    linear-gradient(90deg, transparent 23px, rgba(86, 174, 255, 0.16) 24px, transparent 25px),
    rgba(7, 14, 26, 0.52);
}

.changelog-item {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0 14px 44px;
}

.changelog-item::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid rgba(86, 174, 255, 0.9);
  background: #0b1526;
  box-shadow: 0 0 0 4px rgba(86, 174, 255, 0.12);
}

.changelog-time {
  display: grid;
  align-content: start;
  gap: 5px;
  color: #9fb4d4;
  font-size: 0.78rem;
  font-weight: 850;
}

.changelog-time strong {
  color: #f8fbff;
  font-size: 0.92rem;
  font-weight: 950;
}

.changelog-entry {
  padding: 14px;
  border: 1px solid rgba(116, 151, 206, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(20, 39, 68, 0.9), rgba(10, 20, 36, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.changelog-entry header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.changelog-entry h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0;
}

.changelog-entry p {
  margin: 0;
  color: #9fb4d4;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.45;
}

.changelog-badge,
.changelog-hash {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.changelog-badge {
  border: 1px solid rgba(70, 220, 202, 0.28);
  background: rgba(24, 168, 153, 0.12);
  color: #9af4e8;
}

.changelog-hash {
  margin-top: 10px;
  border: 1px solid rgba(116, 151, 206, 0.18);
  background: rgba(8, 16, 30, 0.68);
  color: #8ca6cc;
  font-family: "Consolas", "Liberation Mono", monospace;
}

.modal-sections {
  display: grid;
  gap: 16px;
}

.plan-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.plan-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(14, 27, 49, 0.78);
}

.plan-card strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.plan-card span {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.print-table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(11, 20, 36, 0.82);
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
}

.print-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 10px;
  background: rgba(16, 29, 52, 0.98);
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dce8ff;
}

.print-table tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: #d7e5ff;
  font-size: 0.84rem;
  vertical-align: top;
}

.print-table tbody tr:nth-child(even) td {
  background: rgba(13, 24, 43, 0.42);
}

.print-stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #08111e;
}

.print-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.plan-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 22, 40, 0.78);
}

.plan-toolbar-copy {
  display: grid;
  gap: 4px;
}

.plan-toolbar-copy strong {
  font-size: 0.92rem;
  color: #eef5ff;
}

.plan-toolbar-copy span {
  font-size: 0.8rem;
  color: var(--muted);
}

.plan-date-field {
  display: grid;
  gap: 6px;
  min-width: 210px;
}

.plan-date-field label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb4d4;
}

.plan-date-field input {
  min-height: 42px;
}

.plan-date-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.plan-nav-btn {
  min-height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(120, 152, 205, 0.26);
  background: rgba(17, 30, 52, 0.88);
  color: #dce9ff;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.plan-nav-btn:hover {
  background: rgba(28, 45, 74, 0.94);
  border-color: rgba(120, 152, 205, 0.42);
  transform: translateY(-1px);
}

.staff-config-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.staff-config-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(14, 25, 45, 0.76);
}

.staff-config-row.header {
  background: rgba(18, 31, 55, 0.92);
  padding-top: 10px;
  padding-bottom: 10px;
}

.staff-config-row.header > div {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb4d4;
}

.staff-config-stage {
  display: grid;
  gap: 2px;
}

.staff-config-stage strong {
  font-size: 0.9rem;
  color: #eef5ff;
}

.staff-config-stage span {
  font-size: 0.78rem;
  color: var(--muted);
}

.staff-config-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.print-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.print-range-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.print-range-actions .form-error {
  flex: 1;
  margin: 0;
}

.print-stage-checkboxes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.print-stage-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
}

.print-stage-option input {
  width: auto;
  min-height: auto;
  accent-color: var(--accent);
}

.stage-plan-sections {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.leader-section {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(11, 20, 36, 0.82);
  overflow: hidden;
}

.leader-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 29, 52, 0.8);
}

.leader-header strong {
  font-size: 0.9rem;
  color: #eef5ff;
}

.leader-header span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.leader-list {
  display: grid;
  gap: 0;
}

.leader-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) 72px 72px minmax(220px, 1fr) 170px;
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.leader-row:last-child {
  border-bottom: 0;
}

.leader-row > div {
  padding: 10px 12px;
  color: #d7e5ff;
  font-size: 0.82rem;
  border-right: 1px solid var(--line);
}

.leader-row > div:last-child {
  border-right: 0;
}

.leader-row.header > div {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb4d4;
  background: rgba(13, 24, 43, 0.62);
}

.modal-section {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(11, 20, 36, 0.88);
}

.modal-section h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.modal-section p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-settings-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 12px;
}

.project-settings-form label,
.project-settings-mode,
.project-lane-selector {
  display: grid;
  gap: 7px;
}

.project-settings-form label span,
.project-settings-mode > span,
.project-lane-selector > span {
  color: #c8d7ef;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.project-settings-form input,
.project-settings-form select,
.project-settings-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  font: inherit;
}

.project-settings-form textarea {
  min-height: 108px;
  padding-top: 12px;
  resize: vertical;
}

.project-settings-wide {
  grid-column: 1 / -1;
}

.project-settings-mode .ghost-btn {
  justify-self: start;
  min-width: 170px;
}

.project-lane-selector > div,
.project-settings-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.project-lane-selector .ghost-btn.active,
.project-settings-mode .ghost-btn.active {
  color: #eef6ff;
  border-color: rgba(82, 152, 255, 0.54);
  background: rgba(58, 127, 219, 0.48);
}

.project-settings-actions {
  justify-content: space-between;
}

.project-plan-btn {
  min-width: 150px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stage-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.stage-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.stage-swatch.stage-1 {
  background: var(--stage-1);
}

.stage-swatch.stage-2 {
  background: var(--stage-2);
}

.stage-swatch.stage-3 {
  background: var(--stage-3);
}

.stage-swatch.stage-4 {
  background: var(--stage-4);
}

.stage-swatch.stage-5 {
  background: var(--stage-5);
}

.stage-swatch.stage-x {
  background: var(--stage-x);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.stage-day {
  position: relative;
  min-height: 118px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(138, 165, 210, 0.14);
  background: rgba(18, 31, 55, 0.72);
  color: #dce7fb;
  font-weight: 700;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: stretch;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.phase-split-marker {
  position: absolute;
  top: 8px;
  left: -8px;
  z-index: 2;
  width: 34px;
  min-height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(138, 165, 210, 0.32);
  background: rgba(11, 21, 38, 0.96);
  color: #9fb6d9;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.phase-split-marker::before {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 50%;
  border-left: 2px dashed rgba(138, 165, 210, 0.22);
  transform: translateX(-50%);
  z-index: -1;
}

.phase-split-marker.active {
  border-color: rgba(100, 200, 255, 0.78);
  background: linear-gradient(135deg, rgba(53, 126, 246, 0.96), rgba(31, 205, 190, 0.88));
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(72, 163, 255, 0.18), 0 12px 22px rgba(0, 0, 0, 0.26);
}

.phase-split-marker.active::before {
  border-left-color: rgba(83, 185, 255, 0.72);
}

.template-phase-chip {
  display: inline-flex !important;
  width: fit-content;
  margin: 6px 0 0 !important;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(93, 190, 255, 0.28);
  background: rgba(44, 126, 214, 0.16);
  color: #bfe0ff !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage-day:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
  border-color: rgba(138, 165, 210, 0.22);
}

.stage-day.saturday {
  background:
    linear-gradient(135deg, rgba(148, 34, 45, 0.46), rgba(18, 31, 55, 0.78) 64%),
    rgba(18, 31, 55, 0.72);
  border-color: rgba(255, 92, 105, 0.34);
}

.stage-day.sunday {
  background:
    linear-gradient(135deg, rgba(201, 157, 23, 0.34), rgba(18, 31, 55, 0.78) 62%),
    rgba(18, 31, 55, 0.72);
  border-color: rgba(241, 198, 75, 0.34);
}

.stage-day .day-number {
  font-size: 1.6rem;
  line-height: 1;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 900;
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  justify-self: center;
  color: #c7d7f3;
}

.stage-day .day-date {
  font-size: 0.64rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #89a0c5;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  justify-self: center;
  margin-top: -4px;
}

.stage-day .day-phase {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(10, 17, 32, 0.8);
}

.stage-day.stage-1 {
  background: var(--stage-1);
}

.stage-day.stage-2 {
  background: var(--stage-2);
}

.stage-day.stage-3 {
  background: var(--stage-3);
  color: #fff3f5;
}

.stage-day.stage-3 .day-phase {
  color: rgba(255, 243, 245, 0.82);
}

.stage-day.stage-4 {
  background: var(--stage-4);
  color: #f3ecff;
}

.stage-day.stage-4 .day-phase {
  color: rgba(243, 236, 255, 0.82);
}

.stage-day.stage-5 {
  background: var(--stage-5);
  color: #fff5eb;
}

.stage-day.stage-5 .day-phase {
  color: rgba(255, 245, 235, 0.82);
}

.stage-day.stage-6 {
  background: var(--stage-x);
  color: #f0f4f9;
}

.stage-day.no-phase {
  background: rgba(16, 27, 47, 0.48);
  border-color: rgba(138, 165, 210, 0.1);
  color: #7f91b2;
  box-shadow: none;
}

.stage-day.no-phase:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(138, 165, 210, 0.1);
}

.stage-day.no-phase .day-number {
  color: #7f91b2;
}

.stage-day.no-phase .day-date {
  color: #6f84a8;
}

.stage-day.no-phase.saturday {
  background:
    linear-gradient(135deg, rgba(104, 28, 39, 0.34), rgba(16, 27, 47, 0.5) 64%),
    rgba(16, 27, 47, 0.48);
  border-color: rgba(231, 80, 95, 0.22);
}

.stage-day.no-phase.sunday {
  background:
    linear-gradient(135deg, rgba(132, 100, 18, 0.28), rgba(16, 27, 47, 0.5) 62%),
    rgba(16, 27, 47, 0.48);
  border-color: rgba(230, 181, 58, 0.22);
}

.stage-shift-btn.stage-1 {
  background: var(--stage-1);
}

.stage-shift-btn.stage-2 {
  background: var(--stage-2);
}

.stage-shift-btn.stage-3 {
  background: var(--stage-3);
  color: #fff3f5;
}

.stage-shift-btn.stage-4 {
  background: var(--stage-4);
  color: #f3ecff;
}

.stage-shift-btn.stage-5 {
  background: var(--stage-5);
  color: #fff5eb;
}

.stage-shift-btn.stage-6 {
  background: var(--stage-x);
  color: #f0f4f9;
}

.stage-shift-btn.stage-empty {
  background: rgba(14, 27, 49, 0.72);
  color: #8ea3c6;
  border-style: dashed;
  box-shadow: none;
}

.stage-shifts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
}

.stage-lane-row {
  display: grid;
  grid-template-columns: 46px repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.stage-lane-tag {
  min-height: 58px;
  border-radius: 10px;
  border: 1px solid rgba(138, 165, 210, 0.14);
  background: rgba(14, 27, 49, 0.76);
  color: #91a8cb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-shift-btn {
  min-height: 58px;
  padding: 8px 6px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #0a1120;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.stage-shift-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.14);
  filter: brightness(1.02);
}

.stage-shift-name {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.86;
}

.stage-shift-value {
  font-size: 1.1rem;
  line-height: 1.05;
  font-weight: 900;
}

.stage-shift-phase {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.stage-shift-placeholder {
  min-height: 58px;
  border-radius: 10px;
  border: 1px dashed rgba(138, 165, 210, 0.16);
  background: rgba(12, 22, 39, 0.4);
  color: #6f84a8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-editor {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(11, 20, 36, 0.88);
}

.collapsible-section {
  padding: 0;
  overflow: hidden;
}

.collapsible-toggle {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.collapsible-toggle span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.collapsible-toggle .chevron {
  font-size: 1rem;
  transition: transform 0.18s ease;
}

.collapsible-section.open .collapsible-toggle .chevron {
  transform: rotate(180deg);
}

.collapsible-body {
  display: none;
  padding: 0 16px 16px;
}

.collapsible-section.open .collapsible-body {
  display: block;
}

.resource-grid {
  min-width: 760px;
}

.resource-grid-header,
.resource-grid-row,
.resource-grid-pair {
  display: grid;
  grid-template-columns: 150px 80px repeat(4, minmax(110px, 1fr));
}

.resource-grid-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 29, 50, 0.98);
  color: #d5e4ff;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.resource-grid-pair {
  grid-template-rows: repeat(2, minmax(0, auto));
}

.resource-grid-header > div,
.resource-grid-row > div,
.resource-grid-pair > div {
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resource-grid-header > div:last-child,
.resource-grid-row > div:last-child,
.resource-grid-pair > div:last-child {
  border-right: 0;
}

.resource-date {
  font-weight: 700;
  color: #dce9ff;
  background: rgba(16, 27, 48, 0.76);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  grid-row: 1 / span 2;
}

.resource-date.saturday {
  color: #ff7d88;
}

.resource-date.sunday {
  color: #f3e7a5;
}

.resource-shift {
  font-weight: 800;
  color: #84bfff;
  background: rgba(14, 27, 49, 0.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
}

.resource-date-sub {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}


.resource-control {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 8px;
  align-items: center;
}

.resource-btn {
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.1rem;
  line-height: 1;
}

.resource-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.resource-value-box {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(138, 165, 210, 0.2);
  background: rgba(18, 31, 55, 0.82);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #dce9ff;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
}

.compact-btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.database-shell {
  min-height: 720px;
}

.database-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 720px;
}

.database-sidebar {
  border-right: 1px solid var(--line);
  background: rgba(8, 15, 27, 0.72);
  min-width: 0;
}

.database-sidebar-top,
.database-panel-top,
.database-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.database-sidebar-top strong,
.database-panel-top h2,
.database-table-header strong {
  margin: 0;
  color: #eff6ff;
}

.database-panel-top p,
.database-table-header span,
.database-table-btn span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.database-table-list {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.database-table-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 10px;
  text-align: left;
  display: grid;
  gap: 4px;
  align-content: center;
  background: rgba(15, 27, 49, 0.72);
}

.database-table-btn.active {
  border-color: rgba(92, 173, 255, 0.66);
  background: rgba(36, 78, 137, 0.72);
}

.database-panel {
  min-width: 0;
}

.database-empty {
  padding: 26px;
  color: var(--muted);
  font-weight: 800;
}

.database-empty.error {
  color: #ffb4b4;
}

.database-table-wrap {
  overflow: auto;
  max-height: 610px;
}

.database-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.database-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(11, 20, 37, 0.98);
  color: #dbe7ff;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.database-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(126, 156, 205, 0.12);
  vertical-align: middle;
}

.database-input {
  min-width: 140px;
  min-height: 34px;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.database-readonly {
  color: #c8d7f1;
  font-size: 0.82rem;
  white-space: nowrap;
}

.database-actions {
  width: 96px;
  text-align: right;
}

.database-view {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    linear-gradient(180deg, rgba(7, 13, 25, 0.98), rgba(8, 15, 27, 0.995));
}

.database-shell {
  min-height: 688px;
}

.database-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 0;
  min-height: 688px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  background: rgba(7, 13, 25, 0.72);
}

.database-sidebar {
  min-width: 0;
  border-right: 1px solid rgba(140, 171, 220, 0.16);
  background:
    linear-gradient(180deg, rgba(18, 32, 57, 0.96), rgba(10, 19, 35, 0.98));
}

.database-sidebar-top {
  min-height: 72px;
  padding: 14px;
  background: rgba(12, 23, 42, 0.9);
}

.database-sidebar-top > div {
  display: grid;
  gap: 3px;
}

.database-sidebar-top strong {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.database-sidebar-top span {
  color: #91a8cb;
  font-size: 0.76rem;
  font-weight: 800;
}

.database-table-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.database-table-btn {
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border-radius: 12px;
  display: grid;
  gap: 5px;
  align-content: center;
  text-align: left;
  border-color: rgba(137, 166, 212, 0.16);
  background: rgba(11, 22, 42, 0.78);
  box-shadow: none;
}

.database-table-btn:hover {
  border-color: rgba(121, 164, 231, 0.34);
  background: rgba(18, 34, 60, 0.88);
}

.database-table-btn.active {
  border-color: rgba(85, 169, 255, 0.64);
  background:
    linear-gradient(180deg, rgba(44, 92, 156, 0.86), rgba(21, 45, 82, 0.88));
  box-shadow: inset 3px 0 0 rgba(91, 183, 255, 0.96);
}

.database-table-title {
  color: #f0f6ff;
  font-size: 0.92rem;
  font-weight: 900;
}

.database-table-name {
  overflow: hidden;
  color: #8fa5c9;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-table-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.database-table-meta span,
.database-table-badges span {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(143, 172, 218, 0.16);
  background: rgba(7, 13, 25, 0.42);
  color: #b9c9e5;
  font-size: 0.72rem;
  font-weight: 800;
}

.database-panel {
  min-width: 0;
  background: rgba(7, 13, 25, 0.58);
}

.database-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.16);
  background:
    linear-gradient(90deg, rgba(28, 56, 96, 0.34), transparent 58%),
    rgba(9, 18, 34, 0.8);
}

.database-hero-copy {
  display: grid;
  gap: 5px;
  align-content: center;
}

.database-hero-copy span {
  color: #7fb8ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.database-hero-copy h2 {
  margin: 0;
  color: #f4f8ff;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.database-hero-copy p {
  margin: 0;
  max-width: 720px;
  color: #a6b7d7;
  font-size: 0.9rem;
  line-height: 1.45;
}

.database-hero-actions {
  display: flex;
  align-items: center;
}

.database-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 10px;
  min-width: 360px;
}

.database-stats div {
  min-height: 78px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(143, 172, 218, 0.14);
  background: rgba(13, 25, 46, 0.82);
}

.database-stats strong {
  display: block;
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1.1;
}

.database-stats span {
  color: #94a9cc;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.components-shell {
  display: grid;
  gap: 14px;
  padding: 10px 6px 18px;
}

.components-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 18px;
  border: 1px solid rgba(140, 171, 220, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(31, 55, 91, 0.45), rgba(14, 24, 42, 0.84)),
    rgba(12, 23, 42, 0.96);
}

.components-header-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr) auto;
}

.components-title {
  display: grid;
  gap: 7px;
}

.components-title h2 {
  margin: 0;
  color: #edf5ff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.components-title p {
  margin: 0;
  color: #9fb2d2;
  font-size: 0.86rem;
  font-weight: 700;
}

.components-summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(90, 174, 255, 0.32);
  border-radius: 14px;
  background: rgba(20, 43, 74, 0.72);
  color: #dcecff;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.components-demand-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px auto;
  gap: 10px;
  align-items: end;
  grid-column: 1 / -1;
}

.components-demand-filters .ghost-btn {
  min-height: 42px;
  white-space: nowrap;
}

.components-date-filter {
  display: grid;
  gap: 7px;
}

.components-date-filter span {
  color: #c8d7ef;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.components-date-filter input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.38);
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  font: inherit;
}

.components-search {
  display: grid;
  gap: 7px;
}

.components-search label {
  color: #c8d7ef;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.components-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.38);
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  font: inherit;
}

.components-search input::placeholder {
  color: #71829c;
}

.components-table-card {
  overflow: auto;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 18px;
  background: rgba(8, 16, 30, 0.9);
}

.components-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.demand-table {
  min-width: 1120px;
}

.components-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 10px;
  border-bottom: 1px solid rgba(115, 151, 207, 0.34);
  background: rgba(12, 22, 40, 0.98);
  color: #dbe7ff;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.components-table tbody td {
  padding: 13px 10px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.11);
  color: #eef5ff;
  font-size: 0.88rem;
}

.components-table tbody td span {
  display: block;
  margin-top: 4px;
  color: #93a8c8;
  font-size: 0.74rem;
  font-weight: 800;
}

.specification-project-cell {
  min-width: 180px;
  color: #d8e7ff !important;
  font-weight: 850;
}

.components-table tbody tr:hover td {
  background: rgba(36, 71, 116, 0.16);
}

.project-templates-table {
  min-width: 780px;
}

.project-template-actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
}

.project-template-modal-card {
  width: min(1240px, 96vw);
}

.users-shell {
  padding-bottom: 22px;
}

.users-header {
  background:
    radial-gradient(circle at 8% 0%, rgba(92, 173, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(31, 55, 91, 0.52), rgba(14, 24, 42, 0.88)),
    rgba(12, 23, 42, 0.96);
}

.users-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.users-permission-note {
  padding: 14px 16px;
  border: 1px solid rgba(90, 174, 255, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(67, 131, 214, 0.12), transparent),
    rgba(8, 16, 30, 0.72);
  color: #9fb2d2;
  font-size: 0.88rem;
  font-weight: 750;
}

.users-permission-note strong {
  color: #edf5ff;
}

.users-table {
  min-width: 920px;
}

.users-table tbody tr[data-open-user] {
  cursor: pointer;
}

.users-table tbody tr[data-open-user]:hover td {
  background: rgba(58, 107, 171, 0.2);
}

.user-role-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 0 !important;
  padding: 0 11px;
  border: 1px solid rgba(92, 173, 255, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(87, 154, 255, 0.18), rgba(18, 37, 66, 0.62)),
    rgba(11, 22, 42, 0.78);
  color: #dcecff !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.users-actions-cell {
  width: 120px;
}

.users-modal-card {
  width: min(1080px, 96vw);
}

.users-form {
  gap: 18px;
}

.users-permission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 16px;
  background: rgba(8, 16, 30, 0.64);
}

.users-permission-toolbar strong {
  display: block;
  color: #edf5ff;
  font-size: 0.9rem;
  font-weight: 950;
}

.users-permission-toolbar span {
  display: block;
  margin-top: 4px;
  color: #9fb2d2;
  font-size: 0.78rem;
  font-weight: 800;
}

.users-permissions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.users-permission-group {
  padding: 14px;
  border: 1px solid rgba(140, 171, 220, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent),
    rgba(8, 16, 30, 0.68);
}

.users-permission-group h3 {
  margin: 0 0 12px;
  color: #edf5ff;
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.users-permission-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.users-permission-option {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(91, 132, 196, 0.22);
  border-radius: 12px;
  background: rgba(10, 20, 37, 0.72);
}

.users-permission-option input {
  width: 16px !important;
  min-height: 16px !important;
  accent-color: #55a7ff;
}

.users-permission-option span {
  color: #d8e7ff !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

.admin-monitoring-shell {
  display: grid;
  gap: 14px;
  padding: 10px 6px 22px;
}

.monitoring-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(140, 171, 220, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 0%, rgba(79, 179, 255, 0.2), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(60, 221, 198, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(20, 42, 76, 0.96), rgba(8, 16, 30, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.monitoring-hero span,
.monitoring-panel-head span {
  color: #9fb7dc;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.monitoring-hero h2 {
  margin: 6px 0;
  color: #f4f8ff;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.monitoring-hero p {
  max-width: 760px;
  margin: 0;
  color: #a8b9d5;
  font-weight: 750;
}

.monitoring-hero-actions {
  display: grid;
  gap: 8px;
  min-width: 170px;
}

.monitoring-hero-actions span {
  text-align: center;
}

.monitoring-status-grid,
.monitoring-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.monitoring-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.monitoring-kpi {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 52%),
    rgba(10, 20, 37, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.monitoring-kpi span {
  display: block;
  color: #9fb2d2;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.monitoring-kpi strong {
  display: block;
  margin: 8px 0 4px;
  color: #f4f8ff;
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1;
}

.monitoring-kpi p {
  margin: 0;
  color: #91a8ca;
  font-size: 0.82rem;
  font-weight: 850;
}

.monitoring-kpi.success {
  border-color: rgba(55, 211, 163, 0.28);
  background:
    linear-gradient(180deg, rgba(55, 211, 163, 0.12), transparent 62%),
    rgba(10, 20, 37, 0.92);
}

.monitoring-kpi.warning {
  border-color: rgba(255, 205, 94, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 205, 94, 0.12), transparent 62%),
    rgba(10, 20, 37, 0.92);
}

.monitoring-kpi.danger {
  border-color: rgba(255, 96, 124, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 96, 124, 0.15), transparent 62%),
    rgba(10, 20, 37, 0.92);
}

.monitoring-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 12px;
}

.monitoring-panel {
  overflow: hidden;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 18px;
  background: rgba(8, 16, 30, 0.9);
}

.monitoring-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.13);
  background: rgba(12, 24, 43, 0.86);
}

.monitoring-panel-head strong {
  color: #edf5ff;
  font-size: 0.98rem;
  font-weight: 950;
}

.monitoring-signal-list,
.monitoring-activity-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.monitoring-signal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(140, 171, 220, 0.14);
  border-radius: 14px;
  background: rgba(12, 24, 43, 0.64);
}

.monitoring-signal strong,
.monitoring-activity-row strong,
.monitoring-table td strong {
  display: block;
  color: #edf5ff;
  font-weight: 950;
}

.monitoring-signal p {
  margin: 4px 0 0;
  color: #9fb2d2;
  font-size: 0.84rem;
  font-weight: 780;
}

.monitoring-signal em {
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(20, 37, 64, 0.9);
  color: #edf5ff;
  font-style: normal;
  font-weight: 950;
  text-align: center;
}

.monitoring-signal.success {
  border-color: rgba(55, 211, 163, 0.25);
}

.monitoring-signal.success em {
  background: rgba(25, 119, 91, 0.5);
  color: #bcffe9;
}

.monitoring-signal.warning {
  border-color: rgba(255, 205, 94, 0.3);
}

.monitoring-signal.warning em {
  background: rgba(127, 91, 20, 0.55);
  color: #ffe5a5;
}

.monitoring-signal.danger {
  border-color: rgba(255, 96, 124, 0.34);
}

.monitoring-signal.danger em {
  background: rgba(127, 29, 48, 0.58);
  color: #ffd3dc;
}

.monitoring-activity-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(12, 24, 43, 0.62);
}

.monitoring-activity-row span,
.monitoring-table td span {
  display: block;
  margin-top: 3px;
  color: #8fa4c7;
  font-size: 0.74rem;
  font-weight: 800;
}

.monitoring-activity-row em {
  color: #cfe0fb;
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.monitoring-table-wrap {
  max-height: 470px;
  overflow: auto;
}

.monitoring-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.monitoring-table th,
.monitoring-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.1);
  text-align: left;
}

.monitoring-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(12, 22, 40, 0.98);
  color: #dbe7ff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.monitoring-table td {
  color: #edf5ff;
  font-size: 0.86rem;
  font-weight: 820;
}

.monitoring-table tr:hover td {
  background: rgba(36, 71, 116, 0.16);
}

.monitoring-table-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(55, 211, 163, 0.32);
  border-radius: 999px;
  background: rgba(25, 119, 91, 0.34);
  color: #bcffe9 !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
}

.monitoring-loading,
.monitoring-empty {
  display: grid;
  min-height: 150px;
  place-items: center;
  color: #9fb2d2;
  font-weight: 900;
}

.monitoring-loading.error {
  color: #ffd6d6;
}

.project-template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.template-stage-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.template-stage-day {
  min-height: 116px;
}

.demand-group-row {
  cursor: pointer;
}

.demand-group-row.expanded td {
  background: rgba(34, 68, 112, 0.2);
}

.demand-expand-mark {
  display: inline-grid !important;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0 8px 0 0 !important;
  border: 1px solid rgba(108, 188, 255, 0.34);
  border-radius: 8px;
  color: #9ed0ff !important;
  background: rgba(76, 163, 255, 0.1);
  font-size: 0.88rem !important;
  font-weight: 900 !important;
}

.demand-detail-row td {
  background: rgba(11, 22, 40, 0.7);
  color: #dce9ff;
}

.demand-detail-row td:first-child {
  border-left: 3px solid rgba(76, 163, 255, 0.48);
}

.components-table tbody tr.demand-overdue td,
.components-table tbody tr.demand-overdue td span,
.components-table tbody tr.demand-overdue td strong {
  color: #ff6b7f !important;
}

.components-table tbody tr.demand-due-soon td,
.components-table tbody tr.demand-due-soon td span,
.components-table tbody tr.demand-due-soon td strong {
  color: #f4d94d !important;
}

.components-table tbody tr.demand-overdue .components-stage-pill,
.components-table tbody tr.demand-due-soon .components-stage-pill {
  border-color: currentColor;
  color: currentColor !important;
}

.components-table tbody tr[data-edit-component],
.components-table tbody tr[data-edit-specification] {
  cursor: pointer;
}

.components-table tbody tr[data-edit-component]:hover td,
.components-table tbody tr[data-edit-specification]:hover td {
  background: rgba(58, 107, 171, 0.2);
}

.components-stage-pill {
  display: inline-flex !important;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(124, 157, 205, 0.22);
  background: rgba(18, 33, 58, 0.9);
  color: #d8e7ff !important;
  font-size: 0.76rem !important;
  font-weight: 900 !important;
}

.component-demand-order-btn {
  min-width: 132px;
  white-space: nowrap;
}

.component-checkbox {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 132, 196, 0.28);
  border-radius: 14px;
  background: rgba(10, 20, 37, 0.72);
  color: #dbe8ff;
  font-weight: 900;
}

.component-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #4aa3ff;
}

.component-checkbox span {
  color: #eef5ff;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.warehouse-header {
  align-items: stretch;
}

.warehouse-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 10px;
  min-width: 540px;
}

.warehouse-kpis div,
.warehouse-kpi-card {
  display: grid;
  align-content: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 174, 255, 0.24);
  border-radius: 14px;
  background: rgba(13, 28, 51, 0.84);
  text-align: left;
}

.warehouse-kpi-card {
  cursor: pointer;
  font: inherit;
}

.warehouse-kpis strong,
.warehouse-kpi-card strong {
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
}

.warehouse-kpis span,
.warehouse-kpi-card span {
  margin-top: 5px;
  color: #9fb6d8;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.warehouse-overdue-card.has-overdue {
  border-color: rgba(255, 93, 115, 0.55);
  background:
    linear-gradient(180deg, rgba(255, 93, 115, 0.18), transparent),
    rgba(53, 15, 29, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 93, 115, 0.08);
}

.warehouse-overdue-card.active {
  border-color: rgba(255, 211, 92, 0.7);
  box-shadow:
    0 0 0 3px rgba(255, 211, 92, 0.12),
    0 14px 30px rgba(0, 0, 0, 0.22);
}

.warehouse-controls {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.warehouse-controls .components-date-filter {
  min-width: 160px;
}

.warehouse-date-weekday {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 22px;
  margin-top: -2px;
  padding: 0 8px;
  border: 1px solid rgba(83, 224, 210, 0.28);
  border-radius: 999px;
  background: rgba(83, 224, 210, 0.1);
  color: #bffaf4;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.warehouse-day-note {
  padding: 12px 16px;
  border: 1px solid rgba(140, 171, 220, 0.14);
  border-radius: 16px;
  background: rgba(10, 20, 37, 0.72);
  color: #b8c9e6;
  font-size: 0.88rem;
  font-weight: 800;
}

.warehouse-day-note strong {
  color: #eef5ff;
  font-weight: 950;
}

.warehouse-table {
  min-width: 1180px;
}

.warehouse-delivered-row td {
  background: rgba(18, 89, 67, 0.16);
}

.warehouse-table tbody tr[data-warehouse-row] {
  cursor: pointer;
}

.warehouse-table tbody tr[data-warehouse-row]:hover td {
  background: rgba(58, 107, 171, 0.22);
}

.warehouse-deliver-btn {
  min-width: 124px;
}

.warehouse-dot {
  display: inline-block !important;
  width: 11px;
  height: 11px;
  margin-top: 0 !important;
  border-radius: 50%;
  background: #36df92;
  box-shadow:
    0 0 0 3px rgba(54, 223, 146, 0.16),
    0 0 14px rgba(54, 223, 146, 0.46);
  vertical-align: middle;
}

.warehouse-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(110, 143, 190, 0.3);
  background: rgba(18, 33, 58, 0.9);
  color: #dce9ff !important;
  font-size: 0.72rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.warehouse-chip.delivered {
  border-color: rgba(71, 224, 151, 0.42);
  background: linear-gradient(135deg, rgba(24, 137, 92, 0.92), rgba(14, 83, 68, 0.9));
  color: #eafff6 !important;
}

.warehouse-chip.pending {
  border-color: rgba(245, 211, 82, 0.42);
  background: rgba(117, 91, 18, 0.26);
  color: #ffeaa0 !important;
}

.warehouse-component-card {
  width: min(980px, 94vw);
}

.warehouse-component-content {
  display: grid;
  gap: 14px;
}

.warehouse-component-hero {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.warehouse-component-hero > div,
.warehouse-component-grid > div,
.warehouse-component-notes {
  padding: 12px 14px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 14px;
  background: rgba(9, 18, 34, 0.76);
}

.warehouse-component-hero span,
.warehouse-component-grid span,
.warehouse-component-notes span {
  display: block;
  margin-bottom: 6px;
  color: #91a8cc;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.warehouse-component-hero strong,
.warehouse-component-grid strong {
  color: #edf5ff;
  font-size: 0.96rem;
  font-weight: 950;
}

.warehouse-component-hero .warehouse-chip {
  align-self: center;
}

.warehouse-component-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.warehouse-component-grid a {
  color: #9ed0ff;
  text-decoration: none;
}

.warehouse-component-notes p {
  margin: 0;
  color: #dce9ff;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
}

.components-muted {
  display: inline !important;
  color: #7f91ae !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
}

.components-empty {
  display: flex;
  align-items: center;
  min-height: 96px;
  color: #9fb2d2;
  font-weight: 800;
}

.components-empty.error {
  color: #ffd6d6;
}

.specifications-table {
  min-width: 760px;
}

.component-modal-card {
  width: min(860px, 100%);
}

.component-form {
  display: grid;
  gap: 16px;
}

.component-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.component-form label {
  display: grid;
  gap: 7px;
}

.component-form label span {
  color: #c8d7ef;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.component-form input,
.component-form select,
.component-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  font: inherit;
}

.component-form textarea {
  min-height: 84px;
  padding-top: 10px;
  resize: vertical;
}

.component-form-wide {
  grid-column: 1 / -1;
}

.component-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-error {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 107, 0.32);
  background: rgba(96, 26, 36, 0.42);
  color: #ffd7d7;
  font-size: 0.86rem;
  font-weight: 800;
}

.database-import-card {
  width: min(900px, 100%);
}

.database-import-body {
  display: grid;
  gap: 16px;
}

.database-import-file-field {
  display: grid;
  gap: 8px;
}

.database-import-file-field span,
.database-import-option strong {
  color: #dceaff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.database-import-file-field input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  font: inherit;
}

.database-import-file-summary {
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.22);
  background: rgba(12, 24, 43, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.database-import-file-summary.ready {
  color: #dfffea;
  border-color: rgba(86, 220, 157, 0.34);
  background: rgba(22, 88, 61, 0.24);
}

.database-import-section-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.database-import-section-tools,
.database-import-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.database-import-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.database-import-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 112px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.24);
  background: rgba(10, 20, 37, 0.72);
  cursor: pointer;
}

.database-import-option:hover {
  border-color: rgba(92, 173, 255, 0.5);
  background: rgba(15, 31, 56, 0.9);
}

.database-import-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #58b7ff;
}

.database-import-option span,
.database-import-option small {
  display: block;
}

.database-import-option span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.database-import-option small {
  margin-top: 8px;
  color: #90a8ca;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

#specification-modal.open,
#component-picker-modal.open {
  align-items: flex-start;
  overflow: auto;
}

.nested-modal {
  z-index: 60;
  background: rgba(3, 8, 16, 0.82);
}

.specification-modal-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 32px);
}

.specification-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.specification-form {
  display: grid;
  gap: 18px;
}

.specification-copy-row {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 10px;
  align-items: center;
}

.specification-copy-row select,
.specification-form input,
.specification-form textarea,
.specification-item-row input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  background: rgba(10, 20, 37, 0.94);
  color: #edf5ff;
  font: inherit;
}

.specification-form textarea {
  min-height: 94px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.specification-copy-row select:disabled,
.specification-copy-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.specification-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.specification-extra-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(140, 171, 220, 0.18);
  background:
    linear-gradient(90deg, rgba(17, 35, 62, 0.72), rgba(9, 18, 33, 0.96)),
    rgba(10, 20, 37, 0.96);
}

.specification-extra-top h3 {
  margin: 0 0 6px;
  color: #edf5ff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.specification-extra-top p {
  margin: 0;
  color: #9fb2d2;
  font-size: 0.86rem;
}

.specification-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.specification-form-grid label,
.specification-extra-grid label,
.specification-item-row label {
  display: grid;
  gap: 7px;
}

.specification-form-grid span,
.specification-extra-grid span,
.specification-item-row label span {
  color: #c8d7ef;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.specification-form-wide {
  grid-column: 1 / -1;
}

.specification-stage-panels {
  display: grid;
  gap: 16px;
}

.specification-stage-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(140, 171, 220, 0.18);
  background:
    linear-gradient(90deg, rgba(20, 41, 72, 0.62), rgba(9, 18, 33, 0.94)),
    rgba(10, 20, 37, 0.96);
}

.specification-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.specification-stage-head h3 {
  margin: 0 0 6px;
  color: #edf5ff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.specification-stage-head p {
  margin: 0;
  color: #9fb2d2;
  font-size: 0.86rem;
}

.specification-stage-items {
  display: grid;
  gap: 10px;
}

.specification-stage-comment {
  display: grid;
  gap: 7px;
}

.specification-stage-comment span {
  color: #c8d7ef;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.specification-stage-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  border-radius: 14px;
  background: rgba(8, 16, 30, 0.54);
  color: #aabbd8;
  font-weight: 900;
}

.specification-item-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 90px minmax(220px, 1.3fr) 142px 76px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(140, 171, 220, 0.14);
  background: rgba(9, 18, 34, 0.72);
}

.specification-item-name {
  display: grid;
  gap: 5px;
  align-self: center;
}

.specification-item-name strong {
  color: #edf5ff;
  font-size: 0.95rem;
}

.specification-item-name span {
  color: #a5b7d5;
  font-size: 0.78rem;
  font-weight: 800;
}

.specification-installed-check {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px !important;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(91, 132, 196, 0.34);
  background: rgba(10, 20, 37, 0.76);
  color: #edf5ff;
  font-weight: 900;
}

.specification-installed-check input,
.component-picker-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4ea1ff;
}

.specification-installed-check span {
  color: #edf5ff !important;
  font-size: 0.78rem !important;
  letter-spacing: 0 !important;
}

.specification-actions,
.component-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.specification-actions {
  justify-content: space-between;
  align-items: center;
}

.specification-save-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.component-picker-card {
  width: min(960px, 100%);
  max-height: calc(100vh - 32px);
}

.component-picker-search {
  margin-bottom: 10px;
}

.component-picker-stage-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 0 16px;
  padding: 9px 12px;
  border: 1px solid rgba(91, 132, 196, 0.32);
  border-radius: 12px;
  background: rgba(10, 20, 37, 0.72);
  color: #dce9ff;
  font-size: 0.82rem;
  font-weight: 800;
}

.component-picker-stage-filter input {
  width: 18px;
  height: 18px;
  accent-color: #4ea1ff;
}

.component-picker-table-card {
  max-height: 560px;
}

.component-picker-table {
  min-width: 760px;
}

.component-picker-table th:first-child,
.component-picker-table td:first-child {
  width: 90px;
  text-align: center;
}

.component-picker-table tbody td {
  vertical-align: middle;
}

.component-picker-added td {
  opacity: 0.72;
}

.component-picker-added input {
  cursor: not-allowed;
}

.database-table-card {
  margin: 16px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  background: rgba(8, 16, 30, 0.86);
}

.database-table-header {
  min-height: 70px;
  padding: 14px 16px;
  background: rgba(13, 25, 46, 0.92);
}

.database-table-header > div:first-child {
  display: grid;
  gap: 4px;
}

.database-table-header strong {
  font-size: 1rem;
}

.database-table-header span {
  color: #91a8cb;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.74rem;
}

.database-table-badges {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.database-table-wrap {
  max-height: 520px;
  overflow: auto;
}

.database-table {
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
}

.database-table th {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.18);
  background: rgba(9, 18, 34, 0.98);
}

.database-table th span,
.database-table th small {
  display: block;
}

.database-table th span {
  color: #dce8ff;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.database-table th small {
  margin-top: 3px;
  color: #7489ae;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.database-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.1);
  background: rgba(8, 16, 30, 0.76);
}

.database-table tr:nth-child(even) td {
  background: rgba(11, 22, 41, 0.76);
}

.database-input {
  min-width: 132px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.82rem;
  background: rgba(14, 27, 50, 0.92);
}

.database-input.number-input {
  min-width: 90px;
}

.database-textarea {
  min-width: 220px;
  min-height: 76px;
  padding: 8px 10px;
  resize: vertical;
}

.database-readonly {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  color: #c7d7f2;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.database-actions {
  width: 108px;
  text-align: right;
}

.database-column-help {
  border-top: 1px solid rgba(140, 171, 220, 0.16);
  background: rgba(7, 14, 27, 0.72);
}

.database-column-help-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.12);
}

.database-column-help-top strong {
  color: #f4f8ff;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.database-column-help-top span {
  color: #91a8cb;
  font-size: 0.8rem;
  font-weight: 800;
}

.database-column-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}

.database-column-help-item {
  min-height: 132px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(140, 171, 220, 0.12);
  background: rgba(11, 22, 42, 0.72);
  display: grid;
  gap: 8px;
  align-content: start;
}

.database-column-help-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.database-column-help-item strong {
  color: #e7f0ff;
  font-size: 0.86rem;
}

.database-column-help-item code {
  max-width: 150px;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(143, 172, 218, 0.14);
  background: rgba(4, 10, 20, 0.44);
  color: #8fb7ee;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.database-column-help-item p {
  margin: 0;
  color: #b6c6e2;
  font-size: 0.8rem;
  line-height: 1.42;
}

.database-column-help-item span {
  color: #768db3;
  font-size: 0.7rem;
  font-weight: 800;
}

.stat-dashboard-shell {
  position: relative;
  display: grid;
  gap: 16px;
  color: #edf5ff;
}

.stat-dashboard-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: stretch;
  min-height: 154px;
  padding: 22px;
  border: 1px solid rgba(120, 164, 226, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(26, 55, 96, 0.94), rgba(8, 18, 35, 0.98)),
    rgba(11, 22, 42, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 70px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.stat-dashboard-title span,
.stat-panel-head span,
.stat-kpi-card > span,
.stat-util-copy span,
.stat-dashboard-actions span {
  color: #9fb8de;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-dashboard-title h1 {
  margin: 8px 0 8px;
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.stat-dashboard-title p {
  max-width: 780px;
  margin: 0;
  color: #b9c8e4;
  font-size: 1rem;
}

.stat-dashboard-radar {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  max-width: 860px;
  margin-top: 18px;
}

.stat-dashboard-radar article {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(126, 159, 211, 0.18);
  border-radius: 13px;
  background: rgba(8, 17, 32, 0.56);
}

.stat-dashboard-radar strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 1.55rem;
  line-height: 1;
}

.stat-dashboard-actions {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  min-width: 270px;
}

.stat-dashboard-actions > div {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(120, 164, 226, 0.2);
  border-radius: 14px;
  background: rgba(8, 17, 32, 0.68);
}

.stat-dashboard-actions strong {
  color: #f5f9ff;
  font-size: 1rem;
}

.stat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.stat-kpi-card {
  min-height: 158px;
  padding: 16px;
  border: 1px solid rgba(126, 159, 211, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(11, 22, 42, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.stat-kpi-card strong {
  display: block;
  margin: 12px 0 8px;
  color: #f7fbff;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.95;
}

.stat-kpi-card p,
.stat-kpi-card em {
  display: block;
  margin: 0;
  color: #aebfe0;
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.35;
}

.stat-kpi-card em {
  margin-top: 12px;
  color: #dbeafe;
  font-weight: 800;
}

.stat-kpi-card.blue {
  border-color: rgba(82, 157, 255, 0.32);
}

.stat-kpi-card.cyan {
  border-color: rgba(45, 212, 191, 0.32);
}

.stat-kpi-card.green {
  border-color: rgba(44, 182, 125, 0.34);
}

.stat-kpi-card.violet {
  border-color: rgba(139, 92, 246, 0.34);
}

.stat-kpi-card.yellow {
  border-color: rgba(234, 179, 8, 0.42);
  background:
    linear-gradient(180deg, rgba(113, 63, 18, 0.2), transparent 56%),
    rgba(13, 22, 40, 0.94);
}

.stat-kpi-card.red {
  border-color: rgba(248, 113, 113, 0.42);
  background:
    linear-gradient(180deg, rgba(127, 29, 29, 0.24), transparent 56%),
    rgba(13, 22, 40, 0.94);
}

.stat-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.stat-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(126, 159, 211, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent 38%),
    rgba(8, 17, 32, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat-panel.wide {
  grid-column: 1 / -1;
}

.stat-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-panel-head h2 {
  margin: 5px 0 0;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.stat-panel-head > strong {
  align-self: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(82, 157, 255, 0.28);
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.14);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stat-util-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-util-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 10px;
  align-items: center;
  min-height: 112px;
  padding: 12px;
  border: 1px solid rgba(126, 159, 211, 0.18);
  border-radius: 12px;
  background: rgba(13, 25, 46, 0.74);
}

.stat-util-copy strong,
.stat-util-copy p {
  display: block;
  margin: 5px 0 0;
}

.stat-util-copy strong {
  color: #f6f9ff;
  font-size: 0.95rem;
}

.stat-util-copy p {
  color: #9fb0d0;
  font-size: 0.78rem;
}

.stat-meter {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#4ca3ff calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
  box-shadow: inset 0 0 0 1px rgba(148, 180, 230, 0.2);
}

.stat-meter.large {
  width: 116px;
  height: 116px;
}

.stat-meter strong {
  color: #ffffff;
  font-size: 0.92rem;
}

.stat-util-card.success .stat-meter {
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#22c55e calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
}

.stat-util-card.warning .stat-meter {
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#f59e0b calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
}

.stat-util-card.danger .stat-meter {
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#ef4444 calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
}

.stat-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.stat-stage-tile {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(126, 159, 211, 0.16);
  border-radius: 10px;
  background: rgba(8, 16, 31, 0.66);
}

.stat-stage-tile div:first-child {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat-stage-tile strong {
  color: #f8fbff;
}

.stat-stage-tile span,
.stat-stage-tile small {
  color: #98abc9;
  font-size: 0.7rem;
}

.stat-stage-tile em {
  display: block;
  margin: 8px 0 6px;
  color: #eaf2ff;
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 900;
}

.stat-mini-bar,
.stat-average-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(91, 114, 151, 0.22);
}

.stat-mini-bar span,
.stat-average-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4ca3ff, #5eead4);
}

.stat-stage-tile.warning .stat-mini-bar span {
  background: linear-gradient(90deg, #eab308, #f59e0b);
}

.stat-stage-tile.danger .stat-mini-bar span {
  background: linear-gradient(90deg, #fb7185, #ef4444);
}

.stat-progress-hero {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.stat-progress-hero strong {
  display: block;
  color: #f8fbff;
  font-size: 2rem;
  line-height: 1;
}

.stat-progress-hero span,
.stat-progress-hero p {
  display: block;
  margin: 5px 0 0;
  color: #aebfe0;
  font-size: 0.82rem;
}

.stat-problem-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.stat-funnel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.stat-funnel-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(126, 159, 211, 0.16);
  border-radius: 11px;
  background: rgba(13, 25, 46, 0.72);
}

.stat-funnel-grid span,
.stat-warehouse-hero span {
  display: block;
  color: #9fb0d0;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stat-funnel-grid strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 1.45rem;
}

.stat-risk-list {
  display: grid;
  gap: 9px;
}

.stat-risk-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.38fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  background: rgba(54, 38, 14, 0.22);
}

.stat-risk-item.danger {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.18);
}

.stat-risk-main strong,
.stat-risk-progress em {
  display: block;
  color: #ffffff;
  font-weight: 900;
}

.stat-risk-main span,
.stat-risk-progress small {
  display: block;
  margin-top: 4px;
  color: #aebfe0;
  font-size: 0.76rem;
}

.stat-risk-progress {
  display: grid;
  gap: 6px;
}

.stat-risk-progress em {
  font-style: normal;
  text-align: right;
}

.stat-warehouse-hero {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  border-radius: 14px;
  background: rgba(20, 184, 166, 0.08);
}

.stat-warehouse-hero.warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(113, 63, 18, 0.14);
}

.stat-warehouse-hero.danger {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.16);
}

.stat-warehouse-hero.success .stat-meter {
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#22c55e calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
}

.stat-warehouse-hero.warning .stat-meter {
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#f59e0b calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
}

.stat-warehouse-hero.danger .stat-meter {
  background:
    radial-gradient(circle at center, #0a1425 58%, transparent 59%),
    conic-gradient(#ef4444 calc(var(--percent) * 1%), rgba(71, 92, 126, 0.3) 0);
}

.stat-warehouse-hero strong {
  display: block;
  color: #f8fbff;
  font-size: 1.65rem;
  line-height: 1;
}

.stat-warehouse-hero p {
  margin: 6px 0 0;
  color: #aebfe0;
  font-size: 0.82rem;
}

.stat-problem-pill,
.stat-empty-pill,
.stat-warehouse-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  background: rgba(127, 29, 29, 0.16);
  color: #fecdd3;
  font-size: 0.74rem;
  font-weight: 800;
}

.stat-warehouse-pill {
  border-color: rgba(82, 157, 255, 0.25);
  background: rgba(37, 99, 235, 0.13);
  color: #bfdbfe;
}

.stat-installation-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  background: rgba(127, 29, 29, 0.16);
  color: #fecdd3;
  font-size: 0.74rem;
  font-weight: 800;
}

.stat-empty-pill {
  border-color: rgba(45, 212, 191, 0.24);
  background: rgba(20, 184, 166, 0.12);
  color: #ccfbf1;
}

.stat-signal-list,
.stat-top-list,
.stat-installation-list,
.stat-average-list {
  display: grid;
  gap: 9px;
}

.stat-signal-card,
.stat-top-item,
.stat-installation-item,
.stat-average-row {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(126, 159, 211, 0.16);
  background: rgba(12, 24, 44, 0.7);
}

.stat-signal-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stat-signal-card span,
.stat-top-item strong,
.stat-average-label strong {
  color: #f8fbff;
  font-weight: 900;
}

.stat-signal-card p,
.stat-top-item span,
.stat-average-label span,
.stat-average-value span {
  margin: 3px 0 0;
  color: #9fb0d0;
  font-size: 0.76rem;
}

.stat-signal-card > strong {
  min-width: 54px;
  color: #ffffff;
  font-size: 1.65rem;
  text-align: right;
}

.stat-signal-card.danger {
  border-color: rgba(248, 113, 113, 0.3);
}

.stat-signal-card.warning {
  border-color: rgba(245, 158, 11, 0.32);
}

.stat-signal-card.ok {
  border-color: rgba(45, 212, 191, 0.28);
}

.stat-top-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stat-installation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.stat-installation-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(251, 113, 133, 0.2);
  border-radius: 11px;
  background: rgba(127, 29, 29, 0.12);
}

.stat-installation-summary span {
  display: block;
  color: #fda4af;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-installation-summary strong {
  display: block;
  margin-top: 6px;
  color: #ffffff;
  font-size: 1.42rem;
}

.stat-installation-list {
  margin-top: 12px;
}

.stat-installation-item {
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto) minmax(96px, auto);
  border-color: rgba(251, 113, 133, 0.24);
  background: rgba(127, 29, 29, 0.13);
}

.stat-installation-main strong,
.stat-installation-meta em {
  display: block;
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
}

.stat-installation-main span,
.stat-installation-meta small {
  display: block;
  margin-top: 4px;
  color: #f0b8c0;
  font-size: 0.74rem;
}

.stat-installation-meta {
  text-align: right;
}

.stat-installation-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.stat-installation-flags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
  font-size: 0.66rem;
  font-weight: 900;
}

.stat-installation-flags .problem {
  color: #fecdd3;
  background: rgba(190, 18, 60, 0.2);
}

.stat-top-item em {
  color: #fecdd3;
  font-style: normal;
  font-weight: 900;
}

.stat-empty-list {
  padding: 18px;
  border: 1px dashed rgba(126, 159, 211, 0.2);
  border-radius: 12px;
  color: #9fb0d0;
  text-align: center;
}

.stat-average-row {
  grid-template-columns: minmax(160px, 0.3fr) minmax(180px, 1fr) 132px;
}

.stat-average-value {
  text-align: right;
}

.stat-average-value strong {
  color: #f8fbff;
  font-size: 1.2rem;
}

.stat-dashboard-loading {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 420px;
  border: 1px solid rgba(126, 159, 211, 0.18);
  border-radius: 18px;
  background: rgba(8, 17, 32, 0.88);
  color: #c9d7ef;
  font-size: 1rem;
  font-weight: 800;
}

.stat-dashboard-loading.error {
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(127, 29, 29, 0.14);
}

.problems-shell {
  min-height: 608px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.problems-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(140, 171, 220, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(22, 36, 62, 0.86), rgba(10, 20, 37, 0.88));
}

.problems-topbar h1 {
  margin: 3px 0 4px;
  font-size: 1.42rem;
  letter-spacing: 0;
}

.problems-topbar p {
  margin: 0;
  color: #9fb2d2;
  font-size: 0.88rem;
  line-height: 1.35;
}

.section-eyebrow {
  color: #78b7ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.problems-stats {
  min-width: 108px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 14px;
  background: rgba(25, 56, 97, 0.38);
}

.problems-stats strong {
  color: #e8f3ff;
  font-size: 1.45rem;
}

.problems-stats span {
  color: #9fc3f5;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problems-refresh-btn {
  min-width: 118px;
}

.problems-table-card {
  overflow: auto;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 18px;
  background: rgba(7, 14, 27, 0.72);
}

.problems-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

.problems-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.18);
  background: rgba(10, 19, 35, 0.98);
  color: #dce8ff;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.problems-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(140, 171, 220, 0.12);
  background: rgba(8, 16, 30, 0.72);
  color: #dce8ff;
  vertical-align: middle;
}

.problem-row {
  cursor: pointer;
}

.problem-row:nth-child(even) td {
  background: rgba(11, 22, 41, 0.74);
}

.problem-row:hover td {
  background: rgba(22, 43, 75, 0.72);
}

.problem-row.material td:first-child {
  box-shadow: inset 4px 0 0 rgba(255, 198, 86, 0.88);
}

.problem-row.people td:first-child {
  box-shadow: inset 4px 0 0 rgba(109, 179, 255, 0.88);
}

.problem-row.design td:first-child {
  box-shadow: inset 4px 0 0 rgba(255, 105, 126, 0.88);
}

.problems-table td strong,
.problems-table td span {
  display: block;
}

.problems-table td span {
  margin-top: 3px;
  color: #8fa4c7;
  font-size: 0.78rem;
  font-weight: 800;
}

.problem-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(140, 171, 220, 0.18);
  border-radius: 999px;
  background: rgba(20, 37, 64, 0.74);
  color: #e7f0ff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.problems-table td .problem-type-pill {
  display: inline-flex;
  margin-top: 0;
}

.problem-type-pill.material {
  border-color: rgba(255, 205, 94, 0.42);
  background: rgba(122, 87, 18, 0.34);
  color: #ffe0a1;
}

.problem-type-pill.people {
  border-color: rgba(111, 185, 255, 0.42);
  background: rgba(30, 82, 137, 0.36);
  color: #cfe8ff;
}

.problem-type-pill.design {
  border-color: rgba(255, 118, 139, 0.42);
  background: rgba(121, 33, 51, 0.36);
  color: #ffd4dc;
}

.problem-details-preview {
  max-width: 300px;
  overflow: hidden;
  color: #bac8e2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problems-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #9fb2d2;
  font-weight: 900;
}

.problems-empty.error {
  color: #ffd6d6;
}

@media (max-width: 1420px) {
  body.tv-mode {
    overflow: auto;
  }

  body.tv-mode .tv-view {
    min-height: 100vh;
    max-height: none;
    overflow: visible;
  }

  body.tv-mode .tv-shell {
    height: auto;
  }

  .tv-command-center {
    grid-template-columns: 1fr;
  }

  .tv-command-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tv-controls-stack {
    grid-template-columns: minmax(120px, 0.45fr) minmax(280px, 1fr) minmax(180px, 0.65fr);
    align-items: end;
  }

  body.tv-mode .tv-hall {
    min-height: 760px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(250px, auto) minmax(250px, auto) minmax(210px, auto) 42px;
    grid-template-areas:
      "stage3 stage3"
      "stage4 stage2"
      "stage5 stage1"
      "legend legend";
  }
}

@media (max-width: 900px) {
  .monitoring-status-grid,
  .monitoring-kpi-grid {
    grid-template-columns: 1fr;
  }

  .monitoring-panel-head,
  .monitoring-signal,
  .monitoring-activity-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .tv-command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tv-controls-stack {
    grid-template-columns: 1fr;
  }

  body.tv-mode .tv-hall {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "stage3"
      "stage4"
      "stage2"
      "stage5"
      "stage1"
      "legend";
  }

  .tv-stage-card.layout-wide .tv-slots,
  .tv-stage-card.layout-pair .tv-slots,
  .tv-stage-card.layout-row .tv-slots {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .tv-legend {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .stat-dashboard-top,
  .stat-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stat-dashboard-actions {
    min-width: 0;
  }

  .stat-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-util-grid,
  .stat-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .database-layout {
    grid-template-columns: 1fr;
  }

  .database-sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(140, 171, 220, 0.16);
  }

  .database-table-list {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .database-hero {
    flex-direction: column;
  }

  .database-stats {
    min-width: 0;
  }

  .components-header-grid {
    grid-template-columns: 1fr;
  }

  .components-header {
    align-items: stretch;
    flex-direction: column;
  }

  .components-demand-filters {
    grid-template-columns: 1fr 1fr;
  }

  .users-permissions-grid,
  .users-permission-options {
    grid-template-columns: 1fr;
  }

  .users-permission-toolbar,
  .users-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .monitoring-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .monitoring-status-grid,
  .monitoring-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitoring-layout {
    grid-template-columns: 1fr;
  }

  .warehouse-kpis {
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .warehouse-controls {
    justify-content: flex-start;
  }

  .warehouse-component-hero,
  .warehouse-component-grid {
    grid-template-columns: 1fr;
  }

  .components-demand-filters .components-search,
  .components-demand-filters .ghost-btn {
    grid-column: 1 / -1;
  }

  .component-form-grid {
    grid-template-columns: 1fr;
  }

  .project-settings-form {
    grid-template-columns: 1fr;
  }

  .specification-copy-row,
  .specification-form-grid,
  .specification-extra-grid,
  .specification-item-row {
    grid-template-columns: 1fr;
  }

  .specification-stage-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1120px) {
  :root {
    --label-width: 360px;
    --day-width: 40px;
  }

  .project-card {
    grid-template-columns: minmax(120px, 1fr) 36px;
    grid-template-rows: auto auto auto;
  }

  .phase-card {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 920px) {
  :root {
    --label-width: 380px;
  }

  .stat-dashboard-view {
    padding: 10px;
  }

  .stat-dashboard-top {
    padding: 16px;
  }

  .stat-kpi-grid,
  .stat-util-grid,
  .stat-stage-grid,
  .stat-dashboard-radar,
  .stat-funnel-grid {
    grid-template-columns: 1fr;
  }

  .stat-average-row,
  .stat-progress-hero,
  .stat-warehouse-hero,
  .stat-risk-item,
  .stat-installation-summary,
  .stat-installation-item {
    grid-template-columns: 1fr;
  }

  .stat-average-value {
    text-align: left;
  }

  .stat-risk-progress em {
    text-align: left;
  }

  .stat-installation-meta {
    text-align: left;
  }

  .phase-grid {
    grid-template-columns: 1fr;
  }
}

@page {
  size: landscape;
  margin: 8mm;
}

@media print {
  html,
  body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body,
  .page {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body::before,
  .page::before,
  .toolbar,
  .footer-note,
  #gantt-board,
  #table-view,
  #tv-view,
  #today-plan-modal,
  #project-modal,
  #staff-config-modal,
  #database-import-modal,
  #component-modal,
  #specification-modal,
  #component-picker-modal {
    display: none !important;
  }

  #stage-plan-view,
  .stage-plan-view,
  .stage-plan-view.active {
    display: block !important;
    overflow: visible !important;
    max-height: none !important;
    min-height: 0 !important;
    border: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  .stage-plan-shell {
    min-width: 0 !important;
  }

  .stage-plan-header {
    grid-template-columns: 140px minmax(0, 1fr) !important;
  }

  .stage-plan-row {
    grid-template-columns: 140px minmax(0, 1fr) !important;
  }

  .stage-plan-header {
    position: static !important;
    background: #ffffff !important;
    border-bottom-color: rgba(0, 0, 0, 0.22) !important;
  }

  .stage-plan-title,
  .stage-plan-label {
    position: static !important;
    left: auto !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #000000 !important;
  }

  .stage-plan-title {
    padding: 0 !important;
    min-height: 0 !important;
    border-right: 1.5px solid rgba(0, 0, 0, 0.22) !important;
  }

  .stage-plan-title strong,
  .stage-plan-title span,
  .stage-plan-label strong,
  .stage-plan-month,
  .stage-plan-day {
    color: #000000 !important;
  }

  .stage-plan-title strong,
  .stage-plan-title span {
    display: none !important;
  }

  .stage-plan-month,
  .stage-plan-day,
  .stage-plan-body,
  .stage-lane {
    background: #ffffff !important;
  }

  .stage-plan-day,
  .stage-plan-month {
    border-right: 1.5px solid rgba(0, 0, 0, 0.28) !important;
  }

  .stage-plan-body,
  .stage-plan-label,
  .stage-plan-tracks,
  .stage-lane {
    border-color: rgba(0, 0, 0, 0.18) !important;
  }

  .stage-lane {
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.24) !important;
    background-image: repeating-linear-gradient(
      to right,
      transparent 0,
      transparent calc(var(--day-width) - 1.5px),
      rgba(0, 0, 0, 0.24) calc(var(--day-width) - 1.5px),
      rgba(0, 0, 0, 0.24) var(--day-width)
    ) !important;
  }

  .stage-item {
    border: 0.75px solid rgba(0, 0, 0, 0.16) !important;
    box-shadow: none !important;
  }

  .stage-item {
    color: #000000 !important;
    font-size: 0.42rem !important;
    font-weight: 900 !important;
  }
}

body.tablet-mode {
  background:
    radial-gradient(circle at top left, rgba(76, 163, 255, 0.16), transparent 24%),
    radial-gradient(circle at 85% 18%, rgba(97, 215, 192, 0.08), transparent 18%),
    linear-gradient(180deg, #050d18 0%, #091423 46%, #07101c 100%);
  color: var(--text);
}

body.tablet-mode .page::before {
  display: none;
}

body.tablet-mode::before {
  display: block;
}

body.tablet-mode .page {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(15, 26, 47, 0.22), transparent 24%),
    linear-gradient(180deg, rgba(8, 16, 30, 0.96), rgba(7, 14, 25, 0.98));
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

body.standalone-tablet .tablet-stage-topbar {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) minmax(300px, auto);
}

.tablet-stage-view {
  display: none;
  min-height: 100vh;
  max-height: none;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top left, rgba(76, 163, 255, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(20, 190, 160, 0.07), transparent 26%),
    linear-gradient(180deg, rgba(8, 15, 27, 0.985), rgba(10, 18, 34, 0.995));
  color: var(--text);
  box-shadow: none;
}

.tablet-stage-view.active {
  display: block;
}

.tablet-stage-shell {
  min-height: 100vh;
  padding: 14px;
  background:
    radial-gradient(circle at 7% 0%, rgba(92, 158, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(8, 15, 27, 0.96), rgba(7, 14, 25, 0.98));
}

.tablet-stage-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(180px, 240px) minmax(300px, auto) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 70%),
    rgba(14, 26, 48, 0.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.tablet-back-btn,
.tablet-refresh-btn,
.tablet-date-nav button,
.tablet-status-btn {
  color: var(--text);
  border-color: rgba(120, 152, 205, 0.32);
  background: linear-gradient(180deg, rgba(22, 36, 61, 0.92), rgba(12, 23, 42, 0.9));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.tablet-refresh-btn {
  min-width: 116px;
  min-height: 64px;
  border-radius: 16px;
  border-width: 2px;
  color: #ffffff;
  border-color: rgba(92, 173, 255, 0.54);
  background: linear-gradient(135deg, #5aaeff, #2e7cf0);
  font-size: 0.92rem;
  font-weight: 950;
}

.tablet-refresh-btn:disabled {
  opacity: 0.62;
  cursor: wait;
}

.tablet-back-btn {
  min-width: 112px;
  min-height: 64px;
  border-radius: 16px;
  border-width: 2px;
  font-size: 1.05rem;
  font-weight: 900;
}

.tablet-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tablet-control select,
.tablet-control input {
  min-height: 64px;
  border: 1px solid rgba(120, 152, 205, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(19, 31, 54, 0.96), rgba(13, 24, 43, 0.94));
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 850;
}

.tablet-date-nav {
  display: grid;
  grid-template-columns: 64px minmax(160px, 1fr) 64px;
  gap: 8px;
  align-items: center;
}

.tablet-date-nav button {
  min-height: 64px;
  border-width: 1px;
  border-radius: 16px;
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
}

.tablet-date-nav strong {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 0 12px;
  border: 1px solid rgba(120, 152, 205, 0.3);
  border-radius: 16px;
  color: #dce9ff;
  background: rgba(9, 17, 31, 0.72);
  font-size: 1rem;
  text-align: center;
}

.tablet-stage-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.tablet-stage-kpi {
  appearance: none;
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 152, 205, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 72%),
    rgba(14, 26, 48, 0.82);
  color: var(--text);
  text-align: left;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
}

.tablet-stage-filter-card {
  cursor: pointer;
}

.tablet-stage-filter-card:hover {
  border-color: rgba(90, 174, 255, 0.62);
  transform: translateY(-1px);
}

.tablet-stage-filter-card.active {
  border-color: rgba(90, 174, 255, 0.92);
  background: linear-gradient(135deg, rgba(50, 125, 230, 0.78), rgba(22, 54, 105, 0.92));
  box-shadow: 0 0 0 3px rgba(90, 174, 255, 0.16), 0 16px 32px rgba(24, 93, 190, 0.24);
}

.tablet-stage-kpi span,
.tablet-stage-kpi small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.tablet-stage-kpi strong {
  color: #eef5ff;
  font-size: 1.36rem;
  font-weight: 950;
  line-height: 1;
}

.tablet-stage-kpi.installed {
  border-color: rgba(52, 211, 153, 0.34);
  background: linear-gradient(180deg, rgba(18, 92, 68, 0.4), rgba(12, 29, 45, 0.82));
}

.tablet-stage-kpi.problem {
  border-color: rgba(255, 107, 107, 0.4);
  background: linear-gradient(180deg, rgba(112, 32, 48, 0.4), rgba(12, 29, 45, 0.82));
}

.tablet-stage-kpi.tablet-stage-filter-card.active {
  border-color: rgba(90, 174, 255, 0.92);
  background: linear-gradient(135deg, rgba(50, 125, 230, 0.78), rgba(22, 54, 105, 0.92));
  box-shadow: 0 0 0 3px rgba(90, 174, 255, 0.16), 0 16px 32px rgba(24, 93, 190, 0.24);
}

.tablet-stage-overdue-card {
  cursor: pointer;
}

.tablet-stage-overdue-card.has-overdue {
  border-color: rgba(255, 205, 71, 0.56);
  background: linear-gradient(180deg, rgba(119, 82, 20, 0.48), rgba(12, 29, 45, 0.86));
}

.tablet-stage-overdue-card.active {
  border-color: rgba(90, 174, 255, 0.92);
  background: linear-gradient(135deg, rgba(50, 125, 230, 0.78), rgba(22, 54, 105, 0.92));
  box-shadow: 0 0 0 3px rgba(90, 174, 255, 0.16), 0 16px 32px rgba(24, 93, 190, 0.24);
}

.tablet-overdue-project-pill {
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 205, 71, 0.58);
  border-radius: 999px;
  color: #ffe59a;
  background: rgba(116, 76, 16, 0.42);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  vertical-align: middle;
}

.tablet-stage-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 14px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 70%),
    rgba(14, 26, 48, 0.94);
  box-shadow: var(--shadow-soft);
}

.tablet-stage-hero span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tablet-stage-hero h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.02;
}

.tablet-stage-hero strong {
  min-width: 136px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #5aaeff, #2e7cf0);
  color: #ffffff;
  font-size: 1.1rem;
  text-align: center;
}

.tablet-projects {
  display: grid;
  gap: 14px;
}

.tablet-project-card {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(11, 20, 37, 0.9);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.tablet-project-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(17, 30, 53, 0.82);
}

.tablet-project-title h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  line-height: 1.04;
}

.tablet-project-title p,
.tablet-project-slots {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.tablet-project-slots {
  color: #7db8ff;
}

.tablet-stage-days {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 230px;
}

.tablet-stage-days.empty {
  min-width: 0;
  color: var(--muted);
  font-weight: 900;
}

.tablet-stage-day-dot {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 3px solid rgba(157, 177, 211, 0.9);
  background: #74839a;
  transform: rotate(45deg);
}

.tablet-stage-day-dot > span {
  transform: rotate(-45deg);
}

.tablet-stage-day-content {
  display: grid;
  place-items: center;
  gap: 1px;
  color: #ffffff;
  line-height: 0.95;
}

.tablet-stage-day-content strong {
  display: block;
  font-size: 0.58rem;
  font-weight: 950;
}

.tablet-stage-day-content small {
  display: block;
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0;
}

.tablet-stage-day-dot.past {
  border-color: rgba(255, 142, 142, 0.95);
  background: #b91c1c;
}

.tablet-stage-day-dot.future {
  border-color: rgba(157, 177, 211, 0.82);
  background: #4b5a70;
}

.tablet-stage-day-dot.saturday {
  border-color: rgba(190, 68, 78, 0.96);
  background: #5a1722;
}

.tablet-stage-day-dot.sunday {
  border-color: rgba(190, 150, 35, 0.96);
  background: #5a4613;
}

.tablet-stage-day-dot.selected {
  border: 6px solid #4ca3ff;
  box-shadow: 0 0 0 3px rgba(76, 163, 255, 0.22), 0 0 22px rgba(76, 163, 255, 0.34);
}

.tablet-stage-day-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 900;
}

.tablet-component-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.tablet-component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 46%);
  gap: 10px;
  align-items: stretch;
  min-height: 84px;
  border: 1px solid rgba(120, 152, 205, 0.24);
  border-radius: 16px;
  background: rgba(9, 17, 31, 0.78);
}

.tablet-component-row.in-progress {
  border-color: rgba(74, 154, 255, 0.86);
}

.tablet-component-row.installed {
  border-color: rgba(44, 182, 125, 0.86);
}

.tablet-component-row.problem {
  border-color: rgba(255, 107, 107, 0.9);
}

.tablet-component-row.problem-resolved {
  border-color: rgba(51, 211, 133, 0.86);
  box-shadow: inset 0 0 0 1px rgba(51, 211, 133, 0.18);
}

.tablet-component-info {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 12px 16px;
  min-width: 0;
}

.tablet-component-info strong {
  color: #eef5ff;
  font-size: 1.12rem;
}

.tablet-component-info span {
  color: #dce9ff;
  font-size: 1.08rem;
  font-weight: 800;
}

.tablet-component-info small {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.tablet-component-info .warehouse-chip {
  margin-top: 2px;
  justify-self: start;
}

.tablet-component-actions {
  display: grid;
  grid-template-columns: minmax(78px, 0.8fr) repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
}

.tablet-component-duration {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 70px;
  padding: 0 6px;
  border: 1px solid rgba(120, 152, 205, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 31, 53, 0.8), rgba(8, 16, 29, 0.88));
  color: #dce9ff;
}

.tablet-component-duration span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.tablet-component-duration strong {
  color: #eef5ff;
  font-size: 1.02rem;
  font-weight: 950;
  line-height: 1.08;
}

.tablet-component-duration.active {
  border-color: rgba(105, 174, 255, 0.58);
  background: linear-gradient(180deg, rgba(37, 111, 232, 0.36), rgba(8, 16, 29, 0.9));
}

.tablet-component-duration.done {
  border-color: rgba(86, 220, 157, 0.48);
  background: linear-gradient(180deg, rgba(25, 145, 95, 0.3), rgba(8, 16, 29, 0.9));
}

.tablet-component-duration.problem {
  border-color: rgba(255, 126, 126, 0.48);
  background: linear-gradient(180deg, rgba(150, 34, 48, 0.3), rgba(8, 16, 29, 0.9));
}

.tablet-status-btn {
  min-height: 70px;
  padding: 0 8px;
  border-width: 2px;
  border-radius: 14px;
  color: #ffffff;
  font-size: clamp(0.78rem, 1.7vw, 1rem);
  font-weight: 900;
  text-transform: uppercase;
  white-space: normal;
}

.tablet-status-btn.in-progress {
  background: linear-gradient(180deg, rgba(54, 118, 216, 0.88), rgba(34, 83, 166, 0.82));
  border-color: rgba(105, 174, 255, 0.66);
}

.tablet-status-btn.installed {
  background: linear-gradient(180deg, rgba(42, 164, 111, 0.9), rgba(27, 112, 77, 0.84));
  border-color: rgba(86, 220, 157, 0.66);
}

.tablet-status-btn.problem {
  background: linear-gradient(180deg, rgba(190, 42, 56, 0.9), rgba(120, 25, 36, 0.86));
  border-color: rgba(255, 126, 126, 0.7);
}

.tablet-status-btn.in-progress.active {
  color: #ffffff;
  background: linear-gradient(135deg, #5aaeff, #256fe8);
  border-color: rgba(146, 204, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(90, 174, 255, 0.18), 0 16px 28px rgba(39, 118, 230, 0.3);
}

.tablet-status-btn.installed.active {
  color: #ffffff;
  background: linear-gradient(135deg, #37d993, #15915f);
  border-color: rgba(134, 245, 190, 0.9);
  box-shadow: 0 0 0 3px rgba(55, 217, 147, 0.16), 0 16px 28px rgba(25, 145, 95, 0.24);
}

.tablet-status-btn.problem.active {
  color: #ffffff;
  background: linear-gradient(135deg, #ff6b6b, #bd2238);
  border-color: rgba(255, 174, 174, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18), 0 16px 28px rgba(189, 34, 56, 0.28);
}

.tablet-status-btn.problem.resolved {
  color: #ffffff;
  background: linear-gradient(135deg, #39d98a, #13895b);
  border-color: rgba(143, 247, 190, 0.86);
  box-shadow: 0 0 0 3px rgba(57, 217, 138, 0.16), 0 16px 28px rgba(19, 137, 91, 0.24);
}

.tablet-component-row.in-progress .tablet-status-btn:not(.active),
.tablet-component-row.installed .tablet-status-btn:not(.active),
.tablet-component-row.problem .tablet-status-btn:not(.active):not(.resolved),
.tablet-component-row.problem-resolved .tablet-status-btn:not(.resolved) {
  color: rgba(196, 210, 234, 0.62);
  border-color: rgba(102, 125, 164, 0.24);
  background: linear-gradient(180deg, rgba(24, 36, 57, 0.62), rgba(10, 18, 32, 0.76));
  box-shadow: none;
  filter: saturate(0.32) brightness(0.78);
  opacity: 0.74;
}

.tablet-component-row .tablet-status-btn.active,
.tablet-component-row.problem-resolved .tablet-status-btn.problem.resolved {
  outline: 3px solid rgba(255, 255, 255, 0.22);
  outline-offset: -5px;
  filter: saturate(1.15) brightness(1.08);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

.tablet-status-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.tablet-problem-card,
.problem-detail-card {
  width: min(920px, 100%);
  border-radius: 20px;
}

.tablet-problem-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.tablet-problem-field,
.problem-detail-field {
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 14px;
  background: rgba(9, 18, 34, 0.76);
}

.tablet-problem-field span,
.problem-detail-field span {
  display: block;
  color: #8399bf;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tablet-problem-field strong,
.problem-detail-field strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #eef5ff;
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tablet-problem-current {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 184, 102, 0.28);
  border-radius: 14px;
  background: rgba(112, 73, 24, 0.26);
  color: #ffdba9;
  font-weight: 850;
}

.tablet-problem-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 16px;
  background: rgba(10, 20, 37, 0.76);
}

.tablet-problem-panel h3 {
  margin: 0 0 10px;
  color: #e7f0ff;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.problem-type-btn {
  min-height: 76px;
  border-width: 2px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 36, 62, 0.92), rgba(12, 24, 44, 0.9));
  color: #dce8ff;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.problem-type-btn.active {
  border-color: rgba(90, 174, 255, 0.9);
  background: linear-gradient(135deg, #4da4ff, #246ee6);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(90, 174, 255, 0.18);
}

.tablet-problem-details-label {
  display: block;
  margin-bottom: 8px;
  color: #a9bbd8;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tablet-problem-details {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(140, 171, 220, 0.22);
  background: rgba(8, 16, 30, 0.92);
  color: #eef5ff;
  resize: vertical;
}

.tablet-problem-actions,
.problem-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

body.tablet-mode #tablet-problem-modal.open {
  align-items: flex-start;
  justify-content: center;
  padding:
    max(8px, env(safe-area-inset-top))
    max(8px, env(safe-area-inset-right))
    max(8px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  overflow: auto;
  z-index: 120;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-card {
  width: min(100%, 880px);
  max-height: none;
  margin: auto 0;
  padding: 14px;
  border-radius: 16px;
}

body.tablet-mode #tablet-problem-modal .modal-top {
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

body.tablet-mode #tablet-problem-modal .modal-top h2 {
  margin-bottom: 4px;
  font-size: 1.22rem;
  letter-spacing: 0;
}

body.tablet-mode #tablet-problem-modal .modal-top p {
  font-size: 0.78rem;
  line-height: 1.25;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-field {
  min-height: 58px;
  padding: 8px 10px;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-field span {
  font-size: 0.62rem;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-field strong {
  margin-top: 3px;
  font-size: 0.82rem;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-panel {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 14px;
}

body.tablet-mode #tablet-problem-modal .problem-type-btn {
  min-height: 58px;
  border-radius: 12px;
  font-size: 0.72rem;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-details {
  min-height: 92px;
}

body.tablet-mode #tablet-problem-modal .tablet-problem-actions {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(10, 20, 37, 0), rgba(10, 20, 37, 0.96) 32%);
}

.problem-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.problem-detail-section {
  padding: 14px;
  border: 1px solid rgba(140, 171, 220, 0.16);
  border-radius: 16px;
  background: rgba(9, 18, 34, 0.76);
}

.problem-detail-section.highlight {
  grid-column: 1 / -1;
  border-color: rgba(90, 174, 255, 0.24);
  background: rgba(15, 31, 56, 0.82);
}

.problem-detail-section h3 {
  margin: 0 0 10px;
  color: #eef5ff;
  font-size: 0.98rem;
}

.problem-detail-section p {
  margin: 12px 0 0;
  color: #d5e2f8;
  line-height: 1.5;
  white-space: pre-wrap;
}

.problem-detail-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.problem-detail-heading > span:last-child {
  color: #9fb2d2;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.problem-doc-link {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(4, 10, 20, 0.42);
  color: #9fb2d2;
  font-weight: 850;
}

.problem-doc-link a {
  color: #7ec3ff;
  font-weight: 900;
}

.tablet-stage-empty {
  padding: 22px;
  border: 1px dashed rgba(141, 177, 233, 0.36);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(9, 17, 31, 0.72);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

.tablet-stage-empty.large {
  min-height: 260px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.tablet-stage-empty.error {
  color: #ffdede;
  border-color: rgba(255, 107, 107, 0.38);
  background: rgba(118, 38, 48, 0.28);
}

@media (max-width: 980px) {
  .tablet-stage-topbar {
    grid-template-columns: 1fr 1fr;
  }

  .tablet-stage-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tablet-back-btn,
  .tablet-refresh-btn {
    min-width: 0;
  }

  .tablet-date-nav {
    grid-column: 1 / -1;
  }

  .tablet-project-head {
    grid-template-columns: 1fr;
  }

  .tablet-stage-days {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .problems-topbar,
  .problem-detail-grid {
    grid-template-columns: 1fr;
  }

  .tablet-problem-context {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (orientation: portrait) and (min-width: 701px) and (max-width: 980px) {
  body.tablet-mode .tablet-stage-shell {
    padding: 8px;
  }

  body.tablet-mode .tablet-stage-topbar {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    gap: 8px;
    align-items: end;
    padding: 8px;
    border-radius: 14px;
  }

  body.tablet-mode .tablet-date-nav {
    grid-column: 1 / -1;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
  }

  body.tablet-mode .tablet-refresh-btn {
    min-height: 44px;
    border-radius: 12px;
    font-size: 0.72rem;
  }

  body.tablet-mode .tablet-control {
    gap: 4px;
    font-size: 0.64rem;
  }

  body.tablet-mode .tablet-control select,
  body.tablet-mode .tablet-control input {
    min-height: 44px;
    border-radius: 12px;
    font-size: 0.86rem;
  }

  body.tablet-mode .tablet-date-nav button {
    min-height: 44px;
    border-radius: 12px;
    font-size: 1.45rem;
  }

  body.tablet-mode .tablet-date-nav strong {
    min-height: 44px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.08;
    white-space: nowrap;
  }

  body.tablet-mode .tablet-stage-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 6px 0;
  }

  body.tablet-mode .tablet-stage-kpi {
    min-height: 44px;
    padding: 7px 8px;
    border-radius: 11px;
  }

  body.tablet-mode .tablet-stage-kpi span,
  body.tablet-mode .tablet-stage-kpi small {
    font-size: 0.5rem;
  }

  body.tablet-mode .tablet-stage-kpi strong {
    font-size: 1.02rem;
  }

  body.tablet-mode .tablet-stage-hero {
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 14px;
  }

  body.tablet-mode .tablet-stage-hero span {
    font-size: 0.66rem;
  }

  body.tablet-mode .tablet-stage-hero h1 {
    font-size: 1.34rem;
  }

  body.tablet-mode .tablet-stage-hero strong {
    min-width: 96px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 0.82rem;
  }

  body.tablet-mode .tablet-projects {
    gap: 8px;
  }

  body.tablet-mode .tablet-project-card {
    border-radius: 14px;
  }

  body.tablet-mode .tablet-project-head {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  body.tablet-mode .tablet-project-title h2 {
    font-size: 1.2rem;
  }

  body.tablet-mode .tablet-project-title p,
  body.tablet-mode .tablet-project-slots {
    margin-top: 3px;
    font-size: 0.72rem;
  }

  body.tablet-mode .tablet-stage-days {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    min-width: 0;
    overflow-x: auto;
    padding: 2px 2px 6px;
  }

  body.tablet-mode .tablet-stage-day-dot {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-width: 2px;
  }

  body.tablet-mode .tablet-stage-day-dot.selected {
    border-width: 4px;
    box-shadow: 0 0 0 2px rgba(76, 163, 255, 0.2), 0 0 14px rgba(76, 163, 255, 0.3);
  }

  body.tablet-mode .tablet-stage-day-content strong {
    font-size: 0.46rem;
  }

  body.tablet-mode .tablet-stage-day-content small {
    font-size: 0.36rem;
  }

  body.tablet-mode .tablet-stage-day-arrow {
    flex: 0 0 auto;
    font-size: 0.76rem;
  }

  body.tablet-mode .tablet-component-list {
    gap: 5px;
    padding: 6px;
  }

  body.tablet-mode .tablet-component-row {
    grid-template-columns: minmax(0, 1fr) minmax(286px, 46%);
    gap: 6px;
    min-height: 52px;
    border-radius: 12px;
  }

  body.tablet-mode .tablet-component-info {
    gap: 1px;
    padding: 7px 8px;
  }

  body.tablet-mode .tablet-component-info strong {
    font-size: 0.82rem;
  }

  body.tablet-mode .tablet-component-info span {
    font-size: 0.8rem;
  }

  body.tablet-mode .tablet-component-info small {
    font-size: 0.66rem;
  }

  body.tablet-mode .tablet-component-actions {
    grid-template-columns: minmax(54px, 0.72fr) repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
  }

  body.tablet-mode .tablet-component-duration {
    min-height: 42px;
    padding: 0 3px;
    border-radius: 10px;
  }

  body.tablet-mode .tablet-component-duration span {
    font-size: 0.42rem;
  }

  body.tablet-mode .tablet-component-duration strong {
    font-size: 0.66rem;
  }

  body.tablet-mode .tablet-status-btn {
    min-height: 42px;
    padding: 0 4px;
    border-width: 1px;
    border-radius: 10px;
    font-size: 0.58rem;
    line-height: 1.05;
  }
}

@media (max-width: 700px) {
  .menu-header-actions {
    width: 100%;
    margin-left: 0;
  }

  .changelog-open-btn {
    width: 100%;
  }

  .changelog-summary {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .changelog-list {
    padding: 14px;
    background: rgba(7, 14, 26, 0.52);
  }

  .changelog-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
  }

  .changelog-item::before {
    display: none;
  }

  .changelog-entry header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tablet-stage-shell {
    padding: 8px;
  }

  .tablet-stage-topbar {
    grid-template-columns: 1fr;
  }

  .tablet-stage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tablet-component-actions {
    grid-template-columns: 1fr;
  }

  body.tablet-mode .tablet-stage-shell {
    padding: 6px;
  }

  body.tablet-mode .tablet-stage-topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 12px;
  }

  body.tablet-mode .tablet-control {
    gap: 3px;
    font-size: 0.58rem;
  }

  body.tablet-mode .tablet-control select,
  body.tablet-mode .tablet-control input {
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.76rem;
  }

  body.tablet-mode .tablet-date-nav {
    grid-column: 1 / -1;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 4px;
  }

  body.tablet-mode .tablet-refresh-btn {
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.64rem;
  }

  body.tablet-mode .tablet-date-nav button {
    min-height: 36px;
    border-radius: 10px;
    font-size: 1.1rem;
  }

  body.tablet-mode .tablet-date-nav strong {
    min-width: 0;
    min-height: 36px;
    padding: 0 4px;
    border-radius: 10px;
    font-size: 0.62rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.tablet-mode .tablet-stage-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 5px 0;
  }

  body.tablet-mode .tablet-stage-kpi {
    min-height: 38px;
    padding: 6px 7px;
    border-radius: 10px;
  }

  body.tablet-mode .tablet-stage-kpi span,
  body.tablet-mode .tablet-stage-kpi small {
    font-size: 0.46rem;
  }

  body.tablet-mode .tablet-stage-kpi strong {
    font-size: 0.92rem;
  }

  body.tablet-mode .tablet-stage-hero {
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 12px;
  }

  body.tablet-mode .tablet-stage-hero h1 {
    font-size: 1.12rem;
  }

  body.tablet-mode .tablet-stage-hero strong {
    min-width: 76px;
    padding: 7px 8px;
    font-size: 0.72rem;
  }

  body.tablet-mode .tablet-projects {
    gap: 6px;
  }

  body.tablet-mode .tablet-project-head {
    gap: 6px;
    padding: 8px;
  }

  body.tablet-mode .tablet-stage-days {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4px;
    min-width: 0;
  }

  body.tablet-mode .tablet-stage-day-dot {
    width: 30px;
    height: 30px;
    border-width: 2px;
  }

  body.tablet-mode .tablet-stage-day-dot.selected {
    border-width: 3px;
  }

  body.tablet-mode .tablet-stage-day-content strong {
    font-size: 0.4rem;
  }

  body.tablet-mode .tablet-stage-day-content small {
    font-size: 0.32rem;
  }

  body.tablet-mode .tablet-component-list {
    gap: 4px;
    padding: 5px;
  }

  body.tablet-mode .tablet-component-row {
    grid-template-columns: minmax(0, 1fr) minmax(222px, 52%);
    gap: 4px;
    min-height: 44px;
    border-radius: 10px;
  }

  body.tablet-mode .tablet-component-info {
    gap: 0;
    padding: 5px 6px;
  }

  body.tablet-mode .tablet-component-info strong {
    font-size: 0.72rem;
  }

  body.tablet-mode .tablet-component-info span {
    font-size: 0.7rem;
  }

  body.tablet-mode .tablet-component-info small {
    font-size: 0.58rem;
  }

  body.tablet-mode .tablet-component-actions {
    grid-template-columns: minmax(42px, 0.68fr) repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding: 3px;
  }

  body.tablet-mode .tablet-component-duration {
    min-height: 34px;
    padding: 0 2px;
    border-radius: 8px;
  }

  body.tablet-mode .tablet-component-duration span {
    font-size: 0.34rem;
  }

  body.tablet-mode .tablet-component-duration strong {
    font-size: 0.52rem;
  }

  body.tablet-mode .tablet-status-btn {
    min-height: 34px;
    padding: 0 2px;
    border-width: 1px;
    border-radius: 8px;
    font-size: 0.43rem;
    line-height: 1.02;
    white-space: nowrap;
  }

  body.standalone-dashboard {
    overflow-x: hidden;
  }

  body.standalone-dashboard .page {
    padding:
      max(6px, env(safe-area-inset-top))
      max(6px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(6px, env(safe-area-inset-left));
  }

  body.standalone-dashboard .stat-dashboard-view {
    min-height: calc(100vh - 14px);
    min-height: calc(100dvh - 14px);
    padding: 6px;
  }

  .stat-dashboard-shell {
    gap: 8px;
    max-width: 100%;
  }

  .stat-dashboard-top {
    min-height: 0;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
  }

  .stat-dashboard-title h1 {
    margin: 6px 0;
    font-size: 2rem;
    line-height: 1;
  }

  .stat-dashboard-title p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .stat-dashboard-title span,
  .stat-panel-head span,
  .stat-kpi-card > span,
  .stat-util-copy span,
  .stat-dashboard-actions span {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
  }

  .stat-dashboard-actions {
    grid-template-rows: none;
    gap: 8px;
  }

  .stat-dashboard-actions > div {
    gap: 4px;
    padding: 10px;
    border-radius: 11px;
  }

  .stat-dashboard-actions strong {
    font-size: 0.82rem;
    overflow-wrap: anywhere;
  }

  .stat-dashboard-actions .primary-btn {
    min-height: 38px;
  }

  .stat-kpi-grid,
  .stat-dashboard-grid {
    gap: 8px;
  }

  .stat-dashboard-radar,
  .stat-funnel-grid {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 10px;
  }

  .stat-dashboard-radar article,
  .stat-funnel-grid div {
    padding: 9px 10px;
    border-radius: 10px;
  }

  .stat-dashboard-radar strong,
  .stat-funnel-grid strong {
    font-size: 1.25rem;
  }

  .stat-kpi-card,
  .stat-panel {
    border-radius: 12px;
    padding: 12px;
  }

  .stat-kpi-card {
    min-height: 0;
  }

  .stat-kpi-card strong {
    margin: 8px 0 6px;
    font-size: 2rem;
    overflow-wrap: anywhere;
  }

  .stat-kpi-card p,
  .stat-kpi-card em {
    font-size: 0.74rem;
  }

  .stat-panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
  }

  .stat-panel-head h2 {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  .stat-panel-head > strong {
    align-self: flex-start;
    font-size: 0.62rem;
  }

  .stat-util-card {
    grid-template-columns: minmax(0, 1fr) 64px;
    min-height: 86px;
    padding: 10px;
    border-radius: 10px;
  }

  .stat-meter {
    width: 58px;
    height: 58px;
  }

  .stat-meter.large {
    width: 88px;
    height: 88px;
  }

  .stat-meter strong {
    font-size: 0.74rem;
  }

  .stat-progress-hero {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
  }

  .stat-warehouse-hero,
  .stat-risk-item,
  .stat-installation-summary,
  .stat-installation-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-progress-hero strong {
    font-size: 1.45rem;
  }

  .stat-stage-tile,
  .stat-signal-card,
  .stat-top-item,
  .stat-average-row {
    border-radius: 10px;
    padding: 10px;
  }

  .stat-stage-tile div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .stat-stage-tile em {
    font-size: 1.05rem;
  }

  .stat-signal-card,
  .stat-top-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-signal-card > strong {
    min-width: 0;
    font-size: 1.35rem;
    text-align: left;
  }

  .stat-top-item em {
    justify-self: start;
  }

  .stat-risk-progress em {
    text-align: left;
  }

  .stat-installation-meta {
    text-align: left;
  }

  .stat-average-row {
    gap: 7px;
  }

  .tablet-problem-context,
  .problem-type-grid,
  .problem-detail-fields {
    grid-template-columns: 1fr;
  }
}
