: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-link {
  display: block;
  text-decoration: none;
  color: #d6dff4;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
}

.today-menu-link {
  position: relative;
  overflow: hidden;
  background: rgba(255, 153, 0, 0.16);
}

.delivery-menu-link {
  position: relative;
}

.delivery-menu-link span {
  float: right;
  min-width: 22px;
  border-radius: 999px;
  background: #ef2b3a;
  color: #fff;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.delivery-menu-link.has-unprocessed {
  overflow: hidden;
  background: #ef2b3a;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(239, 43, 58, 0.35), 0 10px 26px rgba(239, 43, 58, 0.22);
}

.delivery-menu-link.has-unprocessed span {
  background: rgba(255, 255, 255, 0.2);
}

.today-menu-link::after,
.delivery-menu-link.has-unprocessed::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;
}

.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;
}

.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;
}

.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;
}

.bookings-date-list {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

.bookings-date-group {
  display: grid;
  gap: 10px;
}

.bookings-date-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px 8px;
}

.bookings-date-head h2 {
  margin: 0;
  color: #111a2f;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.bookings-date-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.bookings-board {
  margin-top: 0;
}

.booking-tile-card {
  cursor: pointer;
}

.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;
}

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

.delivery-board {
  align-items: stretch;
}

.delivery-archive-section {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.delivery-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.delivery-section-head h2 {
  margin: 0;
  color: #111a2f;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.delivery-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.delivery-board--archive {
  margin-top: 0;
}

.delivery-order-card {
  cursor: pointer;
}

.delivery-order-card--new {
  border: 2px solid #ef2b3a;
  background:
    radial-gradient(circle at 92% 0%, rgba(239, 43, 58, 0.16), rgba(239, 43, 58, 0) 34%),
    #fff;
  animation: delivery-card-alert 1.4s ease-in-out infinite;
}

@keyframes delivery-card-alert {
  0%,
  100% {
    box-shadow: 0 6px 18px rgba(239, 43, 58, 0.1);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(239, 43, 58, 0.14), 0 12px 30px rgba(239, 43, 58, 0.24);
  }
}

.delivery-order-card--accepted {
  border-color: #f2cf9a;
  background: linear-gradient(180deg, #fff9ee, #fff3dc);
  color: #7d4d00;
}

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

.delivery-order-card--cancelled {
  border-color: #2f3744;
  background: linear-gradient(135deg, #3f4755, #252b35);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 20, 32, 0.16);
}

.delivery-card-amount {
  min-width: 92px;
  max-width: 108px;
}

.delivery-card-amount > span:first-child {
  color: #111a2f;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.delivery-card-amount small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.delivery-card-tags span {
  border-color: #dbe6f5;
  background: #f8fbff;
  color: #334155;
}

.today-booking-card.delivery-order-card--accepted .today-card-time,
.today-booking-card.delivery-order-card--accepted .today-card-main strong,
.today-booking-card.delivery-order-card--accepted .today-card-main small,
.today-booking-card.delivery-order-card--accepted .today-card-phone,
.today-booking-card.delivery-order-card--accepted .today-card-table,
.today-booking-card.delivery-order-card--accepted .delivery-card-amount > span:first-child,
.today-booking-card.delivery-order-card--accepted .delivery-card-amount small {
  color: #7d4d00;
}

.today-booking-card.delivery-order-card--completed .today-card-time,
.today-booking-card.delivery-order-card--completed .today-card-main strong,
.today-booking-card.delivery-order-card--completed .today-card-main small,
.today-booking-card.delivery-order-card--completed .today-card-phone,
.today-booking-card.delivery-order-card--completed .today-card-table,
.today-booking-card.delivery-order-card--completed .delivery-card-amount > span:first-child,
.today-booking-card.delivery-order-card--completed .delivery-card-amount small {
  color: #1f5b37;
}

.today-booking-card.delivery-order-card--cancelled .today-card-time,
.today-booking-card.delivery-order-card--cancelled .today-card-time small,
.today-booking-card.delivery-order-card--cancelled .today-card-main strong,
.today-booking-card.delivery-order-card--cancelled .today-card-main small,
.today-booking-card.delivery-order-card--cancelled .today-card-phone,
.today-booking-card.delivery-order-card--cancelled .today-card-table,
.today-booking-card.delivery-order-card--cancelled .delivery-card-amount > span:first-child,
.today-booking-card.delivery-order-card--cancelled .delivery-card-amount small,
.today-booking-card.delivery-order-card--cancelled .today-card-comment {
  color: #fff;
}

.delivery-order-card--accepted .delivery-card-tags span,
.delivery-order-card--completed .delivery-card-tags span {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
}

.delivery-order-card--cancelled .delivery-card-tags span {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.delivery-order-card--cancelled .today-card-comment {
  border-left-color: rgba(255, 255, 255, 0.4);
}

.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 .delivery-card-amount > span:first-child {
  max-width: 108px;
  color: #111a2f;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.today-booking-card .delivery-card-amount small {
  max-width: 108px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.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%;
}

.delivery-action-modal {
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100svh - 32px);
  overflow: hidden;
}

.delivery-action-modal .booking-modal-head {
  align-items: flex-start;
  gap: 14px;
}

.delivery-action-modal .booking-modal-head > div {
  min-width: 0;
  flex: 1;
}

.delivery-action-modal .booking-modal-head strong,
.delivery-action-modal .booking-modal-head .muted {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.delivery-action-modal .booking-modal-head strong {
  color: #111a2f;
  font-size: 22px;
  line-height: 1.12;
}

.delivery-action-menu {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding-top: 0;
  overflow: hidden;
}

.delivery-action-menu button,
.delivery-action-menu .button-link {
  min-width: 0;
  min-height: 48px;
  white-space: normal;
}

.delivery-action-primary,
.delivery-action-danger {
  grid-column: 1 / -1;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.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;
}

.delivery-order-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.delivery-order-summary div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.delivery-order-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}

.delivery-order-summary strong {
  display: block;
  min-width: 0;
  color: #111a2f;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.delivery-comment-panel p {
  margin: 8px 0 0;
  color: #334155;
  font-weight: 700;
  line-height: 1.45;
}

.delivery-items-list {
  display: grid;
  gap: 8px;
}

.delivery-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 120px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.delivery-item-main {
  min-width: 0;
}

.delivery-item-main strong {
  display: block;
  color: #111a2f;
  font-size: 15px;
  line-height: 1.25;
}

.delivery-item-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.delivery-item-qty,
.delivery-item-amount {
  color: #263247;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

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: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.audit-log-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

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

.audit-log-search {
  grid-template-columns: minmax(260px, 1fr) auto auto;
  min-width: min(100%, 520px);
}

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

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

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

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

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

.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;
}

@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-link {
    padding: 7px 12px;
  }

  .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;
  }
}

@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: repeat(4, minmax(0, 1fr));
    align-content: start;
    align-items: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 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;
  }

  .delivery-menu-link span {
    min-width: 18px;
    padding: 1px 5px;
    font-size: 10px;
  }

  .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;
  }

  .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;
  }

  .bookings-date-list {
    gap: 16px;
    margin-top: 12px;
  }

  .bookings-date-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 0 2px 7px;
  }

  .bookings-date-head h2 {
    font-size: 18px;
  }

  .bookings-date-head span {
    font-size: 11px;
  }

  .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;
  }

  .delivery-card-amount {
    min-width: 66px;
    max-width: 82px;
  }

  .today-booking-card .delivery-card-amount > span:first-child {
    max-width: 82px;
    font-size: 14px;
    letter-spacing: 0;
  }

  .today-booking-card .delivery-card-amount small {
    max-width: 82px;
    font-size: 9px;
  }

  .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;
  }

  .delivery-order-summary {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .delivery-order-summary div {
    border-radius: 10px;
    padding: 10px;
  }

  .delivery-order-summary span {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .delivery-order-summary strong {
    font-size: 14px;
  }

  .delivery-item-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
  }

  .delivery-item-main {
    grid-column: 1 / -1;
  }

  .delivery-item-qty,
  .delivery-item-amount {
    font-size: 12px;
    text-align: left;
  }

  .delivery-item-amount {
    text-align: right;
  }

  .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-head h1 {
    font-size: 18px;
  }

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

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

  .audit-log-search .ghost {
    display: none;
  }

  .audit-log-table {
    min-width: 0;
    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: 86px;
  }

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

  .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(3) small {
    font-size: 10px;
    line-height: 1.25;
  }

  .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 ───────────────────────────────────── */

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

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

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

.dashboard-export-btn {
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-load-filter-shell {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 14px;
}

.dashboard-load-filters {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  align-items: end;
  gap: 10px;
}

.dashboard-load-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dashboard-load-filters label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-load-filters select,
.dashboard-load-filters input {
  width: 100%;
  min-height: 42px;
}

.dashboard-load-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-load-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-load-kpi {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding: 12px 4px 6px;
}

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

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

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

.dashboard-load-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
  gap: 16px;
}

.dashboard-load-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  animation: dashboard-tile-in 420ms ease both;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.dashboard-load-tile:hover,
.dashboard-load-tile:focus-within {
  border-color: #ffd38d;
  box-shadow: 0 12px 28px rgba(32, 39, 54, 0.08);
  transform: translateY(-1px);
}

.dashboard-load-tile-main {
  grid-row: span 2;
}

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

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

.dashboard-load-tile-head h2 {
  font-size: 18px;
}

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

.dashboard-period-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  align-items: end;
  gap: 8px;
  min-height: 360px;
  overflow-x: auto;
  padding: 4px 2px 2px;
}

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

.dashboard-period-bar span {
  align-self: start;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.dashboard-period-bar i {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-height: 220px;
  border-radius: 7px;
  background: #f0f3f8;
}

.dashboard-period-bar b {
  display: block;
  width: 100%;
  height: max(4px, var(--bar));
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #ffb23e, #f06f2e);
  transition: height 220ms ease, filter 180ms ease;
}

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

.dashboard-period-bar:hover b,
.dashboard-period-bar:focus-visible b,
.dashboard-hour-row:hover b,
.dashboard-hour-row:focus-visible b {
  filter: saturate(1.16) brightness(0.98);
}

.dashboard-hour-bars {
  display: grid;
  gap: 9px;
}

.dashboard-hour-row {
  display: grid;
  grid-template-columns: 52px minmax(120px, 1fr) 58px;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.dashboard-hour-row i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f7;
}

.dashboard-hour-row b {
  display: block;
  width: max(4px, var(--bar));
  height: 100%;
  border-radius: inherit;
  background: #ff9900;
  transition: width 220ms ease;
}

.dashboard-hour-row strong {
  color: var(--text);
  text-align: right;
}

.dashboard-heatmap-tile {
  margin-top: 16px;
}

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

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

.dashboard-load-heatmap th,
.dashboard-load-heatmap td {
  min-width: 42px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  text-align: center;
}

.dashboard-load-heatmap th {
  color: var(--muted);
  font-size: 12px;
  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.07 + var(--heat, 0) * 0.64));
  color: #202736;
  font-size: 12px;
  font-weight: 900;
  outline: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

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

.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);
}

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

@media (max-width: 1180px) {
  .dashboard-load-filters {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

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

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

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

@media (max-width: 760px) {
  .dashboard-load-top {
    display: grid;
  }

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

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

  .dashboard-load-filters,
  .dashboard-load-kpis {
    grid-template-columns: 1fr;
  }

  .dashboard-load-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-load-filter-actions button,
  .dashboard-load-filter-actions .ghost {
    width: 100%;
  }

  .dashboard-load-kpi span,
  .dashboard-load-kpi em {
    white-space: normal;
  }

  .dashboard-period-chart {
    grid-auto-columns: minmax(38px, 46px);
    min-height: 300px;
  }

  .dashboard-period-bar {
    grid-template-rows: 32px 190px 24px;
  }

  .dashboard-hour-row {
    grid-template-columns: 48px minmax(90px, 1fr) 48px;
  }
}

.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) {
  .actions-panel {
    grid-template-columns: 1fr 1fr;
  }

  .guide-hero,
  .guide-layout,
  .guide-two-col {
    grid-template-columns: 1fr;
  }

  .guide-nav {
    position: static;
  }
}

@media (max-width: 600px) {
  .actions-panel {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 90px 1fr auto;
  }
}
