/* ===== Design tokens ===== */
:root {
  /* Sampled directly from the PSHS System logo (flame + quartered circles) */
  --color-primary: #000000;      /* PSHS black */
  --color-primary-dark: #000000; /* PSHS black */
  --color-primary-light: #48c4d3; /* PSHS teal */
  --color-accent: #fcd116;       /* flame gold */
  --color-accent-dark: #ce1126;  /* flame red */
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-border: #dde3ec;
  --color-text: #1c2733;
  --color-muted: #5c6b7a;

  --color-prepare: #6b7280;
  --color-decide: #b3830f;
  --color-do: #0e7490;
  --color-reflect: #7c3aed;
  --color-complete: #1a8f5c;

  --color-danger: #c0392b;
  --color-danger-bg: #fdecea;
  --color-success-bg: #e9f7ef;

  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.07), 0 1px 1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  line-height: 1.55;
}

img { max-width: 100%; }

a { color: var(--color-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--color-primary-dark); margin-top: 0; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
.muted { color: var(--color-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--color-accent-dark); font-weight: 700; }

/* ===== Layout ===== */
.container { max-width: 1080px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.container.narrow { max-width: 680px; }
.site-main { min-height: 70vh; }

/* ===== Header / Nav ===== */
.site-header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow-sm);
}
.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; white-space: nowrap; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 4px; }
.brand-mark { font-weight: 800; font-size: 1.35rem; letter-spacing: 0.02em; align-self: baseline; }
.brand-sub { font-size: 0.78rem; color: #b8e8ee; align-self: baseline; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }
.site-nav { display: flex; align-items: center; gap: 1rem 1.75rem; justify-content: flex-end; }
.nav-links, .nav-account { display: flex; align-items: center; gap: 1rem 1.1rem; }
.nav-links a { white-space: nowrap; }
.site-nav a { color: #cdeef3; font-size: 0.92rem; }
.site-nav a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--color-accent);
  color: var(--color-primary-dark) !important;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta:hover { background: #e6ba00; }
.nav-messages { position: relative; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem; border-radius: 999px; }
.nav-messages:hover { background: rgba(255, 255, 255, 0.12); }
.nav-messages-label { display: none; }
.nav-messages .nav-badge { position: absolute; top: -0.35rem; right: -0.45rem; }
.nav-menu { position: relative; }
.nav-menu-toggle { display: flex; align-items: center; gap: 0.5rem; list-style: none; cursor: pointer; color: #cdeef3; padding: 0.2rem 0.5rem 0.2rem 0.2rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); }
.nav-menu-toggle::-webkit-details-marker { display: none; }
.nav-menu-toggle:hover, .nav-menu[open] > .nav-menu-toggle { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-avatar { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--color-primary-light); color: #000; font-weight: 800; font-size: 0.95rem; }
.nav-menu-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.nav-menu-caret { font-size: 0.7rem; opacity: 0.8; }
.nav-menu-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); width: 270px; background: #111; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; box-shadow: var(--shadow-md); padding: 0.4rem; z-index: 30; }
.nav-menu-who { display: flex; flex-direction: column; padding: 0.6rem 0.7rem 0.7rem; border-bottom: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 0.4rem; }
.nav-menu-who strong { color: #fff; }
.nav-menu-who span { color: #9fb3bd; font-size: 0.82rem; }
.nav-view-as { padding: 0.3rem 0.7rem 0.6rem; border-bottom: 1px solid rgba(255, 255, 255, 0.15); margin-bottom: 0.4rem; }
.nav-view-as label { display: block; color: #9fb3bd; font-size: 0.78rem; margin-bottom: 0.3rem; }
.nav-view-as select { width: 100%; padding: 0.4rem 0.5rem; font-size: 0.85rem; }
.nav-logout-form { margin: 0; }
.nav-menu-logout { display: block; width: 100%; text-align: left; background: none; border: none; color: #cdeef3; font: inherit; font-size: 0.92rem; padding: 0.55rem 0.7rem; border-radius: 8px; cursor: pointer; }
.nav-menu-logout:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.link-button {
  background: none; border: none; color: #cdeef3; font-size: 0.92rem;
  cursor: pointer; padding: 0; font-family: inherit;
}
.link-button:hover { color: #fff; text-decoration: underline; }

.impersonation-banner {
  background: var(--color-accent-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.impersonation-banner strong { font-weight: 700; }
.impersonation-exit {
  color: #fff; text-decoration: underline; font-weight: 700;
}
.impersonation-exit:hover { color: var(--color-accent); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 2rem 1.5rem 3rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.site-footer p { margin: 0.2rem 0; }
.footer-logo { width: 40px; height: 40px; border-radius: 8px; margin-bottom: 0.75rem; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
}
.hero .container { padding: 4rem 1.5rem; }
.hero-grid { display: flex; align-items: center; gap: 3rem; }
.hero-text { flex: 1 1 480px; }
.hero-image-card {
  flex: 1 1 360px;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.hero-image-card img { width: 100%; height: auto; display: block; border-radius: 14px; }
.hero h1 { color: #fff; font-size: 2.5rem; }
.hero p.lead { font-size: 1.1rem; color: #cdeef3; max-width: 560px; }
.hero-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-grid { flex-direction: column; align-items: stretch; }
  .hero-image-card { max-width: 100%; order: -1; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--color-accent); color: var(--color-primary-dark); }
.btn-primary:hover { background: #e6ba00; }
.btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-danger { background: var(--color-danger-bg); color: var(--color-danger); border-color: #f3c9c4; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: #3c4043;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
}
.btn-google:hover { background: #f8f9fa; text-decoration: none; box-shadow: var(--shadow-sm); }
.btn-danger:hover { background: #f9d8d4; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ===== Cards / sections ===== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
section.section { padding: 3rem 0; }
section.section.alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

/* ===== Stage / status badges ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.badge-prepare { background: var(--color-prepare); }
.badge-decide { background: var(--color-decide); }
.badge-do { background: var(--color-do); }
.badge-reflect { background: var(--color-reflect); }
.badge-complete { background: var(--color-complete); }
.badge-outline {
  background: transparent; border: 1px solid currentColor;
}

/* Stage timeline strip */
.stage-strip { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.stage-step {
  flex: 1 1 150px;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  position: relative;
}
.stage-step .stage-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: #fff; font-weight: 700; font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.stage-step.is-current { border-color: var(--color-accent); box-shadow: 0 0 0 2px rgba(252,209,22,0.3); }
.stage-step h4 { margin: 0 0 0.25rem; }
.stage-step p { margin: 0; font-size: 0.88rem; color: var(--color-muted); }

/* ===== Tables ===== */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
th { color: var(--color-muted); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ===== Forms ===== */
label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="file"], select, textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--color-text);
}
textarea { resize: vertical; min-height: 6rem; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(42,79,140,0.15);
}
.field { margin-bottom: 1.1rem; }
.field-hint { font-size: 0.82rem; color: var(--color-muted); margin-top: 0.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.alert { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.92rem; }
.alert-error { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid #f3c9c4; }
.alert-success { background: var(--color-success-bg); color: #1a8f5c; border: 1px solid #b7e5cb; }
.alert-info { background: #eaf1fc; color: var(--color-primary-light); border: 1px solid #c9d9f3; }

/* ===== Misc ===== */
.flex { display: flex; align-items: center; gap: 0.75rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.stack > * + * { margin-top: 0.75rem; }
.divider { border: none; border-top: 1px solid var(--color-border); margin: 1.5rem 0; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 0.4rem 0; }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { background: #eef2f8; color: var(--color-primary); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.8rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--color-muted); }
.stat { text-align: center; }
.stat .stat-num { font-size: 2.1rem; font-weight: 800; color: var(--color-primary); display: block; }
.stat .stat-label { font-size: 0.82rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Disclosure */
.disclosure-card { margin-top: 1.5rem; }
.disclosure-row { display: flex; gap: 1.25rem; align-items: flex-start; }
.disclosure-row p { margin: 0; line-height: 1.6; }
.disclosure-icon {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.disclosure-icon-ai { background: rgba(72,196,211,0.15); color: var(--color-primary-light); border: 1px solid rgba(72,196,211,0.35); }
.disclosure-icon-check { background: rgba(252,209,22,0.18); color: var(--color-accent-dark); border: 1px solid rgba(252,209,22,0.4); font-size: 1.4rem; }

/* Certificate */
.certificate {
  background: #fffdf7;
  border: 10px solid var(--color-primary);
  outline: 3px solid var(--color-accent);
  outline-offset: -18px;
  padding: 4rem 3rem;
  text-align: center;
  max-width: 760px;
  margin: 2rem auto;
}
.certificate .cert-seal { width: 64px; height: 64px; margin-bottom: 0.75rem; }
.certificate .cert-eyebrow { letter-spacing: 0.25em; color: var(--color-accent-dark); font-weight: 700; }
.certificate h1 { font-size: 2.6rem; margin: 0.5rem 0; }
.certificate .cert-name { font-size: 1.8rem; color: var(--color-primary-dark); font-weight: 800; margin: 1.25rem 0 0.25rem; border-bottom: 2px solid var(--color-border); display: inline-block; padding-bottom: 0.25rem; }
.certificate .cert-project { font-style: italic; margin: 0.75rem 0; }
.certificate .cert-sign { display: flex; justify-content: space-around; margin-top: 3rem; }
.certificate .cert-sign div { border-top: 1px solid var(--color-text); padding-top: 0.4rem; font-size: 0.85rem; min-width: 180px; }

/* ===== Nav toggle (mobile) ===== */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: var(--color-primary-dark);
    padding: 1rem 1.5rem 1.5rem;
    position: absolute;
    top: 100%; left: 0;
  }
  .site-nav.is-open { display: flex; }
  .nav-links, .nav-account { flex-direction: column; align-items: flex-start; width: 100%; gap: 1rem; }
  .nav-account { margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.15); }
  .nav-messages-label { display: inline; }
  .nav-messages .nav-badge { position: static; }
  .nav-menu { width: 100%; }
  .nav-menu-name { max-width: none; flex: 1; }
  .nav-menu-toggle { width: 100%; }
  .nav-menu-panel { position: static; width: 100%; margin-top: 0.5rem; }
}
@media (max-width: 860px) {
  .hero h1 { font-size: 1.9rem; }
}

/* ===== Print ===== */
.print-only { display: none; }

@media print {
  .no-print { display: none !important; }
  .print-only { display: block; }
  html, body { background: #fff; }
  .site-main { min-height: 0; }
  .container, .container.narrow { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 1px solid #999; }
  a { color: inherit; text-decoration: none; }

  /* Chrome's print engine doesn't reserve space for position:fixed
     elements against normal document flow, so a fixed-position footer
     overlaps whatever content happens to be near a page break. The
     display:table-footer-group technique below is the reliable
     alternative: the footer is guaranteed to render after all page
     content (never overlapping it) rather than colliding mid-page. It
     won't repeat on every physical page — Chrome doesn't support that
     reliably for arbitrary content — but it always lands cleanly once,
     after the last content, instead of wherever flow happened to end. */
  .print-page { display: table; width: 100%; }
  .print-page-header { display: table-header-group; }
  .print-page-footer { display: table-footer-group; }
  .print-page-body { display: table-row-group; }
  /* Without this, Chrome can break a page mid-field — the label renders at
     the very bottom of one page and the input/value it belongs to on the
     next, with the reserved footer margin visually overlapping whichever
     half landed last. Keeping each field/label pair intact forces the whole
     thing onto the next page instead when it doesn't fit. */
  .field, .field-row, .stack > div { break-inside: avoid; page-break-inside: avoid; }
  /* Keeps a section heading with its table instead of stranding the heading
     at the bottom of one page, and stops long tables splitting a row in two. */
  h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
  tr, .keep-together { break-inside: avoid; page-break-inside: avoid; }
  /* Two separately-cropped images (not one wide image with its own baked-in
     padding) so each side can be flush-aligned to the true content edges
     regardless of the source artwork's own margins. The small padding here
     is a deliberate visual inset, not a leftover margin correction. */
  .letterhead-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding: 0 40px; }
  .letterhead-header-left { height: 70px; width: auto; }
  .letterhead-header-right { height: 70px; width: auto; }
  .letterhead-footer { width: 100%; height: auto; margin-top: 1.5rem; }
}

/* ===== Messages (Gmail-style) ===== */
.nav-badge {
  display: inline-block; min-width: 1.25rem; padding: 0 0.4rem; border-radius: 999px;
  background: var(--color-accent-dark); color: #fff; font-size: 0.72rem; font-weight: 700;
  line-height: 1.25rem; text-align: center; vertical-align: middle;
}
.mail-container { max-width: 1180px; }
.mail-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: start; }
.mail-sidebar { position: sticky; top: 1rem; }
.mail-compose-btn {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1.5rem; border-radius: 16px;
  background: var(--color-accent); color: var(--color-primary); font-weight: 700; text-decoration: none;
  box-shadow: var(--shadow-md); margin-bottom: 1rem;
}
.mail-compose-btn:hover { background: #e6ba00; text-decoration: none; }
.mail-folders a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 1rem;
  border-radius: 0 999px 999px 0; color: var(--color-text); text-decoration: none; margin-right: 0.5rem;
}
.mail-folders a:hover { background: #eaf0f6; text-decoration: none; }
.mail-folders a.active { background: #fff3b8; font-weight: 700; }
.mail-folder-name { display: inline-flex; align-items: center; gap: 0.65rem; }
.mail-folder-count { font-size: 0.8rem; font-weight: 700; }
.mail-main { background: var(--color-surface); border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); min-height: 420px; overflow: hidden; }
.mail-toolbar { display: flex; align-items: center; gap: 0.9rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.mail-toolbar-action { margin-left: auto; }
.mail-back { font-size: 1.3rem; line-height: 1; color: var(--color-muted); text-decoration: none; padding: 0.2rem 0.5rem; border-radius: 999px; }
.mail-back:hover { background: #eaf0f6; text-decoration: none; }
.mail-list { display: block; }
.mail-row-wrap { position: relative; }
.mail-row {
  display: grid; grid-template-columns: 210px 1fr auto; align-items: center; gap: 0.9rem; padding: 0.55rem 1rem;
  border-bottom: 1px solid #eef1f5; color: inherit; text-decoration: none;
}
.mail-row:hover { box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0, 0 1px 2px rgba(60, 64, 67, 0.3); position: relative; z-index: 1; text-decoration: none; }
.mail-read { background: #f6f8fc; }
.mail-unread { background: #fff; font-weight: 700; }
.mail-row-from { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.mail-row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row-body { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row-snippet { color: var(--color-muted); font-weight: 400; }
.mail-row-date { font-size: 0.82rem; color: var(--color-muted); white-space: nowrap; }
.mail-unread .mail-row-date { color: var(--color-text); }
.mail-row-wrap .mail-row-remove { position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); opacity: 0; z-index: 2; background: #fff; border-radius: 999px; }
.mail-row-wrap:hover .mail-row-remove, .mail-row-remove:focus-within { opacity: 1; }
.mail-row-wrap:hover .mail-row-date { visibility: hidden; }
.mail-row-remove .link-button { color: var(--color-muted); padding: 0.25rem 0.5rem; font-size: 1rem; }
.mail-row-remove .link-button:hover { color: var(--color-danger); text-decoration: none; }
.mail-chip { display: inline-block; padding: 0 0.5rem; margin: 0 0.25rem; border-radius: 6px; background: #e8eaed; color: #3c4043; font-size: 0.72rem; font-weight: 600; vertical-align: middle; }
.mail-avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 2rem; height: 2rem;
  border-radius: 50%; color: #fff; font-size: 0.95rem; font-weight: 700;
}
.mail-empty { text-align: center; color: var(--color-muted); padding: 4rem 1rem; }
.mail-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.mail-thread-subject { font-size: 1.45rem; font-weight: 400; margin: 1rem 1.25rem 0.25rem; }
.mail-thread { padding: 0.5rem 0; }
.mail-msg { display: flex; gap: 0.9rem; padding: 1rem 1.25rem; border-bottom: 1px solid #eef1f5; }
.mail-msg .mail-avatar { width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
.mail-msg-main { flex: 1; min-width: 0; }
.mail-msg-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; }
.mail-msg-body { margin-top: 0.6rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.mail-msg-meta { margin-top: 0.6rem; font-size: 0.82rem; color: var(--color-muted); }
.mail-reply, .mail-compose { padding: 0; }
.mail-reply { margin: 1.25rem; border: 1px solid var(--color-border); border-radius: 12px; box-shadow: var(--shadow-sm); overflow: hidden; }
.mail-reply-head { padding: 0.6rem 1rem; background: #f6f8fc; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.mail-reply textarea, .mail-compose-body { display: block; width: 100%; border: none; outline: none; resize: vertical; padding: 0.9rem 1rem; font: inherit; background: #fff; border-radius: 0; }
.mail-compose-head { padding: 0.7rem 1rem; background: #404040; color: #fff; font-weight: 600; }
.mail-compose-row { display: flex; align-items: center; gap: 0.75rem; border-bottom: 1px solid #eef1f5; padding: 0.25rem 1rem; }
.mail-compose-row label { width: 4.5rem; color: var(--color-muted); font-size: 0.9rem; margin: 0; }
.mail-compose-row select, .mail-compose-row input { flex: 1; border: none; outline: none; background: transparent; padding: 0.6rem 0; font: inherit; box-shadow: none; }
.mail-compose-foot { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; flex-wrap: wrap; }
.mail-send-btn { border-radius: 999px; padding: 0.55rem 1.6rem; }
.mail-compose-email { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; font-size: 0.9rem; margin: 0; color: var(--color-muted); }
.mail-compose-email input { width: auto; }
.mail-discard { margin-left: auto; color: var(--color-muted); font-size: 0.9rem; }
@media (max-width: 760px) {
  .mail-layout { grid-template-columns: 1fr; }
  .mail-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
  .mail-compose-btn { margin-bottom: 0; }
  .mail-folders { display: flex; flex-wrap: wrap; }
  .mail-folders a { border-radius: 999px; margin-right: 0; }
  .mail-row { grid-template-columns: 1fr auto; row-gap: 0.15rem; }
  .mail-row-from { grid-column: 1; }
  .mail-row-date { grid-column: 2; grid-row: 1; }
  .mail-row-body { grid-column: 1 / -1; }
}

/* ===== Adviser evaluation ===== */
.likert-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.85rem; }
.likert-group { margin: 1.25rem 0 0.25rem; }
.likert { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0.75rem 1rem 0.9rem; margin: 0.6rem 0; background: var(--color-surface); }
.likert legend { float: left; width: 100%; padding: 0; margin-bottom: 0.2rem; font-weight: 600; }
.likert-options { display: flex; gap: 0.5rem; flex-wrap: wrap; clear: both; padding-top: 0.2rem; }
.likert-options label { cursor: pointer; margin: 0; font-weight: 400; }
.likert-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.likert-options span { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; padding: 0.45rem 0.7rem; border: 1px solid var(--color-border); border-radius: 999px; background: #fff; }
.likert-options input:checked + span { background: var(--color-accent); border-color: #e6ba00; font-weight: 700; }
.likert-options input:focus-visible + span { outline: 2px solid var(--color-primary-light); outline-offset: 2px; }
.eval-table td { vertical-align: middle; }
.eval-bar { display: inline-block; width: 7rem; height: 0.6rem; border-radius: 999px; background: #e6eaf0; vertical-align: middle; margin-right: 0.5rem; overflow: hidden; }
.eval-bar > span { display: block; height: 100%; background: var(--color-primary-light); }
.eval-overall td { border-top: 2px solid var(--color-border); }
.eval-response { border-top: 1px solid var(--color-border); padding: 0.6rem 0; }
.eval-response p { margin: 0.25rem 0 0; }
.eval-comment { white-space: pre-wrap; padding: 0.6rem 0.9rem; background: #f8fafc; border-left: 3px solid var(--color-primary-light); border-radius: 6px; margin-bottom: 0.5rem; }
