:root {
  --bg: #f2f6f9;
  --panel: #ffffffcc;
  --panel-solid: #ffffff;
  --text: #152532;
  --muted: #667986;
  --line: #d7e1e8;
  --brand: #2b9e9a;
  --brand-2: #3f86ad;
  --brand-3: #2f5f7f;
  --accent: #f2cf67;
  --danger: #dc2626;
  --ok: #2c8f63;
  --radius: 20px;
  --nav-control-height: 40px;
  --nav-control-radius: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: #eef3f7;
}

.page {
  max-width: 980px;
  margin: 28px auto;
  padding: 0 14px;
}

.shell {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid #ffffffcc;
  border-radius: var(--radius);
  box-shadow:
    0 16px 40px rgba(25, 58, 115, 0.12),
    0 2px 8px rgba(25, 58, 115, 0.08);
  overflow: hidden;
  animation: fadeUp 0.45s ease;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--brand-3), var(--brand-2) 55%, var(--brand));
  color: #fff;
}

.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

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

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: var(--nav-control-height);
  text-decoration: none;
  color: #e8f7f8;
  padding: 9px 14px;
  border-radius: var(--nav-control-radius);
  border: 1px solid #ffffff4a;
  font-weight: 700;
  font-size: 14px;
}

.nav a.active {
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
  color: var(--brand-3);
  border-color: #ffffff;
  box-shadow: 0 4px 10px rgba(47, 95, 127, 0.18);
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff3bf;
  color: #7c3f00;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.topbar--authenticated {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.nav-logout {
  margin: 0;
}

.nav-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nav-control-height);
  height: var(--nav-control-height);
  padding: 0;
  color: #e8f7f8;
  background: transparent;
  border: 1px solid #ffffff4a;
  border-radius: var(--nav-control-radius);
  vertical-align: middle;
}

.nav a,
.nav-logout-button {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.nav a:not(.active):hover,
.nav-logout-button:hover {
  border-color: #ffffff80;
  box-shadow: inset 0 0 0 999px #ffffff1f, 0 0 0 3px #ffffff1f;
  filter: none;
  transform: none;
}

.nav a:focus-visible,
.nav-logout-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  :root {
    --nav-control-height: 38px;
    --nav-control-radius: 14px;
  }
  .topbar.topbar--authenticated {
    grid-template-columns: minmax(0, 1fr) var(--nav-control-height);
    align-items: center;
    gap: 10px 12px;
  }
  .topbar--authenticated .nav {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .nav-logout {
    grid-column: 2;
    grid-row: 1;
  }
}

.content {
  padding: 20px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

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

.card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin-top: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(38, 71, 91, 0.05);
}

.settings-card {
  padding: 18px;
}

.settings-card-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(124, 151, 166, 0.18);
}

.settings-card-head h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.rich-editor-shell {
  width: 100%;
  border: 1px solid #ccd9e2;
  border-radius: 16px;
  background: #fbfdfe;
  overflow: hidden;
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  min-height: 42px;
  padding: 6px 8px;
  border-bottom: 1px solid #d7e2ea;
  background: #f3f7f9;
}

.rich-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
  border-right: 1px solid #d4e0e8;
}

.rich-toolbar-group:first-child {
  padding-left: 0;
}

.rich-toolbar-group:last-child {
  border-right: 0;
}

.rich-tool {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #27495e;
  font-size: 14px;
  line-height: 1;
  box-shadow: none;
}

.rich-tool:hover {
  border-color: #c4d4df;
  background: #fff;
}

.rich-tool:active,
.rich-tool.is-active {
  border-color: #9fc7c8;
  background: #e7f3f3;
}

.rich-tool-wide {
  width: auto;
  min-width: 0;
}

.rich-editor {
  width: 100%;
  min-height: 260px;
  max-height: 460px;
  overflow: auto;
  padding: 14px 16px;
  background: #fbfdfe;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.rich-editor:focus {
  outline: none;
}

.rich-editor-shell:focus-within {
  border-color: #68b9b4;
  box-shadow: 0 0 0 4px rgba(96, 177, 170, 0.16);
}

.rich-editor p {
  margin: 0 0 14px;
}

.rich-editor p:last-child {
  margin-bottom: 0;
}

.field-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.row {
  margin-bottom: 10px;
  min-width: 0;
}

label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #ccd9e2;
  border-radius: 14px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  background: #fbfdfe;
  color: var(--text);
}

textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 92px;
  border: 1px solid #ccd9e2;
  border-radius: 14px;
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.45;
  background: #fbfdfe;
  color: var(--text);
}

select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid #ccd9e2;
  border-radius: 14px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 16px;
  background: #fbfdfe;
  color: var(--text);
}

input:focus {
  outline: none;
  border-color: #68b9b4;
  box-shadow: 0 0 0 4px rgba(96, 177, 170, 0.16);
}

textarea:focus {
  outline: none;
  border-color: #68b9b4;
  box-shadow: 0 0 0 4px rgba(96, 177, 170, 0.16);
}

select:focus {
  outline: none;
  border-color: #68b9b4;
  box-shadow: 0 0 0 4px rgba(96, 177, 170, 0.16);
}

/* Lucide chevron-down; license: /static/licenses/lucide.txt. */
select:not([multiple]):not([size]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23667f8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  background-position: right 12px center;
}

@media (forced-colors: active) {
  select:not([multiple]):not([size]) {
    -webkit-appearance: auto;
    appearance: auto;
    background-image: none;
    padding-right: 12px;
  }
}

.input-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px #dc262622 !important;
}

.field-error {
  min-height: 16px;
  margin-top: 4px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
}
.field-error:empty {
  display: none;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 14px;
}

#items {
  min-width: 760px;
}

thead th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  background: #f7fbfc;
  border-bottom: 1px solid var(--line);
  padding: 10px;
}

tbody td {
  border-bottom: 1px solid #eef3f6;
  padding: 10px;
}

button {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f4f9f8, #e9f2f2);
  color: #2f5f7f;
  border: 1px solid #c2d6d7;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 14px;
  line-height: 1.2;
}

.btn-secondary:hover {
  filter: none;
  background: linear-gradient(180deg, #edf6f5, #e1eeee);
}

.btn-danger {
  background: linear-gradient(180deg, #fff1f1, #ffe4e4);
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 15px;
  font-weight: 700;
}

.btn-danger:hover {
  filter: none;
  background: #fecaca;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.filters {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.8fr 1fr auto auto;
  gap: 8px;
}

.filters-bookings {
  grid-template-columns: minmax(0, 1.8fr) minmax(180px, 0.8fr) auto auto;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-filters-months {
  margin-top: 8px;
}

.quick-filter {
  border: 1px solid #c2d6d7;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbfb, #edf5f4);
  color: #2f5f7f;
  padding: 8px 13px;
  font-size: 13px;
  font-weight: 800;
}

.quick-filter.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

.quick-filter-new {
  border-color: #f6c36a;
  background: linear-gradient(180deg, #fff8e6, #fff1c7);
  color: #845000;
}

.quick-filter-new.active {
  background: linear-gradient(135deg, #f2a93b, #e7882b);
  color: #fff;
}

.invoice-link {
  color: var(--brand-3);
  font-weight: 700;
  text-decoration: none;
}

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

.list a {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.list-actions {
  display: flex;
  gap: 6px;
}

.pagination {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination input {
  width: 86px;
  height: 36px;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.status {
  margin-top: 10px;
  font-size: 14px;
}

.status.ok {
  color: var(--ok);
}

.status.err {
  color: var(--danger);
}

.success-toast {
  position: fixed;
  z-index: 50;
  top: 22px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: min(420px, calc(100vw - 28px));
  padding: 14px 16px;
  border: 1px solid rgba(71, 157, 137, 0.28);
  border-radius: 18px;
  background: rgba(247, 253, 251, 0.96);
  box-shadow: 0 18px 45px rgba(39, 73, 94, 0.2);
  color: var(--text);
  opacity: 0;
  transform: translate(-50%, -14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.success-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.success-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #2aa198, #69b77f);
  color: #fff;
  font-weight: 900;
}

.success-toast strong,
.success-toast span {
  display: block;
}

.success-toast strong {
  font-size: 16px;
}

.success-toast span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdfe, #f7fbfd);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.bookings-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.vouchers-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.booking-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcfd 100%);
  box-shadow: 0 10px 24px rgba(46, 83, 106, 0.06);
}

.booking-list-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.booking-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.booking-list-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bookings-table-wrap {
  margin-top: 14px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bookings-table {
  width: 100%;
  min-width: 1280px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: visible;
}

.bookings-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.bookings-table thead th:first-child {
  border-top-left-radius: 18px;
}

.bookings-table thead th:last-child {
  border-top-right-radius: 18px;
}

.bookings-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #edf3f6;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.4;
}

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

.bookings-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 18px;
}

.bookings-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 18px;
}

.bookings-table tbody tr:hover td {
  background: #fbfdfe;
}

.bookings-table tbody tr.booking-unread-row td {
  background: #fffaf0;
  border-bottom-color: #f5dfb3;
}

.bookings-table tbody tr.booking-unread-row:hover td {
  background: #fff4dc;
}

.bookings-table tbody tr.booking-unread-row td:first-child {
  box-shadow: inset 4px 0 0 #f2a93b;
}

.booking-cell-strong {
  font-weight: 800;
  min-width: 180px;
}

.booking-created-at-cell {
  min-width: 190px;
  white-space: nowrap;
}

.booking-row-link {
  color: inherit;
  text-decoration: none;
}

.booking-row-link:hover {
  color: var(--brand-3);
}

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

.booking-email-cell,
.booking-comment-cell {
  min-width: 180px;
  word-break: break-word;
}

.booking-accommodation-cell {
  min-width: 260px;
  white-space: nowrap;
}

.booking-boat-cell {
  min-width: 160px;
  white-space: nowrap;
}

.booking-table-actions {
  min-width: 180px;
}

.booking-table-actions select {
  width: 100%;
  margin-bottom: 8px;
}

.booking-row-menu-cell {
  position: relative;
  min-width: 88px;
  text-align: right;
}

.booking-row-menu {
  position: relative;
  display: inline-block;
}

.booking-row-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 42px;
  height: 34px;
  padding: 0;
  border: 1px solid #bddbdc;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fdfd, #edf7f7);
  color: #2f5f7f;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: 0.18s ease;
}

.booking-row-menu-trigger span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.booking-row-menu-trigger:hover,
.booking-row-menu.open .booking-row-menu-trigger {
  border-color: var(--brand-2);
  background: linear-gradient(180deg, #ffffff, #e9f6f6);
  box-shadow: 0 0 0 4px rgba(44, 158, 160, 0.12);
  transform: translateY(-1px);
}

.booking-row-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 230px;
  padding: 8px;
  display: none;
  border: 1px solid #d8e6ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 34px rgba(38, 71, 91, 0.16);
}

.booking-row-menu.open .booking-row-menu-list {
  display: block;
}

.booking-row-menu-list button {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--brand-3);
  box-shadow: none;
  font-size: 13px;
  text-align: left;
}

.booking-row-menu-list button:hover {
  background: #eef7f7;
  filter: none;
  transform: none;
}

.booking-row-menu-list .booking-row-menu-danger {
  color: #991b1b;
}

.booking-row-menu-list .booking-row-menu-danger:hover {
  background: #fff1f1;
}

.booking-table-details summary {
  cursor: pointer;
  color: var(--brand-3);
  font-weight: 800;
  list-style: none;
}

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

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

.booking-table-detail-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e7eff4;
  border-radius: 14px;
  background: #fafcfd;
}

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

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

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.detail-back {
  text-decoration: none;
}

.detail-create {
  text-decoration: none;
}

.detail-delete {
  height: 40px;
  padding: 10px 16px;
  border-radius: 14px;
}

.booking-detail-card {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.booking-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  padding: 16px;
  box-shadow: 0 8px 18px rgba(38, 71, 91, 0.05);
}

.booking-unread-card {
  border-color: #f4d38d;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
  box-shadow: 0 12px 26px rgba(174, 109, 15, 0.08);
}

.booking-new-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0c2;
  color: #8a4b00;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

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

.booking-main-info {
  flex: 1 1 auto;
  min-width: 0;
}

.booking-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.booking-identity-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.booking-inline-display {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.booking-inline-display[hidden],
.booking-inline-editor[hidden] {
  display: none;
}

.booking-edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6f8998;
  box-shadow: none;
}

.booking-edit-icon:hover {
  background: #eaf4f4;
  color: var(--brand-3);
  filter: none;
}

.booking-edit-icon:focus-visible {
  outline: 2px solid rgba(48, 157, 152, 0.35);
  outline-offset: 1px;
}

.booking-edit-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-edit-icon-small {
  width: 24px;
  height: 24px;
  margin: -5px -5px -5px 1px;
  border-radius: 7px;
}

.booking-edit-icon-small svg {
  width: 15px;
  height: 15px;
}

.booking-inline-editor {
  position: relative;
  display: block;
  align-items: center;
  min-width: 0;
}

.booking-inline-title-editor {
  width: min(760px, 100%);
}

.booking-inline-editor input,
.booking-inline-editor textarea {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 8px 82px 8px 11px;
}

.booking-inline-title-editor textarea {
  display: block;
  min-height: 38px;
  max-height: 96px;
  overflow-y: auto;
  resize: none;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.booking-inline-action {
  position: absolute;
  top: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 9px;
  box-shadow: none;
}

.booking-inline-action:hover {
  filter: none;
}

.booking-inline-action svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-inline-save {
  right: 39px;
  border: 1px solid #b8dcd8;
  background: #eaf6f4;
  color: #177b74;
}

.booking-inline-cancel {
  right: 3px;
  border: 1px solid #dbe4e9;
  background: #f6f9fa;
  color: #718390;
}

.booking-inline-error {
  display: block;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}

.booking-inline-phone-display {
  width: fit-content;
}

.booking-inline-phone-editor {
  width: 100%;
}

.booking-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

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

.booking-detail-actions {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto;
  grid-template-rows: auto 40px;
  gap: 5px 12px;
  align-items: stretch;
}

.booking-status-label {
  grid-column: 1;
  grid-row: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.booking-status-select {
  grid-column: 1;
  grid-row: 2;
  height: 40px;
}

.booking-delete-link {
  grid-column: 2;
  grid-row: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  margin: 0;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #991b1b;
  font-weight: 800;
}

.booking-delete-link:hover {
  filter: none;
  background: #fee2e2;
}

.booking-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 800;
}

.booking-status-0 {
  color: #155e75;
  background: #ecfeff;
}

.booking-status-1 {
  color: #166534;
  background: #f0fdf4;
}

.booking-status-2 {
  color: #991b1b;
  background: #fff1f1;
}

.booking-status-3 {
  color: #92400e;
  background: #fffbeb;
}

.booking-status-4,
.booking-status-unknown {
  color: #475569;
  background: #f8fafc;
}

.booking-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.booking-invoice-box {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f4f9f8, #edf7f6);
  border: 1px solid #d4e7e6;
}

.booking-invoice-link {
  width: fit-content;
  color: var(--brand-3);
  font-weight: 800;
  text-decoration: none;
}

.booking-invoice-link:hover {
  text-decoration: underline;
}

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

.booking-invoice-actions .btn-secondary,
.booking-invoice-actions .btn-danger {
  height: 38px;
  padding: 8px 14px;
  border-radius: 12px;
}

.booking-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fbfd;
  border: 1px solid #e4edf2;
}

.booking-field-wide {
  grid-column: 1 / -1;
}

.booking-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.booking-url {
  word-break: break-word;
}

.booking-payload {
  margin-top: 14px;
  border-top: 1px solid #edf3f6;
  padding-top: 14px;
}

.booking-details {
  margin-top: 14px;
  border-top: 1px solid #edf3f6;
  padding-top: 14px;
}

.booking-details summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--brand-3);
  list-style: none;
}

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

.booking-details summary::after {
  content: "Показать";
  margin-left: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.booking-details[open] summary::after {
  content: "Скрыть";
}

.booking-tech-url {
  margin-top: 12px;
}

.booking-payload-title {
  margin-bottom: 10px;
  font-weight: 800;
}

.booking-payload-row {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f4f7;
}

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

.booking-payload-key {
  color: var(--muted);
  font-weight: 700;
  word-break: break-word;
}

.booking-payload-value,
.booking-payload-empty {
  word-break: break-word;
}

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

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }
  .page {
    margin: 10px auto;
    padding: 0 8px;
  }
  .shell {
    border-radius: 12px;
  }
  .content {
    padding: 12px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .row {
    margin-bottom: 8px;
  }
  .row-due-date {
    margin-top: 12px;
    margin-bottom: 14px;
  }
  .row-rent-from,
  .row-rent-to {
    margin-top: 0;
    margin-bottom: 6px;
  }
  .grid-2 > * {
    min-width: 0;
  }
  input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
  }
  input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
  }
  input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
  }
  .filters {
    grid-template-columns: 1fr;
  }
  .filters-bookings {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .actions button,
  .actions .btn-secondary {
    width: 100%;
  }
  .list-row {
    grid-template-columns: 1fr;
  }
  .list-actions {
    justify-content: flex-end;
  }
  .pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "info info"
      "prev next"
      "jump go";
    gap: 8px;
    align-items: center;
    width: 100%;
  }
  .pagination input {
    width: 100%;
    max-width: none;
  }
  #page_info {
    grid-column: 1 / -1;
    grid-area: info;
    text-align: center;
    font-weight: 700;
  }
  #prev_page_btn {
    grid-area: prev;
  }
  #next_page_btn {
    grid-area: next;
  }
  #page_jump_input {
    grid-area: jump;
  }
  #go_page_btn {
    grid-area: go;
  }
  #prev_page_btn,
  #next_page_btn,
  #go_page_btn {
    width: 100%;
  }
  .bookings-pagination {
    grid-template-areas:
      "info info"
      "prev next"
      "jump go";
  }
  #bookings_page_info {
    grid-column: 1 / -1;
    grid-area: info;
    text-align: center;
    font-weight: 700;
  }
  #bookings_prev_btn {
    grid-area: prev;
  }
  #bookings_next_btn {
    grid-area: next;
  }
  #bookings_page_jump {
    grid-area: jump;
  }
  #bookings_go_btn {
    grid-area: go;
  }
  #bookings_prev_btn,
  #bookings_next_btn,
  #bookings_go_btn {
    width: 100%;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 12px;
  }
  .nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-height: 38px;
    padding: 7px 11px;
    text-align: center;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
  }
  .nav-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
  }
  .brand {
    font-size: 18px;
  }
  thead th,
  tbody td {
    padding: 8px;
  }
  .table-wrap {
    overflow-x: visible;
  }
  #items {
    min-width: 0;
    width: 100%;
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0 18px;
  }
  #items thead {
    display: none;
  }
  #items tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    margin-bottom: 18px;
  }
  #items tbody tr:last-child {
    margin-bottom: 0;
  }
  #items tbody td {
    display: block;
    border-bottom: 0;
    padding: 0;
    margin-bottom: 8px;
  }
  #items tbody td:last-child {
    margin-bottom: 0;
  }
  #items tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.2;
    color: var(--muted);
    font-weight: 700;
  }
  #items tbody td[data-label=""]::before {
    display: none;
  }
  #items tbody td button {
    width: 100%;
  }
  .booking-card-head {
    flex-direction: column;
  }
  .booking-main-info {
    width: 100%;
  }
  .booking-identity-line {
    align-items: center;
  }
  .booking-inline-title-editor {
    width: 100%;
  }
  .booking-inline-title-editor textarea {
    max-height: 132px;
    overflow-y: hidden;
  }
  .bookings-table-wrap {
    display: block !important;
    margin-top: 12px;
  }
  .bookings-list {
    display: none;
  }
  .vouchers-list {
    display: grid;
    gap: 12px;
  }
  .booking-list-item {
    flex-direction: column;
    align-items: stretch;
  }
  .booking-list-actions {
    justify-content: stretch;
  }
  .booking-list-actions > * {
    width: 100%;
  }
  .bookings-table {
    min-width: 1120px;
    border-radius: 14px;
  }
  .bookings-table thead th,
  .bookings-table tbody td {
    padding: 9px 8px;
    font-size: 12px;
    line-height: 1.35;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .bookings-table a,
  .bookings-table select,
  .bookings-table button,
  .booking-boat-cell {
    font-size: 12px;
  }
  .booking-head-actions {
    width: 100%;
    justify-content: stretch;
  }
  .booking-head-actions select {
    width: 100%;
  }
  .booking-detail-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }
  .booking-delete-link {
    min-width: 88px;
  }
  .detail-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }
  .detail-back {
    width: 100%;
  }
  .detail-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }
  .detail-actions > * {
    flex: 1 1 0;
    min-width: 0;
    height: 40px;
    padding: 10px 12px;
  }
  .detail-delete {
    padding: 10px 12px;
  }
  .booking-grid {
    grid-template-columns: 1fr;
  }
  .booking-field-wide {
    grid-column: auto;
  }
  .booking-payload-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .booking-table-detail-grid {
    grid-template-columns: 1fr;
  }
  h1 {
    font-size: 24px;
  }
}

@media (min-width: 761px) {
  .bookings-list {
    display: none;
  }
}

@media (max-width: 420px) {
  :root {
    --nav-control-height: 36px;
    --nav-control-radius: 13px;
  }
  .topbar {
    padding: 14px 10px;
  }
  .nav {
    gap: 5px;
  }
  .nav a {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 13px;
  }
}

/* Structured bookings from huntfish.ru. */
.website-boat{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #e0e7e3}.website-boat span{white-space:nowrap;color:#56665f}.website-order{margin:24px 0;padding:20px;border:1px solid #d8e3dd;border-radius:12px;background:#f6f9f7}.website-order h3{margin:0 0 12px}.website-order-line{display:flex;justify-content:space-between;gap:20px;padding:10px 0;border-bottom:1px solid #dde7e1}.website-order-line small{display:block;color:#60736a;margin-top:4px}.website-order-line>span{white-space:nowrap}.website-order-total{border:0;font-size:18px}.website-order p{font-size:12px;color:#60736a;margin:8px 0 0}.booking-payload-value{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:600px){.website-boat{flex-direction:column;gap:4px}.website-order{padding:14px}.website-order-line{gap:10px}}
