/* Buying Sheet — full-width main, TICKETBOAT wordmark, Inter typography */

.buying-sheet {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  background: #f3f4f6;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

/* Header — logo bar (#0b111f matches TICKETBOAT brand) */
.buying-sheet__topbar {
  background: #0b111f;
  color: #e2e8f0;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
  border-top: none;
  box-shadow: none;
}

.buying-sheet__brand-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

/* Wordmark: TICKET white + BOAT sky blue + dot */
.buying-sheet__logo {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.buying-sheet__logo-ticket {
  color: #ffffff;
}

.buying-sheet__logo-boat {
  color: #7bb2f3;
}

.buying-sheet__logo-dot {
  width: 7px;
  height: 7px;
  background: #ffffff;
  border-radius: 50%;
  margin-left: 8px;
  flex-shrink: 0;
}

.buying-sheet__logo-divider {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  font-size: 15px;
  margin: 0 2px 0 10px;
  letter-spacing: 0;
}

.buying-sheet__logo-page {
  color: #e8edf5;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.buying-sheet__brand-date {
  font-weight: 400;
  color: #94a3b8;
  font-size: 14px;
  margin-left: 10px;
  letter-spacing: 0.02em;
}

.buying-sheet__topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
}

/* Logged-in line — label grey, name white (matches reference bar) */
.buying-sheet__login-line {
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}

.buying-sheet__login-label {
  color: #94a3b8;
  font-weight: 400;
}

.buying-sheet__login-name {
  color: #ffffff;
  font-weight: 700;
}

/* Muted gold / brown-orange CAPTAIN · BUYER pill */
.buying-sheet__role-badge.ant-tag {
  margin: 0;
  padding: 3px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: #ffffff !important;
  background: #a65f2f !important;
  border: none !important;
  border-radius: 4px;
}

/* DEMO ROLE — bordered group; label inside left; segmented = grey pill + white text when selected */
.buying-sheet__demo-role {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 12px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
}

.buying-sheet__demo-role-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #94a3b8;
  white-space: nowrap;
}

.buying-sheet__demo-role .ant-segmented {
  background: rgba(30, 41, 59, 0.85);
  padding: 2px;
  border-radius: 6px;
}

.buying-sheet__demo-role .ant-segmented-item {
  color: #64748b !important;
  font-weight: 500;
}

.buying-sheet__demo-role .ant-segmented-item:hover:not(.ant-segmented-item-selected) {
  color: #94a3b8 !important;
}

.buying-sheet__demo-role .ant-segmented-item-selected {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #f8fafc !important;
  border-radius: 4px !important;
}

.buying-sheet__demo-role .ant-segmented-item-selected .ant-segmented-item-label {
  color: #f8fafc !important;
  font-weight: 500;
}

.buying-sheet__demo-role .ant-segmented-thumb {
  background: rgba(255, 255, 255, 0.14) !important;
}

/* Main: full viewport width — grid so table panel always spans full column (avoids ~80% flex shrink) */
.buying-sheet__body {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  padding: 0 0 16px;
}

/* Tours + search: framed like a table block */
.buying-sheet__page-header-card {
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 0;
  margin-bottom: 12px;
  margin-top: 0;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.05),
    0 4px 14px rgba(15, 23, 42, 0.06);
}

.buying-sheet__title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 20px 12px;
}

.buying-sheet__title-block {
  min-width: 0;
}

.buying-sheet__tours-title {
  margin: 0 !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #111827 !important;
  line-height: 1.3 !important;
}

.buying-sheet__subtitle {
  color: #9ca3af;
  font-size: 13px;
  margin-top: 4px;
}

.buying-sheet__title-right {
  text-align: right;
  flex-shrink: 0;
  padding-top: 2px;
}

.buying-sheet__hint {
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.45;
  max-width: 300px;
}

.buying-sheet__page-header-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0;
}

/* Search: one horizontal row — label | date | Search; total on the right */
.buying-sheet__search-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px 14px;
  flex-wrap: wrap;
}

.buying-sheet__search-col {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
  min-width: 0;
}

.buying-sheet__search-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #9ca3af;
  line-height: 1.2;
  white-space: nowrap;
}

.buying-sheet__search-date {
  width: 200px !important;
  max-width: min(200px, 100%);
}

.buying-sheet__search-submit.ant-btn {
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
}

.buying-sheet__search-total {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  margin-left: auto;
}

/* Table panel: sits on gray; second row of body grid (1fr) */
.buying-sheet__panel {
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

/* Table block only — inset from Tours/search card (20px each side) */
.buying-sheet__panel-table {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: calc(100% - 40px);
  max-width: calc(100% - 40px);
  margin-left: 20px;
  margin-right: 20px;
  min-width: 0;
  overflow-x: auto;
}

/* Main table: thick outer border + light elevation (reads as one table widget) */
.buying-sheet__table-shell {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, 0.05),
    0 6px 16px rgba(15, 23, 42, 0.07);
}

.buying-sheet__table-head-wrap {
  overflow: hidden;
}

/* Full-width grid — columns flex with browser; no side gutters on panel */
.buying-sheet__grid {
  display: grid;
  grid-template-columns:
    minmax(110px, 0.9fr) minmax(200px, 2.2fr) minmax(100px, 1fr) minmax(88px, 0.7fr)
    minmax(130px, 1.1fr) minmax(136px, 1fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
}

.buying-sheet__th {
  background: #1a202c;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 20px;
  border-bottom: 2px solid #2d3748;
  font-family: Inter, system-ui, sans-serif;
}

/* Light blue tint — filter row only */
.buying-sheet__filter-row {
  background: #eff6ff;
  border-top: 2px solid #d1d5db;
  padding: 8px 16px;
  display: grid;
  grid-template-columns:
    minmax(110px, 0.9fr) minmax(200px, 2.2fr) minmax(100px, 1fr) minmax(88px, 0.7fr)
    minmax(130px, 1.1fr) minmax(136px, 1fr);
  gap: 6px;
  align-items: center;
  width: 100%;
}

/* Blue-tinted inputs — filter row only */
.buying-sheet__filter-row .buying-sheet__filter-input {
  border-color: #93c5fd !important;
}

.buying-sheet__filter-row .buying-sheet__filter-input::placeholder {
  color: #60a5fa;
  opacity: 0.9;
}

.buying-sheet__filter-row .ant-picker {
  border-color: #93c5fd !important;
}

/* Add row: same light blue strip as filters — controls stay white + gray borders */
.buying-sheet__add-row {
  background: #eff6ff;
  border-top: 1px solid #93c5fd;
  padding: 8px 16px;
  display: grid;
  grid-template-columns:
    minmax(110px, 0.9fr) minmax(200px, 2.2fr) minmax(100px, 1fr) minmax(88px, 0.7fr)
    minmax(130px, 1.1fr) minmax(136px, 1fr);
  gap: 6px;
  align-items: center;
  width: 100%;
}

/* Slimmer inputs / picker / select in filter + add rows */
.buying-sheet__filter-row .ant-input-sm,
.buying-sheet__filter-row .ant-input-affix-wrapper-sm,
.buying-sheet__add-row .ant-input-sm,
.buying-sheet__add-row .ant-input-affix-wrapper-sm {
  min-height: 22px !important;
  padding-block: 0 !important;
  padding-inline: 8px !important;
  font-size: 12px;
}

.buying-sheet__filter-row .ant-picker,
.buying-sheet__add-row .ant-picker {
  min-height: 22px !important;
  padding: 0 6px 0 8px !important;
}

.buying-sheet__filter-row .ant-picker .ant-picker-input > input,
.buying-sheet__add-row .ant-picker .ant-picker-input > input {
  font-size: 12px;
}

.buying-sheet__filter-row .ant-select .ant-select-selector,
.buying-sheet__add-row .ant-select .ant-select-selector {
  min-height: 22px !important;
  height: 22px !important;
  padding: 0 8px !important;
  font-size: 12px;
}

.buying-sheet__filter-row .ant-select .ant-select-selection-item,
.buying-sheet__filter-row .ant-select .ant-select-selection-placeholder,
.buying-sheet__add-row .ant-select .ant-select-selection-item,
.buying-sheet__add-row .ant-select .ant-select-selection-placeholder {
  line-height: 20px !important;
}

.buying-sheet__add-row .buying-sheet__add-input,
.buying-sheet__add-row .ant-input-affix-wrapper,
.buying-sheet__add-row .ant-picker,
.buying-sheet__add-row .ant-select .ant-select-selector {
  border-color: #d1d5db !important;
  background-color: #ffffff !important;
}

.buying-sheet__add-row .ant-picker .ant-picker-input > input {
  background: transparent !important;
}

.buying-sheet__add-row .buying-sheet__add-input::placeholder {
  color: #9ca3af;
}

.buying-sheet__add-row .ant-select-arrow {
  color: rgba(0, 0, 0, 0.45);
}

.buying-sheet__filter-row .buying-sheet__filter-select .ant-select-selector {
  border-color: #93c5fd !important;
}

/* Filter row — Clear: light blue fill, blue border, blue label (not danger link) */
.buying-sheet__btn-clear.ant-btn {
  justify-self: end;
  height: 22px;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  background: #dbeafe !important;
  border: 1px solid #93c5fd !important;
  color: #2563eb !important;
  box-shadow: none !important;
}

.buying-sheet__btn-clear.ant-btn:hover {
  background: #bfdbfe !important;
  border-color: #60a5fa !important;
  color: #1d4ed8 !important;
}

/* + Add: right-aligned like Clear; hug content (no full-column stretch) */
.buying-sheet__btn-add.ant-btn-sm {
  justify-self: end;
  width: auto;
  min-width: unset;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

.buying-sheet__btn-add .anticon {
  font-size: 12px;
}

/* Search card: soft bordered date field */
.buying-sheet__page-header-card .buying-sheet__search-date.ant-picker,
.buying-sheet__page-header-card .buying-sheet__search-date.ant-picker:hover,
.buying-sheet__page-header-card .buying-sheet__search-date.ant-picker-focused {
  border-color: #cbd5e1 !important;
}

.buying-sheet__page-header-card .buying-sheet__search-date.ant-picker-focused {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.buying-sheet__data-rows {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
}

.buying-sheet__data-row {
  display: grid;
  grid-template-columns:
    minmax(110px, 0.9fr) minmax(200px, 2.2fr) minmax(100px, 1fr) minmax(88px, 0.7fr)
    minmax(130px, 1.1fr) minmax(136px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 14px 20px;
  width: 100%;
  background: #ffffff;
  /* Thicker row dividers (reference: clear separation between onsales) */
  border-top: 2px solid #d1d5db;
}

.buying-sheet__data-row:last-child {
  border-bottom: 2px solid #d1d5db;
}

/* Fills remaining space — same gray as page */
.buying-sheet__panel-filler {
  flex: 1 1 auto;
  min-height: 48px;
  background: #f3f4f6;
}

.buying-sheet__date-cell {
  font-size: 14px;
  color: #1f2937;
}

.buying-sheet__name-cell strong {
  display: block;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
}

.buying-sheet__name-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.35;
}

.buying-sheet__team-tag {
  border-radius: 999px !important;
  padding: 2px 12px !important;
  font-weight: 500 !important;
  border: none !important;
  background: #dbeafe !important;
  color: #1e40af !important;
}

.buying-sheet__progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.buying-sheet__progress-track {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  position: relative;
  min-width: 60px;
}

.buying-sheet__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #ef4444;
  border-radius: 3px;
}

.buying-sheet__progress-knob {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #ef4444;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.buying-sheet__progress-text {
  font-size: 13px;
  color: #4b5563;
  white-space: nowrap;
}

.buying-sheet__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
* {
  box-sizing: border-box;
}

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

#root {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: #f3f4f6;
  overflow-x: hidden;
}
