:root {
  color-scheme: light;
  --vb-font: "VB Manrope", "Segoe UI", Arial, sans-serif;
  --vb-display: "VB Lora", Georgia, serif;
  --vb-ink: #2b2526;
  --vb-ink-soft: #4e4647;
  --vb-muted: #756d6e;
  --vb-faint: #9d9596;
  --vb-paper: #f8f5f2;
  --vb-surface: #ffffff;
  --vb-surface-soft: #fdfaf8;
  --vb-line: #e7dfdc;
  --vb-line-strong: #d8ccca;
  --vb-primary: #8f3d56;
  --vb-primary-deep: #743046;
  --vb-primary-hover: #7e344c;
  --vb-primary-soft: #f4e5ea;
  --vb-blush: #ecd3dc;
  --vb-sage: #55745e;
  --vb-sage-soft: #e7efe9;
  --vb-sage-text: #2f5a3f;
  --vb-warning: #9a6b2d;
  --vb-warning-soft: #f7eddd;
  --vb-warning-text: #765122;
  --vb-danger: #a43d47;
  --vb-danger-soft: #f8e4e6;
  --vb-danger-text: #7d2f38;
  --vb-space-2: 0.5rem;
  --vb-space-3: 0.75rem;
  --vb-space-4: 1rem;
  --vb-space-5: 1.5rem;
  --vb-space-6: 2rem;
  --vb-space-7: 3rem;
  --vb-radius-sm: 0.7rem;
  --vb-radius-md: 1rem;
  --vb-radius-lg: 1.4rem;
  --vb-radius-pill: 999px;
  --vb-shadow-xs: 0 1px 2px rgba(43, 37, 38, 0.04);
  --vb-shadow-sm: 0 8px 24px rgba(43, 37, 38, 0.06);
  --vb-shadow-focus: 0 0 0 3px rgba(143, 61, 86, 0.2);
  --vb-container: 1200px;
  --vb-control: 3rem;
  --vb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --vb-duration: 260ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--vb-font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--vb-ink);
  background: var(--vb-paper);
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--vb-shadow-focus);
}

.vb-wrap {
  width: min(100% - 2rem, var(--vb-container));
  margin-inline: auto;
}

.vb-skip {
  position: absolute;
  left: -999px;
  top: 0;
}

.vb-skip:focus {
  left: var(--vb-space-4);
  top: var(--vb-space-4);
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--vb-surface);
  border-radius: var(--vb-radius-pill);
  box-shadow: var(--vb-shadow-sm);
}

/* Header */
.vb-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 250, 247, 0.88);
  border-bottom: 1px solid var(--vb-line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.vb-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vb-space-4);
  min-height: 4.5rem;
  padding-block: var(--vb-space-3);
}

.vb-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  min-height: 44px;
}

.vb-brand__logo {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.vb-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.15;
}

.vb-brand__text strong {
  font-family: var(--vb-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--vb-ink);
}

.vb-brand__text small {
  font-size: 0.75rem;
  color: var(--vb-muted);
}

.vb-top__actions {
  display: flex;
  align-items: center;
  gap: var(--vb-space-2);
}

/* Buttons / chips */
.vb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--vb-radius-pill);
  background: var(--vb-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--vb-duration) var(--vb-ease), border-color var(--vb-duration) var(--vb-ease), color var(--vb-duration) var(--vb-ease);
}

.vb-btn:hover {
  background: var(--vb-primary-hover);
}

.vb-btn--ghost {
  background: transparent;
  border-color: var(--vb-line-strong);
  color: var(--vb-ink-soft);
}

.vb-btn--ghost:hover {
  background: var(--vb-primary-soft);
  border-color: var(--vb-blush);
  color: var(--vb-primary-deep);
}

.vb-btn--secondary {
  background: var(--vb-surface);
  border-color: var(--vb-line-strong);
  color: var(--vb-ink);
}

.vb-btn--secondary:hover {
  background: var(--vb-surface-soft);
  border-color: var(--vb-blush);
}

.vb-main {
  padding: var(--vb-space-5) 0 var(--vb-space-7);
}

.vb-panel {
  background: var(--vb-surface);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-lg);
  box-shadow: var(--vb-shadow-xs);
  padding: var(--vb-space-5);
}

.vb-panel + .vb-panel {
  margin-top: var(--vb-space-4);
}

.vb-panel__title {
  margin: 0 0 var(--vb-space-4);
  font-family: var(--vb-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--vb-ink);
}

.vb-lead {
  margin: 0 0 var(--vb-space-5);
  color: var(--vb-muted);
  font-size: 0.9375rem;
}

/* City chips */
.vb-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vb-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-pill);
  background: var(--vb-surface-soft);
  color: var(--vb-ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--vb-duration) var(--vb-ease), border-color var(--vb-duration) var(--vb-ease), color var(--vb-duration) var(--vb-ease);
}

.vb-chip:hover {
  background: var(--vb-primary-soft);
  border-color: var(--vb-blush);
  color: var(--vb-primary-deep);
}

.vb-chip.is-active {
  background: var(--vb-primary);
  border-color: var(--vb-primary);
  color: #fff;
}

/* Catalog tabs */
.vb-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 var(--vb-space-5);
  padding: 0.35rem;
  background: var(--vb-surface-soft);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-md);
}

.vb-catalog-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 0.95rem;
  border-radius: var(--vb-radius-pill);
  border: 1px solid transparent;
  color: var(--vb-ink-soft);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--vb-duration) var(--vb-ease), color var(--vb-duration) var(--vb-ease);
}

.vb-catalog-tab em {
  font-style: normal;
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--vb-radius-pill);
  background: var(--vb-paper);
  color: var(--vb-muted);
  font-size: 0.75rem;
  text-align: center;
}

.vb-catalog-tab:hover {
  background: var(--vb-primary-soft);
  color: var(--vb-primary-deep);
}

.vb-catalog-tab.is-active {
  background: var(--vb-primary);
  color: #fff;
}

.vb-catalog-tab.is-active em {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Totals */
.vb-totals {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vb-space-4) var(--vb-space-6);
  margin-bottom: var(--vb-space-5);
  padding: var(--vb-space-4) var(--vb-space-5);
  background: var(--vb-primary-soft);
  border: 1px solid var(--vb-blush);
  border-radius: var(--vb-radius-md);
}

.vb-totals__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.vb-totals__label {
  font-size: 0.75rem;
  color: var(--vb-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.vb-totals__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--vb-ink);
}

.vb-totals__value--money {
  color: var(--vb-primary-deep);
}

/* Callcenter note */
.vb-note {
  margin-bottom: var(--vb-space-5);
  padding: var(--vb-space-4);
  background: var(--vb-surface-soft);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-md);
}

.vb-note__label {
  display: block;
  margin-bottom: var(--vb-space-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vb-muted);
}

.vb-note__content {
  min-height: 3.5rem;
  padding: var(--vb-space-3);
  border-radius: var(--vb-radius-sm);
  background: var(--vb-surface);
  border: 1px dashed var(--vb-line-strong);
  color: var(--vb-ink-soft);
  font-size: 0.9375rem;
  line-height: 1.65;
  white-space: pre-line;
  cursor: pointer;
}

.vb-note__content:hover {
  border-color: var(--vb-blush);
  background: var(--vb-primary-soft);
}

.vb-note__content:empty::before {
  content: "Нажмите, чтобы добавить заметку для колл-центра…";
  color: var(--vb-faint);
  font-style: italic;
}

.vb-note__form {
  display: none;
}

.vb-note__form.is-active {
  display: block;
}

.vb-note__textarea {
  width: 100%;
  min-height: 7.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--vb-line-strong);
  border-radius: var(--vb-radius-sm);
  background: var(--vb-surface);
  color: var(--vb-ink);
  resize: vertical;
}

.vb-note__textarea:focus {
  border-color: var(--vb-primary);
  outline: none;
  box-shadow: var(--vb-shadow-focus);
}

.vb-note__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vb-space-2);
  margin-top: var(--vb-space-3);
}

/* Tables */
.vb-tables {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vb-space-4);
}

@media (min-width: 820px) {
  .vb-tables {
    grid-template-columns: 1fr 1fr;
  }
}

.vb-table-card {
  overflow: hidden;
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-md);
  background: var(--vb-surface);
}

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

.vb-table th,
.vb-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: middle;
  font-size: 0.875rem;
}

.vb-table thead th {
  background: var(--vb-surface-soft);
  border-bottom: 1px solid var(--vb-line);
  color: var(--vb-muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vb-table tbody td {
  border-bottom: 1px solid var(--vb-line);
  color: var(--vb-ink-soft);
}

.vb-table tbody tr:last-child td {
  border-bottom: none;
}

.vb-table tbody tr:hover td {
  background: var(--vb-surface-soft);
}

.vb-table td:first-child {
  font-weight: 600;
  color: var(--vb-ink);
}

.vb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 1.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--vb-radius-pill);
  font-size: 0.8125rem;
  font-weight: 700;
}

.vb-badge--high {
  background: var(--vb-sage-soft);
  color: var(--vb-sage-text);
}

.vb-badge--mid {
  background: var(--vb-warning-soft);
  color: var(--vb-warning-text);
}

.vb-badge--low {
  background: var(--vb-danger-soft);
  color: var(--vb-danger-text);
}

.vb-badge--reserved {
  background: var(--vb-warning-soft);
  color: var(--vb-warning-text);
}

.vb-badge--empty {
  background: var(--vb-surface-soft);
  color: var(--vb-faint);
}

.vb-table th:nth-child(2),
.vb-table th:nth-child(3),
.vb-table td:nth-child(2),
.vb-table td:nth-child(3) {
  width: 5.5rem;
  text-align: center;
}

.vb-price {
  font-weight: 600;
  color: var(--vb-ink);
  white-space: nowrap;
}

.vb-alert {
  padding: var(--vb-space-4);
  border-radius: var(--vb-radius-md);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.vb-alert--info {
  background: var(--vb-primary-soft);
  border: 1px solid var(--vb-blush);
  color: var(--vb-primary-deep);
}

.vb-alert--error {
  background: var(--vb-danger-soft);
  border: 1px solid #edc8cd;
  color: var(--vb-danger-text);
}

/* Login */
.vb-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--vb-space-5);
  background:
    radial-gradient(120% 80% at 10% 0%, var(--vb-blush) 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 100%, var(--vb-primary-soft) 0%, transparent 50%),
    var(--vb-paper);
}

.vb-login__card {
  width: min(100%, 24rem);
  padding: var(--vb-space-6);
  background: var(--vb-surface);
  border: 1px solid var(--vb-line);
  border-radius: var(--vb-radius-lg);
  box-shadow: var(--vb-shadow-sm);
}

.vb-login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--vb-space-3);
  margin-bottom: var(--vb-space-5);
  text-align: center;
}

.vb-login__brand img {
  width: 3.25rem;
  height: 3.25rem;
}

.vb-login__brand h1 {
  margin: 0;
  font-family: var(--vb-display);
  font-size: 1.5rem;
  font-weight: 600;
}

.vb-login__brand p {
  margin: 0;
  color: var(--vb-muted);
  font-size: 0.875rem;
}

.vb-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--vb-space-4);
}

.vb-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vb-ink-soft);
}

.vb-field input {
  width: 100%;
  min-height: var(--vb-control);
  padding: 0.75rem 1rem;
  border: 1px solid var(--vb-line-strong);
  border-radius: var(--vb-radius-pill);
  background: var(--vb-surface-soft);
  color: var(--vb-ink);
}

.vb-field input:focus {
  border-color: var(--vb-primary);
  background: var(--vb-surface);
  outline: none;
  box-shadow: var(--vb-shadow-focus);
}

.vb-login__card .vb-btn {
  width: 100%;
}

.vb-login__error {
  margin-bottom: var(--vb-space-4);
}

@media (max-width: 430px) {
  .vb-wrap {
    width: min(100% - 1.25rem, var(--vb-container));
  }

  .vb-panel {
    padding: var(--vb-space-4);
  }

  .vb-top__inner {
    align-items: flex-start;
  }

  .vb-cities {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .vb-chip {
    width: 100%;
  }

  .vb-note__actions {
    flex-direction: column;
  }

  .vb-note__actions .vb-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
