* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1f2933;
  background: #f5f7fb;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
      600px 300px at 8% -10%,
      rgba(37, 99, 235, 0.18),
      transparent 60%
    ),
    radial-gradient(
      520px 260px at 92% 0%,
      rgba(14, 165, 233, 0.12),
      transparent 60%
    );
  z-index: 0;
}

.hidden {
  display: none;
}

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

.login-card {
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

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

.header h1 {
  margin: 0 0 6px;
}

.actions {
  display: flex;
  gap: 12px;
}

.actions button {
  white-space: nowrap;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.card:hover {
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: end;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

input,
button {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd2d9;
}

input {
  padding: 4px 10px;
  font-size: 13px;
  height: 30px;
  background: #f1f5f9;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  box-shadow: none;
}

input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  background: #ffffff;
}

button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  cursor: pointer;
  border-radius: 8px;
}

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

button:active {
  transform: translateY(0);
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.muted {
  color: #7b8794;
  font-size: 13px;
}

.subtext {
  color: #9aa5b1;
  font-size: 12px;
  margin-top: 4px;
}

.status {
  min-height: 20px;
  margin: 10px 0 16px;
  font-size: 14px;
}

.status.error {
  color: #b91c1c;
}

.status.success {
  color: #15803d;
}

.table-wrap {
  overflow: auto;
}

.view-container.view-table table {
  min-width: 0;
  table-layout: fixed;
}

.view-container.view-table th,
.view-container.view-table td {
  word-break: break-word;
}

.view-container.view-cards .table-wrap {
  display: none;
}

.view-container.view-table .cards-container {
  display: none;
}

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

th,
td {
  text-align: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e4e7eb;
  font-size: 14px;
}

.tix-cell {
  text-align: center;
  width: 56px;
  padding-left: 6px;
  padding-right: 6px;
}

.tix-checkbox {
  transform: scale(1.35);
  transform-origin: center;
}

th {
  background: #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 1;
}

.sortable {
  cursor: pointer;
  user-select: none;
}

.sortable::after {
  content: "↕";
  font-size: 12px;
  margin-left: 6px;
  color: #94a3b8;
}

.sortable.is-sorted-asc::after {
  content: "↑";
  color: #2563eb;
}

.sortable.is-sorted-desc::after {
  content: "↓";
  color: #2563eb;
}

.table-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.view-controls {
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.view-controls .button-secondary {
  height: 34px;
  padding: 6px 14px;
  border-radius: 8px;
}

.view-controls-left,
.view-controls-right {
  display: inline-flex;
  align-items: flex-end;
  gap: 10px;
}

.control-button {
  height: 34px;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
}

.view-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #eef2f7;
  border: 1px solid #d7dee8;
}

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

.view-toggle-option {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.view-toggle input:checked + .view-toggle-option {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

.view-toggle input:disabled + .view-toggle-option {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

.search {
  min-width: 260px;
  font-weight: 600;
  color: #0f172a;
}

.column-settings {
  align-self: flex-end;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
}


.filters {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
  align-items: end;
}

.filters input {
  width: 100%;
}

.filter-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  flex-wrap: nowrap;
}

.filter-actions button {
  width: 110px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  width: min(385px, 94vw);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  padding: 18px 16px 20px;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-body .filters {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 8px;
  width: 100%;
}

.modal-body .filters label {
  gap: 2px;
  width: 100%;
}

.modal-body .filters input {
  height: 31px;
  padding: 5px 11px;
  width: 100%;
}

.modal-body .filters .filter-actions {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: 16px;
}


.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  border: 1px solid #d6dee8;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover {
  background: #eef2f7;
  color: #475569;
}

.button-secondary {
  background: #e2e8f0;
  color: #1f2933;
  border: 1px solid #cbd2d9;
}

.button-danger {
  background: #dc2626;
  color: #ffffff;
}

.button-danger:hover {
  filter: brightness(0.95);
}

.page-tabs {
  display: inline-flex;
  gap: 6px;
  margin-top: 10px;
  padding: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.12);
}

.tab-button {
  padding: 6px 14px;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  border: none;
  font-weight: 600;
}

.tab-button.is-active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
}

.header h1 {
  background: linear-gradient(120deg, #1d4ed8, #0ea5e9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.button-secondary[disabled] {
  opacity: 0.5;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #1f2933;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.column-settings {
  position: relative;
  justify-self: end;
}

.column-settings--placeholder {
  width: 40px;
  height: 40px;
}

.gear-button {
  background: #e2e8f0;
  color: #1f2933;
  border: 1px solid #cbd2d9;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.gear-button.is-open {
  background: #2563eb;
  color: #ffffff;
}

.column-menu {
  position: absolute;
  right: 0;
  top: 46px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 170px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
  font-size: 13px;
  color: #52606d;
}

.column-menu.is-open {
  display: flex;
}

.column-menu-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
}

.column-menu label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.column-menu input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.view-container.hide-hotel .col-hotel,
.view-container.hide-flight .col-flight,
.view-container.hide-transfer .col-transfer {
  display: none;
}

.view-container.hide-created .col-created,
.view-container.hide-id .col-id,
.view-container.hide-travelwire .col-travelwire,
.view-container.hide-status .col-status,
.view-container.hide-agent .col-agent,
.view-container.hide-cruiseline .col-cruiseline,
.view-container.hide-dep-date .col-dep-date,
.view-container.hide-order .col-order {
  display: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
}

.status-badge.sent {
  background: #dcfce7;
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.2);
}

.status-badge.pending {
  background: #fef3c7;
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card-item {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.card-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.card-item-actions .tix-checkbox {
  transform: scale(1.15);
}

.card-item-title {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
}

.card-item-grid {
  display: grid;
  grid-template-columns: minmax(80px, 110px) 1fr;
  gap: 8px 12px;
  font-size: 13px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.card-field {
  display: contents;
}

.card-label {
  color: #64748b;
  font-weight: 600;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
}
