* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  color: #222;
  background: #f5f5f5;
}

.hidden {
  display: none !important;
}

/* --- Auth --- */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 360px;
}

.auth-card h1 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
}

.auth-card p {
  margin: 0 0 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.auth-card label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: #555;
}

.auth-card input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.auth-card button {
  width: 100%;
  padding: 0.6rem;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.auth-card button:hover {
  background: #0d47a1;
}

.btn-google {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  margin-bottom: 0;
}

.btn-google:hover {
  background: #f5f5f5;
}

.auth-divider {
  text-align: center;
  color: #999;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.auth-error {
  color: #c62828;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  min-height: 1.2em;
}

/* --- App header --- */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.app-header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.app-header .user {
  font-size: 0.85rem;
  color: #666;
  margin-right: 0.75rem;
}

.app-header button {
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.app-header button:hover {
  background: #eee;
}

.status-bar {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #666;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}

.status-bar.error {
  color: #c62828;
}

/* --- Calendar --- */

.calendar-wrap {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.month-label {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  flex: 1;
  text-align: center;
  min-width: 160px;
}

.nav-btn {
  padding: 0.45rem 0.85rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.nav-btn:hover {
  background: #eee;
}

.nav-btn--today {
  font-size: 0.85rem;
  margin-left: auto;
}

.month-calendar {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.weekday-label {
  padding: 0.5rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
}

.month-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.day-cell {
  min-height: 88px;
  padding: 6px 8px;
  border-right: 1px solid #e8e8e8;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
}

.day-cell:nth-child(7n) {
  border-right: none;
}

.day-cell--pad {
  background: #fafafa;
  min-height: 88px;
}

.day-cell--today {
  background: #fffde7;
  box-shadow: inset 0 0 0 2px #fbc02d;
}

.day-cell--has-data {
  background: #fafcff;
}

.day-date {
  font-size: 0.68rem;
  color: #aaa;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 5px;
}

.room-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.room-label {
  width: 22px;
  color: #888;
  flex-shrink: 0;
  font-size: 0.7rem;
}

.room-price {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  flex-grow: 1;
  font-size: 0.78rem;
}

.room-price.missing {
  color: #ccc;
  font-weight: 400;
}

.trend {
  width: 1em;
  text-align: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.trend.up {
  color: #c62828;
}

.trend.down {
  color: #2e7d32;
}

.trend.flat {
  color: #bbb;
}

@media (max-width: 700px) {
  .day-cell {
    min-height: 76px;
    padding: 4px 5px;
  }

  .room-row {
    font-size: 0.7rem;
  }

  .room-label {
    display: none;
  }

  .nav-btn--today {
    margin-left: 0;
    width: 100%;
  }
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}
