/* ===========================================================================
   Today.
   ---------------------------------------------------------------------------
   The page people open to check in, so the hero carries the whole of that in
   one card: who you are, where the day stands, the four figures, and the two
   buttons. Everything else on the page is a summary and can wait below it.

   Same vocabulary as the rest of the app - apple.css tokens, Command's card
   radius and hairlines. Everything here is .atod-*.
   =========================================================================== */

.atod-grid { display: grid; gap: 16px; }

/* ---------------------------------------------------------------- hero --- */

.atod-hero {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.atod-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.atod-who { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 240px; }
.atod-name { color: var(--label); font-size: 19px; font-weight: 600; letter-spacing: -.3px; line-height: 1.2; }
.atod-role { color: var(--label-2); font-size: 13px; }
.atod-date { color: var(--label-3); font-size: 12px; margin-top: 2px; }

.atod-state { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.atod-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 700;
}
.atod-where { color: var(--label-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }

/* The headline figure: hours worked against hours expected. */
.atod-worked { display: flex; align-items: baseline; gap: 7px; margin-top: 18px; }
.atod-worked b { color: var(--label); font-size: 34px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.atod-worked span { color: var(--label-2); font-size: 13.5px; }

.atod-bar { margin-top: 12px; height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.atod-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #10b981, var(--accent));
  transition: width 1s cubic-bezier(.4, 0, .2, 1);
}
.atod-pct { color: var(--label-3); font-size: 11.5px; margin-top: 6px; }

/* The four figures. A grid, not a Bootstrap row, so they stay equal and the
   hairlines between them land in the right places at every width. */
.atod-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 20px 0 0; border-top: 1px solid var(--separator); padding-top: 16px;
}
.atod-stat { text-align: center; position: relative; }
.atod-stat + .atod-stat::before {
  content: ''; position: absolute; left: 0; top: 2px; bottom: 2px;
  border-left: 1px solid var(--separator);
}
.atod-stat b { display: block; color: var(--label); font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
.atod-stat span { color: var(--label-3); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; }

/* ------------------------------------------------------------- actions --- */

.atod-actions { display: flex; gap: 10px; margin-top: 20px; }
.atod-btn {
  flex: 1; height: 48px; border: 0; border-radius: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: -.1px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s, background .2s, box-shadow .2s;
}
.atod-in { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(4, 120, 87, .24); }
.atod-in:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.atod-out { background: var(--fill); color: var(--label); }
.atod-out:hover:not(:disabled) { background: var(--fill-2); transform: translateY(-1px); }
.atod-btn:active:not(:disabled) { transform: translateY(0) scale(.99); }
.atod-btn:disabled { background: var(--fill); color: var(--label-3); box-shadow: none; cursor: default; }

/* --------------------------------------------------------------- notes --- */
/* Replaces the stack of Bootstrap .alert blocks. Same words, quieter. */

.atod-note {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 14px; padding: 11px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.45;
  background: var(--fill); color: var(--label-2);
}
.atod-note i { font-size: 15px; line-height: 1.4; flex-shrink: 0; }
.atod-note.is-warn { background: rgba(255, 149, 0, .10); color: #9A5B00; }
.atod-note.is-good { background: rgba(52, 199, 89, .10); color: #1B7F3B; }

/* --------------------------------------------------------------- cards --- */

.atod-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.atod-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
}
.atod-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.atod-card-title { flex: 1; color: var(--label); font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.atod-link {
  border: 0; background: var(--accent-tint); color: var(--accent);
  border-radius: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 10px;
}
.atod-link:hover { background: var(--accent); color: #fff; }

.atod-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.atod-task { text-align: center; padding: 12px 4px; border-radius: 12px; background: var(--fill); }
.atod-task b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.03em; color: var(--label); }
.atod-task span { color: var(--label-2); font-size: 11.5px; }
.atod-task.t-prog b { color: var(--green); }
.atod-task.t-block b { color: var(--red); }
.atod-task.t-done b { color: var(--accent); }

/* ---------------------------------------------------------------- star --- */
/* Was a block of amber on amber. The gold now sits on the medal and the
   leader's name, and the rest is an ordinary card - it reads as a leaderboard
   rather than as a warning. */

.atod-seg { display: inline-flex; background: var(--fill); border-radius: 8px; padding: 2px; }
.atod-seg button {
  border: 0; background: transparent; color: var(--label-2);
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 6px;
}
.atod-seg button.on { background: var(--surface); color: var(--label); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

.atod-star-top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.atod-medal {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: linear-gradient(160deg, #FDE68A, #F59E0B);
  box-shadow: 0 4px 12px rgba(245, 158, 11, .3);
}
.atod-star-name { color: var(--label); font-size: 15px; font-weight: 600; }
.atod-star-sub { color: var(--label-2); font-size: 12.5px; margin-top: 1px; }

.atod-rank { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--separator); }
.atod-rank-n { color: var(--label-3); font-size: 12px; font-weight: 700; width: 16px; text-align: center; }
.atod-rank-name { flex: 1; min-width: 0; color: var(--label); font-size: 13.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atod-rank-meta { color: var(--label-3); font-size: 11.5px; white-space: nowrap; }
.atod-rank-score { color: var(--label); font-size: 13px; font-weight: 700; min-width: 26px; text-align: right; }
.atod-foot { color: var(--label-3); font-size: 11.5px; margin: 14px 0 0; line-height: 1.45; }

@media (max-width: 900px) {
  .atod-two { grid-template-columns: 1fr; }
  .atod-hero { padding: 18px 16px; }
  .atod-card { padding: 16px; }
  .atod-actions { flex-direction: column; }
  .atod-state { text-align: left; align-items: flex-start; width: 100%; }
}
@media (max-width: 560px) {
  .atod-stats { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
  /* With two per row the third cell starts a new row, so its divider would
     hang in mid-air. */
  .atod-stat:nth-child(odd)::before { border-left: 0; }
  .atod-tasks { grid-template-columns: repeat(2, 1fr); }
}
