/* "Needs you" list on the workspace page, in the same plain style as the workspace rows. */
.secretary {
  max-width: 720px;
  margin: 0 0 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px #17202e0a, 0 10px 28px #17202e12;
}
.secretary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px 0; }
.secretary-head h2 { margin: 0; font: 700 17px/1.3 "Space Grotesk", Inter, "Segoe UI", sans-serif; letter-spacing: -.01em; color: var(--ink); }
.secretary-count { margin-left: 4px; color: var(--amber); font-variant-numeric: tabular-nums; }
.secretary-summary { margin: 6px 24px 14px; color: #3d4652; font-size: 14px; line-height: 1.55; }
.secretary.loading .secretary-summary { color: var(--muted); }
.secretary-refresh { padding: 4px 0; border: 0; background: none; color: var(--blue); font-size: 12px; font-weight: 600; cursor: pointer; }
.secretary-refresh:hover { text-decoration: underline; }

.secretary-items { list-style: none; margin: 0; padding: 0; }
.secretary-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  align-items: center; gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
}
.secretary-dot { align-self: start; margin-top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #b1b8c0; }
.secretary-item.urgent .secretary-dot { background: var(--red); }
.secretary-item.due .secretary-dot { background: #d29a2a; }
.secretary-item.pattern .secretary-dot { background: #8a93a0; }
.secretary-item.shortcut .secretary-dot { background: var(--blue); }
.secretary-text { min-width: 0; }
.secretary-text strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.secretary-text small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.secretary-action { color: var(--blue); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.secretary-action:hover { text-decoration: underline; }
.secretary-done { padding: 4px 8px; border: 1px solid #d5dae0; border-radius: 8px; background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; }
.secretary-done:hover { border-color: #b6bec7; color: var(--ink); }
.secretary-item.leaving { opacity: 0; transition: opacity .2s; }

.secretary-clear { margin: 0; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--green); font-size: 13px; }
.secretary-foot { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 10px 24px 14px; border-top: 1px solid var(--line); color: #8a929b; font-size: 12px; }
.secretary-foot:empty, .secretary-foot:has(> :is([hidden], :empty):only-child) { display: none; }

@media (max-width: 700px) {
  .secretary-head, .secretary-item, .secretary-clear, .secretary-foot { padding-inline: 16px; }
  .secretary-summary { margin-inline: 16px; }
  .secretary-item { grid-template-columns: 8px minmax(0, 1fr) auto; row-gap: 6px; }
  .secretary-action { grid-column: 2; grid-row: 2; }
  .secretary-done { grid-column: 3; grid-row: 1; }
}

/* Buttons: one quiet outlined style, one filled for the main action. */
.sec-button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
  border: 1px solid #d5dbe3; border-radius: 9px; background: #fff; color: #3b4552;
  font: 600 12.5px/1 Inter, "Segoe UI", sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s;
}
.sec-button:hover { background: #f5f7fa; border-color: #bcc5d0; color: var(--ink); text-decoration: none; }
.sec-button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.sec-button.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.sec-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.secretary-refresh.sec-button { padding: 0 10px; color: var(--muted); }

/* A flagged student: header, then one small card per day of the week. */
.student-week { display: block; padding: 16px 24px 18px; }
.student-week .secretary-dot { display: none; }
.student-week-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.student-week-who strong { display: block; font-size: 15px; font-weight: 650; color: var(--ink); }
.student-week-who small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.student-week-actions { display: flex; gap: 8px; }
.week-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-top: 12px; }
.day-box { padding: 7px 8px 8px; border: 1px solid #e6e9ee; border-radius: 10px; background: #fafbfc; }
.day-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11.5px; }
.day-label b { color: var(--ink); font-weight: 650; }
.day-marks { display: flex; flex-wrap: wrap; gap: 3px; }
.mark-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; }
.mark-icon svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mark-icon.present { background: #e3f6ea; color: #1f8a4c; }
.mark-icon.late { background: #fff3d6; color: #b07400; }
.mark-icon.absent { background: #fde8e4; color: #c2362a; }
.mark-icon.excused { opacity: .55; }
.secretary-more { margin: 0; padding: 12px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.secretary-more a { color: var(--blue); font-weight: 600; text-decoration: none; }
@media (max-width: 700px) {
  .student-week, .secretary-more { padding-inline: 16px; }
  .week-strip { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

/* Quick question box above the Needs-you card. */
.ask-card { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #dcd6fb; border-radius: 16px; background: linear-gradient(135deg, #f6f4ff, #eef4ff); }
.ask-card-form { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; background: #fff; border: 1px solid #d9dcf3; border-radius: 12px; box-shadow: 0 1px 2px #17202e0a; }
.ask-card-form:focus-within { border-color: #8f7be8; box-shadow: 0 0 0 3px #8f7be82a; }
.ask-card-spark { display: grid; color: #6d4fd8; }
.ask-card-spark svg { width: 18px; height: 18px; }
.ask-card-form input { flex: 1; min-width: 0; padding: 8px 2px; border: 0; outline: none; font: 15px/1.4 Inter, "Segoe UI", sans-serif; background: transparent; }
.ask-card-form .sec-button { min-height: 38px; padding: 0 18px; }
.ask-card-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ask-card-suggest button { padding: 6px 11px; border: 1px solid #d9dcf3; border-radius: 999px; background: #ffffffb3; color: #4a4f74; font: 500 12.5px Inter, sans-serif; cursor: pointer; }
.ask-card-suggest button:hover { background: #fff; color: #2d2a6e; border-color: #b8aef0; }

/* Compact week: name and buttons on one line, a small dot grid between them. */
.student-week { padding: 12px 24px; }
.student-week-head { display: grid; grid-template-columns: minmax(170px, 1fr) auto auto; align-items: center; gap: 8px 18px; }
.student-week-head .week-strip { display: block; margin: 0; }
.dot-grid { display: grid; grid-template-columns: minmax(0, 120px) repeat(var(--days), 12px); gap: 3px 4px; align-items: center; align-content: start; justify-content: start; }
.dot-day { font-size: 9.5px; font-weight: 700; color: #9aa4b0; text-align: center; line-height: 1; }
.dot-seder { font-size: 11.5px; color: #4a5462; text-align: right; overflow: hidden; white-space: nowrap; line-height: 12px; }
.dot { width: 11px; height: 11px; border-radius: 3px; background: #e7ebf0; justify-self: center; }
.dot.present { background: #39a865; }
.dot.late { background: #e3a21a; }
.dot.absent { background: #d6483b; }
.dot.excused { opacity: .35; }
.dot-more { margin: 4px 0 0; padding: 0; border: 0; background: none; color: var(--blue); font: 500 11px/1.4 Inter, sans-serif; white-space: nowrap; cursor: pointer; }
.dot-more:hover { text-decoration: underline; }

.secretary-legend { display: flex; gap: 12px; margin: 0; padding: 8px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.secretary-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
@media (max-width: 760px) {
  .student-week-head { grid-template-columns: 1fr auto; }
  .student-week-head .week-strip { grid-column: 1 / -1; grid-row: 2; }
}
.dot-day { font-size: 10.5px; }
.dot-day.shabbos { color: #6f7f96; }
/* Days that haven't happened yet. */
.dot-day.future { opacity: .35; }
.dot.future { background: transparent; box-shadow: inset 0 0 0 1px #e1e6ec; }
/* Other Sedorim: extra charts side by side under the student. */
.dot-extra { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 28px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e3e8ee; }
.dot-extra[hidden] { display: none; }
/* Week heat map (Cleverbees-style tinted squares, slanted Seder labels). */
.heat { margin-top: 6px; display: grid; grid-template-columns: 14px repeat(var(--cols), 15px); grid-template-rows: 66px; grid-auto-rows: 15px; gap: 1px; align-items: stretch; }
.heat-corner { grid-row: 1; height: 66px; }
.heat-label { position: relative; height: 66px; overflow: visible; }
.heat-label > span { position: absolute; left: 8px; bottom: 2px; transform-origin: 0 100%; transform: rotate(-62deg); white-space: nowrap; font-size: 10px; max-width: 76px; overflow: hidden; text-overflow: ellipsis; line-height: 1; color: #a7b0bb; }
.heat-label.problem > span { color: #2d3744; font-weight: 700; }
.heat > .heat-corner, .heat > .heat-label { grid-row: 1; align-self: end; }
.heat-day { font-size: 9.5px; font-weight: 700; color: #9aa4b0; display: grid; place-items: center; }
.heat-day.shabbos { color: #6f7f96; }
.heat-day.future { opacity: .35; }
.heat-cell { display: grid; place-items: center; border-radius: 2px; background: #eef1f4; font-size: 8.5px; font-weight: 700; line-height: 1; color: #7a4a00; }
.heat-cell.present { background: #bfe5c9; }
.heat-cell.late { background: #f6c86a; }
.heat-cell.absent { background: #ef9a8f; }
.heat-cell.excused { opacity: .45; }
.heat-cell.future { background: transparent; box-shadow: inset 0 0 0 1px #edf0f3; }
.secretary-item .secretary-chart { grid-column: 2 / -1; margin-top: 4px; }
/* The summary as short points. */
.secretary-points { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.secretary-points li { line-height: 1.5; }
.secretary-points li::marker { color: #9aa4b0; }
