:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #202736;
  --muted: #6b7384;
  --line: #e4e9f2;
  --accent: #ff9900;
  --accent-soft: #fff4e3;
}

html,
body {
  min-height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 90% 5%, #ffe7bf 0, rgba(255, 231, 191, 0) 28%), var(--bg);
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(14, 31, 74, 0.08);
  padding: 24px;
}

.login-container.lively {
  background: linear-gradient(180deg, #fff, #fff8eb);
}

.login-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-subtitle {
  color: var(--muted);
  margin-bottom: 20px;
}

.login-step {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  margin-bottom: 10px;
}

.step-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #2c1f09;
  font-size: 12px;
  font-weight: 700;
}

.step-content {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.code-box {
  margin-top: 8px;
  border: 1px dashed #d5b57a;
  background: #fff8eb;
  color: #6e4a13;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.button-container {
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}

.btn-primary,
.form-submit {
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #2f210a;
  font-weight: 700;
  padding: 9px 12px;
  width: 100%;
  cursor: pointer;
}

.error,
.success {
  margin-bottom: 10px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.error {
  background: #fff1f1;
  border: 1px solid #f4cccc;
  color: #a53131;
}

.success {
  background: #f0fbf3;
  border: 1px solid #cbeed6;
  color: #226a3e;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.side {
  background: #111a2f;
  color: #d6dff4;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 18px;
  line-height: 1.2;
  font-size: 15px;
}

.brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.5;
  margin-top: 3px;
  letter-spacing: 0.4px;
}

.menu {
  display: grid;
  gap: 16px;
}

.menu-workflow {
  display: grid;
  gap: 7px;
}

.menu-secondary {
  display: grid;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: #d6dff4;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu-link:hover,
.menu-sublink:hover {
  color: #fff;
  transform: translateX(2px);
}

.menu-link small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.menu-link-primary {
  min-height: 48px;
  padding: 12px 13px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.menu-sublist {
  display: grid;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-sublink {
  display: flex;
  align-items: center;
  min-height: 30px;
  border-radius: 8px;
  padding: 6px 10px;
  color: rgba(214, 223, 244, 0.82);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.menu-sublink.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.today-menu-link {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 153, 0, 0.95), rgba(255, 188, 77, 0.82));
  color: #221707;
  box-shadow: 0 12px 26px rgba(255, 153, 0, 0.2);
}

.today-menu-link small {
  color: rgba(34, 23, 7, 0.62);
}

.today-menu-link::after {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -70%;
  width: 44%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  transform: skewX(-18deg);
  animation: today-menu-flash 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes today-menu-flash {
  0%,
  58% {
    left: -70%;
    opacity: 0;
  }
  68% {
    opacity: 1;
  }
  88%,
  100% {
    left: 130%;
    opacity: 0;
  }
}

.menu-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.today-menu-link.active,
.today-menu-link:hover {
  color: #1d1406;
  background: linear-gradient(135deg, #ff9900, #ffc15c);
}

.menu-link-about {
  margin-top: 2px;
}

.auto-restriction-toggle {
  margin: 0 0 14px;
}

.auto-restriction-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: #d6dff4;
  padding: 9px 10px 9px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auto-restriction-toggle-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.auto-restriction-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.auto-restriction-title {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-restriction-state {
  color: rgba(214, 223, 244, 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.auto-restriction-switch {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #eef1f7);
  box-shadow:
    inset 0 0 0 1px rgba(20, 28, 45, 0.08),
    0 5px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.auto-restriction-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.32);
  transition: transform 0.18s ease;
}

.auto-restriction-toggle-btn.is-on {
  border-color: rgba(86, 229, 83, 0.28);
  background: rgba(86, 229, 83, 0.09);
  box-shadow: inset 0 0 0 1px rgba(86, 229, 83, 0.08);
}

.auto-restriction-toggle-btn.is-on .auto-restriction-state {
  color: #87f589;
}

.auto-restriction-toggle-btn.is-on .auto-restriction-switch {
  background: linear-gradient(180deg, #63ef62, #39d842);
  box-shadow:
    inset 0 0 0 1px rgba(9, 90, 25, 0.12),
    0 7px 16px rgba(57, 216, 66, 0.18);
}

.auto-restriction-toggle-btn.is-on .auto-restriction-knob {
  transform: translateX(26px);
}

.user-box {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 12px;
}

.user-name {
  font-weight: 700;
  font-size: 13px;
}

.user-role {
  opacity: 0.75;
  font-size: 12px;
  margin: 2px 0 10px;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d6dff4;
  text-decoration: none;
  padding: 8px 10px;
}

.main {
  padding: 24px;
  width: 100%;
  overflow-x: hidden;
}

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

.top h1 {
  margin: 0;
  font-size: 28px;
}

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

.with-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.cards-wide {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.cards-compact {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric-card strong {
  font-size: 26px;
}

.billing-notice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid #f0c983;
  border-radius: 14px;
  background: #fff8eb;
  padding: 12px 14px;
}

.billing-notice-banner strong {
  display: block;
  margin-bottom: 3px;
  color: #6b3f00;
}

.billing-notice-banner p {
  margin: 0;
  color: #7a5520;
  font-size: 13px;
  font-weight: 700;
}

.billing-notice-banner a,
.billing-notice-modal-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #2f210a;
  padding: 9px 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.billing-notice-modal {
  width: min(520px, calc(100vw - 28px));
  border: 0;
  border-radius: 16px;
  padding: 0;
}

.billing-notice-modal::backdrop {
  background: rgba(15, 23, 42, 0.44);
}

.billing-notice-modal-copy {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.billing-notice-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.panel {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

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

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

.billing-status-panel h2,
.panel > h2 {
  margin-top: 0;
}

.billing-status-list {
  display: grid;
  gap: 10px;
}

.billing-status-list div {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.billing-status-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.billing-status-list span,
.billing-kv span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.billing-status-list strong,
.billing-kv strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.billing-offer-note,
.billing-muted-note {
  margin-top: 12px;
  border: 1px solid #f0c983;
  border-radius: 12px;
  background: #fff8eb;
  color: #755018;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.billing-offer-note a {
  color: #5b3a08;
  font-weight: 900;
  white-space: nowrap;
}

.billing-kv {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 12px;
}

.billing-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.billing-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.billing-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  font: inherit;
  text-transform: none;
}

.billing-form-actions {
  display: flex;
  align-items: end;
}

.billing-form-actions button,
.billing-row-actions button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #2f210a;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
}

.billing-invoice-form {
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(130px, 0.7fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) auto;
}

.billing-invoices-table th:last-child,
.billing-invoices-table td:last-child {
  min-width: 260px;
}

.billing-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.billing-status--paid {
  background: #e7f8ee;
  color: #1f7a45;
}

.billing-status--issued {
  background: #fff2db;
  color: #8a5200;
}

.billing-status--cancelled {
  background: #f3f4f6;
  color: #667085;
}

.billing-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.billing-row-actions form {
  margin: 0;
}

.billing-row-actions .ghost,
.billing-row-actions a.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  font-weight: 800;
  text-decoration: none;
}

.billing-row-actions .danger-ghost {
  color: #a53131;
}

.billing-warning-text {
  margin-top: 4px;
  color: #9f5800;
  font-size: 12px;
  font-weight: 800;
}

.users-panel h2 {
  margin: 0;
}

.users-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.users-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.users-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(130px, 0.6fr) minmax(260px, 1.15fr) auto;
  gap: 12px;
  align-items: end;
}

.users-create-form label,
.users-inline-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.users-create-form input,
.users-create-form select,
.users-table input,
.users-table select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
}

.users-create-form button,
.users-table button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #2f210a;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.users-create-form button:hover,
.users-table button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(127, 91, 18, 0.14);
}

.users-permission-strip,
.users-permission-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.users-permission-stack {
  min-width: 240px;
}

.users-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-transform: none;
}

.users-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.users-toggle span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #dfe5ef;
  box-shadow: inset 0 0 0 1px rgba(20, 28, 45, 0.08);
  transition: background 0.18s ease;
}

.users-toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 28, 45, 0.24);
  transition: transform 0.18s ease;
}

.users-toggle input:checked + span {
  background: #54d46a;
}

.users-toggle input:checked + span::after {
  transform: translateX(16px);
}

.users-toggle input:focus-visible + span {
  outline: 3px solid rgba(255, 153, 0, 0.28);
  outline-offset: 2px;
}

.users-inline-label {
  margin-top: 8px;
}

.users-user-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.users-user-title strong {
  font-size: 15px;
}

.users-user-title span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: #eef4ff;
  color: #31527c;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.users-login {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.users-admin-note {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.users-row-inactive {
  opacity: 0.58;
}

.users-row-current td {
  background: #fbfcff;
}

.users-table th:first-child,
.users-table td:first-child {
  min-width: 230px;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
  min-width: 260px;
}

.users-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.users-actions form {
  margin: 0;
}

.users-table button.users-danger-button {
  border: 1px solid #f0c9c2;
  background: #fff3f2;
  color: #9b2f25;
}

.users-table button.users-danger-button:hover {
  background: #ffe8e4;
  box-shadow: 0 6px 14px rgba(161, 49, 49, 0.12);
}

.users-table button:disabled,
.users-table button:disabled:hover {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

@media (max-width: 980px) {
  .users-create-form {
    grid-template-columns: 1fr;
  }

  .users-section-head {
    align-items: flex-start;
  }

  .users-permission-strip {
    align-items: center;
  }

  .users-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .users-actions button {
    width: 100%;
  }
}

.legal-offer-top {
  align-items: center;
}

.legal-offer {
  max-width: 980px;
  line-height: 1.55;
}

.legal-offer section {
  border-bottom: 1px solid var(--line);
  padding: 4px 0 16px;
}

.legal-offer section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.legal-offer h2 {
  margin: 16px 0 10px;
  color: #111a2f;
  font-size: 18px;
  line-height: 1.25;
}

.legal-offer p {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.legal-offer p:last-child {
  margin-bottom: 0;
}

.legal-requisites {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.legal-requisites dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.legal-requisites dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.bookings-search-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.bookings-search-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.today-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.today-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.today-search-form {
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  align-items: center;
}

.today-search-date-trigger {
  white-space: nowrap;
}

.today-search-date-control {
  position: relative;
  display: inline-flex;
}

.today-search-date-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
}

.today-search-hint {
  margin-top: 8px;
  color: #7d4d00;
  font-size: 13px;
  font-weight: 700;
}

.today-digits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px) auto;
  grid-template-areas:
    "main chart pending"
    "total chart pending";
  align-items: center;
  gap: 4px 14px;
}

.today-digits-main {
  grid-area: main;
  display: flex;
  gap: 16px;
}

.today-digits-main div,
.today-digits-pending {
  display: grid;
  gap: 1px;
}

.today-digits span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.today-digits strong {
  color: #111a2f;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.today-digits-total {
  grid-area: total;
  color: #8a92a3;
  font-size: 12px;
  font-weight: 700;
}

.today-digits-pending {
  grid-area: pending;
  min-width: 128px;
  border: 1px solid #f0c9c2;
  border-radius: 12px;
  background: #fff3f2;
  padding: 8px 11px;
}

.today-digits-pending strong {
  color: #ef2b3a;
}

.bookings-digits {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  grid-template-areas:
    "main chart"
    "total chart";
}

.bookings-dashboard-panel .today-evening-bar {
  background: linear-gradient(180deg, #5da8ff, #2d5adf);
}

.today-evening-chart {
  grid-area: chart;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.today-evening-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.today-evening-chart-head small {
  color: #8a92a3;
  font-size: 11px;
  font-weight: 700;
}

.today-evening-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(12px, 1fr));
  align-items: end;
  gap: 5px;
  min-height: 82px;
}

.today-evening-slot {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.today-evening-bar {
  display: block;
  width: 100%;
  max-width: 18px;
  min-height: 4px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(180deg, #ffb13d, #ff8a00);
}

.today-evening-slot small {
  color: #8a92a3;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.today-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.today-booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "time table"
    "main table"
    "tags tags"
    "comment comment";
  grid-template-rows: auto minmax(64px, 1fr) auto minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 188px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 12px;
  text-align: left;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.today-booking-card:hover {
  border-color: #cbd5e6;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.today-booking-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.today-booking-card--assigned {
  border-color: #8fd3ad;
  background: linear-gradient(180deg, #effcf3, #dff5e6);
  color: #1f5b37;
}

.archive-booking-card {
  cursor: default;
}

.archive-booking-card--completed {
  border-color: #8fd3ad;
  background: linear-gradient(180deg, #effcf3, #dff5e6);
  color: #1f5b37;
}

.archive-booking-card--cancelled {
  border-color: #f0a6a6;
  background: linear-gradient(180deg, #fff3f3, #ffe2e2);
  color: #7f1d1d;
}

.archive-booking-card--completed .today-card-time,
.archive-booking-card--completed .today-card-main strong,
.archive-booking-card--completed .today-card-main small,
.archive-booking-card--completed .today-card-phone,
.archive-booking-card--completed .today-card-table {
  color: #1f5b37;
}

.archive-booking-card--cancelled .today-card-time,
.archive-booking-card--cancelled .today-card-main strong,
.archive-booking-card--cancelled .today-card-main small,
.archive-booking-card--cancelled .today-card-phone,
.archive-booking-card--cancelled .today-card-table {
  color: #7f1d1d;
}

.archive-booking-card--completed .today-card-tags span {
  border-color: #b9e2c8;
  background: rgba(255, 255, 255, 0.92);
  color: #1f5b37;
}

.archive-booking-card--cancelled .today-card-tags span {
  border-color: #f0b8b8;
  background: rgba(255, 255, 255, 0.9);
  color: #7f1d1d;
}

.today-booking-card--pending {
  border: 2px solid #ef2b3a;
  box-shadow: 0 6px 18px rgba(239, 43, 58, 0.12);
}

.today-booking-card--restriction-alert {
  border-color: #efb1a8;
  background:
    radial-gradient(circle at 95% 0%, rgba(217, 77, 61, 0.18), rgba(217, 77, 61, 0) 34%),
    linear-gradient(180deg, #fff6f4, #ffe8e3);
  box-shadow: 0 12px 28px rgba(177, 52, 35, 0.12);
}

.today-booking-card--restriction-alert .today-card-restriction-remaining {
  color: #7f1f14;
  font-weight: 900;
}

.today-card-time {
  grid-area: time;
  display: grid;
  align-content: start;
  gap: 3px;
  color: #111a2f;
}

.today-card-time strong {
  display: block;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.today-card-time small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.today-booking-card--assigned .today-card-time small {
  color: rgba(31, 91, 55, 0.68);
}

.today-card-main {
  grid-area: main;
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.today-card-main strong,
.today-card-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-card-main strong {
  font-size: 16px;
  line-height: 1.15;
}

.today-card-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.today-card-phone {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(107, 115, 132, 0.35);
  text-underline-offset: 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-card-phone:hover,
.today-card-phone:focus-visible {
  color: #1d4ed8;
  text-decoration-color: currentColor;
}

.today-card-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.today-card-tags span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  border: 1px solid #ffc05c;
  border-radius: 999px;
  background: #fff8eb;
  color: #7d4d00;
  padding: 4px 7px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-booking-card--assigned .today-card-tags span {
  border-color: #b9e2c8;
  background: rgba(255, 255, 255, 0.92);
  color: #1f5b37;
}

.today-card-comment {
  grid-area: comment;
  display: block;
  min-width: 0;
  border-left: 3px solid #f0c26b;
  padding-left: 8px;
  color: #5d4723;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.today-card-table {
  grid-area: table;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 4px;
  min-width: 72px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #263247;
  padding: 0;
  overflow: visible;
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  white-space: normal;
}

.today-card-table > span:first-child {
  display: block;
  max-width: 100%;
  color: inherit;
  font-size: 42px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.today-booking-card--assigned .today-card-time,
.today-booking-card--assigned .today-card-main strong,
.today-booking-card--assigned .today-card-main small,
.today-booking-card--assigned .today-card-phone {
  color: #1f5b37;
}

.today-booking-card--assigned .today-card-phone {
  text-decoration-color: rgba(31, 91, 55, 0.32);
}

.today-booking-card--assigned .today-card-phone:hover,
.today-booking-card--assigned .today-card-phone:focus-visible {
  color: #174328;
  text-decoration-color: currentColor;
}

.today-booking-card--assigned .today-card-table {
  color: #1f5b37;
}

.today-card-table.is-empty {
  min-width: 24px;
  opacity: 0.38;
  color: var(--muted);
}

.today-card-table.is-restricted {
  color: #a13a2f;
}

.today-card-restriction-time {
  color: #ef2b3a;
  font-variant-numeric: tabular-nums;
}

.today-card-restriction {
  display: grid;
  gap: 2px;
  justify-items: end;
  max-width: 96px;
}

.today-card-restriction-until {
  color: #a13a2f;
  font-size: 12px;
  font-weight: 700;
}

.today-card-restriction-remaining {
  color: #ef2b3a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.today-empty {
  grid-column: 1 / -1;
  border: 1px dashed #d8dfec;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.today-action-menu {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
  padding: 0 18px 18px;
}

.today-action-menu button {
  width: 100%;
}

.close-accent {
  border-color: #ef2b3a;
  background: #ef2b3a;
  color: #fff;
  font-weight: 900;
}

.open-table-accent {
  border-color: #8fd3ad;
  background: linear-gradient(180deg, #effcf3, #dff5e6);
  color: #1f5b37;
  font-weight: 800;
}

.today-action-modal .booking-modal-form {
  padding-top: 0;
}

input,
select,
textarea,
button,
.ghost {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  min-height: 86px;
  resize: vertical;
  font-family: inherit;
}

button {
  border: none;
  background: var(--accent);
  color: #252525;
  font-weight: 600;
  cursor: pointer;
}

.ghost {
  text-decoration: none;
  text-align: center;
}

.date-box {
  display: grid;
  gap: 5px;
}

.date-box label {
  font-size: 12px;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
}

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

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

td small {
  color: var(--muted);
}

a {
  color: #2d5adf;
  text-decoration: none;
}

.badge {
  display: inline-block;
  border: 1px solid #ffc05c;
  background: #fff8eb;
  color: #7d4d00;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.badge-alert {
  border-color: #f0c9c2;
  background: #fff3f2;
  color: #a13a2f;
}

.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.chart-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #fffaf1);
}

.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.chart-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.chart-chip.active {
  border-color: #ffc05c;
  background: #fff3dc;
  color: #7d4d00;
}

.chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-canvas-wrap {
  position: relative;
  height: 260px;
}

.chart-canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

.chart-points {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px;
}

.chart-points div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
  background: #fff;
}

.chart-points span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.chart-points strong {
  font-size: 14px;
}

.icon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.icon-actions form {
  margin: 0;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

.icon-btn-confirm {
  color: #1f7a4f;
  border-color: #b8e7cf;
  background: #f1fcf6;
}

.icon-btn-cancel {
  color: #a13a2f;
  border-color: #f0c9c2;
  background: #fff3f2;
}

.icon-btn-open {
  color: #2d5adf;
  border-color: #c9d7ff;
  background: #f3f6ff;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.kv {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kv li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

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

.timeline {
  display: grid;
  gap: 9px;
}

.stack-form {
  display: grid;
  gap: 10px;
}

.stack-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.guest-lookup-hint {
  display: none;
  margin-top: -2px;
  font-size: 12px;
}

.guest-lookup-suggestions {
  display: none;
  gap: 0;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.12);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.guest-lookup-suggestion {
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  display: grid;
  gap: 2px;
  cursor: pointer;
}

.guest-lookup-suggestion:last-child {
  border-bottom: 0;
}

.guest-lookup-suggestion strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.guest-lookup-suggestion span {
  font-size: 12px;
  color: var(--muted);
}

.guest-lookup-suggestion:active,
.guest-lookup-suggestion:focus-visible {
  background: #fff7eb;
  outline: none;
}

.bars {
  display: grid;
  gap: 8px;
}

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
}

.bar-label,
.bar-value {
  color: var(--muted);
  font-size: 12px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #f3f5f9;
  overflow: hidden;
  border: 1px solid #e8edf6;
}

.bar i {
  display: block;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, #ffc05c, #ff9900);
}

.bar-fill.w-20 { width: 20%; }
.bar-fill.w-40 { width: 40%; }
.bar-fill.w-60 { width: 60%; }
.bar-fill.w-80 { width: 80%; }
.bar-fill.w-100 { width: 100%; }

.event {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

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

.empty {
  color: var(--muted);
  text-align: center;
  padding: 20px;
}

.split-panels {
  align-items: start;
}

.table-card {
  display: grid;
  gap: 8px;
}

.table-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.table-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tables-hub-panel {
  display: grid;
  gap: 16px;
}

.tables-hub-copy {
  display: grid;
  gap: 10px;
}

.tables-hub-copy p {
  margin: 0;
}

.tables-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-link-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #f1c072;
  background: linear-gradient(180deg, #ffb741, #ff9900);
  color: #332106;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(255, 153, 0, 0.18);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.compact-restriction-form {
  grid-template-columns: minmax(90px, 110px) minmax(180px, 1fr) auto;
}

.compact-restriction-form input {
  min-width: 0;
}

.danger-ghost {
  color: #a13a2f;
  border-color: #f0c9c2;
  background: #fff3f2;
}

.table-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3f6ff;
  border: 1px solid #c9d7ff;
  color: #2d5adf;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.countdown {
  font-weight: 700;
  color: #7d4d00;
}

.bookings-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 980px;
  table-layout: fixed;
}

.bookings-table .booking-row-pending td {
  background: linear-gradient(180deg, #fff8f7 0%, #fff2f1 100%);
  border-top: 1px solid #edb7b2;
  border-bottom-color: #edb7b2;
}

.bookings-table .booking-row-pending td:first-child {
  border-left: 2px solid #dd6a61;
  border-radius: 12px 0 0 12px;
}

.bookings-table .booking-row-pending td:last-child {
  border-right: 2px solid #dd6a61;
  border-radius: 0 12px 12px 0;
}

.booking-click-row {
  cursor: pointer;
}

.bookings-table .booking-row-assigned td {
  background: #e9f8ee;
  color: #1f5b37;
}

.booking-click-row:hover td,
.booking-click-row:focus-visible td {
  background: #fbfcff;
}

.bookings-table .booking-row-assigned:hover td,
.bookings-table .booking-row-assigned:focus-visible td {
  background: #d9f1e2;
}

.bookings-table .booking-row-assigned a,
.bookings-table .booking-row-assigned strong,
.bookings-table .booking-row-assigned small {
  color: inherit;
}

.booking-click-row:focus-visible {
  outline: none;
}

.booking-click-row:focus-visible td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.booking-col-id {
  width: 58px;
}

.booking-col-date {
  width: 150px;
}

.booking-col-main {
  width: 36%;
}

.booking-col-table {
  width: 130px;
}

.booking-col-count {
  width: 78px;
}

.booking-col-status {
  width: 120px;
}

.booking-col-actions {
  width: 120px;
}

.booking-date-cell,
.booking-main-cell {
  padding-top: 12px;
  padding-bottom: 12px;
}

.booking-id-cell {
  font-weight: 800;
  white-space: nowrap;
}

.booking-mobile-table,
.booking-mobile-tags {
  display: none;
}

.booking-primary-date {
  display: grid;
  gap: 4px;
  justify-items: center;
  border: 1px solid #f2cf9a;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff9ee, #fff3dc);
  padding: 9px 10px;
  color: #7d4d00;
}

.booking-primary-date span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
}

.booking-primary-date strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #7d4d00;
  white-space: nowrap;
}

.booking-primary-guest {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.booking-primary-guest strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-primary-guest span {
  display: block;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.booking-primary-guest small,
.booking-count-cell small,
.booking-table-cell small,
.booking-service-meta small {
  color: var(--muted);
}

.booking-count-cell strong,
.booking-count-cell small,
.booking-table-cell strong,
.booking-table-cell span,
.booking-table-cell small,
.booking-service-meta small {
  display: block;
}

.booking-count-cell strong {
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
}

.booking-count-cell small {
  margin-top: 4px;
  font-size: 11px;
}

.booking-status-cell,
.booking-table-cell,
.booking-actions-cell {
  padding-top: 14px;
}

.booking-table-cell {
  line-height: 1.2;
}

.booking-table-cell strong {
  color: #2d5adf;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.booking-table-cell span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.booking-table-cell small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.25;
}

.booking-service-meta {
  line-height: 1.35;
}

.booking-service-meta small {
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-service-meta small + small {
  margin-top: 3px;
}

.guide-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.guide-hero article {
  border: 1px solid #f2cf9a;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff9ee, #fff);
  padding: 18px;
}

.guide-hero span,
.guide-mini-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guide-hero strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.guide-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.guide-nav {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 8px;
}

.guide-nav h2 {
  margin-bottom: 4px;
}

.guide-nav a {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.guide-content {
  display: grid;
  gap: 14px;
}

.guide-section {
  scroll-margin-top: 18px;
}

.guide-section h2 {
  margin-bottom: 10px;
}

.guide-section h3 {
  margin: 16px 0 8px;
  font-size: 15px;
}

.guide-section p {
  color: var(--muted);
  line-height: 1.55;
}

.guide-section ul,
.guide-section ol {
  margin: 10px 0 0;
  padding-left: 20px;
}

.guide-section li {
  margin: 7px 0;
  line-height: 1.45;
}

.guide-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guide-two-col > div,
.guide-note,
.guide-rule {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf1;
  padding: 14px;
}

.guide-note {
  margin-top: 12px;
  border-color: #f2cf9a;
  color: #7d4d00;
  font-weight: 700;
}

.guide-rule {
  margin: 12px 0;
  border-color: #c9d7ff;
  background: #f3f6ff;
  color: #2d5adf;
  font-weight: 800;
}

.quick-actions {
  grid-template-columns: 1fr;
}

.booking-modal {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(480px, calc(100vw - 24px));
  background: transparent;
}

.booking-modal::backdrop {
  background: rgba(17, 26, 47, 0.45);
}

.booking-modal-shell,
.booking-modal-form {
  background: #fff;
  border: 1px solid var(--line);
}

.booking-modal-shell {
  border-radius: 18px 18px 0 0;
  padding: 16px 18px 10px;
  margin: 0;
}

.booking-modal-form {
  border-top: none;
  border-radius: 0 0 18px 18px;
  padding: 0 18px 18px;
}

.booking-modal-danger-actions {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 18px 18px;
}

#table-session-form {
  border-radius: 0;
  padding-bottom: 10px;
}

.table-booking-conflict-box {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #f0d8bf;
  border-radius: 14px;
  background: #fff7ef;
}

.booking-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.booking-modal-created {
  margin-top: 2px;
  font-size: 14px;
}

.booking-modal-section {
  display: grid;
  gap: 10px;
}

.booking-modal-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.today-date-modal {
  width: min(420px, calc(100vw - 24px));
}

.today-date-calendar {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.today-date-calendar-nav {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
}

.today-date-calendar-nav strong {
  color: var(--text);
  font-size: 16px;
  text-align: center;
  text-transform: capitalize;
}

.today-date-weekdays,
.today-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.today-date-weekdays span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.today-date-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0;
  font-size: 13px;
  font-weight: 800;
}

.today-date-day.is-muted {
  color: #a8afbd;
}

.today-date-day.has-bookings {
  border-color: #ffc05c;
  background: #fff8eb;
  color: #7d4d00;
  box-shadow: inset 0 0 0 1px rgba(255, 192, 92, 0.28);
}

.today-date-day.is-today {
  border-color: #2d5adf;
}

.today-date-day.is-selected {
  border-color: #ff9900;
  background: linear-gradient(180deg, #ffb13d, #ff8a00);
  color: #332106;
}

.inline-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
}

.inline-check input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
}

.conflict-modal-body {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.conflict-table-number {
  border-left: 4px solid #ef2b3a;
  color: #1f2a3d;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  padding-left: 10px;
}

.conflict-message {
  margin: 0;
  color: #4b5568;
  line-height: 1.45;
}

.conflict-rows {
  display: grid;
  gap: 8px;
}

.conflict-rows section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 3px;
  padding-top: 10px;
}

.conflict-rows span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.conflict-rows strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.conflict-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  padding-top: 2px;
}

.conflict-actions button {
  min-height: 42px;
}

.table-restrictions-more {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.table-restrictions-more summary {
  cursor: pointer;
  color: #2d5adf;
  font-weight: 700;
  list-style: none;
}

.table-restrictions-more summary::-webkit-details-marker {
  display: none;
}

.table-restrictions-more[open] summary {
  margin-bottom: 10px;
}

.operation-status.is-hidden {
  display: none;
}

.operation-status.has-error {
  border-color: #f0c9c2;
  background: #fff3f2;
}

.crm-flash-toast {
  position: fixed;
  z-index: 1000;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(32, 39, 54, 0.22);
}

.crm-flash-toast strong {
  display: block;
  margin-bottom: 4px;
}

.crm-flash-toast p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.crm-flash-toast--error {
  border-color: #ffc7c7;
  background: #fff6f6;
}

.crm-flash-toast--ok {
  border-color: #b9dfca;
  background: #f5fff8;
}

.crm-flash-toast-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: rgba(32, 39, 54, 0.08);
  color: var(--text);
}

.tables-date-form {
  display: flex;
  align-items: end;
  gap: 10px;
}

.tables-date-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.tables-tabs-shell {
  padding: 10px;
}

.tables-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tables-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
}

.tables-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f4f6fb;
  font-size: 12px;
}

.tables-tab.active {
  border-color: #ffc05c;
  background: #fff4e3;
  color: #7d4d00;
}

.archive-tabs {
  display: flex;
  gap: 8px;
  padding: 10px;
}

.archive-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 10px 16px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.archive-tab.active {
  border-color: #ffc05c;
  background: #fff4e3;
  color: #7d4d00;
}

.archive-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
}

.archive-search-input {
  font-size: 18px;
  padding: 14px 16px;
}

.quick-presets,
.archive-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.archive-filters,
.restrictions-filters {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.audit-log-head {
  display: grid;
  gap: 14px;
}

.audit-log-head h1 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.1;
}

.audit-log-head p {
  margin: 0;
}

.audit-log-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.audit-log-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 8px;
  min-width: min(100%, 480px);
}

.audit-log-metrics div {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 10px;
}

.audit-log-metrics span,
.audit-log-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.audit-log-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.audit-log-filter-panel {
  margin-top: 10px;
}

.audit-log-search {
  grid-template-columns: minmax(240px, 1.25fr) minmax(180px, 1fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) auto;
  align-items: end;
}

.audit-log-field {
  display: grid;
  gap: 5px;
}

.audit-log-actions {
  display: flex;
  gap: 8px;
}

.audit-log-actions button,
.audit-log-actions .ghost {
  min-height: 41px;
  white-space: nowrap;
}

.audit-log-table {
  min-width: 920px;
  table-layout: fixed;
}

.audit-log-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.audit-log-table td:first-child {
  width: 158px;
}

.audit-log-table th:nth-child(2),
.audit-log-table td:nth-child(2) {
  width: 220px;
}

.audit-log-table th:nth-child(3),
.audit-log-table td:nth-child(3) {
  width: 108px;
}

.audit-log-table th:nth-child(5),
.audit-log-table td:nth-child(5) {
  width: 112px;
}

.audit-log-table td,
.audit-log-table th {
  overflow-wrap: anywhere;
  vertical-align: top;
}

.audit-log-table strong,
.audit-log-table small {
  display: block;
}

.audit-log-time strong {
  font-size: 13px;
  line-height: 1.35;
}

.audit-log-actor {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.audit-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #edf2ff;
  color: #2d5adf;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.audit-status,
.audit-event-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.audit-status {
  margin-top: 6px;
}

.audit-status--ok {
  background: #eaf8ef;
  color: #1e6f3f;
}

.audit-status--error {
  background: #fff0ed;
  color: #a13a2f;
}

.audit-status--muted {
  background: #eef2f7;
  color: var(--muted);
}

.audit-event-chip {
  background: #eef2f7;
  color: #344154;
}

.audit-event-chip--booking {
  background: #fff4e3;
  color: #8a5200;
}

.audit-event-chip--table {
  background: #eaf8ef;
  color: #1f5b37;
}

.audit-event-chip--auth {
  background: #edf2ff;
  color: #2d5adf;
}

.audit-event-chip--command,
.audit-event-chip--report {
  background: #f1eefb;
  color: #5a3ca0;
}

.audit-log-event strong {
  font-weight: 800;
  line-height: 1.35;
}

.audit-log-event small,
.audit-log-target small,
.audit-log-actor small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.audit-log-target strong {
  font-size: 15px;
  line-height: 1.2;
}

.audit-log-empty {
  padding: 20px 10px;
  text-align: center;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-line input {
  width: auto;
}

.archive-group-row td {
  background: #f4f6fb;
  color: #33405d;
  font-weight: 800;
  border-bottom-color: #d8deea;
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.inline-action-form button.ghost {
  border: 1px solid #f0c9c2;
  background: #fff3f2;
}

.restrictions-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.restriction-card {
  display: grid;
  gap: 14px;
  border: 1px solid #e0e6f0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 184, 65, 0.22), rgba(255, 184, 65, 0) 32%),
    linear-gradient(180deg, #fff, #fffaf1);
  box-shadow: 0 10px 28px rgba(14, 31, 74, 0.08);
  padding: 16px;
}

.restriction-card.has-alert-error {
  border-color: #f0c9c2;
  background:
    radial-gradient(circle at 95% 0%, rgba(217, 77, 61, 0.12), rgba(217, 77, 61, 0) 32%),
    #fff8f6;
}

.restriction-card.restriction-card--ending-soon {
  border-color: #efb1a8;
  background:
    radial-gradient(circle at 95% 0%, rgba(217, 77, 61, 0.18), rgba(217, 77, 61, 0) 34%),
    linear-gradient(180deg, #fff6f4, #ffe8e3);
  box-shadow: 0 12px 28px rgba(177, 52, 35, 0.12);
}

.restriction-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.restriction-hall {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.restriction-table-number {
  margin-top: 2px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #111a2f;
}

.restriction-timer {
  min-width: 112px;
  border-radius: 16px;
  background: #111a2f;
  color: #fff;
  padding: 12px;
  text-align: right;
}

.restriction-timer span {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
}

.restriction-timer small {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
}

.restriction-card.restriction-card--ending-soon .restriction-timer {
  background: linear-gradient(135deg, #b13423, #7f1f14);
}

.restriction-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.restriction-tag {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #dbe3f0;
  background: rgba(255, 255, 255, 0.72);
  color: #33405d;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.restriction-tag--wide {
  border-radius: 12px;
  flex-basis: 100%;
  justify-content: flex-start;
}

.restriction-tag--danger {
  border-color: #f0c9c2;
  background: #fff3f2;
  color: #a13a2f;
}

.restriction-actions,
.restriction-extend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.restriction-extend {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.restriction-custom-extend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.restriction-custom-extend input {
  width: 86px;
}

.restriction-custom-extend button {
  padding-inline: 10px;
}

.restriction-error {
  border-radius: 12px;
  border: 1px solid #f0c9c2;
  background: #fff3f2;
  color: #a13a2f;
  padding: 8px 10px;
  font-size: 12px;
}

.tables-hall-panel.is-hidden {
  display: none;
}

.tables-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.table-row-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fffaf1);
  padding: 14px 16px;
  text-align: left;
}

.table-row-button:hover {
  border-color: #ffc05c;
  box-shadow: 0 8px 24px rgba(14, 31, 74, 0.08);
}

.table-row-button--opened {
  border-color: #2f3744;
  background: linear-gradient(135deg, #3f4755, #252b35);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.table-row-button--opened:hover {
  border-color: #5b6676;
  box-shadow: 0 12px 28px rgba(14, 20, 32, 0.2);
}

.table-row-button--restriction-ending {
  border-color: #efb1a8;
  background: linear-gradient(180deg, #fff5f3, #ffe5df);
  box-shadow: 0 10px 26px rgba(177, 52, 35, 0.1);
}

.table-row-button--restriction-ending:hover {
  border-color: #e17d6f;
  box-shadow: 0 12px 28px rgba(177, 52, 35, 0.16);
}

.table-row-button.is-search-hit {
  border-color: #2d5adf;
  box-shadow: 0 0 0 4px rgba(45, 90, 223, 0.14), 0 12px 26px rgba(14, 31, 74, 0.12);
}

.table-row-main {
  display: grid;
  gap: 8px;
}

.table-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.table-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.table-state-badge--deposit {
  border: 1px solid #b8e7cf;
  background: #f1fcf6;
  color: #1f7a4f;
}

.table-state-badge--restricted {
  border: 1px solid #f5d197;
  background: #fff6e6;
  color: #8a5a00;
}

.table-row-button--restriction-ending .table-state-badge--restricted {
  border-color: #efb1a8;
  background: #fff0ec;
  color: #a13a2f;
}

.table-state-badge--booking {
  border: 1px solid #c9d7ff;
  background: #f3f6ff;
  color: #2d5adf;
}

.table-state-badge--opened {
  border: 1px solid #c9ced8;
  background: #f4f6f9;
  color: #303743;
}

.table-row-button--opened .table-state-badge--opened {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.table-state-badge--future {
  border: 1px solid #d8dded;
  background: #f7f8fc;
  color: #54607a;
}

.table-state-badge--comment {
  border: 1px solid #e7dfc4;
  background: #fffaf0;
  color: #6d5730;
  max-width: min(280px, 100%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.table-row-button--opened .table-row-note {
  color: rgba(255, 255, 255, 0.76);
}

.table-row-button--restriction-ending .table-row-note {
  color: #8b4a43;
}

.table-row-side {
  color: #2d5adf;
  font-size: 13px;
  font-weight: 700;
}

.table-row-button--opened .table-row-side {
  color: #fff;
}

.table-row-button--restriction-ending .table-row-side {
  color: #b13423;
}

.about-crm-hero {
  position: relative;
  display: grid;
  min-height: 330px;
  margin: -24px -24px 24px;
  padding: clamp(30px, 4.5vw, 56px) clamp(22px, 5vw, 62px);
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(17, 26, 47, 0.98) 0%, rgba(28, 43, 73, 0.94) 48%, rgba(255, 153, 0, 0.18) 100%),
    linear-gradient(90deg, #111a2f, #263859);
  color: #fff;
}

.about-crm-hero::before {
  content: "";
  position: absolute;
  inset: auto 6% 0 auto;
  width: 360px;
  height: 72%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.5;
  transform: skewX(-10deg);
}

.about-crm-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  max-width: 820px;
  animation: aboutCrmRise 0.7s ease both;
}

.about-crm-hero-copy > span,
.about-crm-section-head span,
.about-crm-bottom span {
  display: inline-flex;
  margin-bottom: 12px;
  color: #ffb13d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-crm-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.about-crm-hero p {
  max-width: 700px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.55;
}

.about-crm-strip,
.about-crm-flow,
.about-crm-panels,
.about-crm-bottom {
  animation: aboutCrmRise 0.55s ease both;
}

.about-crm-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.about-crm-strip div {
  min-height: 176px;
  background: #fff;
  padding: 24px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.about-crm-strip div:hover,
.about-crm-screen-list article:hover {
  transform: translateY(-2px);
  background: #fbfcff;
}

.about-crm-strip span {
  color: #2d5adf;
  font-size: 12px;
  font-weight: 900;
}

.about-crm-strip strong {
  display: block;
  margin-top: 22px;
  font-size: 20px;
  line-height: 1.2;
}

.about-crm-strip p,
.about-crm-flow p,
.about-crm-screen-list p,
.about-crm-bottom p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.about-crm-flow,
.about-crm-panels,
.about-crm-bottom {
  margin-top: 28px;
}

.about-crm-section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.about-crm-section-head h2,
.about-crm-bottom h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}

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

.about-crm-flow-grid article {
  display: grid;
  align-content: start;
  min-height: 226px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 20px;
}

.about-crm-flow-grid b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #eaf8ef;
  color: #1f5b37;
  font-size: 13px;
}

.about-crm-flow-grid h3 {
  margin: 18px 0 0;
  font-size: 18px;
  line-height: 1.22;
}

.about-crm-screen-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.about-crm-screen-list article {
  display: grid;
  align-content: start;
  min-height: 312px;
  background: #fff;
  padding: 22px;
  transition: transform 0.18s ease, background 0.18s ease;
}

.about-crm-screen-list strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.about-crm-screen-list ul {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: #344154;
  font-size: 13px;
  line-height: 1.42;
}

.about-crm-screen-list li::marker {
  color: var(--accent);
}

.about-crm-screen-list em {
  display: block;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #5c6678;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.45;
}

.about-crm-bottom {
  display: block;
  border-radius: 8px;
  background: #111a2f;
  color: #fff;
  padding: clamp(24px, 4vw, 42px);
}

.about-crm-bottom p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.72);
}

@keyframes aboutCrmRise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .side {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .brand {
    margin-bottom: 0;
  }

  .menu {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }

  .menu-workflow,
  .menu-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 0;
    border-top: 0;
  }

  .menu-sublist {
    display: flex;
    gap: 6px;
    padding-left: 0;
    border-left: 0;
  }

  .menu-link {
    padding: 7px 12px;
  }

  .menu-link-primary {
    min-height: 34px;
    padding: 8px 12px;
  }

  .menu-sublink {
    min-height: 31px;
    padding: 6px 9px;
    background: rgba(255, 255, 255, 0.055);
  }

  .auto-restriction-toggle {
    order: 2;
    width: min(270px, 100%);
    margin: 0 0 0 auto;
  }

  .auto-restriction-toggle-btn {
    padding: 8px 9px 8px 11px;
  }

  .main {
    padding: 16px;
  }

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

  .cards-wide {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards-compact {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .today-board {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .restrictions-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .inline-form {
    grid-template-columns: 1fr 1fr;
  }

  .compact-restriction-form {
    grid-template-columns: 1fr 1fr auto;
  }

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

  .about-crm-hero {
    grid-template-columns: 1fr;
    margin: -16px -16px 20px;
  }

  .about-crm-signal {
    width: 100%;
    margin-left: 0;
  }

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

  .about-crm-screen-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .tables-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    background: #f6f7fb;
    overflow-x: hidden;
  }

  .side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "toggle user"
      "menu menu";
    align-items: start;
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    display: none;
  }

  .brand-sub {
    display: none;
  }

  .menu {
    grid-area: menu;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .menu-workflow {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .menu-secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    min-width: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .menu-sublist {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    min-width: 0;
    padding-left: 0;
    border-left: 0;
  }

  .auto-restriction-toggle {
    grid-area: toggle;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .auto-restriction-toggle-btn {
    min-height: 36px;
    border-radius: 12px;
    padding: 6px 7px 6px 9px;
  }

  .auto-restriction-title {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auto-restriction-state {
    display: none;
  }

  .auto-restriction-switch {
    width: 48px;
    height: 26px;
  }

  .auto-restriction-knob {
    width: 20px;
    height: 20px;
  }

  .auto-restriction-toggle-btn.is-on .auto-restriction-knob {
    transform: translateX(22px);
  }

  .menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    min-width: 0;
    margin-bottom: 0;
    border-radius: 9px;
    padding: 6px 7px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-link-primary {
    min-height: 34px;
    justify-content: space-between;
    padding: 7px 10px;
    font-size: 12px;
  }

  .menu-link small {
    display: none;
  }

  .menu-sublink {
    justify-content: center;
    min-height: 28px;
    min-width: 0;
    overflow: hidden;
    padding: 5px 6px;
    background: rgba(255, 255, 255, 0.055);
    font-size: 10px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-box {
    grid-area: user;
    display: grid;
    justify-items: end;
    gap: 5px;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    min-width: 68px;
  }

  .user-name {
    max-width: 76px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.1;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-role {
    display: none;
  }

  .logout-btn {
    min-height: 30px;
    border-radius: 9px;
    padding: 6px 9px;
    font-size: 11px;
    line-height: 1;
  }

  .main {
    padding: 12px 10px;
    overflow-x: visible;
  }

  .top h1 {
    font-size: 20px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .cards-wide,
  .cards-compact {
    grid-template-columns: 1fr 1fr;
  }

  .metric-card strong {
    font-size: 20px;
  }

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

  .today-search-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .today-search-form a.ghost {
    display: none;
  }

  .today-digits {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 8px;
    grid-template-areas:
      "main pending"
      "total pending"
      "chart chart";
  }

  .bookings-digits {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "total"
      "chart";
  }

  .today-digits-main {
    gap: 10px;
  }

  .today-digits strong {
    font-size: 23px;
  }

  .today-digits span {
    font-size: 9px;
  }

  .today-digits-total {
    font-size: 10px;
  }

  .today-digits-pending {
    min-width: 92px;
    padding: 7px 8px;
  }

  .today-evening-chart {
    margin-top: 3px;
  }

  .today-evening-bars {
    min-height: 54px;
    gap: 4px;
  }

  .today-evening-bar {
    max-width: 16px;
  }

  .today-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .today-booking-card {
    min-height: 170px;
    border-radius: 14px;
    padding: 10px;
  }

  .today-card-time {
    font-size: 22px;
  }

  .today-card-main strong {
    font-size: 14px;
  }

  .today-card-table {
    min-width: 58px;
  }

  .today-card-table > span:first-child {
    font-size: 34px;
  }

  .today-card-main small,
  .today-card-table {
    font-size: 11px;
  }

  .today-card-comment {
    font-size: 11px;
  }

  .today-card-tags span {
    min-height: 20px;
    padding: 3px 6px;
    font-size: 10px;
  }

  .bookings-search-panel {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -2px -10px 10px;
    border-width: 0 0 1px;
    border-radius: 0 0 16px 16px;
    background: rgba(246, 247, 251, 0.96);
    padding: 8px 10px 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
  }

  .bookings-search-title {
    margin-bottom: 7px;
    font-size: 14px;
    line-height: 1.15;
  }

  .bookings-search-form input[type="date"]:not(.today-search-date-picker),
  .bookings-search-form .ghost {
    display: none;
  }

  .today-search-form .today-search-date-control {
    display: inline-flex;
  }

  .today-search-form button.today-search-date-trigger {
    display: inline-flex;
  }

  .bookings-search-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
  }

  .audit-log-head {
    display: grid;
    gap: 10px;
  }

  .audit-log-title {
    display: grid;
    gap: 10px;
  }

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

  .audit-log-head p {
    display: none;
  }

  .audit-log-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .audit-log-metrics div {
    padding: 8px;
  }

  .audit-log-metrics strong {
    font-size: 18px;
  }

  .audit-log-search {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .audit-log-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .audit-log-table {
    min-width: 760px;
    font-size: 12px;
  }

  .audit-log-table th,
  .audit-log-table td {
    padding: 8px 6px;
  }

  .audit-log-table th:first-child,
  .audit-log-table td:first-child {
    width: 126px;
  }

  .audit-log-table th:nth-child(2),
  .audit-log-table td:nth-child(2) {
    width: 178px;
  }

  .audit-log-table th:nth-child(3),
  .audit-log-table td:nth-child(3) {
    width: 92px;
  }

  .audit-log-table th:nth-child(5),
  .audit-log-table td:nth-child(5) {
    width: 92px;
  }

  .audit-log-table td:first-child strong {
    font-size: 11px;
    line-height: 1.25;
  }

  .audit-log-table td:nth-child(2) strong {
    font-size: 12px;
    line-height: 1.25;
  }

  .audit-log-table td:nth-child(2) small,
  .audit-log-table td:nth-child(4) small,
  .audit-log-table td:nth-child(5) small {
    font-size: 10px;
    line-height: 1.25;
  }

  .audit-avatar {
    flex-basis: 26px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .bookings-search-form button {
    min-width: 86px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .bookings-search-actions {
    margin-top: 7px;
  }

  .bookings-search-actions button {
    width: 100%;
  }

  input,
  select,
  button,
  .ghost {
    font-size: 16px;
  }

  table {
    min-width: 100%;
  }

  .panel {
    padding: 12px;
  }

  .bookings-list-panel {
    border: 0;
    background: transparent;
    padding: 8px 0;
  }

  .bookings-list-panel h2 {
    padding: 0 8px;
    font-size: 15px;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .compact-restriction-form {
    grid-template-columns: 1fr;
  }

  .tables-date-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .tables-list {
    grid-template-columns: 1fr;
  }

  .restriction-card-top {
    flex-direction: column;
  }

  .restriction-timer {
    width: 100%;
    text-align: left;
  }

  .tables-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .chart-meta {
    flex-direction: column;
  }

  .chart-chip {
    padding: 7px 11px;
    font-size: 11px;
  }

  .chart-canvas-wrap {
    height: 220px;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .bookings-table {
    min-width: 0;
    font-size: 11px;
  }

  .bookings-table colgroup,
  .bookings-table thead {
    display: none;
  }

  .bookings-table,
  .bookings-table tbody {
    display: grid;
    width: 100%;
  }

  .bookings-table tbody {
    gap: 10px;
  }

  .bookings-table tr {
    display: grid;
    grid-template-columns: minmax(136px, 45%) minmax(0, 1fr);
    grid-template-areas:
      "id status"
      "date main";
    align-items: start;
    min-height: 158px;
    border: 1px solid #eceff5;
    border-radius: 18px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }

  .bookings-table .booking-empty-row {
    display: block;
    min-height: 0;
  }

  .bookings-table td {
    overflow: hidden;
    border-bottom: 0;
    padding: 0;
    text-overflow: ellipsis;
  }

  .bookings-table .booking-row-pending {
    border: 2px solid #ef2b3a;
    box-shadow: 0 6px 18px rgba(239, 43, 58, 0.12);
  }

  .bookings-table .booking-row-pending td,
  .bookings-table .booking-row-pending td:first-child,
  .bookings-table .booking-row-pending td:last-child {
    background: transparent;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;
    border-radius: 0;
  }

  .booking-id-cell,
  .booking-date-cell,
  .booking-main-cell,
  .booking-status-cell,
  .booking-actions-cell {
    display: flex;
  }

  .booking-table-cell,
  .booking-count-cell {
    display: none;
  }

  .booking-id-cell {
    grid-area: id;
    align-items: start;
    padding: 18px 0 0 18px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
  }

  .booking-id-cell a {
    color: var(--text);
  }

  .booking-date-cell {
    grid-area: date;
    display: block;
    padding: 12px 8px 18px 18px;
  }

  .booking-primary-date {
    display: grid;
    width: 100%;
    max-width: 150px;
    min-height: 78px;
    align-content: center;
    justify-items: start;
    gap: 5px;
    border-color: #e1e5ed;
    border-radius: 13px;
    background: #fbfcff;
    padding: 11px 13px;
  }

  .booking-primary-date span {
    color: #111a2f;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.05;
  }

  .booking-primary-date span::after {
    content: none;
  }

  .booking-primary-date strong {
    color: #111a2f;
    font-size: 30px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
  }

  .booking-main-cell {
    grid-area: main;
    display: block;
    min-width: 0;
    padding: 11px 18px 0 8px;
    text-align: right;
  }

  .booking-mobile-top {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .booking-mobile-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 120px;
    border: 1px solid #e0e5ee;
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    padding: 6px 11px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .booking-primary-guest {
    gap: 7px;
    justify-items: end;
    width: 100%;
    min-width: 0;
  }

  .booking-primary-guest strong {
    max-width: 100%;
    color: #111a2f;
    font-size: 23px;
    line-height: 1.05;
  }

  .booking-primary-guest span {
    max-width: 100%;
    overflow: hidden;
    color: var(--muted);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
  }

  .booking-primary-guest small {
    display: none;
  }

  .booking-mobile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
  }

  .booking-mobile-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 19px;
    border: 1px solid #d7dbe3;
    border-radius: 999px;
    background: #ffffff;
    color: #111a2f;
    padding: 3px 6px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .booking-mobile-comment {
    border-color: #d8dfec;
    background: #f7f9fd;
    color: var(--muted);
  }

  .booking-actions-cell {
    grid-area: actions;
    align-self: end;
    justify-content: flex-end;
    padding: 0 18px 22px 8px;
  }

  .booking-status-cell {
    grid-area: status;
    justify-content: flex-end;
    padding: 18px 18px 0 12px;
  }

  .booking-status-cell .badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 154px;
    border: 0;
    border-radius: 999px;
    padding: 10px 15px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .booking-status-cell .badge::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: currentColor;
  }

  .booking-status-confirmed {
    background: #eaf8ef;
    color: #18a84d;
  }

  .booking-status-waiting {
    background: #fff4e8;
    color: #ff8a00;
  }

  .booking-status-cancelled,
  .booking-status-declined,
  .booking-status-no_show {
    background: #ffedf0;
    color: #ef2b3a;
  }

  .booking-status-completed {
    background: #eef4ff;
    color: #1f74e8;
  }

  .booking-actions-cell .icon-actions {
    gap: 10px;
  }

  .booking-actions-cell .icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border-color: #e0e5ee;
    font-size: 18px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  }
}

/* ── Action panel ───────────────────────────────────────────── */

.action-banner {
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-weight: 500;
  font-size: 14px;
}

.action-banner--ok {
  background: #edfaf3;
  border: 1px solid #a3e6c2;
  color: #1a6b45;
}

.action-banner--error {
  background: #fdf2f2;
  border: 1px solid #f5c3c3;
  color: #8b1c1c;
}

.actions-panel {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Analytics dashboard */

.analytics-page {
  --dashboard-chart-height: 430px;
  display: grid;
  gap: 14px;
}

.dashboard-load-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-load-top h1,
.dashboard-load-top p {
  margin: 0;
}

.dashboard-load-top p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-load-filter-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(32, 39, 54, 0.04);
  padding: 12px;
}

.dashboard-load-filters {
  display: grid;
  gap: 10px;
}

.analytics-toolbar-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.analytics-toolbar-row--secondary {
  align-items: flex-start;
}

.analytics-control-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.analytics-control-group--wide {
  flex: 1 1 620px;
}

.analytics-control-label,
.analytics-date-range label span,
.analytics-filter-grid label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-segment {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 1fr);
  gap: 2px;
  min-height: 38px;
  border: 1px solid #dde4ee;
  border-radius: 8px;
  background: #edf1f7;
  padding: 2px;
}

.analytics-segment--compact {
  grid-auto-columns: minmax(72px, 1fr);
}

.analytics-segment-option {
  display: grid;
  min-width: 0;
}

.analytics-segment-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.analytics-segment-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 6px;
  color: #4d5668;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  padding: 8px 10px;
  text-align: center;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.analytics-segment-option input:checked + span {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(32, 39, 54, 0.12);
}

.analytics-segment-option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.analytics-date-range {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) repeat(2, minmax(136px, 1fr));
  gap: 8px;
}

.analytics-date-range label,
.analytics-filter-grid label {
  display: grid;
  gap: 5px;
}

.analytics-date-range input,
.analytics-filter-grid select {
  min-height: 38px;
  width: 100%;
}

.analytics-filter-details {
  min-width: min(360px, 100%);
}

.analytics-filter-details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  padding: 8px 12px;
}

.analytics-filter-details summary::-webkit-details-marker {
  display: none;
}

.analytics-filter-details summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.analytics-filter-details[open] summary::after {
  transform: rotate(225deg) translateY(-2px);
}

.analytics-filter-details summary b {
  border-radius: 999px;
  background: var(--accent-soft);
  color: #8a5600;
  font-size: 11px;
  padding: 3px 7px;
}

.analytics-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dashboard-load-filter-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-left: auto;
}

.dashboard-load-filter-actions button,
.dashboard-load-filter-actions .ghost {
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
}

.dashboard-load-filter-actions .ghost {
  background: #fff;
}

.dashboard-load-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.dashboard-load-kpi {
  min-width: 0;
  padding: 13px 14px;
}

.dashboard-load-kpi + .dashboard-load-kpi {
  border-left: 1px solid var(--line);
}

.dashboard-load-kpi span,
.dashboard-load-kpi em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-load-kpi strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 5px;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.05;
}

.dashboard-load-kpi em {
  margin-top: 5px;
  font-size: 10px;
}

.dashboard-load-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-load-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(32, 39, 54, 0.04);
  padding: 16px;
  animation: dashboard-tile-in 280ms ease both;
}

.dashboard-load-tile-main {
  grid-column: 1 / -1;
}

.dashboard-load-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  padding-bottom: 11px;
}

.dashboard-load-tile-head h2,
.dashboard-load-tile-head p {
  margin: 0;
}

.dashboard-load-tile-head h2 {
  font-size: 17px;
  line-height: 1.2;
}

.dashboard-load-tile-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.dashboard-chart-mode {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef2f7;
  color: #4d5668;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}

.dashboard-line-legend {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.dashboard-line-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #f3f6fa;
  color: #4d5668;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}

.dashboard-line-legend-item::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.dashboard-line-legend-item--guests {
  color: #d87500;
}

.dashboard-line-legend-item--bookings {
  color: #2867d8;
}

.dashboard-chart-body {
  height: var(--dashboard-chart-height);
  min-height: var(--dashboard-chart-height);
}

.dashboard-chart-body--rows {
  overflow-y: auto;
  padding-right: 2px;
}

.dashboard-period-chart {
  position: relative;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 0;
}

.dashboard-line-chart {
  display: block;
  width: max(100%, 980px);
  height: 100%;
  overflow: visible;
}

.dashboard-line-grid line {
  stroke: #e9eef5;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.dashboard-line-area {
  fill: url("#dashboardGuestsArea");
  stroke: none;
}

.dashboard-line-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
}

.dashboard-line-path--guests {
  stroke: #ff9900;
}

.dashboard-line-path--bookings {
  stroke: #2867d8;
}

.dashboard-line-point {
  cursor: crosshair;
  outline: none;
}

.dashboard-line-hit {
  opacity: 0;
  pointer-events: stroke;
  stroke: transparent;
  stroke-width: 28;
  vector-effect: non-scaling-stroke;
}

.dashboard-line-guide {
  opacity: 0;
  stroke: #202736;
  stroke-dasharray: 4 5;
  stroke-width: 1;
  transform-origin: center;
  transition: opacity 160ms ease;
  vector-effect: non-scaling-stroke;
}

.dashboard-line-dot {
  fill: #fff;
  stroke-width: 2.2;
  transform-box: fill-box;
  transform-origin: center;
  transition: r 160ms ease, transform 160ms ease, filter 160ms ease;
  vector-effect: non-scaling-stroke;
}

.dashboard-line-dot--guests {
  stroke: #ff9900;
}

.dashboard-line-dot--bookings {
  stroke: #2867d8;
}

.dashboard-line-point:hover .dashboard-line-guide,
.dashboard-line-point:focus .dashboard-line-guide {
  opacity: 0.28;
}

.dashboard-line-point:hover .dashboard-line-dot,
.dashboard-line-point:focus .dashboard-line-dot {
  filter: drop-shadow(0 4px 7px rgba(32, 39, 54, 0.2));
  transform: scale(1.45);
}

.dashboard-line-xlabel {
  fill: #7a8495;
  font-size: 10px;
  font-weight: 650;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  user-select: none;
}

.dashboard-period-bar {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 22px 18px;
  align-items: end;
  gap: 7px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 0;
  text-align: center;
}

.dashboard-period-bar i {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  border-radius: 6px;
  background: repeating-linear-gradient(
    to top,
    #eef2f7 0,
    #eef2f7 1px,
    transparent 1px,
    transparent 25%
  );
}

.dashboard-period-bar b {
  display: block;
  width: 100%;
  height: max(3px, var(--bar));
  border-radius: 6px 6px 2px 2px;
  background: #ff9900;
  transition: height 200ms ease, background 160ms ease;
}

.dashboard-period-bar span {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-period-bar strong {
  color: var(--text);
  font-size: 11px;
}

.dashboard-period-bar:hover b,
.dashboard-period-bar:focus-visible b {
  background: #f06f2e;
}

.dashboard-heatmap-tile {
  margin-top: 0;
}

.dashboard-heatmap-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.dashboard-load-heatmap {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 3px;
}

.dashboard-load-heatmap th,
.dashboard-load-heatmap td {
  min-width: 36px;
  height: 32px;
  border: 0;
  border-radius: 5px;
  text-align: center;
}

.dashboard-load-heatmap th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-load-heatmap tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.dashboard-load-heatmap td {
  background: rgba(255, 153, 0, calc(0.06 + var(--heat, 0) * 0.68));
  color: #202736;
  font-size: 12px;
  font-weight: 900;
  outline: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-load-heatmap td:hover,
.dashboard-load-heatmap td:focus {
  box-shadow: inset 0 0 0 2px rgba(32, 39, 54, 0.18);
  transform: scale(1.03);
}

.dashboard-load-empty {
  align-self: center;
  grid-column: 1 / -1;
  justify-self: stretch;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.dashboard-tooltip {
  position: fixed;
  z-index: 50;
  max-width: min(320px, calc(100vw - 24px));
  border: 1px solid rgba(32, 39, 54, 0.1);
  border-radius: 8px;
  background: #202736;
  color: #fff;
  box-shadow: 0 16px 34px rgba(32, 39, 54, 0.2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  padding: 9px 10px;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.dashboard-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -14px);
}

.dashboard-tooltip--rich {
  display: grid;
  gap: 7px;
  min-width: 172px;
  padding: 10px 11px;
  transform: translate(-50%, -4px) scale(0.96);
}

.dashboard-tooltip--rich.is-visible {
  transform: translate(-50%, -14px) scale(1);
}

.dashboard-tooltip-date {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-tooltip-series {
  display: grid;
  gap: 5px;
}

.dashboard-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.dashboard-tooltip-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dashboard-tooltip-row span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--series-color, #ff9900);
}

.dashboard-tooltip-row strong {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-tooltip-row--guests {
  --series-color: #ff9900;
}

.dashboard-tooltip-row--bookings {
  --series-color: #4f8cff;
}

@keyframes dashboard-tile-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .analytics-toolbar-row,
  .analytics-toolbar-row--secondary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analytics-control-group--wide {
    flex-basis: auto;
  }

  .analytics-segment {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .dashboard-load-kpi + .dashboard-load-kpi {
    border-left: 0;
  }

  .dashboard-load-kpi {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .dashboard-load-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-load-tile-main {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .analytics-page {
    --dashboard-chart-height: 360px;
  }

  .dashboard-load-top {
    display: grid;
  }

  .dashboard-export-btn {
    width: 100%;
  }

  .dashboard-load-filter-shell,
  .dashboard-load-tile {
    padding: 12px;
  }

  .analytics-segment,
  .analytics-segment--compact,
  .analytics-date-range,
  .analytics-filter-grid,
  .dashboard-load-kpis {
    grid-template-columns: 1fr;
  }

  .analytics-filter-details {
    min-width: 0;
  }

  .dashboard-load-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-left: 0;
    width: 100%;
  }

  .dashboard-load-filter-actions button,
  .dashboard-load-filter-actions .ghost {
    width: 100%;
  }

  .dashboard-load-kpi,
  .dashboard-load-kpi + .dashboard-load-kpi {
    border-left: 0;
    border-right: 0;
  }

  .dashboard-load-kpi span,
  .dashboard-load-kpi em {
    white-space: normal;
  }

  .dashboard-load-tile-head {
    display: grid;
  }

  .dashboard-line-legend {
    justify-content: flex-start;
  }

}

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

.action-card h2 {
  margin: 0;
}

.action-card form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.action-card textarea {
  resize: vertical;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  min-height: 60px;
}

.action-card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.action-card select {
  flex: 1;
}

.action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-row--bottom {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.action-row button,
.action-card > form > button {
  white-space: nowrap;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.check-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.file-group {
  margin-bottom: 12px;
}

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

.panel-head h2 {
  margin: 0;
}

.file-download-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 7px 11px;
  font-size: 13px;
  text-decoration: none;
}

.file-download-all:hover {
  border-color: var(--accent);
}

.file-group-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.file-link {
  color: #2d5adf;
  text-decoration: none;
  font-weight: 500;
}

.file-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .billing-grid,
  .billing-form,
  .billing-invoice-form {
    grid-template-columns: 1fr;
  }

  .billing-form-actions {
    align-items: stretch;
  }

  .billing-form-actions button {
    width: 100%;
  }

  .legal-offer {
    max-width: none;
  }

  .actions-panel {
    grid-template-columns: 1fr 1fr;
  }

  .about-crm-hero {
    min-height: auto;
    margin: -16px -10px 20px;
    padding: 28px 18px;
  }

  .about-crm-hero h1 {
    font-size: 36px;
    line-height: 1;
  }

  .about-crm-hero p {
    font-size: 15px;
  }

  .about-crm-strip,
  .about-crm-flow-grid,
  .about-crm-screen-list {
    grid-template-columns: 1fr;
  }

  .about-crm-strip div,
  .about-crm-flow-grid article,
  .about-crm-screen-list article {
    min-height: 0;
  }

  .about-crm-bottom {
    display: grid;
  }

  .guide-hero,
  .guide-layout,
  .guide-two-col {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    position: static;
  }
}

@media (max-width: 600px) {
  .billing-notice-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-kv {
    grid-template-columns: 1fr;
  }

  .billing-row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .billing-row-actions .ghost,
  .billing-row-actions a.ghost,
  .billing-row-actions button {
    width: 100%;
  }

  .legal-offer-top {
    align-items: flex-start;
  }

  .legal-offer h2 {
    font-size: 16px;
  }

  .legal-requisites {
    grid-template-columns: 1fr;
  }

  .actions-panel {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 90px 1fr auto;
  }
}

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

.detail-head h1 {
  margin: 10px 0 4px;
}

.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 14px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.delivery-search-panel {
  display: grid;
  gap: 12px;
}

.delivery-search-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.delivery-search-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.delivery-search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  font: inherit;
  font-weight: 700;
}

.delivery-search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.delivery-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.delivery-summary > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.delivery-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.delivery-summary strong {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.05;
}

.delivery-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.delivery-order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "time number"
    "phone phone"
    "address address"
    "meta status"
    "eta eta";
  grid-template-rows: auto auto minmax(48px, 1fr) auto auto;
  gap: 9px;
  min-width: 0;
  min-height: 210px;
  border: 1px solid #dfe4ee;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 13px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.delivery-order-card:hover {
  border-color: #c6cfdd;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.delivery-order-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 12px 26px rgba(15, 23, 42, 0.08);
}

.delivery-card-datetime {
  grid-area: time;
  display: grid;
  align-content: start;
  gap: 2px;
  color: #111827;
}

.delivery-card-datetime strong {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.delivery-card-datetime small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.delivery-card-number {
  grid-area: number;
  color: #111827;
  font-size: 32px;
  font-weight: 900;
  line-height: 0.92;
  white-space: nowrap;
}

.delivery-card-phone {
  grid-area: phone;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.08;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-card-phone:hover,
.delivery-card-phone:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.delivery-card-address {
  grid-area: address;
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: #253047;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.delivery-card-meta {
  grid-area: meta;
  display: flex;
  flex-wrap: wrap;
  align-content: end;
  gap: 5px;
  min-width: 0;
}

.delivery-card-meta span,
.delivery-card-eta {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 23px;
  border: 1px solid #dbe2ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #4b5568;
  padding: 4px 8px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-card-status {
  grid-area: status;
  align-self: end;
  justify-self: end;
}

.delivery-card-eta {
  grid-area: eta;
  justify-self: start;
  border-color: #c9d7ff;
  color: #2447a8;
}

.delivery-order-card--accepted {
  border-color: #8fd3ad;
  background: linear-gradient(180deg, #f4fff7, #e5f7ec);
}

.delivery-order-card--done {
  border-color: #f5c47e;
  background: linear-gradient(180deg, #fff9ed, #ffefd4);
}

.delivery-order-card--cancelled {
  border-color: #efb1a8;
  background: linear-gradient(180deg, #fff6f4, #ffe6e2);
}

.delivery-order-card--cooking,
.delivery-order-card--delivering {
  border-color: #b9d5ff;
  background: linear-gradient(180deg, #f7fbff, #eaf2ff);
}

.delivery-action-modal {
  width: min(460px, calc(100vw - 24px));
}

.delivery-action-body {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #fff;
  padding: 0 18px 18px;
}

.delivery-eta-form,
.delivery-status-form {
  display: grid;
  gap: 8px;
}

.delivery-eta-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.delivery-eta-form label {
  display: grid;
  gap: 6px;
}

.delivery-eta-form input[type="time"] {
  min-height: 42px;
}

.delivery-status-form {
  grid-template-columns: 1fr;
}

.delivery-status-form button,
.delivery-eta-form button {
  min-height: 42px;
}

.delivery-done-action {
  background: #f59e0b;
  color: #2e2108;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.status-new {
  background: #fff4e3;
  border-color: #ffd79a;
}

.status-accepted,
.status-delivering {
  background: #e9f8ee;
  border-color: #b8e4c4;
  color: #1f5b37;
}

.status-cooking {
  background: #eaf3ff;
  border-color: #b9d5ff;
  color: #2447a8;
}

.status-done {
  background: #fff3df;
  border-color: #f5c47e;
  color: #7c4a03;
}

.status-cancelled {
  background: #fff0f0;
  border-color: #f4c0c0;
  color: #7f1d1d;
}

.payload-preview {
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-size: 12px;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .section-head,
  .detail-head {
    display: grid;
  }

  .detail-list {
    grid-template-columns: 1fr;
  }

  .delivery-search-head {
    display: grid;
  }

  .delivery-search-form,
  .delivery-eta-form {
    grid-template-columns: 1fr;
  }

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

  .delivery-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .delivery-order-card {
    min-height: 188px;
    padding: 10px;
  }

  .delivery-card-number {
    font-size: 26px;
  }

  .delivery-card-phone {
    font-size: 18px;
  }

  .delivery-card-address {
    font-size: 14px;
  }
}
