:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #e5e7eb;
  --line-soft: #f1f5f9;
  --text: #1e293b;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --amber: #d97706;
  --amber-strong: #b45309;
  --amber-soft: #fffbeb;
  --green: #15803d;
  --red: #dc2626;
  --shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
select,
input {
  font: inherit;
}

button,
a {
  align-items: center;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 0;
  border-radius: 7px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.22);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 650;
  justify-content: center;
  min-height: 34px;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
}

button:disabled {
  background: #cbd5e1;
  box-shadow: none;
  color: #f8fafc;
  cursor: not-allowed;
}

.secondary {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: none;
  color: var(--muted);
}

input,
select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-height: 38px;
  padding: 0.6rem 0.7rem;
}

input:focus,
select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  outline: none;
}

.shell {
  margin: 0 auto;
  max-width: 1600px;
  padding: 1.35rem 1.5rem 2rem;
}

.login-shell {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 48%, #f8fafc 100%);
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(320px, 560px) minmax(320px, 430px);
  min-height: 100vh;
  padding: 4rem;
  place-content: center;
}

.login-brand {
  display: grid;
  gap: 2.4rem;
}

.login-copy h2 {
  color: #292524;
  font-size: 2rem;
  line-height: 1.12;
  margin: 0 0 0.75rem;
}

.login-copy p {
  color: #78716c;
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  max-width: 460px;
}

.login-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.card-heading {
  margin-bottom: 1.3rem;
}

.card-heading h2 {
  font-size: 1.25rem;
  margin: 0;
}

.card-heading p {
  color: var(--muted-soft);
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 0.7rem;
}

.brand-lockup img {
  border-radius: 9px;
  height: 36px;
  object-fit: contain;
  width: 36px;
}

.brand-lockup.large img {
  border-radius: 12px;
  height: 58px;
  width: 58px;
}

.brand-lockup h1 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.brand-lockup.large h1 {
  font-size: 1.8rem;
}

.brand-lockup p {
  color: #78716c;
  font-size: 0.72rem;
  margin: 0.1rem 0 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.9rem;
  position: sticky;
  top: 0.75rem;
  z-index: 10;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.user-pill,
.date {
  background: #fafafa;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  min-height: 36px;
  padding: 0.45rem 0.7rem;
}

.user-pill {
  display: grid;
  gap: 0.05rem;
  text-align: right;
}

.user-pill strong {
  color: var(--text);
  font-size: 0.82rem;
}

.user-pill span {
  color: var(--amber);
  font-size: 0.64rem;
  font-weight: 800;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  margin-top: 1rem;
  padding: 1rem;
}

.alert {
  align-items: flex-start;
  border-radius: 9px;
  display: flex;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
}

.alert strong {
  flex: 0 0 auto;
  font-size: 0.82rem;
}

.alert span {
  font-size: 0.82rem;
  line-height: 1.4;
}

.error-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.section-title h2 {
  font-size: 1rem;
  margin: 0;
}

.section-title span {
  background: var(--amber-soft);
  border: 1px solid #fde68a;
  border-radius: 999px;
  color: var(--amber-strong);
  font-size: 0.72rem;
  font-weight: 750;
  padding: 0.35rem 0.65rem;
}

.stack {
  display: grid;
  gap: 0.75rem;
}

.stack label,
.reservation-controls label {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 650;
  gap: 0.35rem;
}

.reservation-controls {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 320px);
  margin-top: 0.85rem;
}

.label,
.muted {
  color: var(--muted);
}

.muted,
.contact-line {
  font-size: 0.72rem;
  line-height: 1.35;
}

.contact-line {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.stay-date {
  font-weight: 650;
}

.stay-journey {
  min-width: 178px;
}

.journey-track {
  background: #f1f5f9;
  border-radius: 999px;
  height: 7px;
  margin: 0.34rem 0 0.54rem;
  position: relative;
}

.journey-progress {
  animation: journey-load 0.75s ease-out both;
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 62%, #16a34a 100%);
  border-radius: 999px;
  display: block;
  height: 7px;
  max-width: 100%;
  min-width: 9px;
  transform-origin: left center;
}

.journey-dot {
  background: #ffffff;
  border: 2px solid #d97706;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  height: 13px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
}

.start-dot {
  left: -1px;
}

.end-dot {
  border-color: #16a34a;
  right: -1px;
}

.journey-paw {
  animation: paw-pop 0.45s ease-out 0.45s both;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.18);
  color: #b45309;
  font-size: 0.67rem;
  height: 19px;
  line-height: 18px;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 19px;
  z-index: 2;
}

.journey-labels {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.journey-labels span {
  color: var(--text);
  display: grid;
  font-size: 0.7rem;
  gap: 0.06rem;
  line-height: 1.2;
}

.journey-labels span:last-child {
  text-align: right;
}

.journey-labels strong {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-meta {
  align-items: center;
  color: var(--amber-strong);
  display: flex;
  font-size: 0.66rem;
  font-weight: 750;
  gap: 0.45rem;
  justify-content: space-between;
  margin-top: 0.38rem;
}

@keyframes journey-load {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes paw-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.check-button.compact {
  box-shadow: none;
  font-size: 0.74rem;
  min-height: 30px;
  min-width: 58px;
  padding: 0.38rem 0.48rem;
}

.check-button.checked {
  background: #16a34a;
}

.kpi-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0.9rem;
}

.kpi {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  display: grid;
  gap: 0.25rem;
  min-height: 72px;
  padding: 0.8rem;
}

.kpi span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
}

.kpi strong {
  font-size: 1.6rem;
}

.missing-kpi strong {
  color: var(--red);
}

.table-wrap {
  overflow-x: auto;
}

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

.reservation-table {
  margin-top: 0.9rem;
}

.reservation-table table {
  font-size: 0.78rem;
  min-width: 1040px;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 0.55rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fffaf0;
}

.reservation-table th:nth-child(1),
.reservation-table td:nth-child(1) {
  min-width: 150px;
}

.reservation-table th:nth-child(2),
.reservation-table th:nth-child(3),
.reservation-table th:nth-child(4),
.reservation-table td:nth-child(2),
.reservation-table td:nth-child(3),
.reservation-table td:nth-child(4) {
  padding-left: 0.28rem;
  padding-right: 0.28rem;
  text-align: center;
  width: 66px;
}

.reservation-table th:nth-child(5),
.reservation-table td:nth-child(5) {
  min-width: 210px;
}

.reservation-table th:nth-child(6),
.reservation-table td:nth-child(6) {
  min-width: 142px;
}

.notes-cell {
  color: #475569;
  max-width: 360px;
}

.dashboard-table {
  margin-top: 1rem;
}

.ok {
  color: var(--green);
  font-weight: 800;
}

.missing {
  color: var(--red);
  font-weight: 800;
}

@media (max-width: 920px) {
  .login-shell {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }

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

@media (max-width: 760px) {
  .shell {
    padding: 0.85rem;
  }

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

  .top-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .user-pill {
    text-align: left;
  }

  .reservation-controls {
    grid-template-columns: 1fr;
  }
}
