/* Shared visual contract for every admin view, including legacy screens. */
body:not(.login-mode) .student-learning-report { width: min(1040px, calc(100vw - 32px)) !important; }
body:not(.login-mode) #studentLearningReportModal .student-learning-report { display: flex; flex-direction: column; overflow: hidden; padding: 0 !important; }
body:not(.login-mode) #studentLearningReportModal .modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0; }
body:not(.login-mode) #studentLearningReportModal .quiet-close { width: auto; flex-shrink: 0; min-height: 42px; padding: 8px 16px; }
body:not(.login-mode) #studentLearningReportBody { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.student-learning-report-body { background: #f5f7fb; padding: 24px; gap: 20px; }
.report-overview { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.report-overview h2 { font-size: 23px; margin: 10px 0 6px; color: #182230; }
.report-overview p,.report-section-heading p { margin: 6px 0 0; color: #667085; font-size: 13px; line-height: 1.6; }
.report-state { color: #245cba; background: #e8efff; border-radius: 6px; padding: 5px 9px; font-size: 12px; }
.report-last-study { display: grid; gap: 8px; text-align: right; font-size: 13px; color: #667085; }
.report-last-study strong { font-size: 18px; color: #344054; }
.report-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.report-metric { display: grid; gap: 8px; padding: 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; min-width: 0; }
.report-metric > span { color: #475467; font-size: 13px; }
.report-metric strong { font-size: 26px; color: #182230; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.report-metric small { color: #667085; font-size: 12px; }
.report-section { padding: 22px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; min-width: 0; }
.report-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.report-section h3 { margin: 0; font-size: 17px; color: #182230; }
.report-comparison { padding: 6px 10px; border-radius: 6px; background: #f1f5fb; color: #475467; font-size: 12px; }
.report-chart-scroll { overflow-x: auto; }
.report-chart { min-width: 550px; height: 180px; display: grid; grid-template-columns: repeat(14,minmax(0,1fr)); gap: 10px; }
.report-day { display: grid; grid-template-rows: 20px 1fr 22px; gap: 8px; text-align: center; font-size: 11px; color: #667085; }
.report-day b { font-size: 11px; font-weight: 500; }
.report-bar-track { display: flex; align-items: end; background: #f5f7fb; border-bottom: 1px solid #dbe3ef; border-radius: 4px 4px 0 0; }
.report-bar-track i { display: block; width: 100%; background: #3974e8; border-radius: 4px 4px 0 0; }
.report-exam-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.report-exam-summary .report-metric { background: #f8fafc; }
.report-exam-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid #edf0f5; }
.report-exam-list article:last-child { border: 0; padding-bottom: 0; }
.report-exam-list article > div { min-width: 0; overflow-wrap: anywhere; }
.report-exam-list strong,.report-practices strong { font-size: 14px; color: #344054; }
.report-exam-list p,.report-exam-list small,.report-practices small { font-size: 12px; color: #667085; line-height: 1.7; }
.report-exam-list p { margin: 5px 0; }
.report-score { flex-shrink: 0; color: #a65d0b; background: #fff5e5; padding: 8px 12px; border-radius: 8px; font-size: 18px; font-weight: 650; }
.report-score.passed { color: #147d59; background: #eaf8f1; }
.report-practices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.report-practices article { display: grid; gap: 10px; min-width: 0; }
.report-practices article > div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.report-practices progress { width: 100%; height: 7px; accent-color: #3974e8; }
.report-empty { background: #f8fafc; padding: 24px 16px; border-radius: 8px; color: #667085; font-size: 13px; line-height: 1.8; text-align: center; }
.report-notice { background: #fff6e8; color: #845213; border-radius: 10px; padding: 14px 18px; font-size: 13px; line-height: 1.7; }
.report-footnote { margin: 0; font-size: 12px; color: #667085; line-height: 1.8; }
@media(max-width:640px) {
  body:not(.login-mode) #studentLearningReportModal .modal-header { padding: 16px; }
  .report-chart { min-width: 0; gap: 3px; }
  .report-day { font-size: 9px; }
  .report-day b { font-size: 9px; }
  .report-month { display: none; }
  .report-day > span { overflow: hidden; white-space: nowrap; }
  .student-learning-report-body { padding: 14px; gap: 14px; }
  .report-overview,.report-section-heading { align-items: start; flex-direction: column; }
  .report-last-study { text-align: left; }
  .report-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-metric { padding: 13px; }
  .report-metric strong { font-size: 22px; }
  .report-section { padding: 16px; }
  .report-practices,.report-exam-summary { grid-template-columns: 1fr; }
}
body:not(.login-mode) #enterpriseView .enterprise-list-panel { border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #fff; }
body:not(.login-mode) #enterpriseView .enterprise-form .fields { grid-template-columns: minmax(0,1fr); }
body:not(.login-mode) #enterpriseView .enterprise-form textarea { min-height: 100px; height: 112px; }
body:not(.login-mode) .crm-p0-card > .crm-section-head { padding: 18px 20px; margin: 0; }
@media (max-width: 600px) {
  body:not(.login-mode) #studentsView .table-wrap table,
  body:not(.login-mode) #studentRows,
  body:not(.login-mode) #studentRows tr { display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100%; box-sizing: border-box; }
  body:not(.login-mode) #studentRows td:not([colspan]):not(.student-select-cell) { display: grid !important; width: 100% !important; min-width: 0 !important; box-sizing: border-box; grid-template-columns: 76px minmax(0,1fr); gap: 8px 12px; align-items: start; white-space: normal !important; overflow-wrap: anywhere; }
  body:not(.login-mode) #studentRows td > * { grid-column: 2; min-width: 0; max-width: 100%; }
  body:not(.login-mode) #studentRows td::before { grid-column: 1; grid-row: 1; }
  body:not(.login-mode) #studentRows td .entitlement-review-note { width: 100%; max-width: 100%; box-sizing: border-box; white-space: normal !important; overflow-wrap: anywhere; }
  body:not(.login-mode) #studentRows td button { width: fit-content; min-height: 40px; white-space: normal; }
  body:not(.login-mode) #studentRows td :is(.learning-state,.status) { justify-self: start; }
}
:root {
  --admin-accent: #2765e8;
  --admin-text: #182230;
  --admin-muted: #64748b;
  --admin-border: #e2e8f0;
  --admin-canvas: #f5f7fa;
  --admin-radius: 14px;
  --biz-blue: var(--admin-accent);
  --crm-blue: var(--admin-accent);
  --rc-primary: var(--admin-accent);
}
body:not(.login-mode) { background: var(--admin-canvas) !important; color: var(--admin-text) !important; }
body:not(.login-mode) main[id] { padding: 28px clamp(18px,2.4vw,36px) 48px !important; background: transparent !important; }
body:not(.login-mode) main[id] > header {
  min-height: 0 !important; margin: 0 0 24px !important; padding: 0 0 20px !important;
  border: 0 !important; border-bottom: 1px solid var(--admin-border) !important;
  border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
}
body:not(.login-mode) main[id] > header::after { display: none !important; }
body:not(.login-mode) main[id] > header h1 { font-size: 30px !important; line-height: 1.35; font-weight: 700 !important; letter-spacing: -.02em; color: var(--admin-text) !important; }
body:not(.login-mode) main[id] > header p { font-size: 14px !important; line-height: 1.7; color: var(--admin-muted) !important; max-width: 72ch; }
body:not(.login-mode) main[id] > header .page-eyebrow { color: var(--admin-muted) !important; font-size: 12px !important; font-weight: 500 !important; }
body:not(.login-mode) :is(.student-list-panel,.student-editor,.crm-list-panel,.crm-editor,.list-panel,.editor,.crm-p0-card,.enterprise-form,.enterprise-card,.dashboard-panel,.bank-preview-card) {
  border: 1px solid var(--admin-border) !important; border-radius: var(--admin-radius) !important; background: #fff !important; box-shadow: 0 1px 2px #18223005 !important;
}
body:not(.login-mode) :is(.panel-title,.crm-section-head) { gap: 16px; flex-wrap: wrap; }
body:not(.login-mode) :is(.panel-title,.crm-section-head) :is(h2,h3,strong) { font-size: 17px; line-height: 1.5; font-weight: 650; color: var(--admin-text); }
body:not(.login-mode) :is(.summary,.crm-order-summary) { gap: 0 !important; border: 1px solid var(--admin-border); border-radius: var(--admin-radius); overflow: hidden; background: #fff; }
body:not(.login-mode) :is(.summary > div,.crm-order-summary > article) { border: 0 !important; border-right: 1px solid var(--admin-border) !important; border-radius: 0 !important; background: #fff !important; box-shadow: none !important; padding: 18px 20px !important; }
body:not(.login-mode) :is(.summary > div,.crm-order-summary > article):last-child { border-right: 0 !important; }
body:not(.login-mode) :is(.summary b,.crm-order-summary strong) { font-variant-numeric: tabular-nums; line-height: 1.3; }
body:not(.login-mode) :is(.student-toolbar,.crm-filterbar,.crm-advanced-filters) { gap: 12px !important; background: #f8fafc !important; border-color: var(--admin-border) !important; }
body:not(.login-mode) :is(main,.modal-panel,.crm-detail-drawer,.crm-followup-drawer) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea) {
  border: 1px solid #cfd8e4 !important; border-radius: 8px !important; color: var(--admin-text) !important; font-size: 14px; line-height: 1.5;
}
body:not(.login-mode) :is(main,.modal-panel) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),select) { min-height: 42px; }
body:not(.login-mode) :is(main,.modal-panel) button { border-radius: 8px; font-size: 14px; line-height: 1.5; }
body:not(.login-mode) :is(main > header,.actions,.crm-editor-footer) button { min-height: 42px; padding: 10px 16px; }
body:not(.login-mode) button.primary { background: var(--admin-accent) !important; border-color: var(--admin-accent) !important; color: #fff !important; }
body:not(.login-mode) main :is(th,td) { border-color: var(--admin-border) !important; }
body:not(.login-mode) main th { font-size: 12px !important; font-weight: 600 !important; color: #526176 !important; background: #f8fafc !important; }
body:not(.login-mode) main td { font-size: 13px !important; line-height: 1.65; }
body:not(.login-mode) .modal-panel { border: 1px solid var(--admin-border); border-radius: 16px !important; background: #fff !important; max-height: calc(100dvh - 32px); }
body:not(.login-mode) .modal-panel .modal-header strong { font-size: 20px; font-weight: 650; line-height: 1.4; }
body:not(.login-mode) .modal-panel .modal-header small { display: block; margin-top: 8px; font-size: 13px; line-height: 1.7; color: var(--admin-muted); }
body:not(.login-mode) :is(.student-pagination,.crm-pagination) { font-size: 13px; padding: 16px 20px; border-top: 1px solid var(--admin-border); }
body:not(.login-mode) :is(button,input,select,textarea,a):focus-visible { outline: 3px solid #92b8ff !important; outline-offset: 3px; }
@media (max-width: 900px) {
  body:not(.login-mode) main[id] { padding: 18px 14px 36px !important; }
  body:not(.login-mode) main[id] > header { flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 620px) {
  body:not(.login-mode) main[id] > header h1 { font-size: 25px !important; }
  body:not(.login-mode) :is(.summary > div,.crm-order-summary > article) { padding: 14px !important; border-bottom: 1px solid var(--admin-border) !important; }
  body:not(.login-mode) :is(.actions,.crm-editor-footer,.crm-table-actions,.student-pagination) button { min-height: 44px; }
  body:not(.login-mode) .modal-mask { padding: 10px; }
  body:not(.login-mode) .modal-panel { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.login-mode) :is(button,input,select,.modal-panel,.crm-p0-card) { transition: none !important; animation: none !important; }
}
