/* ── Cards ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-normal), border-color var(--transition-normal);
}

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

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

.card-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-value.accent {
  color: var(--color-accent);
}

.card-value.success {
  color: var(--color-success);
}

.card-value.info {
  color: var(--color-info);
}

/* ── Welcome section ── */

.welcome-section {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
}

.welcome-section h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.welcome-section p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ── Public page ── */

.public-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.public-page h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.public-page p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.75rem;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
  border: none;
  font-family: inherit;
  line-height: 1.4;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: scale(0.98);
}

/* ── Admin ── */

.admin-sidebar .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ede9fe;
}

.counselor-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3125rem;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 9999px;
  background: var(--color-danger);
  color: #fff;
  margin-left: auto;
}

.sidebar-divider {
  height: 1px;
  background: var(--color-border-subtle);
  margin: 0.5rem 0;
}

.sidebar-section-label {
  display: block;
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.sidebar-nav .back-link {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* ── Flash messages ── */

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.flash-notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.flash-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ── Admin tables ── */

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

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

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

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

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

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

.admin-table code {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

.admin-table .actions {
  text-align: right;
  white-space: nowrap;
}

/* ── Admin sections ── */

.admin-section {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

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

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

.admin-section-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.admin-subsection {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
}

.admin-subsection-title {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.admin-file-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.admin-file-group {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.admin-file-group:last-child {
  border-bottom: 0;
}

.admin-file-group-title {
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.admin-file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0;
}

.admin-file-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-section .admin-table th:first-child,
.admin-section .admin-table td:first-child {
  padding-left: 1.25rem;
}

.admin-section .admin-table th:last-child,
.admin-section .admin-table td:last-child {
  padding-right: 1.25rem;
}

.admin-section .empty-state {
  padding: 2rem 1.5rem;
}

/* ── Toolbar ── */

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.toolbar-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.admin-toolbar .search-form {
  flex-wrap: nowrap;
  flex-shrink: 0;
  /* prevents the form from shrinking too much */
}

/* Prevent “Clear All” text from wrapping inside the button */
.admin-toolbar .btn-sm {
  white-space: nowrap;
  flex-shrink: 0;
  /* keeps the button from collapsing */
}

/* ── Search ── */

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-input {
  padding: 0.4375rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text);
  font-size: 0.8125rem;
  min-width: 240px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  font-family: inherit;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.06);
}

/* ── Breadcrumb ── */

.admin-breadcrumb {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.admin-breadcrumb a {
  color: var(--color-text-muted);
}

.admin-breadcrumb a:hover {
  color: var(--color-text);
}

/* ── Detail grid ── */

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

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.detail-value {
  font-size: 0.875rem;
  font-weight: 500;
}

.detail-grid-section {
  padding: 0 1.25rem 1rem;
}

.detail-grid-section+.detail-grid-section {
  border-top: 1px solid var(--color-border-subtle);
  padding-top: 1rem;
}

.detail-grid-section .detail-grid {
  padding: 0.5rem 0 0;
}

.detail-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.detail-required,
.detail-optional {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.125rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
}

.detail-required {
  color: var(--color-danger, #b91c1c);
  border-color: var(--color-danger, #b91c1c);
}

.detail-optional {
  color: var(--color-text-muted);
}

/* ── Card value variants ── */

.card-value-sm {
  font-size: 1.125rem;
  font-weight: 600;
  word-break: break-all;
}

.card-value-sm.card-value-sm--single-line {
  word-break: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.card-value-sm code {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Role badges ── */

.role-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-admin {
  background: #f5f3ff;
  color: #6d28d9;
}

.role-member {
  background: #eff6ff;
  color: #2563eb;
}

/* ── Organization type badges ── */

.org-type-badge {
  display: inline-block;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid;
}

.org-type-badge.badge-inline {
  padding: 0.1rem 0.375rem;
  font-size: 0.625rem;
}

.org-type-student {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.org-type-guardian {
  background: #f0fdfa;
  color: #0f766e;
  border-color: #99f6e4;
}

.org-type-counselor {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.org-type-essay_specialist {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}

.org-type-essay_manager {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.org-type-support {
  background: #fefce8;
  color: #a16207;
  border-color: #fef08a;
}

.org-type-admin {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* ── Org type grid on dashboard ── */

.org-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.625rem;
  padding: 1rem 1.25rem;
}

.org-type-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.875rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);
}

.org-type-card:hover {
  border-color: var(--color-border);
}

.org-type-name {
  font-size: 0.8125rem;
  font-weight: 500;
}

.org-type-count {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* ── Type assignment ── */

.type-assignment {
  padding: 1.25rem;
}

.type-assignment-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.type-assignment-row .form-input {
  width: auto;
  max-width: 100%;
}

/* ── Filter pills ── */

.filter-pills {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  border-color: var(--color-text-secondary);
  color: var(--color-text);
}

.filter-pill.active {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

/* ── Filter select ── */

.filter-select {
  max-width: 160px;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
}

/* Clickable filter elements (pill links, select dropdowns, filter-bar selects)
   should show the pointer cursor so it's clear they're interactive (ADM-98).
   Text inputs are intentionally excluded so they keep the text caret. */
.filter-pill,
.filter-select,
.c-filter-bar select,
.essay-filter-bar select {
  cursor: pointer;
}

/* ── Buttons ── */

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

.btn-xs {
  padding: 0.1875rem 0.5rem;
  font-size: 0.6875rem;
  border-radius: var(--radius-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
  box-shadow: none;
}

.btn-danger {
  background: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background: #b91c1c;
  color: #ffffff;
}

/* ── Danger zone ── */

.danger-zone {
  padding: 1.25rem;
  border-top: 1px solid #fecaca;
}

.danger-zone p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* ── Quick actions ── */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.25rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition-normal);
}

.quick-action-card:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* ── Settings form ── */

.settings-form .admin-section {
  margin-bottom: 1.5rem;
}

.settings-grid {
  display: grid;
  gap: 1.5rem;
  padding: 1.25rem;
}

.setting-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.setting-field .setting-toggle {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.375rem;
  cursor: pointer;
}

.setting-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.setting-toggle-track {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.375rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--color-border);
  transition: background-color var(--transition-fast);
}

.setting-toggle-track::after {
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  content: "";
  transition: transform var(--transition-fast);
}

.setting-toggle input:checked+.setting-toggle-track {
  background: var(--color-accent);
}

.setting-toggle input:checked+.setting-toggle-track::after {
  transform: translateX(1.125rem);
}

.setting-toggle input:focus-visible+.setting-toggle-track {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.setting-toggle-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  max-width: 400px;
  padding: 0.4375rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  /* background-color (not the background shorthand) so select.form-input keeps
     the global custom chevron's background-image instead of rendering a bare,
     icon-less dropdown app-wide (ADM-59; also fixes ADM-57, ADM-67, ADM-100). */
  background-color: var(--color-bg);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.06);
}

select.form-input {
  cursor: pointer;
}

/* Keep text inputs and selects the same height so their text/placeholders line
   up vertically when shown side by side in a row (e.g. the admin "Add Credits"
   form). Without a fixed height, native selects and inputs render at slightly
   different heights and their text sits at inconsistent vertical positions
   (ADM-113). Textareas are intentionally excluded so they can still grow. */
input.form-input,
select.form-input {
  height: 2.25rem;
  line-height: 1.375;
}

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

.form-actions {
  margin-top: 0.5rem;
}

/* ── Text helpers ── */

.text-muted {
  color: var(--color-text-muted);
}

/* ── Empty state ── */

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

.empty-state p+p {
  margin-top: 0.5rem;
}

/* ── Tabs ── */

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

.tab-item {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

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

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

/* ── Invitation status badges ── */

.inv-status {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.inv-status-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.inv-status-accepted {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.inv-status-revoked {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.inv-status-expired {
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.filter-select {
  max-width: 180px;
}

/* ── Onboarding ── */

.onboarding-header {
  margin-bottom: 1.25rem;
}

.onboarding-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.1875rem;
  letter-spacing: -0.01em;
}

.onboarding-header p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.onboarding-search-area {
  padding: 1rem 1.25rem;
}

.onboarding-search-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-field-group {
  position: relative;
  flex: 1;
  max-width: 480px;
}

.search-field-group .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.onboarding-search-input {
  padding-left: 2.5rem !important;
  padding-right: 2.75rem !important;
  width: 100%;
}

turbo-frame#search-results {
  display: block;
  padding: 0 1.25rem;
}

.search-spinner {
  display: none;
  align-items: center;
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-spinner.is-visible {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.results-header {
  border-top: 1px solid var(--color-border);
}

#search-results table {
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lifecycle-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

/* ── Invite rows ── */

.invite-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--transition-fast);
}

.invite-row:last-child {
  border-bottom: none;
}

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

.invite-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

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

.invite-email {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.invite-phone {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.invite-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.invite-form-inline {
  display: inline;
}

.btn-invite {
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-invite-student {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.btn-invite-student:hover {
  background: #dbeafe;
  color: #1e40af;
}

.btn-invite-guardian {
  background: #faf5ff;
  color: #7c3aed;
  border: 1px solid #e9d5ff;
}

.btn-invite-guardian:hover {
  background: #f3e8ff;
  color: #6d28d9;
}

/* ── Staff assignment ── */
.staff-assign-form {
  padding: 0.75rem 1rem;
}

.staff-assign-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.staff-select {
  flex: 1;
  min-width: 0;
}

/* ── Impersonation pip ── */
.impersonation-pip {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: var(--z-pinned);
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  flex-direction: column;
}

.impersonation-pip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.impersonation-pip:hover .impersonation-pip-dot {
  transform: scale(1.3);
}

.impersonation-pip-panel {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.375rem 0.625rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.impersonation-pip:hover .impersonation-pip-panel {
  display: flex;
}

.impersonation-pip-label strong {
  color: var(--color-text);
}

.impersonation-pip-exit {
  background: #dc2626;
  color: #fff;
  border: none;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.625rem;
  line-height: 1;
}

.impersonation-pip-exit:hover {
  background: #b91c1c;
}

.sidebar--impersonating .sidebar-divider,
.sidebar--impersonating .sidebar-nav a[href*="admin"] {
  display: none;
}

/* ── Impersonate section ── */
.impersonate-zone {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
}

.impersonate-zone p {
  margin: 0;
  font-size: 0.8125rem;
  color: #92400e;
}

.btn-impersonate {
  background: #f59e0b;
  color: #fff;
  border: none;
  font-weight: 600;
  white-space: nowrap;
}

.btn-impersonate:hover {
  background: #d97706;
}

/* ── Admin forms inside sections ── */
.admin-section-body {
  padding: 1.25rem;
}

.admin-section-body p {
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.admin-section-body p:last-child {
  margin-bottom: 0;
}

.admin-section-body .detail-grid {
  padding: 0;
  margin-bottom: 1rem;
}

.admin-section-body .btn,
.admin-section-body input[type="submit"] {
  margin-top: 0.25rem;
}

.admin-section-body .admin-table {
  margin: 0 -1.25rem -1.25rem;
  width: calc(100% + 2.5rem);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

/* ── Credit progress cards ── */
.credit-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.credit-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.credit-card:hover {
  border-color: var(--color-border);
}

.credit-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

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

.credit-card-count {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.credit-card-count small {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--color-border-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s var(--ease-out);
}

.progress-bar-fill.progress-green {
  background: #22c55e;
}

.progress-bar-fill.progress-yellow {
  background: #eab308;
}

.progress-bar-fill.progress-red {
  background: #ef4444;
}

.credit-card-detail {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* ── SR status card ── */
.sr-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color var(--transition-fast);
}

.sr-card:hover {
  border-color: var(--color-border);
}

.sr-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  width: fit-content;
}

.sr-status-pending {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.sr-status-eligible {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.sr-status-delivered {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* ── Enrollment header badge ── */
.enrollment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* ── Team member cards ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.team-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast);
}

.team-card:hover {
  border-color: var(--color-border);
}

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

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

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

.team-name {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ── Resource cards ── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

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

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

.resource-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-bg-hover);
}

.resource-card-body {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.resource-card-tag {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1d4ed8;
}

.resource-card-title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.3;
}

.resource-card-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  flex: 1;
}

.resource-card-cta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: 0.375rem;
}

.resource-card-cta--muted {
  color: var(--color-text-muted);
}

.resource-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Dashboard top row ── */
.dash-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: start;
}

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

@media (max-width: 1023px) {
  .dash-top-row {
    grid-template-columns: 1fr;
  }
}

.dash-top-panel {
  margin-bottom: 0;
}

/* ── Compact team list ── */
.team-compact-list {
  display: flex;
  flex-direction: column;
}

.team-compact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.125rem;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: background var(--transition-fast);
}

.team-compact-row:last-child {
  border-bottom: none;
}

.team-compact-row:hover {
  background: var(--color-bg-hover);
}

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

.team-compact-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.625rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.team-compact-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.team-compact-name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-compact-role {
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ── TODO / action items list ── */
.todo-list {
  display: flex;
  flex-direction: column;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.5rem 1.125rem;
  border-bottom: 1px solid var(--color-border-subtle);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

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

.todo-item:hover {
  background: var(--color-bg-hover);
  color: inherit;
}

.todo-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  margin-top: 0.2rem;
  transition: border-color var(--transition-fast);
}

.todo-item:hover .todo-circle {
  border-color: var(--color-accent);
}

.todo-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.todo-text {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.todo-source {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.todo-icon-deadline {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--color-accent, #2563eb);
}

.todo-icon-deadline--urgent {
  color: var(--color-danger, #dc2626);
}

.todo-due-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1d4ed8;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.todo-due-badge--urgent {
  background: #fee2e2;
  color: #b91c1c;
}

/* ── Upcoming calls section ── */
.upcoming-calls-section {
  margin-bottom: 1.5rem;
}

.upcoming-calls-list {
  display: flex;
  flex-direction: column;
}

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

.upcoming-call-card:last-child {
  border-bottom: none;
}

.upcoming-call-card:hover {
  background: var(--color-bg-hover);
  color: inherit;
}

.upcoming-call-card--next {
  background: #f8fafd;
}

.upcoming-call-card--next:hover {
  background: #f0f4fa;
}

.upcoming-call-date-inline {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 44px;
  flex-shrink: 0;
}

.upcoming-call-card--next .upcoming-call-date-inline {
  color: #1d4ed8;
}

.upcoming-call-title {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upcoming-call-meta {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  flex: 1;
  white-space: nowrap;
  min-width: 0;
}

.upcoming-call-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  background: #1d4ed8;
  color: #fff;
  flex-shrink: 0;
}

.upcoming-call-zoom {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.4375rem;
  background: #2563eb;
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
  flex-shrink: 0;
  transition: background var(--transition-fast);
  cursor: pointer;
}

.upcoming-call-zoom:hover {
  background: #1d4ed8;
}

/* ── Upcoming Events paging ── */
/* Rows outside the current page carry the `hidden` attribute; the row classes
   set display:flex, so they need an explicit rule to stay hidden. */
.upcoming-events-item[hidden] {
  display: none !important;
}

.upcoming-events-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem 1.125rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* Inside a padded .c-card the surrounding padding is already there. */
.upcoming-events-pagination--card {
  padding: 0.875rem 0 0;
  margin-top: 0.25rem;
}

/* Keeps the page numbers together as one group at the right edge. */
.upcoming-events-pages {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
}

.upcoming-events-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  appearance: none;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
}

.upcoming-events-page:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.upcoming-events-page.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* On a phone the row cannot stay on one line: the date, title, meta and Join
   chip together overflow the card. Let it wrap so the title and meta each get
   their own line and nothing is clipped or covered. */
@media (max-width: 767px) {
  .upcoming-call-card {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    padding: 0.625rem 1rem;
  }

  .upcoming-call-date-inline {
    order: 1;
    min-width: 0;
  }

  .upcoming-call-badge {
    order: 2;
  }

  .upcoming-call-zoom {
    order: 3;
    margin-left: auto;
  }

  .upcoming-call-title {
    order: 4;
    flex: 1 1 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
  }

  .upcoming-call-meta {
    order: 5;
    flex: 1 1 100%;
    white-space: normal;
  }

  /* The row already wraps; the chevron only adds clutter on a narrow screen. */
  .upcoming-call-card .mc-list-chevron {
    display: none;
  }

  /* Same treatment for the Admissions Strategist card, scoped to Upcoming
     Events so other meeting lists keep their current layout. */
  .c-meeting-item.upcoming-events-item {
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  .c-meeting-item.upcoming-events-item .c-meeting-time {
    min-width: 0;
  }

  .c-meeting-item.upcoming-events-item .c-meeting-info {
    flex: 1 1 100%;
  }

  .c-meeting-item.upcoming-events-item .c-meeting-title,
  .c-meeting-item.upcoming-events-item .c-meeting-student {
    white-space: normal;
  }

  .c-meeting-item.upcoming-events-item .c-meeting-action {
    margin-left: auto;
  }

  .upcoming-events-pagination {
    padding: 0.75rem 1rem;
  }
}

/* ── Milestone calls ── */
.mc-overview-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.125rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}

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

.mc-overview-number {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.mc-overview-number.accent {
  color: var(--color-accent);
}

.mc-overview-number.success {
  color: var(--color-success);
}

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

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

.mc-list {
  display: flex;
  flex-direction: column;
}

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

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

.mc-list-item:hover {
  background: var(--color-bg-hover);
  color: inherit;
}

.mc-list-item--past {
  opacity: 0.8;
}

.mc-list-number {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-muted);
  min-width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.mc-list-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  flex-shrink: 0;
}

.mc-list-day {
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
}

.mc-list-time {
  font-size: 0.625rem;
  color: var(--color-text-muted);
}

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

.mc-list-title {
  font-size: 0.875rem;
  font-weight: 600;
}

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

.mc-list-preview {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mc-list-chevron {
  color: var(--color-text-muted);
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.mc-list-item:hover .mc-list-chevron {
  opacity: 0.8;
}

/* ── MC status pills ── */
.mc-status-pill {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.mc-status-scheduled {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.mc-status-completed {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.mc-status-cancelled {
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.mc-status-no_show {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ── MC detail page ── */
.mc-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.mc-detail-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mc-detail-header-left h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}

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

@media (max-width: 1023px) {
  .mc-detail-grid {
    grid-template-columns: 1fr;
  }
}

.mc-detail-main {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mc-detail-main .admin-section {
  margin-bottom: 1.25rem;
}

.mc-detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mc-detail-sidebar .admin-section {
  margin-bottom: 1.25rem;
}

.mc-summary-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--color-text);
}

.mc-summary-text p {
  margin-bottom: 0.5rem;
}

.mc-summary-text p:last-child {
  margin-bottom: 0;
}

.mc-notes-text {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.mc-notes-text p {
  margin-bottom: 0.5rem;
}

.mc-notes-text p:last-child {
  margin-bottom: 0;
}

/* ── Action items ── */
.mc-action-items {
  display: flex;
  flex-direction: column;
}

.mc-action-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.mc-action-item:last-child {
  border-bottom: none;
}

.mc-action-item--done {
  opacity: 0.5;
}

.mc-action-check {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.mc-action-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
}

.mc-action-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mc-action-text {
  font-size: 0.8125rem;
  font-weight: 500;
}

.mc-action-item--done .mc-action-text {
  text-decoration: line-through;
}

.mc-action-due {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

/* ── Detail sidebar meta ── */
.mc-detail-meta {
  display: flex;
  flex-direction: column;
}

.mc-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 1.125rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.mc-meta-row:last-child {
  border-bottom: none;
}

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

.mc-meta-value {
  font-size: 0.8125rem;
  font-weight: 500;
}

.mc-counselor-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
}

/* ── Zoom link ── */
.mc-zoom-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  background: #2563eb;
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background var(--transition-fast);
  text-decoration: none;
  margin-bottom: 1rem;
}

.mc-zoom-link:hover {
  background: #1d4ed8;
  color: #fff;
}

.mc-zoom-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mc-zoom-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Transcript ── */
.mc-transcript {
  position: relative;
}

.mc-transcript-entry {
  padding: 0.625rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.625rem;
  row-gap: 0.125rem;
}

.mc-transcript-entry:last-of-type {
  border-bottom: none;
}

.mc-transcript-speaker {
  font-size: 0.6875rem;
  font-weight: 700;
  grid-row: 1;
  grid-column: 1;
}

.mc-transcript-counselor {
  color: #2563eb;
}

.mc-transcript-student {
  color: #7c3aed;
}

.mc-transcript-time {
  font-size: 0.5625rem;
  color: var(--color-text-muted);
  font-family: monospace;
  grid-row: 1;
  grid-column: 2;
  text-align: right;
}

.mc-transcript-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text);
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
}

.mc-transcript-fade {
  height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--color-bg-surface));
  margin-top: -3rem;
  position: relative;
  pointer-events: none;
}

.mc-transcript-cta {
  text-align: center;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--color-border-subtle);
}

/* ── Recording placeholder ── */
.mc-recording-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: default;
}

.mc-recording-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

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

/* ── Credit card link variant ── */
.credit-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.credit-card--link:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  color: inherit;
}

.credit-card-action {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.credit-card--link:hover .credit-card-action {
  color: var(--color-accent);
}

/* ── MC section hints ── */
.mc-section-hint {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  font-weight: 400;
  margin-top: 0.125rem;
  line-height: 1.4;
}

/* ── MC inline editing ── */
.mc-edit-hidden {
  display: none !important;
}

.mc-edit-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mc-edit-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  background: var(--color-bg);
}

.mc-edit-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.mc-edit-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Action item meta row ── */
.mc-ai-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.125rem;
}

.mc-ai-due {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
}

.mc-ai-due--overdue {
  color: #dc2626;
  font-weight: 600;
}

.mc-ai-due--soon {
  color: #d97706;
  font-weight: 600;
}

/* ── Action item tags ── */
.mc-ai-tags {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.mc-ai-tag {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.mc-ai-tag--essay {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mc-ai-tag--research {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.mc-ai-tag--school-list {
  background: #fefce8;
  color: #a16207;
  border-color: #fde68a;
}

.mc-ai-tag--financial-aid {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.mc-ai-tag--testing {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.mc-ai-tag--interview {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #f0abfc;
}

.mc-ai-tag--recommendation {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.mc-ai-tag--extracurricular {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.mc-ai-tag--general {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* ── Action item notification badge ── */
.mc-ai-notify-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: #2563eb;
}

/* ── Action item overdue summary badge ── */
.mc-ai-overdue-badge {
  display: inline-block;
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

/* ── Action item summary bar ── */
.mc-ai-summary-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border-subtle);
}

/* ── Action item edit form ── */
.mc-ai-edit-row {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
}

.mc-ai-edit-row:last-child {
  margin-bottom: 0;
}

.mc-ai-edit-row-main {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.mc-ai-edit-checkbox {
  flex-shrink: 0;
}

.mc-ai-edit-text {
  flex: 1;
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-family: inherit;
}

.mc-ai-edit-text:focus {
  outline: none;
  border-color: var(--color-accent);
}

.mc-ai-remove-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mc-ai-remove-btn:hover {
  background: #fef2f2;
  color: #dc2626;
}

.mc-ai-edit-row-meta {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding-left: 1.5rem;
}

.mc-ai-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.mc-ai-edit-field label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mc-ai-edit-date {
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: inherit;
}

.mc-ai-edit-tags {
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: inherit;
  width: 160px;
}

.mc-ai-edit-field--notify label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.mc-ai-edit-add {
  padding: 0.5rem 0;
}

/* ── Ask Admittedly AI badge ── */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-xs);
  font-family: inherit;
}

.ai-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  background: var(--color-accent-hover);
}

.ai-badge:active {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.ai-badge svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* ── AI chat panel ── */
.ai-chat-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: var(--z-drawer-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}

.ai-chat-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ai-chat-panel {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  right: 0;
  bottom: env(safe-area-inset-bottom, 0px);
  width: 400px;
  max-width: 100vw;
  max-height: 100dvh;
  background: var(--color-bg-surface);
  border-left: 1px solid var(--color-border);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-out);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  overflow: hidden;
}

.ai-chat-panel.is-open {
  transform: translateX(0);
}

/* Account for the dev menu strip so the AI panel & overlay sit below it (ADM-23). */
body:has(.dev-menu) .ai-chat-panel,
body:has(.dev-menu) .ai-chat-overlay {
  top: 32px;
}

/* Lock background scroll while AI chat is open (ADM-45). */
body.is-ai-chat-open {
  overflow: hidden;
}

body.is-ai-chat-open .app-layout {
  overflow: hidden;
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
}

.ai-chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.ai-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-chat-title {
  font-size: 0.875rem;
  font-weight: 700;
  display: block;
  line-height: 1.2;
}

.ai-chat-subtitle {
  font-size: 0.625rem;
  color: var(--color-text-muted);
  display: block;
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.ai-chat-close:hover {
  background: var(--color-bg-hover);
  color: var(--color-text);
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}

.ai-msg {
  display: flex;
}

.ai-msg-user {
  justify-content: flex-end;
}

.ai-msg-bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.ai-msg-user .ai-msg-bubble {
  background: var(--color-accent);
  color: #fff;
  border-bottom-right-radius: var(--radius-sm);
}

.ai-msg-assistant .ai-msg-bubble {
  background: var(--color-bg);
  border: 1px solid var(--color-border-subtle);
  border-bottom-left-radius: var(--radius-sm);
  color: var(--color-text);
}

/* ── Typing indicator ── */
.ai-msg-typing-dots {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  min-height: 0;
}

.ai-msg-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--color-text-muted);
  border-radius: 50%;
  opacity: 0.35;
  animation: typingDot 1.4s infinite ease-in-out;
}

.ai-msg-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-msg-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {

  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }

  30% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ── Suggestion chips ── */
.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0 1.125rem 0.625rem;
  flex-shrink: 0;
}

.ai-suggestion {
  padding: 0.3125rem 0.625rem;
  border: 1px solid var(--color-border);
  border-radius: 9999px;
  background: var(--color-bg-surface);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.ai-suggestion:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
  background: var(--color-bg-hover);
}

/* ── Input area ── */
.ai-chat-input-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-top: 1px solid var(--color-border-subtle);
  flex-shrink: 0;
  background: var(--color-bg-surface);
}

.ai-chat-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ai-chat-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(28, 25, 23, 0.06);
}

.ai-chat-input:disabled {
  opacity: 0.5;
}

.ai-chat-send {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.ai-chat-send:hover {
  background: var(--color-accent-hover);
}

.ai-chat-send:active {
  transform: scale(0.95);
}

/* ── Smooth scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

.comment-highlight {
  background-color: #fef9c3;
  border-bottom: 2px solid #facc15;
  cursor: pointer;
  padding: 0.1rem 0;
}

/* ── Book a Call modal ── */
.book-call-dialog {
  border: none;
  border-radius: 14px;
  padding: 0;
  width: min(380px, calc(100vw - 2rem));
  max-width: 100%;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: transparent;
  position: fixed;
  inset: 0;
  margin: auto;
}

.book-call-dialog::backdrop {
  background: rgba(20, 18, 30, 0.45);
}

.book-call-modal {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
}

.book-call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid #ebe9e2;
}

.book-call-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.book-call-close {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.book-call-body {
  padding: 1.25rem;
}

.book-call-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #ebe9e2;
}

.book-call-footer--split {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.book-call-primary {
  width: 100%;
  border-radius: 999px;
}

.book-call-footer--split .book-call-primary {
  width: auto;
  flex: 1;
}

.book-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.book-cal-month {
  font-size: 0.8125rem;
  font-weight: 700;
}

.book-cal-arrow {
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.125rem 0.375rem;
}

.book-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.book-cal-dow {
  font-size: 0.625rem;
  color: #a8a69f;
  font-weight: 700;
  padding-bottom: 0.25rem;
}

.book-cal-day {
  border: none;
  background: transparent;
  font-size: 0.78rem;
  padding: 0.5rem 0;
  border-radius: 8px;
  cursor: pointer;
  color: #1a1a1a;
}

.book-cal-day.is-muted,
.book-cal-day:disabled {
  color: #d3d1c9;
  cursor: default;
}

.book-cal-day.is-today {
  border: 1px solid #2b2470;
}

.book-cal-day.is-selected {
  background: #2b2470;
  color: #fff;
  font-weight: 700;
}

.book-slots-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  margin: 1.125rem 0 0.625rem;
}

.book-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.book-slot {
  border: 1px solid #d9d7cf;
  border-radius: 8px;
  padding: 0.55rem 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  background: #fff;
  cursor: pointer;
}

.book-slot.is-selected {
  background: #2b2470;
  border-color: #2b2470;
  color: #fff;
}

.book-slots-empty {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.75rem 0;
}

.book-slots-warning {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.25rem;
}

.book-zoom-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #eef6ff;
  border: 1px solid #cfe6ff;
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: #1a5aa8;
  font-weight: 600;
}

.book-zoom-icon {
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 5px;
  background: #2d8cff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.book-call-field {
  margin-bottom: 0.875rem;
}

.book-call-field-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.book-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.78rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1efe8;
}

.book-summary-row:last-of-type {
  border-bottom: none;
}

.book-summary-row span {
  color: var(--color-text-muted);
}

.book-call-error {
  margin-top: 0.75rem;
  color: #b42318;
  font-size: 0.8125rem;
}

/* ── Upcoming events (student) ── */
.ue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ue-stats-card {
  margin-bottom: 1rem;
}

.ue-events-card {
  padding: 0.5rem 0;
}

.ue-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1efe8;
}

.ue-event-row:last-child {
  border-bottom: none;
}

.ue-event-left {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  min-width: 0;
}

.ue-event-dot {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.ue-event-dot--call {
  background: #eef0fb;
  color: #4a3fb0;
}

.ue-event-title {
  font-size: 0.84rem;
  font-weight: 600;
}

.ue-event-link {
  color: inherit;
  text-decoration: none;
}

.ue-event-link:hover {
  text-decoration: underline;
}

.ue-event-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.125rem;
}

.ue-join-btn {
  border: 1px solid #d9d7cf;
  border-radius: 999px;
  background: #fff;
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2b2470;
  text-decoration: none;
  white-space: nowrap;
}

.ue-join-btn:hover {
  background: #f7f6f2;
}

.meeting-transcript {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  background: #fafaf8;
  border: 1px solid #ebe9e2;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  max-height: 24rem;
  overflow: auto;
  margin: 0;
}
/* ── Foundational essays ── */

.essay-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.foundational-star-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
}

.foundational-star-btn.is-starred {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.foundational-star-btn.is-starred:hover,
.foundational-star-btn.is-starred:focus-visible {
  background: #fde68a;
  border-color: #f59e0b;
  color: #78350f;
}

.foundational-star-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-sm);
  background: #fef3c7;
  color: #92400e;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
}

.foundational-star-mark {
  display: inline-flex;
  align-items: center;
  color: #d97706;
  vertical-align: middle;
  flex-shrink: 0;
}

.essay-title-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.foundational-picker-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.foundational-picker .foundational-picker-label ~ .foundational-picker-label {
  margin-top: 1rem;
}

.foundational-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
}

.foundational-option:last-child {
  margin-bottom: 0;
}

.foundational-option-info {
  flex: 1;
  min-width: 0;
}

.foundational-option-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

.foundational-option-star {
  display: inline-flex;
  align-items: center;
  color: #d97706;
  flex-shrink: 0;
}

.foundational-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foundational-option-meta {
  margin-top: 0.1875rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.foundational-option-warning {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #b45309;
}

.foundational-source-notice {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  background: #fffbeb;
  font-size: 0.8125rem;
  color: #92400e;
}

.foundational-limit-warning {
  padding: 0.625rem 0.875rem;
  margin-bottom: 1.25rem;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.8125rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .foundational-option {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   Parent view (read-only). The server refuses every write while a parent is
   viewing a student; these rules just keep the UI from offering them.
   ========================================================================== */
.parent-view-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-info, #2563eb);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg-surface);
  font-size: 0.8125rem;
}
.parent-view-banner-text {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  color: var(--color-text-secondary);
}
.parent-view-banner-text strong {
  color: var(--color-text);
}
.parent-view-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.parent-view-banner-actions form {
  display: inline;
}

/* Action buttons inside write forms, and JS triggers that open write UIs. */
.parent-view .main-content form[method="post"] .c-btn,
.parent-view .main-content form[method="post"] .btn,
.parent-view .main-content form[method="post"] input[type="submit"],
.parent-view .main-content a[href*="/student/essays/new"],
.parent-view .main-content [data-action*="book-call#open"],
.parent-view .main-content [data-action*="inline-edit#toggle"],
.parent-view .main-content [data-action*="compose-message"],
.parent-view .main-content a[data-turbo-method]:not([data-turbo-method="get"]) {
  display: none !important;
}
.parent-view .main-content .parent-view-banner form[method="post"] .c-btn {
  display: inline-flex !important;
}

/* Rows that are themselves form buttons (e.g. onboarding steps) stay visible
   as information but can't be clicked. */
.parent-view .main-content form[method="post"] button,
.parent-view .main-content select,
.parent-view .main-content [contenteditable="true"] {
  pointer-events: none;
}
.parent-view .main-content .parent-view-banner form[method="post"] button {
  pointer-events: auto;
}
