* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f7f5;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 40px 16px;
}

main {
  max-width: 520px;
  width: 100%;
}

h1 {
  font-size: 2rem;
  color: #1a5c2e;
  margin-bottom: 4px;
}

h2 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 12px;
}

.subtitle {
  color: #666;
  margin-bottom: 24px;
  line-height: 1.4;
}

/* ── Login ─────────────────────────────────── */

.login-row {
  display: flex;
  gap: 8px;
}

.login-row input {
  flex: 1;
}

.login-row button {
  padding: 10px 20px;
  background: #1a5c2e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.login-row button:hover {
  background: #155024;
}

/* ── Dashboard ─────────────────────────────── */

.dashboard-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.dashboard-header span {
  font-weight: 600;
  color: #333;
}

.link-btn {
  background: none;
  border: none;
  color: #1a5c2e;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
}

/* ── Watches list ──────────────────────────── */

section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.watches-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-state {
  color: #999;
  font-size: 14px;
  text-align: center;
  padding: 12px;
}

.watch-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 14px;
  position: relative;
}

.watch-card .cabin-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.watch-card .cabin-name a {
  color: #1a5c2e;
  text-decoration: none;
}

.watch-card .cabin-name a:hover {
  text-decoration: underline;
}

.watch-card .watch-details {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.watch-card .watch-days {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.watch-card .day-dot {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: #e8e8e8;
  color: #999;
}

.watch-card .day-dot.on {
  background: #d4edda;
  color: #1a5c2e;
}

.watch-card .watch-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 6px;
}

.watch-card .watch-actions button {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #666;
}

.watch-card .watch-actions button:hover {
  background: #f5f5f5;
}

.watch-card .watch-actions .delete-btn:hover {
  background: #fce4ec;
  color: #b71c1c;
  border-color: #f5c6cb;
}

.watch-card.inactive {
  opacity: 0.5;
}

.email-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #666;
  cursor: pointer;
}

.email-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1a5c2e;
}

.watch-avail {
  margin-top: 10px;
}

.check-avail-btn {
  background: none;
  border: 1px solid #1a5c2e;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  color: #1a5c2e;
  cursor: pointer;
  font-weight: 500;
}

.check-avail-btn:hover {
  background: #f0f7f2;
}

.avail-loading {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

.avail-results {
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 6px;
}

.avail-results.open {
  background: #e8f5e9;
  color: #1a5c2e;
}

.avail-results.full {
  background: #fff3e0;
  color: #e65100;
}

/* ── Form ──────────────────────────────────── */

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  margin-top: 16px;
}

label:first-of-type {
  margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="date"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: #1a5c2e;
}

.cabin-picker {
  position: relative;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  list-style: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown li:last-child {
  border-bottom: none;
}

.dropdown li:hover {
  background: #f0f7f2;
}

.dropdown li .parent {
  display: block;
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-row input {
  flex: 1;
}

.date-row span {
  color: #888;
  font-size: 14px;
}

/* ── Day of week picker ────────────────────── */

.dow-picker {
  display: flex;
  gap: 6px;
}

.dow-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #999;
  transition: all 0.15s;
}

.dow-btn.active {
  background: #1a5c2e;
  color: white;
  border-color: #1a5c2e;
}

.dow-btn:hover {
  border-color: #1a5c2e;
}

.hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

button[type="submit"] {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #1a5c2e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

button[type="submit"]:hover {
  background: #155024;
}

button[type="submit"]:disabled {
  background: #999;
  cursor: not-allowed;
}

/* ── Toast ─────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a5c2e;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.toast.error {
  background: #b71c1c;
}

footer {
  margin-top: 24px;
  text-align: center;
  color: #999;
  font-size: 13px;
  line-height: 1.5;
}
