:root {
  --ink: #111827;
  --muted: #667085;
  --line: #d9def3;
  --panel: #ffffff;
  --soft: #f3f3fe;
  --soft-2: #eef8f7;
  --teal: #068a8f;
  --coral: #f06449;
  --amber: #ffb020;
  --blue: #2463eb;
  --green: #17803d;
  --red: #b42318;
  --shadow: 0 18px 45px rgba(24, 32, 79, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  background: var(--soft);
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.booking-shell {
  width: min(760px, calc(100% - 32px));
  margin: 22px auto 56px;
}

.public-logo-panel {
  display: flex;
  justify-content: center;
  padding: 0 16px 16px;
}

.public-logo {
  display: block;
  width: min(320px, 92%);
  height: auto;
}

.brand-mark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 6px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
}

.inbox-header h1,
.login-panel h1 {
  margin: 18px 0 10px;
  font-size: 40px;
  line-height: 1.12;
}

.form-card,
.login-panel,
.detail-panel,
.booking-list,
.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
}

.form-card {
  padding: 34px;
  border-radius: 2px;
  box-shadow: var(--shadow);
}

.flow-step {
  margin-top: 0;
}

.form-heading,
.inbox-header,
.toolbar,
.detail-heading,
.form-actions,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-heading h2,
.detail-heading h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.submitted-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flow-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.notice-bar,
.queue-banner {
  margin: 22px 0;
  padding: 14px 16px;
  border: 1px solid #b7e0dc;
  border-radius: 8px;
  color: #134e4a;
  background: var(--soft-2);
  line-height: 1.45;
}

.section-block {
  margin: 26px 0 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.section-block legend {
  padding-right: 16px;
  color: #25305a;
  font-size: 18px;
  font-weight: 800;
}

.party-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.party-type-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #25305a;
  text-align: left;
  background: #fbfcff;
}

.party-type-card:hover,
.party-type-card:focus {
  border-color: #b7e0dc;
  background: #eef8f7;
}

.party-type-card strong {
  display: block;
  font-size: 18px;
}

.party-type-card span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

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

.package-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.package-card.featured {
  border-color: #b7e0dc;
  background: #eef8f7;
}

.package-price {
  margin: 0;
  color: var(--teal);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.package-card h3,
.package-detail-band h3 {
  margin: 4px 0 0;
  color: #25305a;
  font-size: 18px;
}

.package-card h4 {
  margin: 0;
  color: #25305a;
  font-size: 14px;
}

.package-card p,
.package-detail-band p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.package-card ul,
.package-detail-band ul,
.package-detail-band ol {
  margin: 0;
  padding-left: 18px;
  color: #2d365f;
  line-height: 1.48;
}

.package-detail-band p + p {
  margin-top: 8px;
}

.package-card li + li,
.package-detail-band li + li {
  margin-top: 7px;
}

.package-detail-band {
  margin-top: 16px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.package-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 22px;
}

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

label,
.option-group {
  display: grid;
  gap: 7px;
  color: #2d365f;
  font-weight: 700;
}

label span,
.option-group > span,
.notes-box span {
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8ceed;
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(6, 138, 143, 0.14);
}

input[readonly] {
  color: var(--muted);
  background: #f8fafc;
}

.option-group {
  margin-top: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.option-group.compact-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.option-group > span {
  grid-column: 1 / -1;
}

.option-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcff;
}

.option-group input {
  width: 18px;
  height: 18px;
}

.primary-button,
.secondary-button,
.tab-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 10px 16px;
  font-weight: 800;
}

.primary-button {
  color: #ffffff;
  background: var(--coral);
}

.primary-button:disabled {
  opacity: 0.68;
  cursor: wait;
}

.secondary-button {
  color: #25305a;
  text-decoration: none;
  background: #ffffff;
  border-color: var(--line);
}

.danger-button {
  color: #912018;
  border-color: #fecdca;
  background: #fff5f4;
}

.danger-panel {
  border-color: #fecdca;
}

.form-actions {
  margin-top: 26px;
  justify-content: flex-start;
}

.form-actions.compact {
  align-items: flex-start;
  flex-wrap: wrap;
}

.form-message {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.form-message.success {
  color: var(--green);
  font-weight: 800;
}

.form-message.error {
  color: var(--red);
  font-weight: 800;
}

.admin-shell {
  width: min(1280px, calc(100% - 28px));
  margin: 24px auto 48px;
}

.login-panel {
  width: min(430px, 100%);
  margin: 80px auto;
  padding: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-panel .brand-mark {
  color: #25305a;
  border-color: var(--line);
  background: #fbfcff;
}

.staff-logo {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
}

.login-logo {
  margin: 0 auto 18px;
}

.inbox-logo {
  width: min(290px, 72vw);
  margin: 0 auto;
}

.login-form {
  display: grid;
  gap: 16px;
}

.autofill-decoys {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.inbox-header {
  display: grid;
  gap: 14px;
  align-items: stretch;
  justify-content: stretch;
  margin-bottom: 22px;
}

.inbox-header h1 {
  margin: 4px 0 0;
  color: #111827;
}

.inbox-brand-row {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 2px 0 4px;
}

.inbox-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.subtle-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.device-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.device-section {
  display: grid;
  gap: 8px;
}

.collapsible-section {
  padding: 10px;
  border: 1px solid #edf0fa;
  border-radius: 8px;
  background: #fbfcff;
}

.collapsible-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #25305a;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

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

.collapsible-section summary::before {
  content: "+";
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #25305a;
  background: #ffffff;
}

.collapsible-section[open] summary::before {
  content: "-";
}

.collapsible-section summary span {
  flex: 1;
}

.collapsible-section summary strong {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #25305a;
  text-align: center;
  background: #eef2f6;
}

.collapsible-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.device-section h3 {
  margin: 4px 0;
  color: #25305a;
  font-size: 16px;
}

.device-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf0fa;
  border-radius: 8px;
  background: #fbfcff;
}

.device-item strong,
.device-item span {
  display: block;
}

.device-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.device-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.account-form,
.reset-password-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto minmax(160px, 1fr);
  gap: 12px;
  align-items: end;
}

.owner-account-form {
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto minmax(180px, 1fr);
}

.owner-panel-body {
  margin-top: 12px;
}

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

.user-item {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #edf0fa;
  border-radius: 8px;
  background: #fbfcff;
}

.user-item strong,
.user-item span {
  display: block;
}

.user-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.reset-password-form {
  grid-template-columns: minmax(160px, 1fr) auto auto;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-tile {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  text-align: left;
  background: #ffffff;
}

.metric-tile:hover,
.metric-tile.active {
  border-color: #b7e0dc;
  background: #eef8f7;
}

.metric-tile span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.toolbar {
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 8px;
}

.block-panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.block-heading h2 {
  margin: 4px 0 14px;
  font-size: 20px;
}

.block-form {
  display: grid;
  grid-template-columns: 1fr 0.8fr 0.8fr 1.4fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.block-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.block-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #edf0fa;
  border-radius: 8px;
  background: #fbfcff;
}

.block-item strong,
.block-item span {
  display: block;
}

.block-item span,
.empty-inline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.tab-button {
  color: #344054;
  background: #f8fafc;
  border-color: var(--line);
}

.tab-button.active {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.search-box {
  width: min(280px, 100%);
}

.inbox-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.85fr) minmax(0, 1.55fr);
  gap: 14px;
  align-items: start;
}

.booking-list,
.detail-panel {
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
}

.booking-list {
  padding: 10px;
}

.booking-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
}

.booking-row + .booking-row {
  margin-top: 8px;
}

.booking-row:hover,
.booking-row.selected {
  border-color: #b7e0dc;
  background: #eef8f7;
}

.booking-row strong,
.booking-row span {
  display: block;
}

.booking-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.row-meta {
  min-width: 118px;
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
}

.status-pill.pending {
  color: #7a2e0e;
  background: #fff3d6;
}

.status-pill.confirmed {
  color: #0b5a2a;
  background: #dcfae6;
}

.status-pill.completed {
  color: #344054;
  background: #e4e7ec;
}

.status-pill.approved,
.status-pill.owner {
  color: #0b5a2a;
  background: #dcfae6;
}

.status-pill.staff {
  color: #1849a9;
  background: #dbeafe;
}

.status-pill.canceled {
  color: #912018;
  background: #fee4e2;
}

.status-pill.revoked {
  color: #912018;
  background: #fee4e2;
}

.detail-panel {
  padding: 22px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  line-height: 1.5;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.info-row {
  padding: 12px 0;
  border-bottom: 1px solid #edf0fa;
}

.info-row span,
.notes-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-row strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.notes-box {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.notes-box p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.review-form {
  display: grid;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .field-grid,
  .detail-grid,
  .metrics-row,
  .inbox-grid,
  .block-form,
  .device-item,
  .account-form,
  .reset-password-form,
  .user-item,
  .party-type-grid,
  .package-grid,
  .package-select-row {
    grid-template-columns: 1fr;
  }

  .option-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-heading,
  .inbox-title-row,
  .block-heading,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .booking-shell,
  .admin-shell {
    width: min(100% - 18px, 1280px);
    margin-top: 10px;
  }

  .form-card,
  .detail-panel,
  .login-panel,
  .block-panel,
  .device-panel {
    padding: 20px;
  }

  .option-group {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .header-actions,
  .device-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .booking-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .row-meta {
    min-width: 0;
    text-align: left;
  }
}
