/* Basic reset */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Status page */
.status-page {
  width: 100vw;
  height: 100vh;
  cursor: pointer;
}

.status-green { background: #2e7d32; }
.status-yellow { background: #f9a825; }
.status-red { background: #c62828; }

/* Dashboard page */
.dashboard-page {
  background: #ffffff;
  overflow: hidden;
}

.toolbar {
  position: fixed;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.iconBtn {
  font-size: 22px;
  line-height: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.iconBtn:active {
  transform: scale(0.98);
}

.rows {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 58px; /* leave room for toolbar */
  box-sizing: border-box;
}

.taskRow {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px 28px;
  box-sizing: border-box;
}

.taskBtn {
  font-size: 76px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 10px;
  border-radius: 16px;
}

.taskBtn:focus-visible {
  outline: 3px solid #222;
  outline-offset: 3px;
}

.taskBtn:active {
  transform: scale(0.96);
}

/* Overlay + modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
  z-index: 100;
}

.hidden {
  display: none !important;
}

.modal {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
  padding: 16px;
  box-sizing: border-box;
}

.login-modal {
  width: min(520px, 100%);
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modalHeader h2 {
  margin: 0;
  font-size: 18px;
}

.modalBody {
  padding-bottom: 8px;
}

.section {
  margin: 14px 0 18px;
}

.sectionTitle {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #222;
}

.smallNote {
  margin: 6px 0 0 0;
  color: #555;
  font-size: 13px;
}

.taskList {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
}

.taskListItem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.taskListItem:last-child {
  border-bottom: none;
}

.taskMeta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.taskTitle {
  font-size: 14px;
  font-weight: 600;
}

.taskSub {
  font-size: 12px;
  color: #666;
}

.taskEmoji {
  font-size: 22px;
  width: 34px;
  text-align: center;
}

.taskActions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.smallBtn {
  font-size: 12px;
  padding: 7px 10px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.smallBtn:active {
  transform: scale(0.98);
}

.smallBtn.danger {
  border-color: #d32f2f;
  color: #d32f2f;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.fieldLabel {
  font-size: 12px;
  font-weight: 700;
  color: #333;
}

input[type="text"], input[type="password"], select {
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
}

.daysGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dayChip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  border: 1px solid #ddd;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.dayChip input {
  transform: scale(1.1);
}

.rowBtns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 12px;
}

.primaryBtn {
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
}

.primaryBtn:active {
  transform: scale(0.98);
}

.errorText {
  color: #d32f2f;
  font-size: 13px;
  margin: 10px 0 0;
}

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ddd;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #999;
}

.dot.green { background: #2e7d32; }
.dot.yellow { background: #f9a825; }
.dot.red { background: #c62828; }

@media (max-width: 480px) {
  .taskBtn { font-size: 66px; }
  .taskListItem { grid-template-columns: auto 1fr; }
  .taskActions { grid-column: 1 / -1; justify-content: flex-start; }
}
