/* ── Document Repository ── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - 130px);
  margin: -2rem;
}

.docs-sidebar {
  background: var(--color-bg-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
}

.docs-sidebar-header {
  padding: 1.25rem 1.25rem 0.75rem;
}

.docs-sidebar-header h3 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.docs-folder-sort-select {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.3125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-bg-surface);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.docs-folder-nav {
  display: flex;
  flex-direction: column;
  padding: 0 0.75rem;
  gap: 0.125rem;
}

.docs-folder-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.docs-folder-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.docs-folder-item--active {
  background: var(--color-bg-hover);
  color: var(--color-accent);
  font-weight: 600;
}

.docs-folder-label {
  flex: 1;
}

.docs-folder-count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  min-width: 1.25rem;
  text-align: center;
}

.docs-folder-item--active .docs-folder-count {
  background: var(--color-accent);
  color: var(--color-bg);
}

.docs-folder-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.375rem 0.75rem;
}

.docs-folder-item-wrap {
  display: flex;
  align-items: center;
}

.docs-folder-item-wrap .docs-folder-item {
  flex: 1;
  min-width: 0;
}

.docs-folder-delete-btn {
  background: none;
  border: none;
  padding: 0.25rem;
  margin-right: 0.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0;
}

.docs-folder-item-wrap:hover .docs-folder-delete-btn {
  opacity: 1;
}

.docs-folder-delete-btn:hover {
  color: #dc2626;
}

.docs-sidebar-actions {
  margin-top: auto;
  padding: 0.75rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.docs-sidebar-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 0.75rem;
  white-space: nowrap;
}

.docs-new-folder-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  /* keep label on a single line and align icon + text vertically (ADM-30, ADM-55) */
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  line-height: 1;
}

.docs-new-folder-btn svg {
  flex-shrink: 0;
}

/* Required-field marker (ADM-56). */
.docs-required {
  color: var(--color-danger);
  font-weight: 600;
  margin-left: 0.125rem;
}

.docs-new-folder-btn:hover {
  background: var(--color-bg-hover, #f5f5f4);
  color: var(--color-text);
}

.docs-upload-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.docs-external-btn {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.docs-external-btn:hover {
  background: var(--color-bg-hover, #f5f5f4);
  color: var(--color-text);
}

/* Document main area */
.docs-main {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.docs-search-bar {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}

.docs-search-form {
  display: flex;
}

.docs-search-field {
  flex: 1;
  position: relative;
}

.docs-search-input {
  width: 100%;
  /* leave room on the right for the clear button so it can sit inside the field (ADM-54) */
  padding-right: 2.25rem !important;
}

.docs-search-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.docs-search-clear:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}

/* Generic in-field clear button used by the school selections search and other search bars (ADM-50, ADM-54). */
.search-input--with-icons {
  padding-left: 2.5rem !important;
  padding-right: 2.25rem !important;
}

.search-input-clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  /* Reset native <button> chrome so the clear control renders flush inside the
     field the same whether it's an <a> or a <button> (ADM-101, ADM-10). */
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.search-input-clear[hidden] {
  display: none;
}

.search-input-clear:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}

.docs-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}

.docs-content-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.docs-count-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.docs-main .flash {
  margin: 1rem 1.5rem 0;
}

/* Document list */
.docs-list {
  display: flex;
  flex-direction: column;
}

.docs-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition-fast);
}

.docs-list-item:last-child {
  border-bottom: none;
}

.docs-list-item--grouped {
  align-items: flex-start;
}

.docs-list-item:hover {
  background: var(--color-bg-surface);
}

.docs-file-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.docs-file-icon--pdf {
  background: #fef2f2;
  border-color: #fecaca;
}

.docs-file-icon--pdf .docs-ext-label {
  color: #dc2626;
}

.docs-file-icon--doc,
.docs-file-icon--docx {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.docs-file-icon--doc .docs-ext-label,
.docs-file-icon--docx .docs-ext-label {
  color: #2563eb;
}

.docs-file-icon--xls,
.docs-file-icon--xlsx,
.docs-file-icon--csv {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.docs-file-icon--xls .docs-ext-label,
.docs-file-icon--xlsx .docs-ext-label,
.docs-file-icon--csv .docs-ext-label {
  color: #16a34a;
}

.docs-file-icon--ppt,
.docs-file-icon--pptx {
  background: #fff7ed;
  border-color: #fed7aa;
}

.docs-file-icon--ppt .docs-ext-label,
.docs-file-icon--pptx .docs-ext-label {
  color: #ea580c;
}

.docs-file-icon--png,
.docs-file-icon--jpg,
.docs-file-icon--jpeg {
  background: #faf5ff;
  border-color: #e9d5ff;
}

.docs-file-icon--png .docs-ext-label,
.docs-file-icon--jpg .docs-ext-label,
.docs-file-icon--jpeg .docs-ext-label {
  color: #7c3aed;
}

.docs-file-icon--essay {
  background: #fefce8;
  border-color: #fde68a;
  color: #b45309;
}

.docs-file-icon--link {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}

.docs-ext-label {
  font-size: 0.5625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #2563eb;
}

.docs-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.docs-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-item-meta {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.docs-item-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin-top: 0.125rem;
}

.docs-item-url {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.125rem;
}

.docs-item-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.docs-list-item:hover .docs-item-actions {
  opacity: 1;
}

.docs-item-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.docs-delete-btn {
  color: var(--color-text-muted) !important;
}

.docs-delete-btn:hover {
  color: #dc2626 !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}

/* Document empty state */
.docs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  color: var(--color-text-muted);
  text-align: center;
  gap: 0.75rem;
}

.docs-empty-state svg {
  opacity: 0.3;
  margin-bottom: 0.5rem;
}

.docs-empty-state p {
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 0;
}

.docs-empty-state .text-muted {
  font-size: 0.8125rem;
  font-weight: 400;
}

/* Upload modal */
.docs-upload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);
  z-index: var(--z-drawer-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.docs-upload-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.docs-upload-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 520px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: var(--z-drawer);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.docs-upload-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.p-student-documents-index .main-content:has(.docs-upload-modal.is-open) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.docs-upload-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.docs-upload-modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.docs-upload-form {
  padding: 1.5rem;
}

.docs-upload-form .form-input {
  max-width: 100%;
}

.docs-form-field {
  margin-bottom: 1.25rem;
}

.docs-form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.docs-textarea {
  max-width: 100%;
  resize: vertical;
  min-height: 4rem;
}

.docs-form-hint {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
}

.docs-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* Dropzone */
.docs-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.docs-dropzone:hover,
.docs-dropzone--active {
  border-color: var(--color-accent);
  background: var(--color-bg-hover);
}

.docs-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.docs-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  color: var(--color-text-muted);
}

.docs-dropzone-text {
  font-size: 0.875rem;
  font-weight: 500;
}

.docs-dropzone-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.docs-dropzone-selected {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  pointer-events: none;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
}

/* In-modal status: validation errors and per-file upload outcomes.
   Never rendered as a page-level flash, so the modal can stay open. */
.docs-form-status:empty {
  display: none;
}

.docs-form-status-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
}

.docs-form-status-box--error {
  background: #fef2f2;
  border-color: #fecaca;
}

.docs-form-status-box--info {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.docs-form-status-line {
  margin: 0 0 0.25rem;
  font-weight: 600;
}

.docs-form-status-line--error {
  color: var(--color-danger);
}

.docs-form-status-line--ok {
  color: var(--color-success);
}

.docs-form-status-list {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
}

.docs-form-status-list:last-child {
  margin-bottom: 0;
}

.docs-form-status-item {
  font-size: 0.75rem;
  padding: 0.1rem 0;
  overflow-wrap: anywhere;
}

.docs-form-status-item--error {
  color: var(--color-danger);
}

.docs-form-status-item--ok {
  color: var(--color-text-muted);
}

/* Queued / attached file rows inside the modals */
.docs-file-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.docs-file-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.docs-file-row--removed .docs-file-row-name,
.docs-file-row--removed .docs-file-row-size {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.docs-file-row-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.docs-file-row-size {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* Beats .docs-form-field label, whose stacked-label bottom margin and line box
   lift this in-row checkbox above the centre line the row aligns everything to. */
.docs-file-row .docs-file-row-flag {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.docs-file-row-remove {
  flex-shrink: 0;
}

/* External link rows — each carries its own delete control */
.docs-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.docs-link-row .form-input {
  flex: 1;
  min-width: 0;
}

.docs-link-delete {
  flex-shrink: 0;
  color: var(--color-danger);
}

/* Attachments listed under a document title in the documents list */
.docs-attachments {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.4rem;
}

.docs-attachment {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--color-bg-hover);
  font-size: 0.75rem;
  min-width: 0;
}

.docs-attachment-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
}

.docs-attachment-name {
  flex: 1;
  min-width: 0;
  /* Single-line truncation, matching .docs-item-title and .docs-item-url in
     this same list. Wrapping a filename produced ugly mid-word breaks across
     4-6 lines on a phone ("WhatsApp Image 2026-08-31 at 1.35.43 PM.jpeg"), and
     no wrap setting helps when the row is narrow: the icon, size and Download
     button are all flex-shrink: 0, so the name is the only thing that gives.
     `nowrap` also renders any inherited overflow-wrap/word-break inert. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-attachment-meta {
  color: var(--color-text-muted);
  white-space: nowrap;
}

.docs-attachment-action {
  flex-shrink: 0;
}

/* Breakpoint migrated to the standard scale (see base.css).
   was: max-width: 768px  ->  now: max-width: 767px
   Behaviour changes only inside the 767px..768px band; >= 1024px unaffected. */

@media (max-width: 767px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .docs-folder-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 0.25rem;
    padding: 0 0.75rem 0.75rem;
  }

  .docs-folder-item {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .docs-sidebar-actions {
    display: none;
  }

  .docs-item-actions {
    opacity: 1;
  }
}

/* ── Counselor Dashboard & Views ───────────────────────────────────────── */

.counselor-sidebar {
  border-right-color: var(--color-border);
}

.c-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.c-grid>* {
  min-width: 0;
}

.c-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.c-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-xs);
  overflow-wrap: anywhere;
  min-width: 0;
}

.c-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.c-card-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.c-card-header .c-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}

.c-card-header .c-link:hover {
  color: var(--color-text);
}

.c-stat-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
}

.c-stat {
  display: flex;
  flex-direction: column;
}

.c-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.c-stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.c-meeting-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.c-meeting-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.c-meeting-item:hover {
  background: var(--color-bg-hover);
}

.c-meeting-time {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  min-width: 4.5rem;
  white-space: nowrap;
}

.c-meeting-info {
  flex: 1;
  min-width: 0;
}

.c-meeting-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-meeting-student {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-meeting-action {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-info);
  white-space: nowrap;
}

.c-alert-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.c-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  text-decoration: none;
}

.c-alert-item:hover {
  background: var(--color-bg-hover);
}

.c-alert-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.c-alert-icon--danger {
  color: var(--color-danger);
}

.c-alert-icon--warning {
  color: #d97706;
}

.c-alert-icon--info {
  color: var(--color-info);
}

.c-deadline-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.c-deadline-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.c-deadline-item:last-child {
  border-bottom: none;
}

.c-deadline-date {
  font-weight: 600;
  color: var(--color-text);
  min-width: 4.5rem;
  white-space: nowrap;
  font-size: 0.75rem;
}

.c-deadline-date--overdue {
  color: var(--color-danger);
}

.c-deadline-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-deadline-student {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.c-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.c-activity-item {
  display: flex;
  gap: 0.625rem;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.c-activity-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.c-activity-text {
  flex: 1;
}

.c-activity-time {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Student List ──────────────────────────────────────────────────────── */

.c-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.c-filter-bar select,
.c-filter-bar input[type="text"] {
  font-size: 0.8125rem;
  padding: 0.4375rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  /* Use background-color (not the background shorthand) so the global custom
     select chevron's background-image survives on filter-bar dropdowns (ADM-96). */
  background-color: var(--color-bg-surface);
  color: var(--color-text);
  height: 2.125rem;
}

.c-filter-bar select:focus,
.c-filter-bar input[type="text"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(28, 25, 23, 0.08);
}

.c-filter-bar .c-btn-sm {
  height: 2.125rem;
}

.c-saved-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  margin-left: auto;
  /* Cap how much horizontal space saved views can claim and let extras flow
     onto a second row instead of crushing the filter bar (ADM-42). */
  max-width: min(60%, 720px);
  max-height: 4.5rem;
  overflow-y: auto;
  padding: 0.125rem 0.25rem 0.125rem 0;
  scrollbar-width: thin;
}

.c-saved-views::-webkit-scrollbar {
  width: 6px;
}

.c-saved-views::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.c-saved-view-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  white-space: nowrap;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c-saved-view-tag:hover,
.c-saved-view-tag--active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* Saved view pill + its delete control sit together as one unit (ADM-97). */
.c-saved-view {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
}

.c-saved-view-delete-form {
  display: contents;
}

.c-saved-view-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1875rem;
  line-height: 0;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  appearance: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.c-saved-view-delete:hover {
  color: #dc2626;
  background: var(--color-bg-hover);
}

.c-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.c-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.c-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
  vertical-align: middle;
}

.c-table tr:last-child td {
  border-bottom: none;
}

.c-table tbody tr {
  transition: background var(--transition-fast);
}

.c-table tbody tr:hover {
  background: var(--color-bg-hover);
}

.c-table a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.c-table a:hover {
  text-decoration: underline;
}

.c-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.c-table-responsive .c-table {
  min-width: 760px;
  /* prevents columns being crushed below a readable width */
}

.c-table th,
.c-table td {
  overflow-wrap: normal;
  word-break: normal;
  white-space: nowrap;
}

/* Title and Student columns can contain longer text — let them wrap
   normally at word boundaries instead of forcing one unbroken line. */
.c-table td:nth-child(1),
.c-table td:nth-child(2) {
  white-space: normal;
}

/* Breakpoint migrated to the standard scale (see base.css).
   was: max-width: 640px  ->  now: max-width: 767px
   Behaviour changes only inside the 640px..767px band; >= 1024px unaffected. */

@media (max-width: 767px) {
  .c-table-responsive .c-table {
    min-width: 640px;
  }
}

/* ── Status Badges ─────────────────────────────────────────────────────── */

.c-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.c-badge--draft {
  background: #f3f4f6;
  color: #6b7280;
}

.c-badge--submitted {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-badge--in-review {
  background: #fef3c7;
  color: #92400e;
}

.c-badge--counselor-approved {
  background: #d1fae5;
  color: #065f46;
}

.c-badge--with-manager {
  background: #fef3c7;
  color: #92400e;
}

.c-badge--with-specialist {
  background: #faf5ff;
  color: #7c3aed;
}

.c-badge--specialist-reviewed {
  background: #eff6ff;
  color: #1d4ed8;
}

.c-badge--feedback-approved {
  background: #ecfdf5;
  color: #047857;
}

.c-badge--revision-requested {
  background: #fee2e2;
  color: #991b1b;
}

.c-badge--approved {
  background: #d1fae5;
  color: #065f46;
}

.c-badge--final {
  background: #d1fae5;
  color: #065f46;
}

.c-badge--forwarded {
  background: #fef3c7;
  color: #92400e;
}

.c-badge--returned-without-feedback {
  background: #e0e7ff;
  color: #3730a3;
}

.c-badge--commented {
  background: #f3f4f6;
  color: #6b7280;
}

.c-badge--feedback {
  background: #e0e7ff;
  color: #3730a3;
}

.c-badge--internal {
  background: #f3f4f6;
  color: #4b5563;
}

.c-badge--student {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-badge--pending {
  background: #f3f4f6;
  color: #6b7280;
}

.c-badge--in-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-badge--completed {
  background: #d1fae5;
  color: #065f46;
}

.c-badge--cancelled {
  background: #f3f4f6;
  color: #9ca3af;
}

.c-badge--low {
  background: #f3f4f6;
  color: #6b7280;
}

.c-badge--normal {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-badge--high {
  background: #fee2e2;
  color: #991b1b;
}

.c-badge--eligible {
  background: #fef3c7;
  color: #92400e;
}

.c-badge--delivered {
  background: #d1fae5;
  color: #065f46;
}

.c-badge--overdue {
  background: #fee2e2;
  color: #991b1b;
}

.c-badge--scheduled {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-badge--expedited {
  background: #fef3c7;
  color: #92400e;
}

.c-badge--no-show {
  background: #fee2e2;
  color: #991b1b;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.c-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  line-height: 1.25;
}

.c-btn:hover {
  background: var(--color-bg-hover);
}

.c-btn--primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.c-btn--primary:hover,
.c-btn--primary:focus-visible {
  background: var(--color-accent-hover);
  color: #fff;
}

.c-btn--danger {
  color: var(--color-danger);
  border-color: #fecaca;
}

.c-btn--danger:hover {
  background: #fef2f2;
}

.c-btn:disabled,
.c-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.c-btn-sm {
  font-size: 0.75rem;
  padding: 0.3125rem 0.625rem;
}

.c-btn-xs {
  font-size: 0.6875rem;
  padding: 0.1875rem 0.5rem;
}

/* ── Tabs ──────────────────────────────────────────────────────────────── */

.c-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.c-tab {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.625rem 1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.c-tab:hover {
  color: var(--color-text);
}

.c-tab--active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* ── Forms ─────────────────────────────────────────────────────────────── */

.c-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

/* Section sub-labels (e.g. "Primary contact") sitting directly inside a card
   need matching horizontal padding so they align with the fields (ADM-85). */
.admin-section>.detail-section-label {
  padding: 1rem 1.25rem 0;
}

.c-form-grid>.c-form-group {
  margin-bottom: 0;
}

.c-form-group {
  margin-bottom: 1rem;
}

.c-form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.c-form-group input,
.c-form-group textarea,
.c-form-group select {
  width: 100%;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  /* background-color preserves the global custom chevron on form-group selects (ADM-59). */
  background-color: var(--color-bg-surface);
  color: var(--color-text);
}

.c-form-group textarea {
  resize: vertical;
  min-height: 5rem;
}

.c-form-group input:focus,
.c-form-group textarea:focus,
.c-form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(28, 25, 23, 0.08);
}

.c-form-inline {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.c-form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* ── Notes (threaded) ──────────────────────────────────────────────────── */

.c-note-privacy-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-hover, rgba(0, 0, 0, 0.03));
  border-radius: var(--radius-sm);
}

.c-note-threads {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.c-note-thread {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.c-note-thread:last-child {
  border-bottom: none;
}

.c-note-entry {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.c-note-avatar-col {
  flex-shrink: 0;
}

.c-note-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.c-note-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.c-note-content {
  flex: 1;
  min-width: 0;
}

.c-note-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.c-note-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.c-note-role-badge {
  display: inline-block;
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.0625rem 0.375rem;
  border-radius: var(--radius-sm);
  background: var(--color-border-subtle);
  color: var(--color-text-muted);
}

.c-note-time {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.c-note-body {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.c-note-replies {
  margin-top: 0.75rem;
  margin-left: 2.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.c-note-entry--reply .c-note-avatar {
  width: 24px;
  height: 24px;
}

.c-note-entry--reply .c-note-avatar-placeholder {
  width: 24px;
  height: 24px;
  font-size: 0.5625rem;
}

.c-note-reply-toggle {
  margin-top: 0.375rem;
  margin-left: 2.75rem;
}

.c-btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  padding: 0.125rem 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.c-btn-link:hover {
  color: var(--color-accent);
}

.c-note-reply-form {
  margin-top: 0.5rem;
  margin-left: 2.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-accent);
}

.c-note-reply-form textarea {
  width: 100%;
  font-size: 0.8125rem;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  resize: vertical;
  font-family: inherit;
}

.c-note-reply-form .c-form-actions {
  margin-top: 0.375rem;
}

.c-note-thread-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.375rem;
  margin-left: 2.75rem;
}

.c-btn-link--muted {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.c-btn-link--muted:hover {
  opacity: 1;
  color: var(--color-text-muted);
}

.c-note-thread--archived {
  opacity: 0.6;
}

.c-note-archived-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-bg-hover, rgba(0, 0, 0, 0.03));
  border-radius: var(--radius-sm);
}

.c-card-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Unread indicators */
.c-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.3125rem;
  font-size: 0.5625rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-danger, #e53e3e);
  border-radius: 999px;
  margin-left: 0.25rem;
}

.c-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-danger, #e53e3e);
  flex-shrink: 0;
}

.c-student-name-cell {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ── Tasks ─────────────────────────────────────────────────────────────── */

.c-task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.c-task-item:last-child {
  border-bottom: none;
}

.c-task-check {
  margin-top: 0.125rem;
}

.c-task-check input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--color-accent);
}

.c-task-content {
  flex: 1;
  min-width: 0;
}

.c-task-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.c-task-title--done {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.c-task-meta {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.c-task-due--overdue {
  color: var(--color-danger);
  font-weight: 600;
}

/* ── Messages ──────────────────────────────────────────────────────────── */

.c-thread-list {
  display: flex;
  flex-direction: column;
}

.c-thread-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--transition-fast);
}

.c-thread-item:hover {
  background: var(--color-bg-hover);
}

.c-thread-item--unread {
  background: #fafaf9;
}

.c-thread-unread-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-info);
  flex-shrink: 0;
}

.c-thread-content {
  flex: 1;
  min-width: 0;
}

.c-thread-subject {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-thread-preview {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-thread-time {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.c-message-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.c-message {
  display: flex;
  gap: 0.625rem;
}

.c-message-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-bg-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.c-message-body {
  flex: 1;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
}

.c-message--self .c-message-body {
  background: var(--color-accent);
  color: #fff;
}

.c-message-sender {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.c-message-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.c-message-time {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.c-message--self .c-message-time {
  color: rgba(255, 255, 255, 0.7);
}

.c-reply-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.c-reply-form textarea {
  flex: 1;
  font-size: 0.8125rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  resize: none;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 8rem;
}

.c-reply-form .c-btn {
  height: 2.5rem;
}

.c-reply-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(28, 25, 23, 0.08);
}

/* ── Essay Review Timeline ─────────────────────────────────────────────── */

.c-review-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.c-review-item {
  padding: 0.75rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  min-width: 0;
}

.c-review-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.c-review-header .c-note-author,
.c-review-header .c-note-role-badge,
.c-review-header .c-note-time {
  overflow-wrap: break-word;
}

.c-review-body {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

/* ── Student Context Tabs Content ──────────────────────────────────────── */

.c-student-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.c-student-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--color-bg-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.c-student-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.c-student-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.c-student-meta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.c-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.c-section {
  margin-bottom: 1.5rem;
}

.c-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

/* ── Doc list inside student context ───────────────────────────────────── */

.c-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.c-doc-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.8125rem;
  transition: background var(--transition-fast);
}

.c-doc-item:hover {
  background: var(--color-bg-hover);
}

.c-doc-icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.c-doc-title {
  flex: 1;
  font-weight: 500;
}

.c-doc-meta {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* ── Timeline ──────────────────────────────────────────────────────────── */

.c-timeline {
  position: relative;
  padding-left: 1.5rem;
}

.c-timeline::before {
  content: "";
  position: absolute;
  left: 0.3125rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--color-border);
}

.c-timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.c-timeline-item::before {
  content: "";
  position: absolute;
  left: -1.1875rem;
  top: 0.4375rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-border);
  border: 2px solid var(--color-bg-surface);
}

.c-timeline-date {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.125rem;
}

.c-timeline-text {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* ── Strategy Reports ──────────────────────────────────────────────────── */

.c-sr-state {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* ── Service Utilization Panel ─────────────────────────────────────────── */

.c-usage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.c-usage-card {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 0.875rem;
}

.c-usage-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

.c-usage-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.c-usage-detail {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ── Modal / Slide-over for forms ──────────────────────────────────────── */

.c-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: var(--z-modal-overlay);
  display: none;
}

.c-modal-overlay.is-open {
  display: block;
}

.c-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  z-index: var(--z-modal);
  width: min(32rem, 90vw);
  max-height: 85vh;
  overflow-y: auto;
  display: none;
}

.c-modal.is-open {
  display: block;
}

.c-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.c-modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.c-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.25rem;
}

.essay-comment-modal-overlay {
  display: block;
}

.essay-comment-modal {
  display: block;
}

.essay-comment-modal .c-modal-close {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #f3f4f6;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.essay-comment-modal .c-modal-close:hover {
  border-color: #d1d5db;
  background: #e5e7eb;
  color: var(--color-text);
}

.essay-comment-modal .c-modal-close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.essay-comment-modal-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.essay-comment-modal-input {
  display: block;
  max-width: none;
  min-height: 7rem;
  resize: vertical;
}

.essay-comment-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}

.essay-comment-character-count {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.essay-comment-character-count.is-at-limit {
  color: var(--color-danger);
  font-weight: 600;
}

.essay-comment-modal-error {
  margin: 0.5rem 0 0;
  color: var(--color-danger);
  font-size: 0.75rem;
}

.essay-comment-modal-actions {
  display: flex;
  gap: 0.5rem;
}

/* Breakpoint migrated to the standard scale (see base.css).
   was: max-width: 768px  ->  now: max-width: 767px
   Behaviour changes only inside the 767px..768px band; >= 1024px unaffected. */

@media (max-width: 767px) {
  .c-grid {
    grid-template-columns: 1fr;
  }

  .c-grid--3 {
    grid-template-columns: 1fr;
  }
}

/* ── Onboarding Tracker ── */
.onboarding-tracker {
  margin-bottom: 1.5rem;
}

.onboarding-progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.onboarding-progress-bar-wrapper {
  padding: 0 1.5rem 0.25rem;
}

.onboarding-progress-bar-wrapper .progress-bar-track {
  height: 6px;
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.5rem;
  border-top: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.onboarding-step--link:hover {
  background: var(--color-bg-hover);
  color: inherit;
}

.onboarding-step--locked {
  opacity: 0.5;
  pointer-events: none;
}

.onboarding-step--locked .onboarding-step-check {
  border-color: var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
}

.onboarding-step-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.onboarding-step--done .onboarding-step-check {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.onboarding-step-number {
  font-size: 0.6875rem;
  font-weight: 700;
}

.onboarding-step-content {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  flex: 1;
  min-width: 0;
}

.onboarding-step-label {
  font-size: 0.875rem;
  font-weight: 600;
}

.onboarding-step--done .onboarding-step-label {
  color: var(--color-text-muted);
}

.onboarding-step-status {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.onboarding-step-status--done {
  color: #16a34a;
  font-weight: 500;
}

.onboarding-step-arrow {
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.onboarding-step--link:hover .onboarding-step-arrow {
  transform: translateX(2px);
  color: var(--color-text);
}

.onboarding-step-action {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--color-accent);
  color: #fff;
  transition: background var(--transition-fast);
}

.onboarding-step--link:hover .onboarding-step-action {
  background: var(--color-accent-hover);
}

/* ── My Admittedly Team Bar ── */
.team-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-surface);
}

.team-bar-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.team-bar-members {
  display: flex;
  align-items: center;
  overflow-x: auto;
}

.team-bar-members::-webkit-scrollbar {
  height: 0px;
}

.team-bar-member {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.team-bar-member--link {
  text-decoration: none;
  color: inherit;
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  position: relative;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
}

.team-bar-member--link:hover {
  background: var(--color-bg-hover);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.team-bar-member--link:hover .team-bar-avatar,
.team-bar-member--link:hover .team-bar-avatar-placeholder {
  box-shadow: 0 0 0 2px var(--color-accent);
}

.team-bar-member-email-icon {
  color: var(--color-text-muted);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.team-bar-member--link:hover .team-bar-member-email-icon {
  opacity: 1;
}

.team-bar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.team-bar-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.team-bar-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}

.team-bar-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.team-bar-role {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.team-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}

.team-bar-action {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.team-bar-action:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.team-bar-action svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.team-bar-action:hover svg {
  opacity: 1;
}

/* Breakpoint migrated to the standard scale (see base.css).
   was: max-width: 640px  ->  now: max-width: 767px
   Behaviour changes only inside the 640px..767px band; >= 1024px unaffected. */

@media (max-width: 767px) {
  .team-bar {
    padding: 0.625rem 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .team-bar-title {
    display: none;
  }

  .team-bar-members {
    gap: 1rem;
  }

  .team-bar-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    padding-top: 0.25rem;
    flex-wrap: wrap;
  }
}

/* ── Staff / Counselor Dashboard ── */
.staff-welcome {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.staff-welcome-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.staff-welcome-avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.staff-welcome-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.staff-welcome-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.staff-welcome-role {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.staff-welcome-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 1.5rem;
  border-left: 1px solid var(--color-border);
}

/* Breakpoint migrated to the standard scale (see base.css).
   was: max-width: 640px  ->  now: max-width: 767px
   Behaviour changes only inside the 640px..767px band; >= 1024px unaffected. */

@media (max-width: 767px) {
  .staff-welcome {
    flex-wrap: wrap;
  }

  .staff-welcome-stats {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  /* Number left-aligned flush with its label's own left edge, instead of
     centered above it, per request. */
  .p-counselor-dashboard-show .staff-stat,
  .p-essay-specialist-dashboard-show .staff-stat {
    align-items: flex-start;
  }
}

.staff-stats-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.staff-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.staff-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.staff-stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.staff-stats-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--color-border);
}

.staff-roster-table td {
  vertical-align: middle;
}

a.staff-student-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.375rem;
  margin: -0.25rem -0.375rem;
  transition: background 0.15s ease;
}

a.staff-student-name-cell:hover {
  background: var(--color-bg-hover, rgba(0, 0, 0, 0.04));
}

a.staff-student-name-cell:hover .staff-student-name {
  color: var(--color-accent);
}

.staff-student-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.staff-student-email {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.staff-student-school {
  display: block;
  font-size: 0.8125rem;
}

.staff-student-location {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.staff-onboarding-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-onboarding-bar {
  width: 48px;
  height: 6px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.staff-onboarding-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.staff-next-call {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
}

.staff-next-call-time {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* ── Workflow Progress Tracker ── */

.wf-tracker {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 1.25rem 1.5rem 1rem;
  overflow-x: auto;
}

.wf-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  min-width: 5.5rem;
}

.wf-step-node {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all 0.2s ease;
}

.wf-step-node svg {
  display: none;
}

.wf-step--completed .wf-step-node {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.wf-step--completed .wf-step-node svg {
  display: block;
  color: var(--color-bg);
}

.wf-step--active .wf-step-node {
  border-color: var(--color-accent);
  background: var(--color-bg);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.12);
}

.wf-step--active .wf-step-node::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-accent);
}

.wf-step--revision .wf-step-node {
  border-color: #f59e0b;
  background: #fffbeb;
}

.wf-step--revision .wf-step-node svg {
  display: block;
  color: #f59e0b;
}

.wf-step-connector {
  position: absolute;
  top: calc(0.875rem - 1px);
  left: calc(50% + 0.875rem + 0.125rem);
  right: calc(-50% + 0.875rem + 0.125rem);
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.wf-step--completed .wf-step-connector {
  background: var(--color-accent);
}

.wf-step:last-child .wf-step-connector {
  display: none;
}

.wf-step-label {
  margin-top: 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.3;
  max-width: 6rem;
}

.wf-step--completed .wf-step-label {
  color: var(--color-text-secondary);
}

.wf-step--active .wf-step-label {
  color: var(--color-accent);
  font-weight: 700;
}

.wf-step--revision .wf-step-label {
  color: #d97706;
  font-weight: 700;
}

.wf-round-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  background: #f5f5f4;
  color: var(--color-text-secondary);
}

.wf-round-badge--active {
  background: #fffbeb;
  color: #d97706;
}

/* ── Tiptap Rich-Text Editor ── */

.tiptap-wrapper {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  overflow: hidden;
}

.tiptap-toolbar {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  background: #fafafa;
  flex-wrap: wrap;
}

.tiptap-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm, 4px);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.tiptap-toolbar button:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.tiptap-toolbar .tiptap-sep {
  width: 1px;
  height: 1rem;
  background: var(--color-border);
  margin: 0 0.25rem;
}

.tiptap-content {
  min-height: 200px;
  padding: 1rem 1.25rem;
  outline: none;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
  font-family: "Inter", sans-serif;
}

.tiptap-content:focus {
  outline: none;
}

.tiptap-content p {
  margin: 0 0 0.75em;
  display: inline;
}

.tiptap-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  line-height: 1.3;
}

.tiptap-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.25em 0 0.5em;
  line-height: 1.3;
}

.tiptap-content ul,
.tiptap-content ol {
  padding-left: 1.5em;
  margin: 0.5em 0 1em;
}

.tiptap-content li {
  margin: 0.25em 0;
}

.tiptap-content blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1rem;
  margin: 1em 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.tiptap-content strong {
  font-weight: 600;
}

.tiptap-content p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--color-text-muted);
  pointer-events: none;
  height: 0;
}

.tiptap-wordcount {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-top: 1px solid var(--color-border);
  background: #fafafa;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.tiptap-wc--warn {
  color: #d97706;
}

.tiptap-wc--over {
  color: #dc2626;
  font-weight: 600;
}

.tiptap-count-sep {
  width: 1px;
  height: 0.75rem;
  background: var(--color-border);
}

/* Read-only mode */
.tiptap-readonly {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-text);
  font-family: "Inter", sans-serif;
  padding: 0.25rem 0;
}

.tiptap-readonly p {
  margin: 0 0 0.75em;
}

.tiptap-readonly h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1.5em 0 0.5em;
  line-height: 1.3;
}

.tiptap-readonly h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.25em 0 0.5em;
  line-height: 1.3;
}

.tiptap-readonly ul,
.tiptap-readonly ol {
  padding-left: 1.5em;
  margin: 0.5em 0 1em;
}

.tiptap-readonly li {
  margin: 0.25em 0;
}

.tiptap-readonly blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1rem;
  margin: 1em 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.tiptap-readonly strong {
  font-weight: 600;
}

/* ── Tiptap Focus Mode ── */

body.tiptap-focus-body {
  overflow: hidden;
}

.tiptap-focus-wrap {
  transition: none;
}

.tiptap-focus-wrap.tiptap-focus-active {
  position: fixed;
  inset: 0;
  z-index: var(--z-pinned);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--focus-bg);
  color: var(--focus-text);

  --focus-bg: #f7f7f5;
  --focus-surface: #ffffff;
  --focus-border: #e5e2dd;
  --focus-text: #1c1917;
  --focus-text-secondary: #57534e;
  --focus-text-muted: #78716c;
  --focus-toolbar-bg: #fafafa;
  --focus-toolbar-hover: #e5e2dd;
  --focus-editor-bg: #ffffff;
}

/* Theme: Warm */
.tiptap-focus-wrap.tiptap-focus-active[data-focus-theme="warm"] {
  --focus-bg: #f0ebe1;
  --focus-surface: #f7f3eb;
  --focus-border: #d6cfc1;
  --focus-text: #2c2418;
  --focus-text-secondary: #5c5040;
  --focus-text-muted: #7a6e5e;
  --focus-toolbar-bg: #e8e2d6;
  --focus-toolbar-hover: #d6cfc1;
  --focus-editor-bg: #f7f3eb;
}

/* Theme: Dark */
.tiptap-focus-wrap.tiptap-focus-active[data-focus-theme="dark"] {
  --focus-bg: #1a1a1a;
  --focus-surface: #232323;
  --focus-border: #333333;
  --focus-text: #d4d4d4;
  --focus-text-secondary: #a3a3a3;
  --focus-text-muted: #737373;
  --focus-toolbar-bg: #1f1f1f;
  --focus-toolbar-hover: #333333;
  --focus-editor-bg: #1e1e1e;
}

/* Theme: Green */
.tiptap-focus-wrap.tiptap-focus-active[data-focus-theme="green"] {
  --focus-bg: #e8efe6;
  --focus-surface: #f0f5ee;
  --focus-border: #c5d4c0;
  --focus-text: #1a2618;
  --focus-text-secondary: #3d5038;
  --focus-text-muted: #5e7658;
  --focus-toolbar-bg: #dbe5d8;
  --focus-toolbar-hover: #c5d4c0;
  --focus-editor-bg: #f0f5ee;
}

/* Theme: Dusk */
.tiptap-focus-wrap.tiptap-focus-active[data-focus-theme="dusk"] {
  --focus-bg: #23202e;
  --focus-surface: #2a2738;
  --focus-border: #3d3952;
  --focus-text: #cdc5e0;
  --focus-text-secondary: #a99ec0;
  --focus-text-muted: #7e7596;
  --focus-toolbar-bg: #282535;
  --focus-toolbar-hover: #3d3952;
  --focus-editor-bg: #262332;
}

.tiptap-focus-active .tiptap-focus-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.625rem 1.5rem;
  border-bottom: 1px solid var(--focus-border);
  background: var(--focus-toolbar-bg);
  flex-shrink: 0;
}

.tiptap-focus-header {
  display: none;
}

.tiptap-focus-active .tiptap-focus-prompt {
  display: block;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid var(--focus-border);
  background: var(--focus-surface);
  flex-shrink: 0;
  max-height: 30vh;
  overflow-y: auto;
}

.tiptap-focus-prompt {
  display: none;
}

.tiptap-focus-prompt-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--focus-text-muted, var(--color-text-muted));
  margin-bottom: 0.25rem;
}

.tiptap-focus-prompt-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--focus-text-secondary, var(--color-text-secondary));
}

.tiptap-focus-active .tiptap-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none;
  border-radius: 0;
  min-height: 0;
  background: var(--focus-bg);
}

.tiptap-focus-active [data-essay-editor-target="editor"] {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  background: var(--focus-editor-bg);
}

.tiptap-focus-active .tiptap-content {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
  padding: 2rem 2rem 4rem;
  min-height: 300px;
  color: var(--focus-text);
}

.tiptap-focus-active .tiptap-content blockquote {
  border-left-color: var(--focus-border);
  color: var(--focus-text-secondary);
}

.tiptap-focus-active .tiptap-toolbar {
  border-radius: 0;
  background: var(--focus-toolbar-bg);
  border-bottom-color: var(--focus-border);
}

.tiptap-focus-active .tiptap-toolbar button {
  color: var(--focus-text-secondary);
}

.tiptap-focus-active .tiptap-toolbar button:hover {
  background: var(--focus-toolbar-hover);
  color: var(--focus-text);
}

.tiptap-focus-active .tiptap-toolbar .tiptap-sep {
  background: var(--focus-border);
}

.tiptap-focus-active .tiptap-wordcount {
  border-radius: 0;
  background: var(--focus-toolbar-bg);
  border-top: 1px solid var(--focus-border);
  color: var(--focus-text-muted);
}

.tiptap-focus-active .c-form-actions {
  display: none;
}

.tiptap-focus-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--focus-text, var(--color-text));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.tiptap-focus-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--focus-border, var(--color-border));
  border-radius: var(--radius-sm, 4px);
  background: var(--focus-surface, var(--color-bg));
  color: var(--focus-text-secondary, var(--color-text-secondary));
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.tiptap-focus-exit:hover {
  background: var(--focus-toolbar-hover, var(--color-border));
  color: var(--focus-text, var(--color-text));
}

.tiptap-focus-active .tiptap-content p.is-editor-empty:first-child::before {
  color: var(--focus-text-muted);
}

/* ── Focus Mode Theme Switcher ── */

.tiptap-focus-themes {
  display: none;
}

.tiptap-focus-active .tiptap-focus-themes {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  margin-right: 0.75rem;
}

.tiptap-theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  padding: 0;
  position: relative;
  outline: none;
}

.tiptap-theme-dot:hover {
  transform: scale(1.15);
}

.tiptap-theme-dot.is-active {
  border-color: var(--focus-text);
  box-shadow: 0 0 0 1px var(--focus-surface);
}

.tiptap-theme-dot[data-theme="light"] {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d4d4d4;
}

.tiptap-theme-dot[data-theme="light"].is-active {
  box-shadow: inset 0 0 0 1px #d4d4d4, 0 0 0 1px var(--focus-surface);
}

.tiptap-theme-dot[data-theme="warm"] {
  background: #f0ebe1;
  box-shadow: inset 0 0 0 1px #c9bfa8;
}

.tiptap-theme-dot[data-theme="warm"].is-active {
  box-shadow: inset 0 0 0 1px #c9bfa8, 0 0 0 1px var(--focus-surface);
}

.tiptap-theme-dot[data-theme="dark"] {
  background: #1a1a1a;
}

.tiptap-theme-dot[data-theme="green"] {
  background: #dbe5d8;
  box-shadow: inset 0 0 0 1px #a8bda3;
}

.tiptap-theme-dot[data-theme="green"].is-active {
  box-shadow: inset 0 0 0 1px #a8bda3, 0 0 0 1px var(--focus-surface);
}

.tiptap-theme-dot[data-theme="dusk"] {
  background: #23202e;
}

/* ── Prompt Picker Cards ── */

.c-prompt-card:has(input:checked) {
  border-color: var(--color-accent);
  background: #fafaf9;
}

.c-prompt-card:hover {
  border-color: var(--color-text-muted);
}

/* ── School Accordion Cards ─────────────────────────────────────────── */

.school-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.school-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-fast);
}

.school-card:hover {
  box-shadow: var(--shadow-sm);
}

.school-card.is-open {
  box-shadow: var(--shadow-md);
}

.school-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
  border-radius: var(--radius-lg);
}

.school-card.is-open .school-card-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.school-card-header:hover {
  background: var(--color-bg-hover);
}

.school-card-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform var(--transition-normal);
}

.school-card.is-open .school-card-chevron {
  transform: rotate(90deg);
}

.school-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
}

.school-card-location {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: -0.25rem;
}

.school-card-meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-left: auto;
  flex-shrink: 0;
}

.school-card-essay-progress {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.school-card-body {
  display: none;
  padding: 1rem 1.25rem 1.25rem;
}

.school-card.is-open .school-card-body {
  display: block;
}

/* School info section inside expanded card */
.school-info-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.school-info-details {
  flex: 1;
}

.school-info-details p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.school-info-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--color-info);
  text-decoration: none;
  font-weight: 500;
}

.school-info-link:hover {
  text-decoration: underline;
}

/* ── Status Tracker ─────────────────────────────────────────────────── */

.school-status-tracker {
  display: flex;
  align-items: center;
  gap: 0;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.school-status-step {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  position: relative;
}

.school-status-step:last-child {
  flex: 0;
}

.school-status-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  transition: all var(--transition-fast);
}

.school-status-dot svg {
  display: none;
}

.school-status-step.is-completed .school-status-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.school-status-step.is-completed .school-status-dot svg {
  display: block;
  color: #fff;
}

.school-status-step.is-current .school-status-dot {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.1);
}

.school-status-step.is-decision-positive .school-status-dot {
  background: var(--color-success);
  border-color: var(--color-success);
}

.school-status-step.is-decision-positive .school-status-dot svg {
  display: block;
  color: #fff;
}

.school-status-step.is-decision-negative .school-status-dot {
  background: var(--color-danger);
  border-color: var(--color-danger);
}

.school-status-step.is-decision-negative .school-status-dot svg {
  display: block;
  color: #fff;
}

.school-status-step.is-decision-waitlisted .school-status-dot {
  background: #f59e0b;
  border-color: #f59e0b;
}

.school-status-step.is-decision-waitlisted .school-status-dot svg {
  display: block;
  color: #fff;
}

.school-status-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  transition: background var(--transition-fast);
}

.school-status-step.is-completed .school-status-line {
  background: var(--color-accent);
}

.school-status-label {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--color-text-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.school-status-step.is-current .school-status-label {
  color: var(--color-text);
  font-weight: 600;
}

/* Status badge dropdown */
.school-status-badge-wrap {
  position: relative;
}

.school-status-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.school-status-badge-btn:hover {
  opacity: 0.85;
}

.school-status-badge-btn svg {
  width: 10px;
  height: 10px;
  transition: transform var(--transition-fast);
}

.school-status-badge-wrap.is-open .school-status-badge-btn svg {
  transform: rotate(180deg);
}

.school-status-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.25rem;
  z-index: var(--z-dropdown);
  min-width: 160px;
}

.school-status-badge-wrap.is-open .school-status-menu {
  display: block;
}

.school-status-menu-item {
  display: block;
  width: 100%;
  padding: 0.4rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: background var(--transition-fast);
}

.school-status-menu-item:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.school-status-menu-item.is-active {
  background: var(--color-bg-active);
  font-weight: 600;
  color: var(--color-text);
}

/* Status badge color variants */
.c-badge--researching {
  background: #f3f4f6;
  color: #6b7280;
}

.c-badge--applying {
  background: #dbeafe;
  color: #1d4ed8;
}

.c-badge--submitted-app {
  background: #fef3c7;
  color: #92400e;
}

.c-badge--accepted {
  background: #d1fae5;
  color: #065f46;
}

.c-badge--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.c-badge--waitlisted {
  background: #fef3c7;
  color: #92400e;
}

/* ── Prompt List inside accordion ───────────────────────────────────── */

.school-prompts-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.625rem;
}

.school-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.school-prompt-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.school-prompt-item:hover {
  border-color: var(--color-border);
}

.school-prompt-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}

.school-prompt-icon--not-started {
  background: #f3f4f6;
  color: #9ca3af;
}

.school-prompt-icon--in-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.school-prompt-icon--done {
  background: #d1fae5;
  color: #065f46;
}

.school-prompt-content {
  flex: 1;
  min-width: 0;
}

.school-prompt-text {
  font-size: 0.8125rem;
  color: var(--color-text);
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

.school-prompt-meta {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.school-prompt-essay {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
  font-size: 0.75rem;
}

.school-prompt-essay a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.school-prompt-essay a:hover {
  text-decoration: underline;
}

.school-prompt-actions {
  flex-shrink: 0;
  align-self: center;
}

.school-no-prompts {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* Remove button in header */
.school-card-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}

.school-card-remove:hover {
  color: var(--color-danger);
  background: #fee2e2;
}

/* ── School deadline ── */

.school-deadline-section {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.school-deadline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.school-deadline-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.school-deadline-info svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.school-deadline-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 9999px;
  letter-spacing: 0.03em;
}

.school-deadline-badge--ed {
  background: #dbeafe;
  color: #1d4ed8;
}

.school-deadline-badge--ea {
  background: #d1fae5;
  color: #047857;
}

.school-deadline-badge--ed0 {
  background: #bfdbfe;
  color: #1e40af;
}

.school-deadline-badge--ed2 {
  background: #c7d2fe;
  color: #4338ca;
}

.school-deadline-badge--rea {
  background: #fef3c7;
  color: #92400e;
}

.school-deadline-badge--scea {
  background: #fce7f3;
  color: #9d174d;
}

.school-deadline-badge--rd {
  background: #f3e8ff;
  color: #7c3aed;
}

.school-deadline-label {
  font-size: 0.8125rem;
  color: var(--color-text);
  font-weight: 500;
}

.school-deadline-date {
  font-size: 0.8125rem;
  color: var(--color-text);
}

.school-deadline-date--overdue {
  color: var(--color-danger);
  font-weight: 600;
}

.school-deadline-empty {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.school-deadline-form {
  padding-top: 0.5rem;
}

.school-deadline-fields {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.school-deadline-actions {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  height: 2rem;
  align-self: flex-end;
}

.school-deadline-fields .form-input,
.school-deadline-fields select {
  height: 2rem;
  line-height: 1.2;
}

.deadline-edit-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.deadline-edit-row .form-input,
.deadline-edit-row select {
  height: 2rem;
  line-height: 1.2;
}

.deadline-edit-row .c-form-group {
  margin-bottom: 0;
}



.docs-search-field {
  overflow: hidden;
}

.docs-search-input.form-input {
  height: 2.25rem;
}


.essay-focus-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  margin-right: 0.375rem;
}

.admin-section-header:has(> .essay-focus-btn) h3 {
  margin-right: 0.5rem;
}

.tiptap-content,
.tiptap-readonly,
.c-form-group textarea {
  overflow-wrap: anywhere;
  word-break: break-word;
}


.timezone-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-width: 400px;
}

.timezone-filter-wrap input[type="search"] {
  width: 100%;
}


.select-filter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 160px;
}

/* ── Essay filter bar ── */

.essay-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.essay-college-filter .filter-select {
  min-width: 180px;
  max-width: 260px;
  padding: 0.3125rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  /* background-color keeps the global custom chevron visible on this filter (ADM-96). */
  background-color: var(--color-bg-surface);
  color: var(--color-text);
  cursor: pointer;
}

/* ── Sortable table headers ── */

.c-table-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.c-table-sort-link:hover {
  color: var(--color-text);
  text-decoration: none;
}

.c-table-sort-link.is-active {
  color: var(--color-text);
}

/* ── Prompt type tags ── */

.c-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.4375rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.c-tag--personal_statement {
  background: #ede9fe;
  color: #5b21b6;
}

.c-tag--supplemental {
  background: #e0f2fe;
  color: #0369a1;
}

.c-tag--why_us {
  background: #fef3c7;
  color: #92400e;
}

.c-tag--short_answer {
  background: #f3f4f6;
  color: #4b5563;
}

.c-tag--activity {
  background: #d1fae5;
  color: #065f46;
}

.c-tag--diversity {
  background: #fce7f3;
  color: #9d174d;
}

.c-tag--additional_info {
  background: #f5f5f4;
  color: #78716c;
}

.c-tag--resume {
  background: #e0e7ff;
  color: #3730a3;
}

.c-tag--letter_of_continued_interest {
  background: #ffe4e6;
  color: #9f1239;
}

.c-tag--scholarship_honors {
  background: #fef9c3;
  color: #854d0e;
}

.c-tag--summer_learning {
  background: #ccfbf1;
  color: #115e59;
}

.c-tag--other {
  background: #f3f4f6;
  color: #4b5563;
}

/* ── Student Group Disclosure ───────────────────────────────────────── */

.student-group {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.student-group+.student-group {
  margin-top: 0.5rem;
}

.student-group-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
  list-style: none;
}

.student-group-header::-webkit-details-marker {
  display: none;
}

.student-group-header:hover {
  background: var(--color-bg-hover);
}

.student-group-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform var(--transition-normal);
}

.student-group[open]>.student-group-header .student-group-chevron {
  transform: rotate(90deg);
}

.student-group-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-active);
  color: var(--color-text-muted);
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.student-group-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.student-group-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.student-group-body {
  border-top: 1px solid var(--color-border-subtle);
}

.student-group-body .c-table {
  margin-bottom: 0;
}

.student-group-body .c-table th:first-child,
.student-group-body .c-table td:first-child {
  padding-left: 1rem;
}

.student-group-body .c-table th:last-child,
.student-group-body .c-table td:last-child {
  padding-right: 1rem;
}

.search-input--with-spinner {
  padding-right: 60px !important;
}

@media (max-width: 1023px) {
  .booking-hours-day {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .booking-hours-ranges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .booking-hours-range {
    flex-wrap: wrap;
  }
}

/* ── Early Edge Course ─────────────────────────────────────────────────── */

.ee-course {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ee-course .admin-breadcrumb {
  margin-bottom: 0;
}

.ee-course-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.ee-course-header-text {
  min-width: 0;
}

.ee-course-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ee-course-subtitle {
  margin-top: 0.375rem;
  max-width: 46rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.ee-course-eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.ee-course-progress-card {
  flex-shrink: 0;
  width: 15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.ee-course-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.ee-course-progress-row strong {
  color: var(--color-text);
}

.ee-course-progress-detail {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* Module cards */
.ee-course-modules {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ee-course-module {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.375rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: inherit;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.ee-course-module:hover {
  color: inherit;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.ee-course-module-badge {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--color-accent);
  color: #fff;
}

.ee-course-module-badge span {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.ee-course-module-badge strong {
  font-size: 1.375rem;
  line-height: 1;
}

.ee-course-module-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.ee-course-module-desc {
  margin-top: 0.25rem;
  max-width: 52rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.ee-course-module-meta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.ee-course-module-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.625rem;
}

.ee-course-module-progress {
  width: 9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.ee-course-module-progress .progress-bar-track {
  flex: 1;
}

.ee-course-module-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
}

/* Video list inside a module */
.ee-course-lessons {
  margin-bottom: 0;
}

.ee-course-lesson {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  color: inherit;
  transition: background var(--transition-fast);
}

.ee-course-lesson + .ee-course-lesson {
  border-top: 1px solid var(--color-border-subtle);
}

.ee-course-lesson:hover {
  color: inherit;
  background: var(--color-bg-hover);
}

.ee-course-lesson-thumb {
  flex-shrink: 0;
  width: 4rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #fff;
}

.ee-course-lesson-title {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.ee-course-lesson-check {
  display: inline-flex;
  color: var(--color-success);
}

.ee-course-lesson-chevron {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

/* Lesson page */
.ee-course-lesson-actions {
  max-width: 960px;
}

.ee-course-lesson-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ee-course-lesson-status,
.ee-course-lesson-nav {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.ee-course-lesson-nav {
  margin-left: auto;
}

.ee-course-inline-form {
  display: inline-flex;
  margin: 0;
}

@media (max-width: 767px) {
  .ee-course-header {
    flex-direction: column;
    align-items: stretch;
  }

  .ee-course-progress-card {
    width: auto;
  }

  .ee-course-title {
    font-size: 1.25rem;
  }

  .ee-course-module {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .ee-course-module-badge {
    width: 3rem;
    height: 3rem;
  }

  .ee-course-module-aside {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .ee-course-lesson {
    padding: 0.75rem 1rem;
  }

  .ee-course-lesson-thumb {
    width: 3.25rem;
    height: 2rem;
  }

  .ee-course-lesson-nav {
    margin-left: 0;
    width: 100%;
  }

  .ee-course-lesson-nav .c-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ── Google Drive video player (shared/_drive_video) ─────────────────── */

.drive-video,
.drive-video-help {
  max-width: 960px;
}

.drive-video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

.drive-video-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.drive-video-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* The display rules above would otherwise override the hidden attribute. */
.drive-video-player[hidden],
.drive-video-fallback[hidden] {
  display: none;
}

.drive-video-fallback-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
}

.drive-video-fallback h3 {
  font-size: 1rem;
  font-weight: 700;
}

.drive-video-fallback p {
  max-width: 26rem;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.drive-video-help {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.drive-video-help a {
  color: var(--color-info);
}

/* ── Resource recordings (Ask Admittedly & Admittedly Academy) ─────────── */

.recording-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.recording-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.875rem;
}

.recording-section-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.recording-section-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Workshop cards */
.recording-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.recording-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  color: inherit;
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.recording-card:hover {
  color: inherit;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.recording-card-thumb {
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
}

.recording-play {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: background var(--transition-fast);
}

.recording-card:hover .recording-play {
  background: rgba(255, 255, 255, 0.28);
}

.recording-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.875rem 1rem 1.125rem;
}

.recording-card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.recording-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Live Q&A list */
.recording-list {
  overflow: hidden;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.recording-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.875rem 1.25rem;
  color: inherit;
  transition: background var(--transition-fast);
}

.recording-row + .recording-row {
  border-top: 1px solid var(--color-border-subtle);
}

.recording-row:hover {
  color: inherit;
  background: var(--color-bg-hover);
}

.recording-row-date {
  flex-shrink: 0;
  width: 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: var(--color-text-muted);
}

.recording-row-date strong {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.recording-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.recording-row-title {
  font-size: 0.9375rem;
  font-weight: 600;
}

.recording-row-host {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.recording-row-watch {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-bg-surface);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.recording-row:hover .recording-row-watch {
  background: var(--color-bg);
}

/* Recording page */
.recording-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.recording-page .admin-breadcrumb {
  margin-bottom: 0;
}

.recording-page-eyebrow {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.recording-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.recording-page-meta {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

@media (max-width: 767px) {
  .recording-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .recording-row {
    gap: 0.875rem;
    padding: 0.75rem 1rem;
  }

  .recording-row-watch {
    padding: 0.375rem 0.625rem;
  }

  .recording-page-title {
    font-size: 1.25rem;
  }
}
