:root {
  --app-bg: #eef3f7;
  --panel-bg: #ffffff;
  --panel-alt: #f7fafc;
  --line: #d7e1ea;
  --line-strong: #b2c3d4;
  --text: #172633;
  --muted: #607284;
  --navy: #14324a;
  --steel: #24567a;
  --teal: #0e6f74;
  --amber: #c88619;
  --danger: #c4473a;
  --success: #25855a;
  --shadow: 0 18px 48px rgba(20, 50, 74, 0.08);
  --radius: 18px;
}

html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 992px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(36, 86, 122, 0.12), transparent 24%),
    linear-gradient(180deg, #f4f7fa 0%, #eaf0f5 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
}

main[role="main"] {
  width: 100%;
  min-height: 100%;
}

a {
  color: var(--steel);
  text-decoration: none;
}

a:hover {
  color: var(--navy);
}

.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
  max-width: 100% !important;
  padding-left: 0;
  padding-right: 0;
}

.app-shell {
  flex: 1 0 auto;
  display: flex;
  padding: 1.35rem 0 2rem;
}

.app-main {
  display: flex;
  flex: 1 0 auto;
  align-items: stretch;
  min-height: calc(100vh - 180px);
  max-width: 100%;
  padding-bottom: 1rem;
}

.app-topbar {
  background:
    linear-gradient(135deg, rgba(20, 50, 74, 0.98), rgba(15, 77, 92, 0.95)),
    linear-gradient(45deg, rgba(200, 134, 25, 0.12), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 36px rgba(12, 24, 35, 0.22);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  color: #fff;
  font-size: 1.05rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy small {
  color: rgba(255,255,255,0.65);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navbar-nav .nav-link {
  border-radius: 999px;
  padding: 0.65rem 1rem !important;
  margin-right: 0.25rem;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}

.navbar-nav .nav-link.active,
.navbar-nav .show > .nav-link {
  background: rgba(255,255,255,0.16);
  color: #fff;
}

.dropdown-menu {
  border: 1px solid rgba(20, 50, 74, 0.08);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.6rem;
}

.dropdown-item {
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-weight: 500;
}

.dropdown-item:hover {
  background: #eef5fb;
}

.dropdown-item.active,
.dropdown-item:active {
  background: rgba(36, 86, 122, 0.12);
  color: var(--navy);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.home-page-header {
  padding-top: 0.35rem;
}

.page-header h1,
.page-header h2 {
  margin: 0;
  color: var(--navy);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--muted);
  margin: 0.45rem 0 0;
  max-width: 820px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.app-card,
.card {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}

.app-page {
  width: 100%;
}

.app-page > .app-card:last-child,
.app-page > .card:last-child,
.app-page > .table-responsive:last-child {
  margin-bottom: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: linear-gradient(180deg, #fff, #f7fafc);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.metric-card.warning { border-left: 5px solid var(--amber); }
.metric-card.danger { border-left: 5px solid var(--danger); }
.metric-card.success { border-left: 5px solid var(--success); }

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.metric-value {
  color: var(--navy);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.mini-sparkline {
  width: 100%;
  height: 26px;
  margin-top: 0.35rem;
}

.mini-sparkline polyline {
  fill: none;
  stroke: var(--steel);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-trend-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 0.2rem;
}

.top-nav-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.top-nav-counter.warning {
  background: rgba(200, 134, 25, 0.22);
  color: #f9e8c4;
}

.top-nav-counter.danger {
  background: rgba(196, 71, 58, 0.28);
  color: #ffe5e2;
}

.notification-dropdown {
  width: 340px;
  max-width: calc(100vw - 2rem);
}

.notification-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.notification-dropdown-item small {
  color: var(--muted);
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    margin-right: 0;
    margin-bottom: 0.2rem;
  }

  .navbar-nav .dropdown-menu {
    margin-bottom: 0.5rem;
  }
}

.notification-item-unread {
  border-left: 4px solid var(--amber);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.1rem;
}

.form-control,
.form-select {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fbfdff;
}

textarea.form-control {
  min-height: 120px;
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus {
  border-color: rgba(36, 86, 122, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(36, 86, 122, 0.14);
}

.form-label {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.45rem;
}

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-industrial {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--teal), var(--steel));
}

.btn-industrial:hover {
  color: #fff;
  background: linear-gradient(135deg, #0d6267, #1f4967);
}

.btn-industrial-secondary {
  color: #fff;
  border: none;
  background: linear-gradient(135deg, var(--amber), #b16710);
}

.btn-industrial-secondary:hover {
  color: #fff;
  background: linear-gradient(135deg, #b57614, #8f5008);
}

.app-table {
  margin-bottom: 0;
}

.app-table thead th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--line);
  background: #f5f9fc;
}

.app-table tbody td {
  border-color: var(--line);
  vertical-align: middle;
}

.app-table tbody tr:hover {
  background: rgba(36, 86, 122, 0.04);
}

.status-badge,
.severity-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.status-нов,
.status-new { background: rgba(36, 86, 122, 0.12); color: var(--steel); }
.status-в_преглед,
.status-inreview { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.status-нужно_действие,
.status-actionrequired { background: rgba(196, 71, 58, 0.14); color: #9d352b; }
.status-чака_верификация,
.status-waitingverification { background: rgba(14, 111, 116, 0.14); color: #0b5c60; }
.status-затворен,
.status-closed,
.status-изпълнена,
.status-completed { background: rgba(37, 133, 90, 0.14); color: #19603f; }
.status-отворена,
.status-open { background: rgba(36, 86, 122, 0.12); color: var(--steel); }
.status-в_работа,
.status-inprogress { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.status-просрочена,
.status-overdue { background: rgba(196, 71, 58, 0.14); color: #9d352b; }
.status-underreview { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.status-assigned { background: rgba(36, 86, 122, 0.14); color: var(--steel); }
.status-actionimplemented { background: rgba(14, 111, 116, 0.14); color: #0b5c60; }
.status-awaitingverification { background: rgba(37, 133, 90, 0.14); color: #19603f; }
.status-rejected,
.status-cancelled { background: rgba(196, 71, 58, 0.14); color: #9d352b; }
.status-done { background: rgba(37, 133, 90, 0.14); color: #19603f; }

.severity-ниска,
.severity-low { background: rgba(37, 133, 90, 0.12); color: #19603f; }
.severity-средна,
.severity-medium { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.severity-висока,
.severity-high { background: rgba(196, 71, 58, 0.14); color: #9d352b; }
.severity-критична,
.severity-critical { background: rgba(123, 30, 30, 0.16); color: #7b1e1e; }

.status-нов { background: rgba(36, 86, 122, 0.12); color: var(--steel); }
.status-в-преглед { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.status-нужно-действие { background: rgba(196, 71, 58, 0.14); color: #9d352b; }
.status-чака-верификация { background: rgba(14, 111, 116, 0.14); color: #0b5c60; }
.status-затворен { background: rgba(37, 133, 90, 0.14); color: #19603f; }
.status-отворена { background: rgba(36, 86, 122, 0.12); color: var(--steel); }
.status-в-работа { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.status-изпълнена { background: rgba(37, 133, 90, 0.14); color: #19603f; }
.status-просрочена { background: rgba(196, 71, 58, 0.14); color: #9d352b; }

.severity-ниска { background: rgba(37, 133, 90, 0.12); color: #19603f; }
.severity-средна { background: rgba(200, 134, 25, 0.14); color: #8d600f; }
.severity-висока { background: rgba(196, 71, 58, 0.14); color: #9d352b; }
.severity-критична { background: rgba(123, 30, 30, 0.16); color: #7b1e1e; }

.empty-state {
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  padding: 2rem 1rem;
  background: linear-gradient(180deg, #fbfdff, #f4f8fb);
}

.empty-state.compact {
  padding: 1rem;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-alt);
  padding: 1rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.overview-card {
  height: 100%;
}

.kpi-trend-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff, #f3f8fb);
  padding: 1rem;
}

.kpi-trend-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.kpi-trend-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.kpi-trend-stat {
  min-width: 120px;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: rgba(15, 95, 115, 0.06);
  border: 1px solid rgba(15, 95, 115, 0.12);
}

.kpi-trend-stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-trend-stat-value {
  display: block;
  margin-top: 0.2rem;
  color: var(--navy);
  font-weight: 800;
  font-size: 1.1rem;
}

.kpi-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.kpi-trend-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.kpi-trend-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.kpi-trend-svg {
  width: 100%;
  height: 240px;
  display: block;
}

.kpi-trend-axis {
  font-size: 11px;
  fill: var(--muted);
}

.kpi-trend-grid {
  stroke: rgba(38, 63, 84, 0.08);
  stroke-width: 1;
}

.kpi-trend-line-primary {
  fill: none;
  stroke: #0f5f73;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-trend-line-secondary {
  fill: none;
  stroke: #d18b23;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 6;
}

.kpi-trend-point-primary {
  fill: #0f5f73;
}

.kpi-trend-point-secondary {
  fill: #d18b23;
}

.kpi-breakdown-card {
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kpi-breakdown-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(23, 38, 51, 0.08);
  border-color: rgba(15, 95, 115, 0.16);
}

.kpi-breakdown-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 95, 115, 0.08);
  color: var(--steel);
  font-weight: 800;
  font-size: 0.82rem;
}

.kpi-breakdown-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.kpi-breakdown-metric {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 38, 51, 0.06);
  padding: 0.65rem 0.75rem;
}

.kpi-breakdown-metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.kpi-breakdown-metric-value {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
}

.kpi-drilldown-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.kpi-drilldown-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.kpi-drilldown-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  background: rgba(15, 95, 115, 0.08);
  color: var(--steel);
  font-size: 0.75rem;
  font-weight: 700;
}

.kpi-drilldown-cards {
  display: none;
  gap: 0.85rem;
  flex-direction: column;
}

.kpi-drilldown-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f7fafc);
  padding: 0.9rem 1rem;
}

.kpi-drilldown-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.6rem;
}

.kpi-drilldown-card-title {
  color: var(--navy);
  font-weight: 800;
  margin: 0;
}

.kpi-drilldown-card-meta {
  display: grid;
  gap: 0.45rem;
}

.kpi-drilldown-card-meta span {
  color: var(--muted);
  font-size: 0.86rem;
}

.kpi-drilldown-card-actions {
  margin-top: 0.75rem;
}

@media (max-width: 991.98px) {
  .kpi-trend-head {
    flex-direction: column;
  }

  .kpi-breakdown-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .page-header {
    gap: 1rem;
  }

  .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .page-actions .btn {
    width: 100%;
  }

  .kpi-trend-stats {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .kpi-trend-svg {
    height: 220px;
  }

  .kpi-drilldown-table {
    display: none;
  }

  .kpi-drilldown-cards {
    display: flex;
  }

  .kpi-drilldown-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

.scope-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f7fafc);
  overflow: hidden;
  min-height: 280px;
}

.scope-head {
  padding: 0.95rem 1rem;
  font-weight: 800;
  color: #fff;
}

.scope-production .scope-head { background: linear-gradient(135deg, #1d67d8, #255db5); }
.scope-plant .scope-head { background: linear-gradient(135deg, #1bbbd9, #1185b6); }
.scope-line .scope-head { background: linear-gradient(135deg, #ffc531, #ef9a00); color: #253142; }
.scope-machine .scope-head { background: linear-gradient(135deg, #11995f, #0c7f4f); }

.scope-body {
  padding: 0.9rem 1rem;
  max-height: 250px;
  overflow: auto;
}

.scope-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(23, 38, 51, 0.08);
  font-weight: 500;
}

.scope-option:last-child {
  border-bottom: none;
}

.stack-item-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem 1rem;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 0.8rem;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--steel), var(--teal));
  margin-top: 0.35rem;
}

.timeline-content {
  border-left: 1px solid var(--line);
  padding-left: 1rem;
}

.attachment-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.attachment-link:hover {
  background: #f0f6fb;
}

.overdue-signal {
  border-color: rgba(196, 71, 58, 0.28);
  box-shadow: 0 12px 28px rgba(196, 71, 58, 0.08);
}

.checklist-hint {
  line-height: 1;
  font-size: 1rem;
}

.checklist-item-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.checklist-item-card:hover {
  transform: translateY(-1px);
}

.popover {
  max-width: 360px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.popover-header {
  background: #f4f8fb;
  color: var(--navy);
  font-weight: 700;
}

.industrial-alert {
  border: none;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.simple-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.simple-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #eef5fb;
  color: var(--steel);
  font-size: 0.82rem;
  font-weight: 700;
}

.simple-chip.empty {
  background: #f3f6f9;
  color: var(--muted);
}

.app-table .col-actions {
  width: 132px;
  text-align: center;
}

.app-table .btn {
  padding: 0.5rem 0.8rem;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 700;
}


.legend-dot {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.4rem;
  border-radius: 0.2rem;
  vertical-align: -0.08rem;
}

.legend-dot.production { background: #4fc3f7; }
.legend-dot.plant { background: #81c784; }
.legend-dot.line { background: #ffb74d; }
.legend-dot.machine { background: #e57373; }
.legend-dot.operator { background: #ffd54f; }

.diagram-shell {
  padding: 1rem;
}

.diagram-host {
  width: 100%;
  height: calc(100vh - 360px);
  min-height: 640px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(247, 250, 252, 0.9));
}

@media (max-width: 991px) {
  .page-header {
    flex-direction: column;
    align-items: start;
  }

  .app-shell {
    padding-top: 1rem;
  }

  .app-main {
    min-height: calc(100vh - 150px);
  }

  .diagram-host {
    height: calc(100vh - 300px);
    min-height: 500px;
  }
}

.app-shell-operator {
  padding-top: 0.75rem;
}

.operator-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.5rem 0 2rem;
}

.operator-header-card,
.operator-fill-header,
.operator-progress-card,
.operator-section,
.operator-step-card {
  background: #fff;
  border: 1px solid rgba(13, 115, 125, 0.12);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 65, 79, 0.08);
}

.operator-header-card,
.operator-fill-header {
  padding: 1.4rem 1.25rem;
  margin-bottom: 1rem;
}

.operator-kicker {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f6f7e;
}

.operator-alert {
  border-radius: 20px;
}

.operator-section {
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.operator-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.operator-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.operator-hint,
.operator-task-meta,
.operator-step-note,
.operator-step-instruction,
.operator-photo-block span {
  color: #5d7080;
  font-size: 0.95rem;
}

.operator-task-grid {
  display: grid;
  gap: 0.85rem;
}

.operator-task-form {
  margin: 0;
}

.operator-task-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  padding: 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(13, 115, 125, 0.16);
  background: linear-gradient(180deg, rgba(240, 248, 249, 0.95), #ffffff);
  color: #09344e;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.operator-task-card:hover,
.operator-task-card:focus {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 65, 79, 0.12);
  color: #09344e;
}

.operator-task-type,
.operator-step-index,
.operator-step-category,
.operator-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.operator-task-type,
.operator-step-index {
  background: rgba(224, 137, 0, 0.12);
  color: #c47b00;
}

.operator-step-category,
.operator-pill {
  background: rgba(15, 111, 126, 0.12);
  color: #0f6f7e;
}

.operator-empty-state {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(240, 248, 249, 0.85);
  color: #4f6372;
}

.operator-progress-card {
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.operator-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}

.operator-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 111, 126, 0.12);
  overflow: hidden;
}

.operator-progress-value {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0f7d89, #e08900);
  transition: width 0.2s ease;
}

.operator-step-stack {
  display: block;
}

.operator-step-card {
  display: none;
  padding: 1.2rem;
}

.operator-step-card.is-active {
  display: block;
}

.operator-step-head {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.operator-step-card h2 {
  margin-bottom: 0.9rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.operator-input-zone {
  margin-top: 1rem;
}

.operator-input {
  min-height: 64px;
  border-radius: 18px;
  font-size: 1.05rem;
}

.operator-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.operator-choice-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 0.9rem;
  border-radius: 20px;
  border: 2px solid rgba(15, 111, 126, 0.22);
  background: #fff;
  color: #09344e;
  font-size: 1.1rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.btn-check:checked + .operator-choice-button {
  border-color: #0f7d89;
  background: rgba(15, 125, 137, 0.1);
}

.btn-check:checked + .operator-choice-button.operator-choice-negative {
  border-color: #d53b3b;
  background: rgba(213, 59, 59, 0.1);
  color: #8c1f1f;
}

.btn-check:checked + .operator-choice-button.operator-choice-positive {
  border-color: #1f8a43;
  background: rgba(31, 138, 67, 0.1);
  color: #14592c;
}

.operator-photo-block,
.operator-deviation-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(240, 248, 249, 0.85);
}

.operator-deviation-box {
  display: none;
  border: 1px solid rgba(213, 59, 59, 0.15);
}

.operator-deviation-box.is-visible {
  display: block;
  background: rgba(213, 59, 59, 0.08);
}

.operator-photo-block.is-highlighted {
  border: 1px solid rgba(224, 137, 0, 0.28);
  background: rgba(255, 247, 230, 0.9);
}

.operator-photo-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.operator-photo-input {
  min-height: 54px;
  border-radius: 16px;
}

.operator-deviation-actions,
.operator-step-actions {
  display: grid;
  gap: 0.75rem;
}

.operator-step-actions {
  margin-top: 1rem;
}

.operator-primary-button,
.operator-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: none;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.operator-primary-button {
  background: linear-gradient(135deg, #0f7d89, #0b6171);
  color: #fff;
}

.operator-secondary-button {
  background: #fff;
  color: #09344e;
  border: 1px solid rgba(15, 111, 126, 0.18);
}

.operator-primary-button:hover,
.operator-primary-button:focus,
.operator-secondary-button:hover,
.operator-secondary-button:focus {
  color: inherit;
}

.operator-primary-button:disabled,
.operator-secondary-button:disabled {
  opacity: 0.45;
}

@media (min-width: 768px) {
  .operator-task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operator-photo-grid,
  .operator-step-actions,
  .operator-deviation-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operator-step-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .app-main {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .operator-step-card h2 {
    font-size: 1.25rem;
  }

  .operator-choice-grid {
    grid-template-columns: 1fr;
  }
}
