* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  background: #f9f9f9;
  color: #333;
}

/* LOGIN SCREEN */
#login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 16px;
}

#login-screen h1 {
  font-size: 3rem;
  font-weight: 800;
}

#login-screen p {
  color: #666;
}

#google-signin-btn {
  padding: 12px 24px;
  background: #4285F4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

#google-signin-btn:hover {
  background: #2b6fd4;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #eee;
}

#signout-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}

/* ─── TOAST ─────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 99px;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
}

.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { background: #1DD1A1; }
.toast-error   { background: #FF6B6B; }
.toast-info    { background: #48DBFB; color: #333; }

/* ─── LOADER ─────────────────────────────── */
#global-loader {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #eee;
  border-top-color: #FF6B6B;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── TRACKER ───────────────────────────────────────── */
.month-heading {
  font-size: 1.5rem;
  font-weight: 800;
  padding: 24px 24px 8px;
  color: #333;
}

.tracker-section {
  margin: 16px;
  border: 2px solid #eee;
  border-radius: 16px;
  overflow: hidden;
}

.tracker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  border-radius: 0 0 12px 0;
}

.tracker-header-row,
.tracker-row {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  overflow-x: auto;
}

.activity-label {
  min-width: 90px;
  font-size: 0.75rem;
  color: #999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.day-header {
  min-width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  color: #bbb;
  flex-shrink: 0;
}

.day-num { font-weight: 600; color: #999; }
.day-label { color: #ccc; }

.day-cell {
  min-width: 28px;
  height: 28px;
  border: 2px solid #ddd;
  border-radius: 50%;
  margin: 3px 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.day-cell.clickable {
  cursor: pointer;
}

.day-cell.clickable:hover {
  transform: scale(1.15);
  border-color: #aaa;
}

.day-cell.marked {
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  color: #aaa;
  padding: 60px 24px;
}

/* ─── MONTH NAV ─────────────────────────────────────── */
#month-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

#current-month-label {
  font-size: 1rem;
  font-weight: 700;
  min-width: 120px;
  text-align: center;
}

#month-nav button {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#month-nav button:hover:not(:disabled) {
  background: #f0f0f0;
}

#month-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}