* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f3ee;
  color: #23281f;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #2f4d3a;
  color: white;
}

header h1 {
  font-size: 18px;
  margin: 0;
}

header .user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.auth-page main {
  max-width: 380px;
  margin: 80px auto;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

.swatch.free { background: #ffffff; border: 1px solid #ccc; }
.swatch.pending { background: repeating-linear-gradient(45deg, #f4c86a, #f4c86a 4px, #f9dfa8 4px, #f9dfa8 8px); }
.swatch.accepted { background: #4caf6a; }
.swatch.declined { background: #e05c5c; }
.swatch.blocked { background: #6b7f99; }

.months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.month {
  background: white;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.month h3 {
  margin: 0 0 10px;
  font-size: 15px;
  text-align: center;
  text-transform: capitalize;
}

.weekdays, .days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.weekdays div {
  font-size: 11px;
  text-align: center;
  color: #888;
  padding-bottom: 4px;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #ddd;
  background: white;
  cursor: default;
  user-select: none;
}

.day.blank {
  border: none;
  background: transparent;
}

.day.past {
  color: #bbb;
  background: #f0f0f0;
}

.day.free {
  cursor: pointer;
}

.day.free:hover {
  border-color: #2f4d3a;
}

.day.pending {
  background: repeating-linear-gradient(45deg, #f4c86a, #f4c86a 4px, #f9dfa8 4px, #f9dfa8 8px);
}

.day.accepted {
  background: #4caf6a;
  color: white;
  border-color: #4caf6a;
}

.day.declined {
  background: #e05c5c;
  color: white;
  border-color: #e05c5c;
}

.day.blocked {
  background: #6b7f99;
  color: white;
  border-color: #6b7f99;
}

.day.releasable {
  cursor: pointer;
}

.day.releasable:hover {
  opacity: 0.75;
}

.day.selected {
  outline: 2px solid #2f4d3a;
  outline-offset: 1px;
}

.request-panel {
  position: sticky;
  bottom: 0;
}

.request-panel label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #444;
}

.request-panel textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  margin-bottom: 10px;
}

.request-panel .actions {
  display: flex;
  gap: 10px;
}

button {
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.btn-primary {
  background: #2f4d3a;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
}

.btn-secondary {
  background: white;
  color: #2f4d3a;
  border: 1px solid #2f4d3a;
  border-radius: 6px;
  padding: 10px 16px;
}

.message {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.message.error {
  background: #fde8e8;
  color: #a12626;
}

.message.success {
  background: #e6f4ea;
  color: #216b3c;
}

form.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

form.stack input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.auth-page h2 {
  text-align: center;
}

.pending-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.pending-row:last-child {
  border-bottom: none;
}

.pending-row .actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pending-note {
  color: #666;
  font-size: 13px;
}

.auth-switch {
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #eee;
  font-size: 16px;
}

.tab.active {
  background: #333;
  color: white;
}
