*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f6f8;
  color: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.6;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.page-subtitle {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.logout-btn {
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 4px;
  font-size: 13px;
  color: #666;
}

.meta-bar p {
  margin: 0;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.month-nav__label {
  margin: 0;
  min-width: 120px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.month-nav__btn {
  width: 40px;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #333;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.month-nav__btn:hover,
.logout-btn:hover {
  background: #f0f0f0;
}

.page-footer {
  margin-top: 14px;
}

.status-message {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 14px;
}

.status-message--error {
  background: #fee2e2;
  color: #991b1b;
}

.scroll-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: #666;
}

.table-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.availability-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.availability-table th,
.availability-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  text-align: center;
  font-size: 14px;
  white-space: nowrap;
}

.availability-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #fafafa;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
}

.availability-table thead th:nth-child(even) {
  background: #f3f6fb;
}

.availability-table tbody td:nth-child(even) {
  background: #fbfcff;
}

.availability-table .col-date {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  text-align: left;
  min-width: 100px;
  font-weight: 700;
  box-shadow: 4px 0 8px rgba(0, 0, 0, 0.04);
}

.availability-table thead .col-date {
  z-index: 5;
  background: #fafafa;
}

.availability-table td.cell-unknown {
  background: #f9fafb;
}

.availability-table tbody td.cell-unknown:nth-child(even) {
  background: #f1f5f9;
}

.status-label {
  display: inline-block;
  min-width: 52px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-label--ok {
  background: #dcfce7;
  color: #166534;
}

.status-label--ng {
  background: #fee2e2;
  color: #991b1b;
}

.status-label--unknown {
  background: #f3f4f6;
  color: #6b7280;
}

.price-label {
  display: block;
  margin-top: 4px;
  color: #4b5563;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.login-card h1 {
  margin: 0;
  font-size: 24px;
}

.login-lead {
  margin: 8px 0 20px;
  color: #666;
  font-size: 14px;
}

.login-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
}

.login-card button {
  width: 100%;
  margin-top: 16px;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: #1f2937;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.login-error {
  margin: 12px 0 0;
  color: #991b1b;
  font-size: 14px;
}

@media (max-width: 767px) {
  .page {
    padding: 16px 12px 32px;
  }

  .table-wrap {
    max-height: calc(100vh - 190px);
  }

  .page-title {
    font-size: 20px;
  }

  .scroll-hint {
    display: block;
  }

  .availability-table th,
  .availability-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .availability-table .col-date {
    min-width: 88px;
  }

  .status-label {
    min-width: 48px;
    padding: 4px 6px;
    font-size: 11px;
  }

  .price-label {
    font-size: 10px;
  }
}

@media (min-width: 768px) {
  .scroll-hint {
    display: none;
  }
}
