/* Букет CRM. Тема статического демо цветочного магазина «Ромашка и Лён».
   Системный шрифт, плоские поверхности, без градиентов и внешних ресурсов.
   Тёмный винно-ягодный сайдбар #4a2433, фон #f7f4f1, акцент кнопок #2f5d46.
   Контраст всех пар текста и фона не ниже 4.5:1 (WCAG AA). */

:root {
  --berry: #4a2433;
  --berry-dark: #381a27;
  --berry-mid: #5c2f41;
  --berry-soft: #f1e3e9;
  --side-text: #ffffff;
  --side-muted: #e9d5dc;
  --side-accent: #e9c8d4;
  --bg: #f7f4f1;
  --card: #ffffff;
  --text: #222222;
  --muted: #55504c;
  --placeholder: #716a63;
  --line: #e4ddd4;
  --line-soft: #efe9e1;
  --leaf: #2f5d46;
  --leaf-dark: #264a38;
  --leaf-soft: #e2ece6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(34, 34, 34, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, p {
  margin: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-tulip {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  color: var(--berry);
}

.logo-tulip .tulip-stem {
  color: var(--leaf);
}

.sidebar .logo-tulip {
  color: var(--side-text);
}

.sidebar .logo-tulip .tulip-stem {
  color: var(--side-accent);
}

.muted {
  color: var(--muted);
}

.money-risk {
  color: var(--berry);
  font-weight: 600;
}

.money-good {
  color: var(--leaf);
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

/* Фокус */

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 2px;
}

.btn:focus-visible,
.icon-btn:focus-visible,
.nav-item:focus-visible,
.tab-item:focus-visible,
.kpi:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff;
}

.sidebar .nav-item:focus-visible {
  outline-color: #ffffff;
  box-shadow: 0 0 0 2px var(--berry);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--leaf);
  outline-offset: 1px;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--leaf);
  color: #ffffff;
}

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

.btn-outline {
  border-color: var(--line);
  background: var(--card);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--leaf);
  color: var(--leaf-dark);
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
}

.btn-quiet:hover {
  background: var(--line-soft);
  color: var(--text);
}

.btn-sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--leaf);
}

/* Бейджи: ягодный для риска и праздников, зелёный для завершённого. */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-berry {
  background: var(--berry-soft);
  color: var(--berry);
}

.badge-leaf {
  background: var(--leaf-soft);
  color: var(--leaf-dark);
}

.badge-muted {
  background: var(--line-soft);
  color: var(--muted);
}

/* Поля */

.field {
  display: block;
  margin-bottom: 14px;
}

.field-label {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select,
.row-select,
.reminder-side select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 16px;
}

.field textarea {
  min-height: 76px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder,
.toolbar input::placeholder {
  color: var(--placeholder);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--berry-soft);
  color: var(--berry);
  font-size: 14px;
  font-weight: 600;
}

.form-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}

/* Экран входа */

.login {
  min-height: 100vh;
  background: var(--berry);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-wrap {
  width: 100%;
  max-width: 520px;
}

.login-card {
  background: var(--card);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 10px 30px rgba(56, 26, 39, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--berry);
  line-height: 1.25;
}

.brand-slogan {
  font-size: 12px;
  color: var(--muted);
}

.login-brand {
  margin-bottom: 20px;
}

.login-card h1 {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.login-lead {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.login-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.login-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
}

.login-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--leaf-soft);
  color: var(--leaf-dark);
}

.login-check .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.4;
}

.login-hint {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--leaf-soft);
  color: var(--leaf-dark);
  font-size: 13px;
}

.login-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.login-foot {
  margin-top: 16px;
  text-align: center;
  color: var(--side-muted);
  font-size: 12px;
}

/* Каркас приложения */

.app {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 250px;
  width: 250px;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--berry);
  color: var(--side-text);
  padding: 18px 14px;
}

.sidebar-brand {
  padding: 4px 8px 16px;
}

.sidebar .brand-name {
  color: var(--side-text);
}

.sidebar .brand-slogan {
  color: var(--side-muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--side-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.nav-item:hover {
  background: var(--berry-mid);
  color: var(--side-text);
}

.nav-item.is-active {
  background: var(--berry-dark);
  color: var(--side-text);
}

.nav-count {
  margin-left: auto;
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--berry-dark);
  color: var(--side-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.nav-item.is-active .nav-count {
  background: var(--leaf);
  color: #ffffff;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 8px 4px;
}

.sidebar-note {
  font-size: 12px;
  color: var(--side-muted);
}

.sidebar-note b {
  display: block;
  color: var(--side-text);
  margin-bottom: 3px;
}

.sidebar-version {
  margin-top: 10px;
  font-size: 11px;
  color: var(--side-muted);
}

.workspace {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 26px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.topbar-context {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar-date {
  font-size: 14px;
  font-weight: 600;
}

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

.main {
  width: 100%;
  padding: 22px 26px 40px;
}

/* Типовые блоки */

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h1 {
  font-size: 22px;
  line-height: 1.3;
}

.page-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.card-head h2 {
  font-size: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.grid-2 > .card {
  min-width: 0;
}

.grid-2 .card {
  margin-bottom: 0;
}

.grid-2-wrap {
  margin-bottom: 16px;
}

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

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
}

button.kpi {
  cursor: pointer;
  transition: border-color 0.15s ease;
}

button.kpi:hover {
  border-color: var(--leaf);
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.kpi-note {
  font-size: 12px;
  color: var(--muted);
}

.kpi-risk .kpi-value,
.kpi-berry .kpi-value {
  color: var(--berry);
}

.kpi-leaf .kpi-value {
  color: var(--leaf);
}

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

.toolbar .search-wrap {
  position: relative;
  flex: 1 1 240px;
  min-width: 0;
}

.toolbar .search-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--placeholder);
  pointer-events: none;
}

.toolbar .search-wrap input {
  padding-left: 40px;
}

.toolbar select {
  width: auto;
  min-width: 150px;
  flex: 0 1 auto;
}

.toolbar-note {
  font-size: 13px;
  color: var(--muted);
}

/* Вкладки */

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tab-item {
  min-height: 38px;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.tab-item:hover {
  background: var(--line-soft);
  color: var(--text);
}

.tab-item.is-active {
  background: var(--leaf);
  color: #ffffff;
}

.tab-count {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.tab-item.is-active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Таблицы */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

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

.table tbody tr:hover {
  background: var(--bg);
}

.table .row-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 4px 0;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
  color: var(--leaf-dark);
  text-align: left;
}

.table .row-link:hover {
  text-decoration: underline;
}

.cell-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cell-sub {
  font-size: 12px;
  color: var(--muted);
}

.cell-clip {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.row-select {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 14px;
  max-width: 100%;
}

.stock-name {
  font-weight: 600;
}

/* Пустое состояние */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--line-soft);
  color: var(--muted);
}

.empty p {
  color: var(--muted);
  font-size: 14px;
}

/* Списки */

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--card);
}

.list-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.list-row-title {
  font-weight: 600;
  font-size: 14px;
}

.list-row-sub {
  font-size: 12px;
  color: var(--muted);
}

.list-row-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.row-time {
  font-weight: 700;
  color: var(--berry);
  margin-right: 4px;
}

/* Задачи */

.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.task-row.is-done .task-title {
  text-decoration: line-through;
  color: var(--muted);
}

.task-title {
  flex: 1 1 auto;
  font-size: 14px;
  min-width: 0;
}

.task-due {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.task-due.is-overdue {
  color: var(--berry);
  font-weight: 700;
}

/* Букеты */

.bouquet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}

.bouquet-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bouquet-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.bouquet-name {
  font-size: 15px;
  font-weight: 700;
}

.bouquet-cost {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.bouquet-price {
  font-size: 13px;
}

.comp-list {
  display: flex;
  flex-direction: column;
}

.comp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13px;
}

.comp-row:last-child {
  border-bottom: 0;
}

.comp-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.comp-qty {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
}

.comp-sum {
  color: var(--muted);
  white-space: nowrap;
  min-width: 76px;
  text-align: right;
}

.bouquet-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.bouquet-foot b {
  color: var(--text);
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--leaf);
}

/* Детали и модальные подписи */

.detail-box {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg);
  padding: 12px;
  font-size: 14px;
}

.detail-box p {
  margin-bottom: 4px;
}

.detail-box p:last-child {
  margin-bottom: 0;
}

.detail-box .cardtext {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
}

.modal-subtitle {
  font-size: 13px;
  margin: 14px 0 8px;
}

/* Карточка клиента */

.client-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Доставка */

.status-note {
  font-size: 12px;
  color: var(--muted);
}

/* Напоминания */

.reminder-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--card);
}

.reminder-row.is-sent {
  background: var(--bg);
}

.reminder-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
}

.reminder-text {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.reminder-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.reminder-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.reminder-side select {
  min-height: 40px;
  padding: 6px 10px;
  font-size: 14px;
  width: auto;
}

/* Отчёты */

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.bar-label {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--berry);
  min-width: 2px;
}

.bar-fill.is-leaf {
  background: var(--leaf);
}

.bar-fill.is-berry {
  background: var(--berry);
}

.bar-value {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.report-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

/* Модальные окна */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(56, 26, 39, 0.55);
}

.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--card);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(56, 26, 39, 0.35);
}

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

.modal-head h2 {
  font-size: 18px;
  line-height: 1.3;
}

.modal-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Тост */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--berry-dark);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(56, 26, 39, 0.35);
}

/* Адаптив */

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

@media (max-width: 900px) {
  .app {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace {
    width: 100%;
  }

  .sidebar {
    position: static;
    width: 100%;
    flex: 0 0 auto;
    height: auto;
    overflow: visible;
    padding: 12px 12px 0;
  }

  .sidebar-brand {
    padding: 2px 6px 10px;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 10px;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 12px;
  }

  .nav-count {
    margin-left: 2px;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    padding: 10px 14px;
  }

  .main {
    padding: 16px 14px 32px;
  }

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

@media (max-width: 760px) {
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: var(--card);
  }

  .table tbody tr:hover {
    background: var(--card);
  }

  .table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--line-soft);
    text-align: right;
  }

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

  .table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
  }

  .table td[data-label=""]::before {
    content: none;
  }

  .table .cell-main {
    align-items: flex-end;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bar-label {
    grid-column: 1 / -1;
  }

  .cell-clip {
    max-width: 200px;
  }
}

@media (max-width: 640px) {
  .topbar-reset span,
  .btn-logout span {
    display: none;
  }

  .topbar-reset,
  .btn-logout {
    width: 44px;
    padding: 10px;
  }

  .login-card {
    padding: 22px 18px;
  }

  .modal {
    padding: 18px 16px;
  }

  .page-head h1 {
    font-size: 20px;
  }
}
