:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #162235;
  background: #f3f6fa;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

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

button,
input,
.button-link {
  font: inherit;
}

.page-shell {
  width: min(100% - 32px, 720px);
  margin: 0 auto;
  padding: 32px 0;
}

.page-shell--center {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.page-shell--wide {
  width: min(100% - 24px, 920px);
}

.card {
  width: 100%;
  padding: 28px;
  border: 1px solid #d8e0ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(22, 34, 53, 0.08);
}

.login-card {
  max-width: 460px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #2868c7;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin-top: 0;
  line-height: 1.3;
}

.muted {
  color: #64748b;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  color: #8a1f1f;
  background: #fff0f0;
}

label {
  display: block;
  margin: 18px 0 6px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #b8c4d3;
  border-radius: 10px;
  background: #fff;
}

input:focus {
  border-color: #2868c7;
  outline: 3px solid rgba(40, 104, 199, 0.16);
}

button {
  min-height: 46px;
  margin-top: 22px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #2868c7;
  font-weight: 700;
  cursor: pointer;
}

.button-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  color: #fff;
  background: #2868c7;
  font-weight: 700;
  text-decoration: none;
}

.button-secondary {
  margin-top: 0;
  color: #2868c7;
  background: #e9f1fc;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions form {
  margin: 0;
}

.month-heading {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.month-heading h2,
.month-period {
  margin-bottom: 0;
}

.month-nav {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  color: #2868c7;
  background: #e9f1fc;
  font-size: 2rem;
  line-height: 1;
  text-decoration: none;
}

.center {
  text-align: center;
}

.notice {
  margin: 22px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  color: #694f00;
  background: #fff8d8;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.summary-grid div {
  padding: 12px;
  border-radius: 12px;
  background: #f3f6fa;
  text-align: center;
}

.summary-grid strong,
.summary-grid span {
  display: block;
}

.summary-grid strong {
  font-size: 1.5rem;
}

.summary-grid span {
  color: #64748b;
  font-size: 0.82rem;
}

.day-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.day-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(170px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d8e0ea;
  border-radius: 14px;
  background: #fff;
}

.day-row--holiday {
  border-color: #f0c7c7;
  background: #fffafa;
}

.day-date,
.day-detail {
  display: grid;
  gap: 2px;
}

.day-detail {
  color: #475569;
  font-size: 0.9rem;
}

.holiday-name {
  color: #b42323;
  font-size: 0.82rem;
}

.status-badge {
  min-width: 46px;
  padding: 5px 10px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
}

.status-badge--missing {
  color: #5a6575;
  background: #eef1f5;
}

.status-badge--work {
  color: #166534;
  background: #dcfce7;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(20px, calc((100vw - 720px) / 2));
  border-bottom: 1px solid #d8e0ea;
  background: #fff;
}

.app-header h1 {
  margin-bottom: 0;
  font-size: 1.3rem;
}

@media (max-width: 560px) {
  .card {
    padding: 22px;
  }

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

  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions .button-link,
  .header-actions button {
    min-height: 40px;
    padding: 8px 12px;
  }

  .summary-grid {
    gap: 6px;
  }

  .day-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }

  .day-detail {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
