/* AcademyOS admin design system — Public Sans loaded via admin enqueue */

:root {
	--ao-navy: #1a1a2e;
	--ao-blue: #2563eb;
	--ao-green: #16a34a;
	--ao-amber: #d97706;
	--ao-red: #dc2626;
	--ao-purple: #7c3aed;
	--ao-surface: #fcf8fa;
	--ao-surface-low: #f6f2f4;
	--ao-border: #e2e8f0;
	--ao-text: #1c1b1d;
	--ao-text-muted: #47464c;
	--ao-sidebar-w: 260px;
	--ao-topbar-h: 64px;
	--ao-radius: 8px;
	--font-main: "Public Sans", system-ui, -apple-system, sans-serif;
}

.ao-wrap {
	font-family: var(--font-main);
	color: var(--ao-text);
	background: var(--ao-surface-low);
	/* Respect wp-admin padding/margins to avoid clipping under the menu/admin bar. */
	margin: 0;
	padding: 20px 24px 40px;
	min-height: calc(100vh - 32px);
}

.ao-shell {
	display: flex;
	min-height: 100vh;
	background: var(--ao-surface-low);
}

.ao-sidebar {
	width: var(--ao-sidebar-w);
	background: var(--ao-navy);
	color: #fff;
	flex-shrink: 0;
}

.ao-topbar {
	height: var(--ao-topbar-h);
	background: #fff;
	border-bottom: 1px solid var(--ao-border);
	display: flex;
	align-items: center;
	padding: 0 24px;
	position: sticky;
	top: 0;
	z-index: 5;
	width: 100%;
	box-sizing: border-box;
	gap: 16px;
}

/* When the WP admin bar is present, offset sticky topbar. */
body.admin-bar .ao-topbar {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Admin shell (wp-admin): avoid fixed positioning that clips under WP chrome. */
.ao-admin-shell-sidebar {
	position: sticky;
	top: 0;
	height: calc(100vh - 0px);
	align-self: flex-start;
}

body.admin-bar .ao-admin-shell-sidebar {
	top: var(--wp-admin--admin-bar--height, 32px);
	height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

.ao-admin-shell-topbar {
	position: sticky;
	top: 0;
	z-index: 50;
}

body.admin-bar .ao-admin-shell-topbar {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.ao-main {
	flex: 1;
	min-width: 0;
}

.ao-content {
	max-width: 1400px;
	margin: 0 auto;
	padding: 28px;
}

.ao-page-head {
	margin-bottom: 24px;
}

.ao-page-title {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 6px;
}

.ao-page-subtitle {
	margin: 0;
	color: var(--ao-text-muted);
	font-size: 0.95rem;
}

.ao-text-muted {
	color: var(--ao-text-muted);
	font-size: 0.9rem;
}

.ao-card {
	background: #fff;
	border-radius: var(--ao-radius);
	box-shadow: 0 1px 3px rgba(26, 26, 46, 0.08);
	border: 1px solid var(--ao-border);
	margin-bottom: 24px;
	overflow: hidden;
}

.ao-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--ao-border);
}

.ao-card-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
}

.ao-card-body {
	padding: 20px;
}

.ao-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
	margin: 0 -4px;
}

.ao-table-scroll .ao-table {
	min-width: 880px;
}

.ao-table-scroll .ao-table th:last-child,
.ao-table-scroll .ao-table td:last-child {
	white-space: nowrap;
}

.ao-selected-list {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.ao-selected-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--ao-border);
	border-radius: 10px;
	background: #fff;
}

.ao-selected-item-label {
	min-width: 0;
	flex: 1;
	font-weight: 600;
	color: var(--ao-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ao-selected-item-actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.ao-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.ao-stat-card {
	background: #fff;
	border: 1px solid var(--ao-border);
	border-radius: var(--ao-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ao-stat-icon {
	font-size: 28px;
	color: var(--ao-blue);
}

.ao-stat-value {
	font-size: 1.75rem;
	font-weight: 700;
}

.ao-stat-label {
	font-size: 0.8rem;
	color: var(--ao-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.ao-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.ao-table th,
.ao-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--ao-border);
}

.ao-table thead th {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ao-text-muted);
	background: var(--ao-surface-low);
}

.ao-table tbody tr:nth-child(even) {
	background: #fafafa;
}

.ao-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: var(--ao-radius);
	font-weight: 600;
	font-size: 0.875rem;
	border: 1px solid transparent;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	background: var(--ao-surface-low);
	color: var(--ao-text);
}

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

.ao-btn-blue {
	background: var(--ao-blue);
	color: #fff;
	border-color: var(--ao-blue);
}

.ao-btn-outline {
	background: #fff;
	border-color: var(--ao-border);
}

.ao-btn-danger {
	background: #fff;
	color: var(--ao-red);
	border-color: #fecaca;
}

.ao-btn-sm {
	padding: 6px 12px;
	font-size: 0.8125rem;
}

.ao-btn-xs {
	padding: 4px 10px;
	font-size: 0.75rem;
}

.ao-input,
.ao-field select,
.ao-field textarea {
	width: 100%;
	max-width: 420px;
	padding: 10px 12px;
	border: 1px solid var(--ao-border);
	border-radius: var(--ao-radius);
	font-family: inherit;
	font-size: 0.9rem;
	background: #fff;
}

.ao-label {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	color: var(--ao-text-muted);
	margin-bottom: 6px;
}

.ao-field {
	margin-bottom: 16px;
}

.ao-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	background: var(--ao-surface-low);
	color: var(--ao-text-muted);
}

.ao-badge-active,
.ao-badge-completed {
	background: #dcfce7;
	color: var(--ao-green);
}

.ao-badge-pending,
.ao-badge-draft {
	background: #fef3c7;
	color: var(--ao-amber);
}

.ao-badge-inactive,
.ao-badge-withdrawn {
	background: #fee2e2;
	color: var(--ao-red);
}

.ao-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.ao-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.ao-toggle-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #cbd5e1;
	border-radius: 999px;
	transition: 0.2s;
}

.ao-toggle-slider::before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: 0.2s;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.ao-toggle input:checked + .ao-toggle-slider {
	background: var(--ao-green);
}

.ao-toggle input:checked + .ao-toggle-slider::before {
	transform: translateX(20px);
}

.ao-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(26, 26, 46, 0.45);
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ao-modal-overlay.is-open {
	display: flex;
}

.ao-modal {
	background: #fff;
	border-radius: var(--ao-radius);
	max-width: 520px;
	width: 100%;
	padding: 24px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.ao-notice {
	border-left: 4px solid var(--ao-blue);
	padding: 12px 16px;
	margin: 12px 0;
	border-radius: 4px;
}

.ao-notice-success {
	border-left-color: var(--ao-green);
	background: #f0fdf4;
}

.ao-notice-error {
	border-left-color: var(--ao-red);
	background: #fef2f2;
}

.ao-notice-warn {
	border-left-color: var(--ao-amber);
	background: #fffbeb;
}

.ao-notice-info {
	border-left-color: var(--ao-blue);
	background: #eff6ff;
}

.ao-student-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--ao-navy);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.85rem;
}

.ao-progress {
	height: 8px;
	background: var(--ao-border);
	border-radius: 999px;
	overflow: hidden;
}

.ao-progress-fill {
	height: 100%;
	background: var(--ao-blue);
	border-radius: 999px;
}

.ao-grade-pill {
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.85rem;
	background: var(--ao-surface-low);
}

.ao-quick-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 480px;
}

.ao-quick-action,
.ao-quick-action-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--ao-border);
	border-radius: var(--ao-radius);
	background: #fff;
	cursor: pointer;
	font-family: inherit;
	font-weight: 600;
	text-align: left;
}

.ao-quick-action:hover,
.ao-quick-action-btn:hover {
	border-color: var(--ao-blue);
}

.ao-audit-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ao-audit-item {
	padding: 10px 0;
	border-bottom: 1px solid var(--ao-border);
	font-size: 0.9rem;
}

.ao-empty {
	text-align: center;
	padding: 48px 24px;
	color: var(--ao-text-muted);
}

.ao-empty-icon {
	font-size: 56px;
	display: block;
	margin-bottom: 12px;
	color: #cbd5e1;
}

.ao-empty-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	color: var(--ao-text);
}

.ao-empty-message {
	margin: 0;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

.ao-action-link {
	color: var(--ao-blue);
	font-weight: 600;
	text-decoration: none;
}

.ao-action-link:hover {
	text-decoration: underline;
}

.ao-pagination {
	display: flex;
	gap: 8px;
	margin-top: 16px;
}

#ao-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.ao-toast-item {
	min-width: 240px;
	max-width: 360px;
	padding: 14px 16px;
	border-radius: var(--ao-radius);
	background: var(--ao-navy);
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
	font-size: 0.9rem;
	pointer-events: auto;
}

.ao-toast-item.ao-toast-success {
	background: var(--ao-green);
}

.ao-toast-item.ao-toast-error {
	background: var(--ao-red);
}

.ao-toast-item.ao-toast-warn {
	background: var(--ao-amber);
	color: #1c1b1d;
}

.ao-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.ao-tab-btn {
	padding: 8px 14px;
	border: 1px solid var(--ao-border);
	background: #fff;
	border-radius: 999px;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.85rem;
}

.ao-tab-btn.is-active {
	background: var(--ao-navy);
	color: #fff;
	border-color: var(--ao-navy);
}

.ao-tab-panel {
	display: none;
	padding: 12px 0;
}

.ao-tab-panel.is-active {
	display: block;
}

.ao-list {
	margin: 0;
	padding-left: 20px;
}

.ao-table-search {
	max-width: 280px;
	margin-bottom: 12px;
}

.ao-shortcode-reference code.ao-shortcode-tag {
	display: inline-block;
	padding: 4px 8px;
	background: var(--ao-surface-low);
	border: 1px solid var(--ao-border);
	border-radius: 4px;
	font-size: 0.85rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	white-space: nowrap;
}

.ao-dash-columns {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	align-items: flex-start;
	margin-bottom: 24px;
}

.ao-dash-col-main {
	flex: 2 1 320px;
	min-width: 0;
}

.ao-dash-col-side {
	flex: 1 1 260px;
	max-width: 480px;
	min-width: 0;
}

.ao-coach-manage-columns {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	align-items: flex-start;
}

.ao-coach-manage-columns > div {
	flex: 1 1 360px;
	min-width: 0;
}

.ao-coach-manage-columns > div:first-child {
	flex: 1 1 320px;
	max-width: 520px;
}

/* Admissions — incoming transcript form (prior-school uploads) */
.ao-admissions-form .ao-admissions-sheet {
	border: 1px solid var(--ao-border);
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 24px;
	background: linear-gradient(180deg, #f8fafc 0%, #fff 52%);
	box-shadow: 0 1px 2px rgba(26, 26, 46, 0.04);
}
.ao-admissions-sheet__eyebrow {
	margin: 0 0 4px;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--ao-blue);
}
.ao-admissions-sheet__lede {
	margin: 0 0 18px;
	max-width: 52rem;
	line-height: 1.45;
}
.ao-admissions-applicant-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 8px;
}
.ao-upload-dropzone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 112px;
	padding: 18px;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	background: #fff;
	text-align: center;
	transition:
		border-color 0.15s ease,
		background 0.15s ease;
}
.ao-upload-dropzone:hover {
	border-color: var(--ao-blue);
	background: rgba(37, 99, 235, 0.04);
}
.ao-upload-dropzone__label {
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--ao-text);
	pointer-events: none;
}
.ao-upload-dropzone__types {
	font-size: 0.82rem;
	color: var(--ao-text-muted);
	pointer-events: none;
	max-width: 28rem;
	line-height: 1.35;
}
.ao-upload-dropzone__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.ao-admissions-current-file {
	margin-top: 10px;
	margin-bottom: 0;
	font-size: 0.88rem;
}
.ao-admissions-section-title {
	margin: 20px 0 8px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ao-navy);
}
.ao-admissions-form .ao-admissions-section-title:first-of-type {
	margin-top: 0;
}

.ao-module-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.ao-module-card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px;
	border: 1px solid var(--ao-border);
	border-radius: var(--ao-radius);
	background: var(--ao-surface-low);
}

.ao-module-card-icon {
	font-size: 32px;
	color: var(--ao-blue);
	flex-shrink: 0;
}

.ao-module-card-body {
	flex: 1;
	min-width: 0;
}

.ao-module-card-title {
	display: block;
	margin-bottom: 4px;
}

.ao-module-card-desc {
	margin: 0;
	font-size: 0.85rem;
}

.ao-module-card-toggle {
	flex-shrink: 0;
	margin-top: 4px;
}

.ao-settings-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 20px;
}

.ao-settings-columns h3 {
	margin: 0 0 8px;
	font-size: 0.95rem;
}

.ao-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
}

.ao-inline-form.ao-stack-form {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.ao-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(26, 26, 46, 0.45);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.ao-modal-overlay.is-open {
	display: flex;
}

.ao-modal {
	background: #fff;
	border-radius: var(--ao-radius);
	padding: 24px;
	max-width: 480px;
	width: 100%;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.ao-progress {
	height: 8px;
	background: var(--ao-border);
	border-radius: 999px;
	overflow: hidden;
}

.ao-progress-fill {
	height: 100%;
	background: var(--ao-blue);
	border-radius: 999px;
}

.ao-audit-json {
	font-size: 0.72rem;
	max-height: 160px;
	overflow: auto;
	background: var(--ao-surface-low);
	padding: 8px;
	border-radius: 4px;
}

.ao-report-preview-inline {
	max-height: 240px;
	overflow: auto;
	font-size: 0.85rem;
}

.ao-sidebar-link {
	display: block;
	padding: 10px 18px;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	font-size: 0.9rem;
	border-left: 3px solid transparent;
}

.ao-sidebar-link:hover,
.ao-sidebar-link.is-active {
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	border-left-color: var(--ao-blue);
}

.ao-sidebar-nav {
	padding: 8px 0 24px;
}

.ao-sidebar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 18px;
	font-weight: 700;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ao-topbar-search {
	display: flex;
	align-items: center;
	flex: 1;
	max-width: 360px;
	background: var(--ao-surface-low);
	border-radius: 999px;
	padding: 0 12px;
	border: 1px solid var(--ao-border);
}

.ao-topbar-search-input {
	border: 0;
	background: transparent;
	flex: 1;
	padding: 10px 8px;
	font: inherit;
	min-width: 0;
}

.ao-topbar-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.ao-topbar-user {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
}

.ao-topbar-avatar {
	border-radius: 50%;
}

/* Material Symbols (ligature icons) — font via academyos-admin-fonts enqueue */
.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	font-weight: normal;
	font-style: normal;
	font-size: 24px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	-webkit-font-smoothing: antialiased;
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ao-brand-icon-preview {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 12px;
	padding: 14px 16px;
	background: var(--ao-surface-low);
	border: 1px solid var(--ao-border);
	border-radius: var(--ao-radius);
}
.ao-brand-icon-preview__glyph {
	font-size: 40px;
	color: var(--ao-navy);
}
.ao-brand-icon-preview__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
}
.ao-brand-icon-preview__meta strong {
	font-family: ui-monospace, monospace;
	font-size: 14px;
	color: var(--ao-text);
}
.ao-brand-icon-picker {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
	gap: 8px;
	max-width: 720px;
}
.ao-brand-icon-picker__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 72px;
	padding: 8px 6px;
	border: 1px solid var(--ao-border);
	border-radius: var(--ao-radius);
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ao-brand-icon-picker__btn:hover {
	border-color: var(--ao-blue);
	background: #eff6ff;
}
.ao-brand-icon-picker__btn.is-selected {
	border-color: var(--ao-blue);
	background: #dbeafe;
	box-shadow: 0 0 0 1px var(--ao-blue);
}
.ao-brand-icon-picker__btn .material-symbols-outlined {
	font-size: 28px;
	color: var(--ao-navy);
}
.ao-brand-icon-picker__label {
	font-size: 10px;
	line-height: 1.2;
	color: var(--ao-text-muted);
	text-align: center;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
