/*
Hospice Rooster v1.5.5
Rustige mobiele interface.
*/

:root {
  --bg: #f7f5f0;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #687385;
  --line: #e4e0d8;
  --primary: #2563eb;
  --success: #047857;
  --warning: #b45309;
  --danger: #b91c1c;
  --neutral: #6b7280;
  --shadow: 0 10px 30px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

.page {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.login-card {
  margin-top: 12vh;
}

h1, h2, h3 {
  margin: 0 0 8px;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1rem;
  margin-top: 16px;
}

.muted {
  color: var(--muted);
  margin: 0 0 12px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0 18px;
}

.small-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.stack {
  display: grid;
  gap: 10px;
}

label {
  font-weight: 650;
}

input, button {
  width: 100%;
  font: inherit;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 13px 14px;
}

button {
  cursor: pointer;
  border: 0;
  font-weight: 750;
  background: #edf2f7;
}

.primary {
  background: var(--primary);
  color: white;
}

.secondary {
  background: #e0ecff;
  color: #123d80;
}

.warning {
  background: #fff1d6;
  color: var(--warning);
}

.danger-button {
  background: #fee2e2;
  color: var(--danger);
}

.big-danger {
  background: var(--danger);
  color: white;
  font-size: 1.3rem;
  padding: 18px;
}

.alert {
  padding: 13px 16px;
  border-radius: 16px;
  margin: 12px 0;
  font-weight: 650;
}

.success {
  background: #dcfce7;
  color: #166534;
}

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

.date-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
}

.date-nav a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  color: var(--text);
  text-decoration: none;
}

.date-nav a:last-child {
  text-align: center;
}

.slots {
  display: grid;
  gap: 14px;
}

.slot-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 0.9rem;
}

.badge.ok {
  background: #dcfce7;
  color: var(--success);
}

.badge.danger {
  background: #fee2e2;
  color: var(--danger);
}

.badge.neutral {
  background: #e5e7eb;
  color: var(--neutral);
}

.closed {
  opacity: 0.78;
}

.full {
  opacity: 0.82;
}

.notice {
  background: #fff7ed;
  color: #9a3412;
  padding: 10px 12px;
  border-radius: 14px;
}

.names {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: grid;
  gap: 8px;
}

.names li {
  background: #f3f4f6;
  padding: 10px 12px;
  border-radius: 13px;
}

.reserve-box {
  margin-top: 12px;
}

.reserve-box summary {
  cursor: pointer;
  background: #eef2ff;
  color: #3730a3;
  padding: 13px;
  border-radius: 14px;
  font-weight: 800;
}

.inline-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  align-items: end;
}

.grid-form.compact {
  grid-template-columns: repeat(4, 1fr);
  margin: 12px 0;
}

.grid-form label {
  display: grid;
  gap: 6px;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.button-row form {
  flex: 1 1 180px;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.admin-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #f9fafb;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 14px;
}

.admin-list form {
  width: auto;
}

button.small {
  width: auto;
  padding: 8px 10px;
  font-size: 0.9rem;
}

.audit {
  display: grid;
  gap: 10px;
}

.audit-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fafafa;
}

.audit-row span {
  display: inline-block;
  margin-right: 8px;
  color: var(--muted);
}

.audit-row p {
  margin: 6px 0 0;
}

.footer {
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  padding: 26px 0 10px;
}

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

  .topbar {
    display: block;
  }

  .date-nav {
    grid-template-columns: 1fr;
  }

  .grid-form,
  .grid-form.compact {
    grid-template-columns: 1fr;
  }

  .admin-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-list form,
  .admin-list button {
    width: 100%;
  }
}


/* Hospice Rooster v1.5.5 additions */

.default-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.default-row {
  margin-top: 8px;
}

.default-list form + form {
  margin-bottom: 14px;
}

input[type="text"]::placeholder {
  color: #9ca3af;
}


/* Hospice Rooster v1.5.5 additions */

.date-picker-form {
  margin: 0;
}

.date-picker-form input[type="date"] {
  text-align: center;
  font-weight: 800;
  background: var(--card);
}


/* Hospice Rooster v1.5.5 additions */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tool-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fafafa;
}

.button-link {
  display: inline-block;
  width: 100%;
  text-align: center;
  border-radius: 14px;
  padding: 13px 14px;
  font-weight: 800;
  text-decoration: none;
}

.button-link.primary {
  background: var(--primary);
  color: white;
}

.button-link.secondary {
  background: #e0ecff;
  color: #123d80;
}

.danger-details {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.danger-details summary {
  cursor: pointer;
  font-weight: 850;
}

@media (max-width: 680px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}


/* Hospice Rooster v1.5.5 additions */

.info-box {
  background: #eff6ff;
  color: #1e3a8a;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 12px;
  margin: 12px 0;
}


/* Hospice Rooster v1.5.5 additions */

.day-note-public {
  background: #fff7ed;
  border-color: #fed7aa;
}

.day-note-public h2 {
  color: #9a3412;
}

.day-note-public p {
  white-space: pre-wrap;
  margin-bottom: 0;
}

textarea {
  width: 100%;
  font: inherit;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 13px 14px;
  resize: vertical;
}

.staff-add-form {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin: 10px 0 14px;
}


/* Hospice Rooster v1.5.5 additions */

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.checkbox-row input[type="checkbox"] {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.pinned-note-info {
  margin-bottom: 14px;
}


/* Hospice Rooster v1.5.5 additions */

.today-button {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  font-weight: 900;
}

@media (min-width: 681px) {
  .date-nav {
    grid-template-columns: 1fr auto 1fr auto;
  }
}
