/*
 * Warm Bento skin — loaded after ivy-ui.css / ivy-portal.css on every shell.
 * Cream→butter gradient canvas, frosted white bento cards, dark pill navigation,
 * a yellow accent and one dark "focus" card per page. Tokens first, chrome second,
 * then the student/teacher dashboard components (.bento-*).
 */
:root {
  --wb-ink: #1c1c1e;
  --wb-ink-2: #2b2b2e;
  --wb-muted: #6c6c72;
  --wb-line: rgb(28 28 30 / 0.1);
  --wb-yellow: #fbd24d;
  --wb-yellow-soft: #fde98f;
  --wb-card: rgb(255 255 255 / 0.66);
  --wb-card-solid: #fffdf5;
  --wb-card-border: rgb(255 255 255 / 0.9);
  --wb-shadow: 0 14px 36px rgb(120 96 20 / 0.1);
  --wb-radius: 28px;

  --ui-canvas: #f6f3ea;
  --ui-surface: #fffdf7;
  --ui-surface-subtle: #f6f2e4;
  --ui-text: var(--wb-ink);
  --ui-text-muted: var(--wb-muted);
  --ui-border: #ebe5d2;
  --ui-border-strong: #d9d1b8;
  --ui-brand: #1c1c1e;
  --ui-brand-strong: #000;
  --ui-warning-soft: #fff4c7;
  --ui-radius-sm: 14px;
  --ui-radius-md: 20px;
  --ui-radius-lg: var(--wb-radius);
  --ui-shadow-float: var(--wb-shadow);
  --crimson-soft: #fdeceb;
  --warm: #f6f2e4;
}

html {
  background: #f1eee2;
}

html body,
html body[data-ui] {
  min-height: 100dvh;
  color: var(--wb-ink);
  background:
    radial-gradient(70rem 46rem at 100% 100%, rgb(253 232 130 / 0.75), transparent 62%),
    radial-gradient(60rem 40rem at 0% 0%, rgb(226 226 230 / 0.9), transparent 60%),
    linear-gradient(150deg, #ebeae7 0%, #f3f0e2 55%, #faefba 100%);
  background-attachment: fixed;
}

:focus-visible {
  outline: 3px solid var(--wb-ink);
  outline-offset: 2px;
}

/* ---------- top bar: outlined logo pill · nav pill · round tools ---------- */
.brand-bar {
  top: 14px;
  width: min(1440px, calc(100% - 32px));
  padding: 0;
  color: var(--wb-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ui-brand-link {
  padding: 10px 22px;
  color: var(--wb-ink);
  border: 1px solid var(--wb-ink);
  border-radius: 999px;
}

.brand-name {
  color: var(--wb-ink);
  letter-spacing: 0.12em;
}

.brand-tagline {
  display: none;
}

.brand-shield {
  display: none;
}

.nav-links {
  gap: 2px;
  padding: 6px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
  box-shadow: var(--wb-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand-bar .nav-link,
.brand-bar .ui-profile-link,
.brand-bar .ui-nav-toggle {
  color: var(--wb-ink);
  background: transparent;
  border-radius: 999px;
}

.brand-bar .nav-link:hover,
.brand-bar .ui-profile-link:hover {
  background: rgb(28 28 30 / 0.07);
}

.brand-bar .nav-link[aria-current="page"],
.brand-bar .nav-link.active,
.brand-bar .nav-link.is-active {
  color: #fff;
  background: var(--wb-ink);
}

.ui-account-actions {
  padding: 6px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
  box-shadow: var(--wb-shadow);
}

.brand-bar .ui-nav-menu {
  color: var(--wb-ink);
  background: rgb(255 253 245 / 0.96);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--ui-radius-md);
  box-shadow: 0 18px 44px rgb(60 48 10 / 0.18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* ---------- surfaces ---------- */
.card,
.ui-card,
.panel,
.ui-form-card,
.ui-table-shell,
.ui-workspace-section,
.ui-priority-panel,
.ui-modal-card,
.ui-empty-state,
.ui-error-state,
.ui-login-card {
  background: var(--wb-card);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.ui-login-card {
  background: rgb(255 255 255 / 0.8);
}

.ui-page-title,
.ui-page-header h1,
.page-title {
  color: var(--wb-ink);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.ui-eyebrow,
.sec-title,
.ui-section-title {
  color: var(--wb-muted);
}

.ui-page-subtitle {
  color: var(--wb-muted);
}

/* ---------- KPI strip → soft tiles with light numerals ---------- */
.ui-summary-strip {
  overflow: visible;
  gap: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ui-summary-item,
.ui-summary-item:last-child {
  background: var(--wb-card);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--wb-shadow);
}

.ui-summary-item:first-child {
  background: var(--wb-yellow);
  border-color: var(--wb-yellow);
}

.ui-summary-item div,
.ui-summary-item p,
.ui-summary-item strong {
  color: inherit !important;
}

.ui-summary-item .ui-summary-label,
.ui-summary-item .summary-label,
.ui-summary-item div.text-xs {
  color: var(--wb-muted) !important;
}

.ui-summary-item:first-child .ui-summary-label,
.ui-summary-item:first-child .summary-label,
.ui-summary-item:first-child div.text-xs {
  color: rgb(28 28 30 / 0.7) !important;
}

.ui-summary-item .ui-summary-value,
.ui-summary-item .summary-value {
  color: var(--wb-ink) !important;
  font-weight: 300;
}

/* ---------- actions ---------- */
.ui-button-primary,
.btn-crimson,
.btn-navy,
[data-ui="student-shell"] .btn,
.student-primary-action {
  color: #fff;
  background: var(--wb-ink);
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.ui-button-primary:hover,
.btn-crimson:hover,
.btn-navy:hover,
[data-ui="student-shell"] .btn:hover {
  background: #000;
}

.ui-button-secondary,
.btn-outline,
[data-ui="student-shell"] .btn-outline {
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.7);
  border: 1px solid var(--wb-line);
  border-radius: 999px;
}

.tag,
.status-chip,
.ui-pill {
  border-radius: 999px;
}

/* ---------- tabs ---------- */
.ui-tabs,
.tab-rail {
  gap: 2px;
}

.ui-tab,
.tab-rail .tab {
  color: var(--wb-ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
}

.ui-tab[aria-current="page"],
.ui-tab.active,
.tab-rail .tab.active,
.tab-rail .tab[aria-selected="true"] {
  color: #fff;
  background: var(--wb-ink);
}

/* ---------- legibility helpers ---------- */
.ui-page-header > div:first-child p,
.ui-page-header > div:first-child p * {
  color: var(--wb-muted) !important;
}

.ui-page-header > div:first-child h1,
.ui-page-header > div:first-child .page-title {
  color: var(--wb-ink) !important;
}

.progress {
  background: rgb(28 28 30 / 0.08);
  border-radius: 999px;
}

.progress > span {
  background: var(--wb-ink);
  border-radius: 999px;
}

/* ---------- login ---------- */
.ui-login-card h1 {
  color: var(--wb-ink);
  font-weight: 300;
}

.ui-login-eyebrow {
  color: var(--wb-muted);
}

.ui-login-roles li {
  background: rgb(255 255 255 / 0.7);
  border-color: var(--wb-line);
}

.ui-login-roles strong {
  color: var(--wb-ink);
}

.ui-login-form .ui-button-primary {
  border-radius: 999px;
}

.ui-login-footer {
  color: var(--wb-muted);
}

@media (prefers-reduced-transparency: reduce) {
  .card,
  .ui-card,
  .panel,
  .nav-links,
  .ui-account-actions,
  .bento-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--wb-card-solid);
  }
}

/* ======================================================================
 * Student portal chrome
 * ==================================================================== */
[data-ui="student-shell"] .topbar {
  background: transparent;
  border: 0;
  color: var(--wb-ink);
}

.student-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.student-bar .bar-logo {
  padding: 10px 22px;
  color: var(--wb-ink);
  border: 1px solid var(--wb-ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.student-bar .tab-rail {
  margin: 0;
  padding: 6px;
  overflow-x: auto;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
  box-shadow: var(--wb-shadow);
}

.student-bar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-bar .language-switch,
.student-bar .logout-link,
.bar-avatar {
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  box-shadow: var(--wb-shadow);
}

.student-bar .language-switch {
  padding: 3px;
  border-radius: 999px;
}

.language-switch a {
  color: var(--wb-muted);
  border-radius: 999px;
}

.language-switch a.active {
  color: #fff;
  background: var(--wb-ink);
}

.logout-link {
  color: var(--wb-ink);
  border-radius: 999px;
}

.bar-avatar {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--wb-ink);
  border-radius: 50%;
  font-weight: 800;
}

[data-ui="student-shell"] .card,
.season-card,
.school-card {
  background: var(--wb-card);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
}

.student-task-card {
  background: rgb(255 255 255 / 0.7);
  border: 1px solid var(--wb-line);
  border-radius: var(--ui-radius-md);
  box-shadow: none;
}

[data-ui="student-shell"] .panel,
[data-ui="student-shell"] .panel.active {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.student-main {
  padding-block: 8px 48px;
}

/* ======================================================================
 * Bento dashboard components
 * ==================================================================== */
.bento-welcome {
  display: grid;
  gap: 28px 40px;
  padding-block: 18px 28px;
}

@media (min-width: 1280px) {
  .bento-welcome {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .bento-welcome h1,
  .bento-welcome .bento-pills {
    grid-column: 1;
  }

  .bento-welcome .bento-metrics {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

.bento-welcome h1 {
  margin: 0;
  color: var(--wb-ink);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.bento-welcome h1 small {
  display: block;
  margin-bottom: 8px;
  color: var(--wb-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.bento-metrics {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px 44px;
}

.bento-metric {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  gap: 0 10px;
}

.bento-metric-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  align-self: end;
  margin-bottom: 26px;
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.7);
  border: 1px solid var(--wb-card-border);
  border-radius: 10px;
  font-size: 15px;
}

.bento-metric-value {
  padding-right: 6px;
  color: var(--wb-ink);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}

.bento-metric-label {
  grid-column: 2;
  color: var(--wb-ink);
  font-size: 14px;
  font-weight: 500;
}

/* status pills (reference: Interviews · Hired · Project time · Output) */
.bento-pills {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.bento-pill {
  display: flex;
  min-width: 96px;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 10px;
}

.bento-pill--stripe {
  min-width: 0;
  flex: 1 1 200px;
}

.bento-pill > span {
  padding-left: 6px;
  color: var(--wb-ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.bento-pill > i {
  display: block;
  height: 60px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 60px;
}

.bento-pill--dark > i {
  color: #fff;
  background: var(--wb-ink-2);
}

.bento-pill--yellow > i {
  color: var(--wb-ink);
  background: var(--wb-yellow);
}

.bento-pill--stripe > i {
  color: var(--wb-ink);
  background: repeating-linear-gradient(-55deg, rgb(255 255 255 / 0.95) 0 6px, rgb(255 255 255 / 0.35) 6px 12px);
  border: 1px solid rgb(255 255 255 / 0.9);
}

.bento-pill--line > i {
  color: var(--wb-ink);
  background: transparent;
  border: 1px solid var(--wb-ink);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.bento-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 26px;
  background: var(--wb-card);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.bento-card > h2,
.bento-title {
  margin: 0;
  color: var(--wb-ink);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.01em;
}

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

.bento-arrow {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.9);
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.bento-arrow:hover {
  background: var(--wb-yellow);
}

.bento-big {
  margin-top: 14px;
  color: var(--wb-ink);
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}

.bento-big small {
  margin-left: 8px;
  color: var(--wb-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.bento-card--dark {
  color: #fff;
  background: var(--wb-ink-2);
  border-color: var(--wb-ink-2);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.bento-card--dark > h2,
.bento-card--dark .bento-title {
  color: #fff;
}

.bento-span-3 { grid-column: span 3; }
.bento-span-4 { grid-column: span 4; }
.bento-span-5 { grid-column: span 5; }
.bento-span-6 { grid-column: span 6; }
.bento-span-9 { grid-column: span 9; }
.bento-span-12 { grid-column: 1 / -1; }

.bento-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

@media (max-width: 1100px) {
  .bento-span-3,
  .bento-span-4,
  .bento-span-5 { grid-column: span 6; }
  .bento-span-9 { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .bento-grid { gap: 14px; }
  .bento-span-3,
  .bento-span-4,
  .bento-span-5,
  .bento-span-6 { grid-column: 1 / -1; }
  .bento-card { padding: 20px; }
  .student-bar { flex-wrap: wrap; }
  .student-bar .tab-rail { order: 3; max-width: 100%; width: 100%; }
  .bento-pill > i { height: 48px; padding: 0 14px; line-height: 48px; }
}

/* profile card */
.bento-profile {
  min-height: 330px;
  justify-content: flex-end;
  gap: 14px;
  background:
    radial-gradient(18rem 14rem at 20% 10%, rgb(255 255 255 / 0.85), transparent 70%),
    linear-gradient(165deg, #f7f0dc 0%, #e9d9a8 55%, #f3c75b 100%);
  overflow: hidden;
}

.bento-school-logo {
  position: absolute;
  top: 22px;
  left: 22px;
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  overflow: hidden;
  color: var(--wb-ink);
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 10px 24px rgb(80 60 10 / 0.18);
  font-size: 34px;
  font-weight: 800;
}

.bento-school-logo img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.bento-profile h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
}

.bento-profile p {
  margin: 4px 0 0;
  color: rgb(28 28 30 / 0.7);
  font-size: 14px;
}

.bento-tier {
  position: absolute;
  top: 28px;
  right: 22px;
  padding: 12px 22px;
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.55);
  border: 1px solid rgb(28 28 30 / 0.35);
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
}

/* weekly bar chart */
.bento-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 150px;
  margin-top: 18px;
}

.bento-bar {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bento-bar i {
  display: block;
  width: 8px;
  min-height: 6px;
  background: var(--wb-ink);
  border-radius: 999px;
}

.bento-bar--today i {
  background: var(--wb-yellow);
}

.bento-bar--empty i {
  min-height: 40px;
  background: repeating-linear-gradient(-55deg, rgb(28 28 30 / 0.14) 0 3px, transparent 3px 6px);
}

.bento-bar b {
  padding: 5px 9px;
  background: var(--wb-yellow);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.bento-bar span {
  color: var(--wb-muted);
  font-size: 12px;
}

/* completion ring */
.bento-ring {
  position: relative;
  display: grid;
  width: min(100%, 210px);
  margin: 10px auto 0;
  aspect-ratio: 1;
  place-items: center;
}

.bento-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.bento-ring .ring-track {
  fill: none;
  stroke: rgb(28 28 30 / 0.12);
  stroke-width: 10;
  stroke-dasharray: 1.5 4.5;
}

.bento-ring .ring-value {
  fill: none;
  stroke: var(--wb-yellow);
  stroke-linecap: round;
  stroke-width: 14;
}

.bento-ring-label {
  text-align: center;
}

.bento-ring-label strong {
  display: block;
  color: var(--wb-ink);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.bento-ring-label span {
  color: var(--wb-muted);
  font-size: 14px;
}

.bento-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
}

/* readiness card */
.bento-ready-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.bento-ready-head strong {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.bento-segments {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.bento-segment {
  display: grid;
  gap: 6px;
}

.bento-segment > div {
  display: flex;
  justify-content: space-between;
  color: var(--wb-ink);
  font-size: 13px;
}

.bento-segment > i {
  display: block;
  height: 16px;
  overflow: hidden;
  background: rgb(28 28 30 / 0.09);
  border-radius: 999px;
}

.bento-segment > i > b {
  display: block;
  height: 100%;
  background: var(--wb-yellow);
  border-radius: 999px;
}

.bento-segment:nth-child(2) > i > b { background: var(--wb-ink-2); }
.bento-segment:nth-child(3) > i > b { background: #9b9ba0; }

.bento-note {
  margin: 12px 0 0;
  color: var(--wb-muted);
  font-size: 12px;
}

/* dark task card */
.bento-tasks-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.bento-tasks-head strong {
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.bento-task-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.bento-task {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.bento-task form {
  display: contents;
}

.bento-task-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: rgb(255 255 255 / 0.12);
  border-radius: 50%;
  font-size: 17px;
}

.bento-task--open .bento-task-icon {
  color: var(--wb-ink);
  background: #fff;
}

.bento-task-text {
  min-width: 0;
}

.bento-task-title {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bento-task--done .bento-task-title {
  color: rgb(255 255 255 / 0.55);
  text-decoration: line-through;
}

.bento-task-due {
  display: block;
  color: rgb(255 255 255 / 0.55);
  font-size: 12px;
}

.bento-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.18);
  border: 0;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.bento-task--done .bento-check {
  background: var(--wb-yellow);
}

.bento-check:hover {
  background: var(--wb-yellow);
}

.bento-empty-dark {
  margin: 18px 0 0;
  color: rgb(255 255 255 / 0.7);
  font-size: 14px;
}

/* week calendar */
.bento-week {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0 8px;
  margin-top: 16px;
}

.bento-day {
  min-width: 0;
  padding: 6px 4px 12px;
  border-left: 1px dashed rgb(28 28 30 / 0.18);
  text-align: center;
}

.bento-day:first-child {
  border-left: 0;
}

.bento-day h3 {
  margin: 0 0 12px;
  color: var(--wb-muted);
  font-size: 13px;
  font-weight: 400;
}

.bento-day h3 b {
  display: block;
  font-size: 20px;
  font-weight: 400;
}

.bento-day--today h3,
.bento-day--today h3 b {
  color: var(--wb-ink);
  font-weight: 700;
}

.bento-event {
  margin-bottom: 8px;
  padding: 10px 12px;
  overflow: hidden;
  color: #fff;
  background: var(--wb-ink-2);
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.bento-event--done {
  color: var(--wb-ink);
  background: var(--wb-yellow);
  text-decoration: line-through;
}

.bento-week-empty {
  margin: 18px 0 0;
  color: var(--wb-muted);
  font-size: 14px;
}

.bento-schedule-more {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}

.bento-schedule-more li {
  padding: 10px 14px;
  list-style: none;
  background: rgb(255 255 255 / 0.7);
  border-radius: 16px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .bento-week {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .bento-day {
    min-width: 120px;
  }
}

/* accordion list (reference: Pension contributions / Devices …) */
.bento-accordion details {
  padding: 4px 0;
  border-bottom: 1px dashed rgb(28 28 30 / 0.2);
}

.bento-accordion details:last-child {
  border-bottom: 0;
}

.bento-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  color: var(--wb-ink);
  font-size: 20px;
  font-weight: 300;
  cursor: pointer;
  list-style: none;
}

.bento-accordion summary::-webkit-details-marker {
  display: none;
}

.bento-accordion summary::after {
  color: var(--wb-muted);
  content: "⌄";
  font-size: 18px;
  transition: transform 160ms ease;
}

.bento-accordion details[open] > summary::after {
  transform: rotate(180deg);
}

.bento-accordion .acc-body {
  padding: 0 4px 16px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.logout-link {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .bento-pills {
    flex-wrap: wrap;
  }

  .bento-pill--stripe {
    order: 5;
    flex: 1 1 100%;
  }
}

/* sun card = the yellow accent card */
.bento-card--sun {
  background: linear-gradient(160deg, #fdf3c3 0%, #fbd24d 100%);
  border-color: #fbe27c;
}

/* ======================================================================
 * Teacher student workspace (profile hub + progress pages)
 * ==================================================================== */
.ws-header {
  display: grid;
  gap: 14px 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding-block: 14px 6px;
}

.ws-header-main {
  min-width: 0;
}

.ws-back {
  color: var(--wb-muted);
  font-size: 13px;
  text-decoration: none;
}

.ws-back:hover {
  color: var(--wb-ink);
}

.ws-name {
  margin: 4px 0 0;
  color: var(--wb-ink);
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.ws-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--wb-muted);
  font-size: 14px;
}

.ws-meta-muted {
  font-size: 12px;
  opacity: 0.8;
}

.ws-header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ws-portal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  box-shadow: var(--wb-shadow);
}

.ws-dot {
  width: 8px;
  height: 8px;
  background: #b9b9bd;
  border-radius: 50%;
}

.ws-dot--on {
  background: #1fa45b;
}

.ws-tabs,
.ws-header .student-workflow-nav {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  gap: 2px;
  padding: 6px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
  box-shadow: var(--wb-shadow);
}

.ws-tabs .ui-tab,
.ws-header .student-workflow-nav .ui-tab {
  padding: 9px 18px;
  font-size: 14px;
  text-decoration: none;
}

.ws-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.ws-more {
  position: relative;
}

.ws-more > summary {
  display: inline-flex;
  list-style: none;
  cursor: pointer;
}

.ws-more > summary::-webkit-details-marker {
  display: none;
}

.ws-more-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  min-width: 190px;
  gap: 2px;
  padding: 8px;
  background: rgb(255 253 245 / 0.98);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--ui-radius-md);
  box-shadow: 0 18px 44px rgb(60 48 10 / 0.18);
}

.ws-more-menu a,
.ws-more-menu button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  color: var(--wb-ink);
  background: transparent;
  border-radius: 12px;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}

.ws-more-menu a:hover {
  background: rgb(28 28 30 / 0.06);
}

.ws-more-menu .ui-button-danger {
  color: #b42318;
  background: transparent;
  box-shadow: none;
}

.ws-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ws-stat {
  padding: 16px 20px;
  background: var(--wb-card);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--wb-shadow);
}

.ws-stat:first-child {
  background: var(--wb-yellow);
  border-color: var(--wb-yellow);
}

.ws-stat span {
  display: block;
  color: var(--wb-muted);
  font-size: 12px;
}

.ws-stat:first-child span {
  color: rgb(28 28 30 / 0.7);
}

.ws-stat strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--wb-ink);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 18px;
  align-items: start;
}

.ws-col {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.ws-group {
  padding: 22px 24px 12px;
  background: var(--wb-card);
  border: 1px solid var(--wb-card-border);
  border-radius: var(--wb-radius);
  box-shadow: var(--wb-shadow);
}

.ws-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  color: var(--wb-ink);
  font-size: 22px;
  font-weight: 300;
}

.ws-group-title span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: var(--wb-ink-2);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
}

.ws-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px dashed rgb(28 28 30 / 0.16);
}

.ws-row--stack {
  align-items: flex-start;
  flex-direction: column;
}

.ws-row-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ws-row-text strong {
  color: var(--wb-ink);
  font-size: 15px;
  font-weight: 600;
}

.ws-row-text small {
  color: var(--wb-muted);
  font-size: 12px;
}

.ws-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ws-row .ui-button-secondary,
.ws-row .ui-button-primary {
  min-height: 38px;
  padding: 8px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.ws-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ws-chips a {
  padding: 8px 14px;
  color: var(--wb-ink);
  background: rgb(255 255 255 / 0.8);
  border: 1px solid var(--wb-line);
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
}

.ws-chips a:hover {
  background: var(--wb-yellow);
}

.ws-history {
  margin: -4px 0 8px;
  color: var(--wb-muted);
  font-size: 13px;
}

.ws-history summary {
  cursor: pointer;
}

.ws-history ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 14px;
}

.ws-history a {
  color: var(--wb-ink);
}

.ws-hint {
  margin: -6px 0 8px;
  color: var(--wb-muted);
  font-size: 12px;
}

@media (max-width: 960px) {
  .ws-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ws-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .ws-tabs,
.ws-header .student-workflow-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    border-radius: 24px;
  }

  .ws-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.ws-switch {
  display: inline-flex;
  grid-column: 1 / -1;
  width: fit-content;
  gap: 2px;
  padding: 6px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
  box-shadow: var(--wb-shadow);
}

.ws-switch .ui-tab {
  padding: 9px 20px;
  font-size: 14px;
  text-decoration: none;
}

/* second-level tabs sit below the switch, lighter than the switch itself */
.ws-tabs,
.ws-header .student-workflow-nav {
  gap: 4px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ws-tabs .ui-tab,
.ws-header .student-workflow-nav .ui-tab {
  background: rgb(255 255 255 / 0.55);
  border: 1px solid var(--wb-line);
}

.ws-tabs .ui-tab[aria-current="page"],
.ws-header .student-workflow-nav .ui-tab[aria-current="page"] {
  color: var(--wb-ink);
  background: var(--wb-yellow);
  border-color: var(--wb-yellow);
}

.ws-portal-chip {
  gap: 12px;
}

.ws-portal-chip .student-portal-state {
  display: block;
  font-weight: 600;
}

.ws-portal-chip .student-portal-username {
  display: block;
  max-width: 160px;
  overflow: hidden;
  color: var(--wb-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-chip-action {
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
}

/* ======================================================================
 * Manager overview — who needs me today
 * ==================================================================== */
.bento-span-8 { grid-column: span 8; }

@media (max-width: 1100px) {
  .bento-span-8 { grid-column: 1 / -1; }
}

.ws-flag {
  padding: 0 12px;
  background: var(--wb-yellow);
  border-radius: 18px;
}

.health-item {
  padding: 14px 0;
  border-top: 1px solid rgb(255 255 255 / 0.12);
}

.health-item:first-child {
  border-top: 0;
}

.health-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-go {
  min-height: 34px;
  padding: 6px 16px;
  color: var(--wb-ink) !important;
  background: #fff !important;
  font-size: 13px;
}

.health-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.health-dot--red { background: #ff6b5e; }
.health-dot--orange { background: var(--wb-yellow); }
.health-dot--gray { background: #9b9ba0; }
.health-dot--green { background: #3ec17a; }

.health-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0 20px;
}

.health-reasons a {
  padding: 4px 10px;
  color: rgb(255 255 255 / 0.85);
  background: rgb(255 255 255 / 0.12);
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
}

.health-reasons a:hover {
  background: rgb(255 255 255 / 0.22);
}

.health-allgood strong {
  display: block;
  margin-top: 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 300;
}

.ws-filter {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: rgb(255 255 255 / 0.72);
  border: 1px solid var(--wb-card-border);
  border-radius: 999px;
}

.ws-filter .ui-tab {
  padding: 7px 16px;
  font-size: 13px;
  text-decoration: none;
}

.health-scroll {
  margin-top: 14px;
  overflow-x: auto;
}

.health-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.health-table th {
  padding: 8px 10px;
  color: var(--wb-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.health-table td {
  padding: 12px 10px;
  border-top: 1px dashed rgb(28 28 30 / 0.16);
  vertical-align: middle;
}

.health-sub {
  margin-top: 2px;
  color: var(--wb-muted);
  font-size: 12px;
}

.health-bad {
  color: #b42318;
  font-weight: 700;
}

.health-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.health-badge--red { color: #fff; background: var(--wb-ink-2); }
.health-badge--orange { color: var(--wb-ink); background: var(--wb-yellow); }
.health-badge--gray { color: var(--wb-ink); background: rgb(28 28 30 / 0.1); }
.health-badge--green { color: #0a5028; background: #dff5e8; }

.health-legend {
  margin: 14px 0 0;
  color: var(--wb-muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .health-table thead {
    display: none;
  }

  .health-table,
  .health-table tbody {
    display: block;
    width: 100%;
  }

  /* phone: one compact line per student — status, name and the main reason */
  .health-table tr {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px dashed rgb(28 28 30 / 0.2);
  }

  .health-table td {
    display: none;
    padding: 0;
    border: 0;
  }

  .health-table td[data-label="状态"],
  .health-table td[data-label="学生"] {
    display: block;
  }

  .health-table td[data-label="学生"] {
    min-width: 0;
    flex: 1;
  }

  .health-table td[data-label="逾期"] {
    display: block;
  }

  .health-table td[data-label="逾期"]::before {
    content: "逾期 ";
    color: var(--wb-muted);
    font-size: 12px;
  }
}

.mgr-headline {
  font-size: clamp(30px, 4.2vw, 52px) !important;
}

.health-nowrap {
  white-space: nowrap;
}

.health-foot {
  margin: 16px 0 0;
  padding-top: 14px;
  color: rgb(255 255 255 / 0.65);
  border-top: 1px solid rgb(255 255 255 / 0.12);
  font-size: 12px;
}

.health-num {
  white-space: nowrap;
}

.health-of {
  color: var(--wb-muted);
  font-size: 12px;
}

.health-table td:nth-child(2) {
  min-width: 150px;
}

/* exceptions strip: compact, flows horizontally so one student costs one row, not a tall card */
.health-panel {
  padding: 20px 24px;
}

.health-panel .bento-tasks-head {
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.health-panel .bento-tasks-head h2 {
  font-size: 20px;
}

.health-panel .bento-tasks-head strong {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  padding: 0 10px;
  color: var(--wb-ink);
  background: var(--wb-yellow);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
}

.health-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.health-strip .health-item {
  padding: 12px 14px;
  background: rgb(255 255 255 / 0.07);
  border: 0;
  border-radius: 18px;
}

.health-strip .health-reasons {
  margin-left: 20px;
}

.health-panel .health-foot {
  margin-top: 14px;
  padding-top: 12px;
}

.health-panel .health-allgood strong {
  margin-top: 6px;
  font-size: 18px;
}

.health-panel .health-allgood p {
  margin: 4px 0 0;
}

/* roster is the exceptions view: reasons sit under the name, action at the row end */
.health-count {
  margin-left: 12px;
  padding: 4px 14px;
  vertical-align: middle;
  color: var(--wb-ink);
  background: var(--wb-yellow);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.health-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.health-chips a {
  padding: 3px 10px;
  color: var(--wb-ink);
  background: rgb(28 28 30 / 0.07);
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
}

.health-chips a:hover {
  background: var(--wb-yellow);
}

.health-row--red .health-chips a {
  background: rgb(255 107 94 / 0.16);
}

.health-action .ui-button-primary {
  min-height: 34px;
  padding: 6px 16px;
  font-size: 13px;
}

.health-fine {
  margin: 14px 0 0;
  color: #0a5028;
  font-size: 13px;
}

@media (max-width: 720px) {
  .health-table td.health-action {
    display: block;
  }

  .health-table td[data-label="学生"] .health-chips a:nth-child(n + 2) {
    display: none;
  }
}

/* with the metrics gone the overview header only needs headline + status pills */
@media (min-width: 1280px) {
  [data-ui="teacher-welcome"] {
    grid-template-columns: minmax(0, 1fr);
  }

  [data-ui="teacher-welcome"] .bento-pills {
    max-width: 720px;
  }
}
