﻿:root {
  --bo-bg: #edf2f8;
  --bo-bg-accent: #e4ecf7;
  --bo-surface: #ffffff;
  --bo-surface-soft: #f6f9fd;
  --bo-border: #d6e0ee;
  --bo-line: #e8eef7;
  --bo-text: #13263f;
  --bo-text-soft: #5c6f88;
  --bo-title: #0f1d31;
  --bo-brand: #118ae4;
  --bo-brand-strong: #0b6fc2;
  --bo-brand-soft: #eaf5ff;
  --bo-success: #1f9660;
  --bo-warning: #d88c1f;
  --bo-danger: #d65267;
  --bo-dark: #162131;
  --bo-dark-2: #1e2b3d;
  --bo-shadow: 0 18px 36px rgba(14, 33, 58, 0.08);
  --bo-shadow-soft: 0 10px 22px rgba(14, 33, 58, 0.05);
  --bo-radius-xl: 28px;
  --bo-radius-lg: 22px;
  --bo-radius-md: 16px;
  --bo-radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--bo-text);
  background:
    radial-gradient(circle at top left, rgba(17, 138, 228, 0.08), transparent 34%),
    linear-gradient(180deg, var(--bo-bg-accent) 0%, var(--bo-bg) 180px, var(--bo-bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

input,
select,
button {
  font: inherit;
}

.bo-shell {
  min-height: 100vh;
}

.bo-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(22, 33, 49, 0.98), rgba(30, 43, 61, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(10, 18, 31, 0.18);
}

.bo-brand-wrap {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.bo-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.bo-brand-mark {
  width: 64px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 29, 49, 0.08);
}

.bo-brand-mark img {
  width: 46px;
  height: auto;
}

.bo-brand-copy strong {
  display: block;
  color: #fff;
  font-size: 17px;
  line-height: 1.15;
}

.bo-brand-copy small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
}

.bo-main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(17, 138, 228, 0.45) transparent;
}

.bo-main-nav::-webkit-scrollbar {
  height: 8px;
}

.bo-main-nav::-webkit-scrollbar-thumb {
  background: rgba(17, 138, 228, 0.38);
  border-radius: 999px;
}

.bo-main-nav::-webkit-scrollbar-track {
  background: transparent;
}

.bo-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: 0.18s ease;
}

.bo-nav-link:hover,
.bo-nav-link.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(17, 138, 228, 0.26), rgba(11, 111, 194, 0.26));
  border-color: rgba(17, 138, 228, 0.55);
  box-shadow: 0 8px 16px rgba(11, 111, 194, 0.22);
  transform: translateY(-1px);
}

.bo-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bo-main {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.bo-auth {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 56px;
}

.bo-panel,
.bo-surface,
.bo-kpi-card,
.bo-page-hero,
.bo-module-card,
.bo-machine-card {
  background: var(--bo-surface);
  border: 1px solid var(--bo-border);
  box-shadow: var(--bo-shadow-soft);
}

.bo-panel,
.bo-surface,
.bo-page-hero {
  border-radius: var(--bo-radius-xl);
}

.bo-panel {
  width: min(100%, 660px);
  padding: 34px;
}

.bo-panel-profile {
  width: min(100%, 920px);
}

.bo-panel-narrow {
  width: min(100%, 520px);
}

.bo-panel h1,
.bo-page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--bo-title);
}

.bo-subtitle {
  margin: 12px 0 0;
  max-width: 900px;
  color: var(--bo-text-soft);
  font-size: 16px;
  line-height: 1.6;
}

.bo-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.bo-form-profile {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.bo-form-profile > .bo-checkbox {
  grid-column: 1 / -1;
}

.bo-form-profile > .bo-button {
  justify-self: start;
}

.bo-form-tight {
  margin-top: 14px;
}

.bo-form label,
.bo-filter-grid label {
  display: block;
}

.bo-form label span,
.bo-filter-grid label span,
.bo-code-grid label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #627a99;
}

.bo-form input,
.bo-select,
.bo-code-box input,
.bo-filter-grid input {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid #cfdcf0;
  background: #fbfdff;
  color: var(--bo-text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.bo-form input:focus,
.bo-select:focus,
.bo-code-box input:focus,
.bo-filter-grid input:focus {
  border-color: rgba(17, 138, 228, 0.5);
  box-shadow: 0 0 0 4px rgba(17, 138, 228, 0.12);
  background: #fff;
}

.bo-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #5e7696 50%), linear-gradient(135deg, #5e7696 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.bo-select-compact {
  min-width: 185px;
  min-height: 44px;
  padding: 10px 13px;
}

.bo-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f8fd;
  border: 1px solid #d9e6f6;
}

.bo-checkbox input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin-top: 2px;
}

.bo-button,
.bo-link-chip,
.bo-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 14px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: 0.18s ease;
}

.bo-button:hover,
.bo-link-chip:hover,
.bo-copy-button:hover {
  transform: translateY(-1px);
}

.bo-button-primary {
  background: linear-gradient(135deg, var(--bo-brand), var(--bo-brand-strong));
  color: #fff;
}

.bo-button-secondary {
  background: #fff;
  color: var(--bo-brand-strong);
  border: 1px solid #c4d6f3;
}

.bo-button-link,
.bo-link-chip {
  background: var(--bo-brand-soft);
  color: #315278;
  border: 1px solid #d6e9fb;
}

.bo-link-chip-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.bo-inline-form,
.bo-inline-buttons {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bo-inline-form-header {
  align-items: center;
}

.bo-inline-form-center {
  justify-content: center;
  margin-top: 14px;
}

.bo-alert {
  margin-bottom: 18px;
  padding: 15px 17px;
  border-radius: 16px;
  border: 1px solid transparent;
}

.bo-alert-success {
  background: #eefaf4;
  color: #187f51;
  border-color: #c8ebd8;
}

.bo-alert-error {
  background: #fff1f4;
  color: #b4364b;
  border-color: #f6cad2;
}

.bo-alert-info {
  background: #eef6ff;
  color: #265e96;
  border-color: #cee1f7;
}

.bo-page-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding: 30px 32px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 138, 228, 0.14), rgba(17, 138, 228, 0.04)),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

.bo-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 138, 228, 0.08), transparent 45%);
  pointer-events: none;
}

.bo-page-hero > * {
  position: relative;
  z-index: 1;
}

.bo-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bo-brand-strong);
}

.bo-hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bo-page-hero-machine {
  align-items: center;
}

.bo-page-hero-main {
  display: grid;
  gap: 10px;
}

.bo-hero-meta-machine {
  align-items: center;
}

.bo-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.bo-status-badge.is-linked {
  background: #ecfaf2;
  color: #177a4c;
  border-color: rgba(23, 122, 76, 0.18);
}

.bo-status-badge.is-pending {
  background: #fff4e7;
  color: #b07218;
  border-color: rgba(176, 114, 24, 0.2);
}

.bo-pill,
.bo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.bo-pill {
  background: #edf5ff;
  color: #1f5c93;
}

.bo-pill-soft,
.bo-chip-soft {
  background: #f3f7fc;
  color: #536c8d;
}

.bo-chip-positive {
  background: #eef9f3;
  color: #1f8d5a;
}

.bo-muted {
  color: var(--bo-text-soft);
}

.bo-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.bo-kpi-card {
  border-radius: var(--bo-radius-lg);
  padding: 22px;
}

.bo-kpi-card span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a82a2;
}

.bo-kpi-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1.06;
  color: var(--bo-title);
}

.bo-kpi-card small {
  display: block;
  margin-top: 10px;
  color: var(--bo-text-soft);
}

.bo-grid {
  display: grid;
  gap: 18px;
}

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

.bo-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bo-grid-link {
  align-items: start;
}

.bo-surface {
  padding: 24px;
}

.bo-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.bo-card-head h2,
.bo-surface h2,
.bo-surface h3,
.bo-surface h4 {
  margin: 0;
  color: var(--bo-title);
}

.bo-card-head > div {
  min-width: 0;
}

.bo-card-head p {
  margin: 8px 0 0;
  color: var(--bo-text-soft);
}

.bo-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bo-module-card {
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.bo-module-card:hover {
  border-color: #bcd3ef;
  box-shadow: var(--bo-shadow);
}

.bo-module-kicker {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bo-brand-strong);
}

.bo-module-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.06;
  color: var(--bo-title);
}

.bo-module-stat {
  display: block;
  margin-top: 12px;
  font-weight: 700;
  color: #284567;
}

.bo-module-card small {
  display: block;
  margin-top: 7px;
  color: var(--bo-text-soft);
}

.bo-machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.bo-machine-card {
  border-radius: var(--bo-radius-lg);
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.bo-machine-card.is-linked {
  border-color: rgba(31, 150, 96, 0.24);
}

.bo-machine-card.is-pending {
  border-color: rgba(216, 140, 31, 0.28);
}

.bo-machine-card-create {
  border-style: dashed;
  background: linear-gradient(180deg, #fbfdff, #f1f7ff);
}

.bo-machine-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bo-machine-card h3 {
  margin: 0;
  font-size: 26px;
  color: var(--bo-title);
}

.bo-machine-status {
  margin: 8px 0 0;
  color: var(--bo-text-soft);
}

.bo-status-dot {
  width: 14px;
  height: 14px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--bo-success);
  box-shadow: 0 0 0 8px rgba(31, 150, 96, 0.12);
}

.bo-machine-card.is-pending .bo-status-dot {
  background: var(--bo-warning);
  box-shadow: 0 0 0 8px rgba(216, 140, 31, 0.14);
}

.bo-status-dot-create {
  width: 38px;
  height: 38px;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--bo-brand), var(--bo-brand-strong));
  box-shadow: none;
}

.bo-meta-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.bo-meta-list-compact {
  gap: 10px;
}

.bo-meta-list div {
  display: grid;
  gap: 4px;
}

.bo-meta-list dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7088a8;
}

.bo-meta-list dd {
  margin: 0;
  color: #223751;
}

.bo-machine-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.bo-link-surface,
.bo-meta-card {
  min-height: 100%;
}

.bo-machine-summary-surface,
.bo-link-surface {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.bo-link-block {
  display: grid;
  gap: 16px;
}

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

.bo-summary-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #dce7f5;
  background: linear-gradient(180deg, #f9fcff, #f3f8ff);
}

.bo-summary-card span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f86a5;
}

.bo-summary-card strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--bo-title);
}

.bo-summary-card small {
  display: block;
  margin-top: 8px;
  color: var(--bo-text-soft);
}

.bo-link-empty {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed #cddcf0;
  background: #f8fbff;
}

.bo-link-empty strong,
.bo-link-empty p {
  margin: 0;
}

.bo-link-empty p {
  color: var(--bo-text-soft);
}

.bo-table-wrap {
  overflow: auto;
}

.bo-table {
  width: 100%;
  border-collapse: collapse;
}

.bo-table th,
.bo-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--bo-line);
  text-align: left;
  vertical-align: top;
}

.bo-table th {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7389a6;
  white-space: nowrap;
}

.bo-table td {
  color: #1a3050;
}

.bo-table td small {
  display: block;
  margin-top: 4px;
  color: var(--bo-text-soft);
}

.bo-table-compact th,
.bo-table-compact td {
  padding: 10px 8px;
}

.bo-feed-list,
.bo-stack-list,
.bo-dashboard-layout,
.bo-dashboard-main {
  display: grid;
  gap: 16px;
}

.bo-feed-item,
.bo-event-card {
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.bo-feed-item {
  padding: 16px 18px;
  border: 1px solid #dde7f5;
}

.bo-feed-item header,
.bo-event-head,
.bo-bar-copy {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bo-feed-item p,
.bo-event-head p {
  margin: 8px 0 0;
  color: var(--bo-text-soft);
}

.bo-event-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bo-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.bo-breakdown-grid section {
  padding: 16px;
  border-radius: 18px;
  background: var(--bo-surface-soft);
  border: 1px solid #deebfb;
}

.bo-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.bo-filter-surface {
  margin-bottom: 18px;
}

.bo-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.bo-filter-grid-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bo-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bo-bar-list {
  display: grid;
  gap: 14px;
}

.bo-bar-item {
  display: grid;
  gap: 10px;
}

.bo-bar-copy {
  color: var(--bo-text-soft);
}

.bo-bar-copy strong {
  color: var(--bo-text);
}

.bo-bar-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e3edf9;
}

.bo-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bo-brand), #57b0ff);
}

.bo-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bo-code-box {
  display: flex;
  gap: 8px;
}

.bo-code-box input {
  flex: 1 1 auto;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: #fff;
}

.bo-copy-button {
  min-width: 58px;
  background: var(--bo-title);
  color: #fff;
}

.bo-caption {
  margin: 0;
  color: var(--bo-text-soft);
}

.bo-empty-state {
  padding: 22px;
  border-radius: 18px;
  border: 1px dashed #c8d8ee;
  background: #f8fbff;
  color: var(--bo-text-soft);
}

.bo-empty-state-small {
  padding: 16px;
}

@media (max-width: 1320px) {
  .bo-module-grid,
  .bo-grid-3,
  .bo-filter-grid-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1060px) {
  .bo-header,
  .bo-page-hero,
  .bo-card-head,
  .bo-feed-item header,
  .bo-event-head,
  .bo-bar-copy {
    flex-direction: column;
  }

  .bo-grid-2,
  .bo-grid-3,
  .bo-module-grid,
  .bo-code-grid,
  .bo-breakdown-grid,
  .bo-filter-grid,
  .bo-filter-grid-stats,
  .bo-form-profile {
    grid-template-columns: 1fr;
  }

  .bo-header-actions {
    justify-content: flex-start;
  }

  .bo-brand-wrap {
    width: 100%;
    flex-direction: column;
  }

  .bo-main-nav {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .bo-header {
    padding: 16px;
  }

  .bo-main {
    width: min(100%, calc(100% - 24px));
    padding: 18px 0 30px;
  }

  .bo-panel,
  .bo-surface,
  .bo-page-hero,
  .bo-kpi-card,
  .bo-module-card,
  .bo-machine-card {
    padding: 20px;
  }

  .bo-brand {
    width: 100%;
  }

  .bo-brand-mark {
    width: 54px;
    height: 44px;
  }

  .bo-brand-copy strong {
    font-size: 15px;
  }

  .bo-main-nav {
    gap: 8px;
    padding-bottom: 2px;
  }

  .bo-nav-link {
    padding: 9px 12px;
    font-size: 13px;
  }

  .bo-machine-card h3 {
    font-size: 22px;
  }

  .bo-code-box {
    flex-direction: column;
  }
}
