:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #64717a;
  --line: #d9e0e3;
  --surface: #ffffff;
  --page: #f4f1ec;
  --navy: #18354a;
  --teal: #0e7c7b;
  --free: #d8dde0;
  --option: #f3c744;
  --booked: #e45d4f;
  --shadow: 0 18px 60px rgba(31, 45, 53, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f5f1 0%, #eef5f4 100%);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 28px auto;
}

.workspace {
  background: var(--surface);
  border: 1px solid rgba(23, 32, 38, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  color: #fff;
  background: var(--navy);
}

.eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.legend span,
.status-line span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.dot-free {
  background: var(--free);
}

.dot-option {
  background: var(--option);
}

.dot-booked {
  background: var(--booked);
}

.query-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px minmax(150px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #c9d3d8;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  width: 100%;
  min-height: 220px;
  border: 1px solid #c9d3d8;
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  line-height: 1.55;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  opacity: 0.56;
  cursor: progress;
}

.summary {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.whatsapp-panel {
  padding: 20px 24px 22px;
  border-bottom: 1px solid var(--line);
  background: #f4f8f7;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 19px;
}

.eyebrow.dark {
  color: var(--teal);
}

.empty-state {
  color: var(--muted);
  padding: 24px;
  border: 1px dashed #bec9ce;
  border-radius: 8px;
  text-align: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.metric b {
  display: block;
  font-size: 24px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  margin: 18px 0 10px;
  font-size: 16px;
}

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

.boat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.boat-name {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.boat-name:hover {
  text-decoration: underline;
}

.boat-meta {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 104px;
  border-radius: 999px;
  padding: 7px 11px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.status-available {
  color: #263139;
  background: var(--free);
}

.status-option {
  color: #4b3a00;
  background: var(--option);
}

.status-booked {
  color: #fff;
  background: var(--booked);
}

.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eef6f2;
  color: #174331;
  font-weight: 750;
}

.notice.warn {
  background: #fff4d6;
  color: #5b4100;
}

@media (max-width: 760px) {
  .app-shell {
    width: 100%;
    margin: 0;
  }

  .workspace {
    min-height: 100vh;
    border-radius: 0;
  }

  .topbar,
  .query-bar {
    grid-template-columns: 1fr;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

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

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .status-pill {
    min-width: 0;
  }

}
