/* Company Enrollment for Tutor LMS
   Front end inherits the theme's fonts; colours are set here so it reads well on any theme.
   Change --tce-accent to match your brand. */

.tce,
.tce-page,
.tce-admin {
	--tce-accent: #0f766e;
	--tce-accent-ink: #ffffff;
	--tce-accent-soft: #e6f4f1;
	--tce-ink: #1f2937;
	--tce-muted: #6b7280;
	--tce-line: #e5e7eb;
	--tce-surface: #ffffff;
	--tce-sunk: #f6f7f9;
	--tce-ok: #15803d;
	--tce-ok-soft: #e8f6ec;
	--tce-wait: #92400e;
	--tce-wait-soft: #fdf3e2;
	--tce-bad: #b91c1c;
	--tce-bad-soft: #fdecec;
	--tce-radius: 10px;
}

.tce { color: var(--tce-ink); font-size: 15px; line-height: 1.5; }
.tce *, .tce *::before, .tce *::after { box-sizing: border-box; }
.tce-narrow { max-width: 560px; margin: 0 auto; }
.tce-muted { color: var(--tce-muted); }
.tce-sub { display: block; color: var(--tce-muted); font-size: 13px; overflow-wrap: anywhere; }
.tce-help { color: var(--tce-muted); font-size: 13px; margin: 6px 0 0; }
.tce-eyebrow { margin: 0 0 4px; color: var(--tce-accent); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.tce .tce-title { margin: 0 0 12px; font-size: 1.5em; line-height: 1.25; }
.tce .tce-h { margin: 28px 0 12px; font-size: 1.1em; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.tce-count { font-size: 13px; font-weight: 500; color: var(--tce-muted); background: var(--tce-sunk); border-radius: 999px; padding: 1px 8px; }
.tce-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.tce-top .tce-title { margin: 0; }

.tce-card {
	background: var(--tce-surface);
	border: 1px solid var(--tce-line);
	border-radius: var(--tce-radius);
	padding: 22px;
}

/* Buttons and links ------------------------------------------------------ */
.tce .tce-btn,
.tce-page .tce-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 40px;
	padding: 8px 16px;
	border-radius: 8px;
	border: 1px solid var(--tce-line);
	background: var(--tce-surface);
	color: var(--tce-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}
.tce .tce-btn:hover { border-color: #cbd0d6; background: var(--tce-sunk); color: var(--tce-ink); }
.tce .tce-btn--primary { background: var(--tce-accent); border-color: var(--tce-accent); color: var(--tce-accent-ink); }
.tce .tce-btn--primary:hover { background: #0b5f59; border-color: #0b5f59; color: var(--tce-accent-ink); }
.tce .tce-btn[disabled] { opacity: .5; cursor: not-allowed; }
.tce .tce-btn--small { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.tce .tce-btn--wide { width: 100%; }
.tce .tce-btn.is-copied { border-color: var(--tce-ok); color: var(--tce-ok); }

.tce .tce-link {
	display: inline;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	color: var(--tce-accent);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	box-shadow: none;
	min-height: 0;
	text-transform: none;
	letter-spacing: normal;
}
.tce .tce-link:hover { color: var(--tce-ink); background: none; }
.tce .tce-link--quiet { color: var(--tce-muted); font-weight: 500; }
.tce .tce-link--danger, .tce-admin .tce-link--danger { color: var(--tce-bad); }
.tce .tce-link.is-copied { color: var(--tce-ok); }
.tce-inline { display: inline; margin: 0; }

/* Notices ---------------------------------------------------------------- */
.tce-notice { border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; border: 1px solid; font-size: 14px; }
.tce-notice p { margin: 0; }
.tce-notice--success { background: var(--tce-ok-soft); border-color: #b9e3c6; color: #14532d; }
.tce-notice--error { background: var(--tce-bad-soft); border-color: #f5c2c2; color: #7f1d1d; }
.tce-notice--warning { background: var(--tce-wait-soft); border-color: #f3d9a8; color: #78350f; }
.tce-notice--info { background: var(--tce-sunk); border-color: var(--tce-line); color: var(--tce-ink); }

/* Chips ------------------------------------------------------------------ */
.tce-chip {
	display: inline-block;
	margin: 4px 4px 0 0;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	background: var(--tce-sunk);
	color: var(--tce-muted);
	vertical-align: middle;
	white-space: nowrap;
}
.tce-chip--manager { background: var(--tce-accent-soft); color: var(--tce-accent); }
.tce-chip--wait { background: var(--tce-wait-soft); color: var(--tce-wait); }
.tce-chip--ok { background: var(--tce-ok-soft); color: var(--tce-ok); }
.tce-chip--bad { background: var(--tce-bad-soft); color: var(--tce-bad); }

/* Stats ------------------------------------------------------------------ */
.tce-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
	margin: 0 0 8px;
}
.tce-stat {
	background: var(--tce-surface);
	border: 1px solid var(--tce-line);
	border-radius: var(--tce-radius);
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.tce-stat > span { color: var(--tce-muted); font-size: 13px; }
.tce-stat strong { font-size: 26px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tce-stat strong small { font-size: 15px; color: var(--tce-muted); font-weight: 500; }
.tce-stat > small { color: var(--tce-muted); font-size: 12px; }

/* Seats ------------------------------------------------------------------ */
.tce-seats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}
.tce-seat {
	background: var(--tce-surface);
	border: 1px solid var(--tce-line);
	border-radius: var(--tce-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}
.tce-seat__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tce .tce-seat__title { font-weight: 700; color: var(--tce-ink); text-decoration: none; }
.tce .tce-seat__title:hover { text-decoration: underline; }
.tce-seat__left { flex: none; font-size: 13px; font-weight: 600; color: var(--tce-accent); }
.tce-seat__left.is-full { color: var(--tce-wait); }
.tce-seat__meta { margin: 0; font-size: 13px; color: var(--tce-muted); }
.tce-seat__meta a { color: var(--tce-accent); font-weight: 600; }

.tce-meter { height: 8px; border-radius: 999px; background: var(--tce-sunk); overflow: hidden; }
.tce-meter span { display: block; height: 100%; border-radius: inherit; background: var(--tce-accent); }
.tce-meter--sm { height: 6px; max-width: 140px; margin-bottom: 4px; }

.tce-join { border-top: 1px dashed var(--tce-line); padding-top: 10px; margin-top: 2px; }
.tce-join__label { display: block; font-size: 12px; font-weight: 600; color: var(--tce-muted); margin-bottom: 4px; }
.tce-copy { display: flex; gap: 6px; }
.tce .tce-copy input {
	flex: 1;
	min-width: 0;
	height: 34px;
	padding: 4px 10px;
	border: 1px solid var(--tce-line);
	border-radius: 8px;
	background: var(--tce-sunk);
	color: var(--tce-ink);
	font-size: 13px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tce-join__actions { display: flex; gap: 14px; margin-top: 6px; }
.tce-hint { display: block; font-size: 12px; margin-top: 4px; }
.tce-more { margin: 12px 0 0; font-size: 14px; color: var(--tce-muted); }
.tce-more a { color: var(--tce-accent); font-weight: 600; }

/* Invite form ------------------------------------------------------------ */
.tce-invite__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-bottom: 14px; }
.tce-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.tce-invite fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.tce .tce-invite textarea,
.tce-register input {
	width: 100%;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 10px 12px;
	font: inherit;
	font-size: 14px;
	background: #fff;
	color: var(--tce-ink);
}
.tce .tce-invite textarea { min-height: 140px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.tce-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border: 1px solid var(--tce-line);
	border-radius: 8px;
	margin-bottom: 6px;
	cursor: pointer;
	font-size: 14px;
}
.tce-check:hover { border-color: #cbd0d6; }
.tce-check input { margin: 0; flex: none; width: 16px; height: 16px; accent-color: var(--tce-accent); }
.tce-check span { flex: 1; min-width: 0; }
.tce-check em { font-style: normal; font-size: 12px; color: var(--tce-muted); white-space: nowrap; }
.tce-check.is-disabled { opacity: .55; cursor: not-allowed; }

/* People table ----------------------------------------------------------- */
.tce-people-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tce-people-tools { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
.tce .tce-filter {
	height: 40px;
	padding: 6px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
	min-width: 220px;
	background: #fff;
}
.tce .tce-stage-filter {
	height: 40px;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
	background: #fff;
	max-width: 100%;
}

/* Reminder card ---------------------------------------------------------- */
.tce-nudge { display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0 14px; padding: 18px 20px; border-left: 4px solid var(--tce-accent); }
.tce-nudge__text { flex: 1 1 320px; min-width: 0; }
.tce-nudge__text p { margin: 4px 0 0; }
.tce-nudge__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tce-nudge__actions .tce-inline { margin: 0; }

.tce-table-wrap { overflow-x: auto; border: 1px solid var(--tce-line); border-radius: var(--tce-radius); background: var(--tce-surface); }
.tce .tce-table { width: 100%; border-collapse: collapse; margin: 0; border: 0; font-size: 14px; }
.tce .tce-table th,
.tce .tce-table td { padding: 12px 14px; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--tce-line); background: none; }
.tce .tce-table thead th { background: var(--tce-sunk); font-size: 12px; font-weight: 700; color: var(--tce-muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.tce .tce-table tbody tr:last-child td { border-bottom: 0; }
.tce-person { min-width: 200px; }
.tce-last { white-space: nowrap; }
.tce-page.alignwide { max-width: min(1200px, 100%); margin-left: auto; margin-right: auto; }
.tce-person strong { font-weight: 600; }
.tce-actions { white-space: nowrap; text-align: right !important; }
.tce-actions > * { margin-left: 12px; }
.tce-actions > *:first-child { margin-left: 0; }
.tce-table td .tce-inline { display: block; margin-top: 4px; }
.tce-actions .tce-inline { display: inline; margin-top: 0; }

.tce-bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.tce-bar__track { flex: 1; height: 6px; border-radius: 999px; background: var(--tce-sunk); overflow: hidden; }
.tce-bar__track span { display: block; height: 100%; border-radius: inherit; background: var(--tce-accent); }
.tce-bar--full .tce-bar__track span { background: var(--tce-ok); }
.tce-bar b { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.tce-stage--completed { color: var(--tce-ok); font-weight: 600; }

/* Learner's own courses -------------------------------------------------- */
.tce-mycourses { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tce-mycourses li { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; align-items: center; gap: 16px; padding: 16px 18px; }
.tce .tce-mycourses__title { font-weight: 700; color: var(--tce-ink); text-decoration: none; }

/* Invite / join / register ----------------------------------------------- */
.tce-courselist { margin: 0 0 18px; padding: 0; list-style: none; }
.tce-courselist li { padding: 10px 14px; border: 1px solid var(--tce-line); border-radius: 8px; margin-bottom: 6px; font-weight: 600; background: var(--tce-sunk); }
.tce-register { margin-top: 18px; border-top: 1px solid var(--tce-line); padding-top: 4px; }
.tce-register p { margin: 0 0 12px; }
.tce-register label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tce-register input[readonly] { background: var(--tce-sunk); color: var(--tce-muted); }
.tce-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tce-accept { margin: 18px 0 6px; }
.tce-card #loginform p { margin: 0 0 12px; }
.tce-card #loginform label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.tce-card #loginform input[type="text"],
.tce-card #loginform input[type="password"] { width: 100%; border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.tce-card #loginform .button-primary { background: var(--tce-accent); border: 0; color: #fff; border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; }

/* wp-admin --------------------------------------------------------------- */
.tce-admin .tce-panel { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 4px 18px 14px; margin: 16px 0; max-width: 1100px; }
.tce-admin .tce-panel h2 { font-size: 15px; margin: 14px 0 6px; }
.tce-admin .tce-seat-rows { max-width: 760px; margin-top: 10px; }
.tce-admin .tce-seat-rows td { vertical-align: middle; }
.tce-admin .tce-seat-rows select { max-width: 100%; min-width: 260px; }
.tce-admin .tce-row-remove { font-size: 20px; line-height: 1; color: #b32d2e; text-decoration: none; }
.tce-admin .tce-delete { margin-top: 24px; }
.tce-admin .tce-meta { color: #646970; margin: 6px 0 0; }
.tce-admin .tce-managers ul { margin: 6px 0 12px; }
.tce-admin .tce-managers li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tce-admin .tce-addmanager { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.tce-admin .tce-addmanager input { min-width: 220px; }
.tce-admin .tce { margin-top: 8px; max-width: 1400px; }
.tce-admin .tce .tce-h { font-size: 15px; }
.tce-admin .tce-chip { margin-top: 0; }
.tce-admin .wp-list-table .tce-sub { font-size: 12px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }


/* Withdrawals and participation report (1.2.0) -------------------------- */
.tce-stage--withdrawn { color: var(--tce-bad); font-weight: 600; }
.tce-withdraw { margin-top: 4px; }
.tce-withdraw > summary { list-style: none; cursor: pointer; display: inline; }
.tce-withdraw > summary::-webkit-details-marker { display: none; }
.tce-withdraw[open] > summary { font-weight: 600; }
.tce-withdraw__form { margin-top: 8px; padding: 12px; border: 1px solid var(--tce-line); border-radius: 8px; background: var(--tce-sunk); display: grid; gap: 6px; min-width: 220px; max-width: 320px; }
.tce-withdraw__form .tce-help { margin: 0 0 4px; }
.tce-withdraw__form select, .tce-withdraw__form textarea { width: 100%; box-sizing: border-box; }
.tce-withdraw__form .tce-btn { justify-self: start; margin-top: 4px; }
.tce .tce-report td, .tce .tce-report th { white-space: nowrap; }
.tce .tce-report td:first-child { white-space: normal; min-width: 180px; }
.tce .tce-h--sub { font-size: 1em; margin-top: 22px; }
.tce-reasons { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tce-reasons li { display: flex; gap: 10px; align-items: center; padding: 6px 12px; border: 1px solid var(--tce-line); border-radius: 999px; background: var(--tce-surface); font-size: 14px; }
.tce-reasons b { font-variant-numeric: tabular-nums; color: var(--tce-bad); }

/* Small screens ---------------------------------------------------------- */
@media (max-width: 720px) {
	.tce-invite__grid { grid-template-columns: minmax(0, 1fr); }
	.tce-row { grid-template-columns: minmax(0, 1fr); }
	.tce-people-tools { width: 100%; margin-top: 0; }
	.tce-people-tools { flex-wrap: wrap; }
	.tce .tce-filter { flex: 1 1 100%; min-width: 0; }
	.tce .tce-stage-filter { flex: 1 1 100%; }
	.tce-nudge__actions, .tce-nudge__actions .tce-inline, .tce-nudge__actions .tce-btn { width: 100%; }
	.tce-mycourses li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.tce-card { padding: 18px; }

	/* People table becomes stacked cards. */
	.tce-table-wrap { border: 0; background: none; overflow: visible; }
	.tce .tce-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
	.tce .tce-table, .tce .tce-table tbody, .tce .tce-table tr, .tce .tce-table td { display: block; width: 100%; }
	.tce .tce-table tr { background: var(--tce-surface); border: 1px solid var(--tce-line); border-radius: var(--tce-radius); margin-bottom: 10px; padding: 6px 0; }
	.tce .tce-table tr[hidden] { display: none; }
	.tce .tce-table td { border: 0; padding: 8px 14px; }
	.tce .tce-table td[data-label]:not(.tce-person)::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--tce-muted); margin-bottom: 4px; }
	.tce .tce-table td.is-empty { display: none; }
	.tce-last { white-space: normal; }
	.tce-actions { display: flex !important; flex-wrap: wrap; gap: 8px 16px; text-align: left !important; white-space: normal; border-top: 1px solid var(--tce-line) !important; padding-top: 10px !important; }
	.tce-actions:empty { display: none !important; }
	.tce-actions > * { margin-left: 0; }
}

/* Logo and automatic reminders (1.3.0) ----------------------------------- */
.tce-prefs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.tce-prefs__card h4 { margin: 0 0 4px; font-size: 1em; }
.tce-prefs__card select, .tce-prefs__card input[type="file"] { width: 100%; max-width: 100%; box-sizing: border-box; }
.tce-prefs__logo { margin: 10px 0 12px; min-height: 48px; display: flex; align-items: center; }
.tce-prefs__logo img { max-height: 64px; max-width: 240px; padding: 6px; background: #fff; border: 1px solid var(--tce-line); border-radius: 6px; }
.tce-prefs__status { padding: 8px 12px; border-radius: 6px; font-size: 14px; line-height: 1.45; }
.tce-prefs__status.is-on { background: #ecfdf3; color: #05603a; }
.tce-prefs__status.is-off { background: var(--tce-sunk); color: var(--tce-muted, #5f6368); }
.tce-check { display: block; margin: 6px 0; font-size: 14px; }
.tce-set-courses { margin: 0 0 16px; padding-left: 20px; } .tce-set-courses li { margin: 2px 0; }

/* Invite form: courses in a dropdown, invite form folded under People */
.tce-course-pick { border: 1px solid var(--tce-line, #e5e7eb); border-radius: 10px; background: #fff; margin: 6px 0 10px; }
.tce-course-pick__summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 600; }
.tce-course-pick__summary::-webkit-details-marker { display: none; }
.tce-course-pick__summary::after { content: '\25BE'; color: var(--tce-muted, #6b7280); margin-left: 4px; }
.tce-course-pick[open] .tce-course-pick__summary::after { content: '\25B4'; }
.tce-course-pick__count { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--tce-muted, #6b7280); }
.tce-course-pick__count.is-set { color: var(--tce-accent, #5f3606); font-weight: 600; }
.tce-course-pick__list { max-height: 320px; overflow-y: auto; padding: 4px 10px 10px; border-top: 1px solid var(--tce-line, #e5e7eb); display: grid; gap: 6px; }
.tce-invite-wrap { margin-top: 18px; }
.tce-invite-wrap > .tce-invite-wrap__summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; padding: 6px 0 12px; list-style: none; }
.tce-invite-wrap > .tce-invite-wrap__summary::-webkit-details-marker { display: none; }
.tce-invite-wrap > .tce-invite-wrap__summary::before { content: '+'; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--tce-accent, #5f3606); color: #fff; font-size: 18px; line-height: 1; }
.tce-invite-wrap[open] > .tce-invite-wrap__summary::before { content: '\2212'; }
.tce-report-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tce-managers { margin: 16px 0; }
.tce-managers__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.tce-managers__list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin: 0; padding: 10px 0; border-top: 1px solid var(--tce-line, #e5e7eb); }
.tce-managers__list li:first-child { border-top: 0; }
.tce-managers__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tce-rename { display: inline-block; }
.tce-rename > summary { list-style: none; cursor: pointer; }
.tce-rename > summary::-webkit-details-marker { display: none; }
.tce-rename__form { display: flex; gap: 6px; margin-top: 6px; }
.tce-rename__form input[type=text] { height: 36px; padding: 0 10px; border: 1px solid var(--tce-line, #d1d5db); border-radius: 8px; min-width: 200px; }

/* People search and pages (1.7.3) */
.tce-people-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.tce-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.tce-pager__links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
