:root {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #0f172a;
  background-color: #f7f9fb;
  --primary: #0ea5e9;
  --secondary: #38bdf8;
  --surface: #ffffff;
  --border: #e2e8f0;
  --muted: #64748b;
  --danger: #f87171;
  --accent: #14b8a6;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eff6ff;
}


.offline-banner {
  background: #f59e0b;
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.offline-banner[hidden] {
  display: none;
}

body.is-offline .editor-controls,
body.is-offline .add-form,
body.is-offline .ai-assist,
body.is-offline .editor-table-wrapper input,
body.is-offline .editor-table-wrapper textarea,
body.is-offline .editor-table-wrapper select,
body.is-offline .editor-table-wrapper button {
  opacity: 0.75;
  filter: grayscale(0.25);
}

.app-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem;
}


.app-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}



.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
}

.hero-copy,
.hero-media {
  position: relative;
  z-index: 1;
}

.hero-copy {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.hero-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hero-tags span {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.hero-media {
  flex: 0 0 320px;
  max-width: 360px;
  align-self: stretch;
  border-radius: 1.4rem;
  overflow: hidden;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.35);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-credit {
  position: absolute;
  bottom: 0.6rem;
  right: 0.9rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3rem);
  color: #0f172a;
}

.lede {
  margin: 0.35rem 0 0;
  color: #6b4b61;
  max-width: 45ch;
}

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

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

button {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

button.secondary {
  background: #e0f2fe;
  color: #0369a1;
  border: none;
}

button:active {
  transform: scale(0.98);
}

.file-input {
  position: relative;
  overflow: hidden;
}

.file-input input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.app-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.app-nav button {
  border-radius: 0.9rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: #475569;
}

.app-nav button.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.panel {
  display: none;
}

.panel.visible {
  display: block;
}

#overview {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
  align-items: stretch;
}

.info-row .card {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.traveler-card ul {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.traveler-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.traveler-name {
  font-weight: 600;
}

.traveler-actions {
  display: flex;
  gap: 0.25rem;
  min-width: 150px;
  justify-content: flex-end;
}

.help-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.help-link-button {
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: #0f172a;
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 0.28rem 0.8rem;
  cursor: pointer;
}

.help-link-button:hover,
.help-link-button:focus-visible {
  background: #e0f2fe;
}

.chip-button {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #0f172a;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
}

.lodging-card ul {
  padding: 0;
  list-style: none;
  margin: 0.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}


.week-day-column {
  border: 1px solid #d6d9e0;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}


.chip-button--disabled {
  background: #e2e8f0;
  border-color: #cbd5f5;
  color: #94a3b8;
  cursor: not-allowed;
}

.chip-button:hover,
.chip-button:focus-visible {
  border-color: var(--primary);
}

.chip-button--disabled:hover,
.chip-button--disabled:focus-visible {
  border-color: #cbd5f5;
}



.chip-button--disabled {
  background: #e2e8f0;
  border-color: #cbd5f5;
  color: #94a3b8;
  cursor: not-allowed;
}

.chip-button:hover,
.chip-button:focus-visible {
  border-color: var(--primary);
}

.chip-button--disabled:hover,
.chip-button--disabled:focus-visible {
  border-color: #cbd5f5;
}

.qr-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}


.card.compact-card {
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.card.compact-card h3 {
  font-size: 0.95rem;
  margin: 0 0 0.3rem;
}

.card.compact-card ul {
  padding-left: 1rem;
  margin: 0.1rem 0 0;
}

.lodging-card ul {
  padding: 0;
  list-style: none;
  margin: 0.35rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.lodging-card li {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.7rem;
}

.lodging-card li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.lodging-name {
  margin: 0;
  font-weight: 600;
}

.lodging-dates {
  margin: 0.15rem 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.lodging-address {
  margin: 0;
  font-size: 0.92rem;
  color: #0f172a;
}

.lodging-address a {
  color: #1d4ed8;
  text-decoration: underline;
}

.lodging-guide {
  margin: 0.3rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lodging-guide-button {
  border: none;
  background: transparent;
  color: #0369a1;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.lodging-guide-button:empty {
  display: none;
}

.lodging-guide-button:hover,
.lodging-guide-button:focus-visible {
  color: #0f172a;
}

.lodging-key-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 0.9rem;
  color: #0f172a;
  text-decoration: none;
  cursor: pointer;
}

.lodging-key-link:hover,
.lodging-key-link:focus-visible {
  border-color: var(--primary);
}


.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  color: #0f172a;
}

.card-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #0f172a;
}

.muted {

  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}


.week-calendar-card {
  padding: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 1.3rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  color: #0f172a;
  margin-bottom: 2rem;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}


.week-day-column {
  border: 1px solid #d6d9e0;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.week-day-column .airbnb-chip {
  margin-top: auto;
}

.week-day-column header {
  border-radius: 0.8rem;
  background: linear-gradient(130deg, #eef2ff, #fdf2f8);
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
}



.week-day-column {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 320px;
  box-shadow: 0 20px 30px rgba(250, 204, 248, 0.2);
}


.week-day-column header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.week-day-index {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #475569;
  margin: 0;
  font-weight: 600;
}

.week-day-column h4 {
  margin: 0.15rem 0 0.1rem;
  font-size: 1.05rem;
  color: #0f172a;
}

.week-day-column p {
  margin: 0;
  font-size: 0.95rem;
  color: #1e293b;
}

.week-task-list {
  list-style: none;
  margin: 0;
  padding: 0.85rem 1rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 250px;
  overflow-y: auto;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.week-task-list::-webkit-scrollbar {
  width: 6px;
}

.week-task-list::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.week-task-list::-webkit-scrollbar-track {
  background: transparent;
}


.week-task {
  display: flex;
  gap: 0.45rem;
  font-size: 1rem;
  color: #0f172a;
  line-height: 1.5;
}

.week-task .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.35rem;
  background: var(--muted);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #f1f5f9;
}

.week-task .text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  color: #0f172a;
}

.week-task .time {
  font-weight: 700;
  color: #0f172a;
}

.week-task.done .dot {
  background: #34d399;
}

.week-task.in-progress .dot {
  background: #fcd34d;
}

.week-task.pending .dot {
  background: #c4b5fd;
}

.week-day-column.complete {
  border-color: #86efac;
  background: #ecfccb;
  box-shadow: 0 15px 30px rgba(34, 197, 94, 0.18);
}

.week-day-column.active {
  background: linear-gradient(145deg, #fff5f7, #fef3c7);
  border-color: #fcd34d;
  box-shadow: 0 15px 30px rgba(250, 204, 21, 0.18);
}

.week-day-column.upcoming {
  background: linear-gradient(145deg, #f5f3ff, #ede9fe);
  border-color: #ddd6fe;
}

[data-view="editor"] .info-row,
[data-view="editor"] .week-calendar-card {
  display: none;
}

.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

.qr-modal[data-visible="true"] {
  display: flex;
}

.qr-modal__content {
  background: #ffffff;
  border-radius: 1.35rem;
  padding: 1.75rem;
  max-width: 460px;
  width: min(92vw, 460px);
  text-align: center;
  position: relative;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3);
  border: 1px solid #dbeafe;
}

.qr-modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #475569;
}

.qr-modal img {
  width: 100%;
  height: auto;
  border-radius: 0.85rem;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.qr-modal p {
  margin: 1rem 0 0;
  font-weight: 600;
  color: #0f172a;
}

.help-modal__content {
  background: linear-gradient(180deg, #ffffff, #f4f8ff);
  border-radius: 1.4rem;
  padding: 2rem;
  width: min(95vw, 560px);
  max-height: 85vh;
  text-align: left;
  border: 1px solid #dbeafe;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
  color: #0f172a;
}

.help-modal__content h3 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.help-modal__content img {
  display: none;
}

.help-modal__body {
  text-align: left;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 0.75rem;
  line-height: 1.6;
}

.help-modal__body::-webkit-scrollbar {
  width: 6px;
}

.help-modal__body::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.help-modal__body p {
  margin: 0.4rem 0;
}

.help-modal__body ol,
.help-modal__body ul {
  padding-left: 1.2rem;
}

.help-modal__body li {
  margin-bottom: 0.25rem;
}

.help-modal__body a {
  color: var(--primary);
  text-decoration: underline;
}

.help-section-title {
  font-weight: 700;
  margin: 1rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0f172a;
}

.help-note {
  margin-top: 1rem;
  font-style: italic;
  color: #475569;
  background: #f1f5f9;
  border-left: 3px solid #94a3b8;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.editor-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.editor-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}

.editor-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: #0f172a;
}

.editor-controls select {
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.45rem 0.75rem;
  background: #f8fafc;
}

.editor-controls__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
}

.sync-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  min-height: 1rem;
}

.sync-status[data-state="success"] {
  color: #059669;
}

.sync-status[data-state="error"] {
  color: var(--danger);
}

.sync-status[data-state="info"] {
  color: #0284c7;
}


.editor-table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  overflow-x: auto;
}

.editor-table-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.editor-table-wrapper th,
.editor-table-wrapper td {
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.editor-table-wrapper th {
  font-size: 0.9rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.editor-table-wrapper tr:last-child td {
  border-bottom: none;
}

#editorTableBody input,
#editorTableBody textarea,
#editorTableBody select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.45rem 0.6rem;
  background: #f8fafc;
  font-size: 0.95rem;
}

#editorTableBody textarea {
  min-height: 60px;
  resize: vertical;
}


.add-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.add-form h3 {
  margin: 0;
  color: #0f172a;
}

.add-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.75rem;
}

.add-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
}

.add-form input,
.add-form select {
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.5rem 0.65rem;
  background: #f8fafc;
}

.ai-assist {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.ai-assist--compact {
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
}

.ai-assist__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.ai-assist__eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.ai-assist__compact-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.ai-assist__prompt {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
}

.ai-assist__prompt textarea {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
  min-height: 90px;
  resize: vertical;
  font-size: 0.95rem;
  font-weight: 400;
}

.ai-assist__actions {
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
}

.ai-assist__status-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ai-status {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}


.ai-assist__header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.ai-assist__eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.ai-assist__lede {
  margin: 0.2rem 0 0;
  color: #475569;
}


.ai-assist__hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.ai-assist__hint[data-state="error"] {
  color: var(--danger);
}

.ai-assist__hint[data-state="success"] {
  color: #10b981;
}

.ai-assist__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.ai-status {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

.ai-status[data-state="success"] {
  color: #0f9d58;
}

.ai-status[data-state="error"] {
  color: var(--danger);
}

.ai-status[data-state="info"] {
  color: #0284c7;
}

.ai-status--key {
  font-size: 0.78rem;
  color: var(--muted);
}

.ai-preview {
  border: 1px dashed var(--border);
  border-radius: 1rem;
  padding: 1rem;
  background: #f8fafc;
}

.ai-preview h4 {
  margin: 0 0 0.5rem;
}

.ai-preview ol {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-preview__item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.ai-preview__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ai-preview__time {
  font-weight: 700;
  color: #0f172a;
}

.ai-preview__label {
  margin: 0;
  font-weight: 600;
}

.ai-preview__type {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-preview__status {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 700px) {
  .info-row {
    flex-direction: column;
  }

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

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
