/* TM Learning — Lesson Dashboard
   Simple, flat, thin-border LMS style matching the supplied reference. */

/* Self-hosted fonts (bundled directly — this site's setup has had issues
   loading externally-referenced assets, e.g. the TinyMCE table plugin,
   so fonts are bundled the same way for reliability). */
@font-face {
	font-family: 'Oswald';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/oswald-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Oswald';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/oswald-latin-700-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Barlow Condensed';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/barlow-condensed-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Barlow Condensed';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Roboto Condensed';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/roboto-condensed-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Roboto Condensed';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/roboto-condensed-latin-700-normal.woff2') format('woff2');
}

.tml-dashboard {
	--tml-header-bg: #11736F;
	--tml-page-bg: #F4F4F4;
	--tml-border: #d3d3d3;
	--tml-text: #2b2b2b;
	--tml-panel1-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--tml-title-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--tml-topic-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	--tml-studynotes-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	color: var(--tml-text);
	font-family: inherit;
	overflow: hidden;
}

.tml-dashboard *,
.tml-dashboard *::before,
.tml-dashboard *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */
.tml-header {
	height: 46px;
	min-height: 46px;
	background: var(--tml-header-bg);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	width: 100%;
}

.tml-header-logo img {
	height: var(--tml-logo-height, 30px);
	width: auto;
	object-fit: contain;
	display: block;
}

.tml-header-sitename {
	color: #fff;
	font-weight: bold;
	font-size: 16px;
}

.tml-header-sitename-link {
	text-decoration: none;
}

.tml-header-nav {
	display: flex;
	gap: 8px;
}

.tml-nav-btn {
	background: #ffffff;
	color: #2b2b2b;
	border: 1px solid #888;
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 13px;
	text-decoration: none;
	line-height: 1;
	white-space: nowrap;
}

.tml-nav-btn:hover {
	background: #f0f0f0;
}

.tml-nav-btn.tml-nav-active {
	font-weight: bold;
}

.tml-mobile-toggle {
	display: none;
	background: transparent;
	border: 1px solid #fff;
	color: #fff;
	border-radius: 4px;
	font-size: 16px;
	padding: 4px 10px;
	cursor: pointer;
}

/* ---------- Main two-column layout ---------- */
.tml-main {
	flex: 1;
	display: flex;
	gap: 12px;
	padding: 12px;
	background: var(--tml-page-bg);
	min-height: 0;
	box-sizing: border-box;
	overflow: hidden;
}

/* ---------- Sidebar (Panel 1) ---------- */
.tml-sidebar {
	width: 300px;
	min-width: 300px;
	background: #fff;
	border: 1px solid var(--tml-border);
	border-radius: 10px;
	height: 100%;
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
}

.tml-sidebar-heading {
	flex: 0 0 34px;
	height: 34px;
	line-height: 34px;
	text-align: center;
	font-weight: bold;
	font-size: 16px;
	margin: 0;
	padding: 0 10px;
	color: var(--tml-text);
	border-bottom: 1px solid var(--tml-border);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--tml-panel1-font);
}

.tml-exams-heading {
	border-top: 1px solid var(--tml-border);
}

.tml-module-list {
	flex: 1 1 auto;
	overflow-y: hidden;
	display: flex;
	flex-direction: column;
}

.tml-examtag-item {
	display: block;
	min-height: 40px;
	line-height: 40px;
	padding: 0 18px;
	background: #ececec;
	border-top: 1px solid var(--tml-border);
	color: var(--tml-text);
	text-decoration: none;
	font-size: 14px;
	font-family: var(--tml-panel1-font);
	font-size: var(--tml-panel1-font-size);
}

.tml-examtag-item:hover {
	background: #e0e0e0;
}

.tml-module-row {
	display: flex;
	align-items: stretch;
	min-height: 40px;
	background: #ececec;
	border-top: 1px solid var(--tml-border);
	font-family: var(--tml-panel1-font);
	font-size: var(--tml-panel1-font-size);
}

.tml-module-row:hover {
	background: #e0e0e0;
}

.tml-module-row.tml-active {
	background: #d7d7d7;
	border-right: 4px solid #d63638;
}

.tml-module-name {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	padding: 0 14px;
	color: var(--tml-text);
	text-decoration: none;
	font-size: 15px;
	font-weight: bold;
}

.tml-module-exam-btn {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	color: #888;
	text-decoration: none;
	font-size: 12px;
	border-left: 1px solid var(--tml-border);
	white-space: nowrap;
}

.tml-module-exam-btn:hover {
	color: #555;
	background: rgba(0,0,0,0.03);
}

.tml-subcategory-list {
	display: none;
	flex-direction: column;
}

.tml-module-expanded .tml-subcategory-list {
	display: flex;
}

.tml-subcategory-item {
	display: block;
	min-height: 32px;
	line-height: 32px;
	padding: 0 14px;
	background: #f5f5f5;
	border-top: 1px solid var(--tml-border);
	color: var(--tml-text);
	text-decoration: none;
	font-size: 13px;
	font-family: var(--tml-panel1-font);
	font-size: var(--tml-panel1-font-size);
}

.tml-subcategory-item:hover {
	background: #ebebeb;
}

.tml-subcategory-item.tml-active {
	background: #e0e0e0;
	font-weight: bold;
	border-right: 4px solid #dba617;
}

/* ---------- Content panel (Panel 2) ---------- */
.tml-content {
	flex: 1;
	background: #fff;
	border: 1px solid var(--tml-border);
	border-radius: 10px;
	height: 100%;
	overflow: hidden;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.tml-content-inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.tml-content-title-bar {
	flex: 0 0 34px;
	height: 34px;
	line-height: 34px;
	padding: 0 16px;
}

.tml-content-title-bar-nav {
	flex: 0 0 30px;
	height: 30px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 8px;
}

.tml-content-title-bar-nav .tml-content-title {
	flex: 1 1 auto;
	min-width: 0;
}

.tml-topic-nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1a8f1a;
	text-decoration: none;
	font-size: 20px;
	font-weight: bold;
	line-height: 1;
}

.tml-topic-nav:hover {
	color: #146b14;
}

.tml-topic-nav-disabled {
	color: #ccc;
	pointer-events: none;
}

.tml-topic-title {
	font-weight: bold;
	font-size: 20px;
	margin: 4px 0 4px 0;
	font-family: var(--tml-topic-font);
}

.tml-topic-position {
	display: block;
	font-size: 12px;
	color: #888;
	margin: -4px 0 14px 0;
}

.tml-content-title {
	text-align: center;
	font-weight: bold;
	font-size: 18px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--tml-title-font);
	font-size: var(--tml-title-font-size);
}

.tml-divider {
	flex: 0 0 1px;
	border: none;
	border-top: 1px solid var(--tml-border);
	margin: 0;
}

.tml-content-scroll {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 20px 24px 20px;
}

.tml-chapter-list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tml-subcategory-group {
	margin-bottom: 24px;
}

.tml-subcategory-heading {
	font-size: 17px;
	font-weight: bold;
	color: var(--tml-header-bg);
	margin: 0 0 10px 0;
	padding-bottom: 0;
	border-bottom: none;
}

.tml-chapter-link,
.tml-topic-link {
	color: var(--tml-text);
	text-decoration: underline;
	font-size: 20px;
	font-family: var(--tml-topic-font);
	font-size: var(--tml-topic-font-size);
}

.tml-chapter-link:hover,
.tml-topic-link:hover {
	color: var(--tml-header-bg);
}

.tml-examtag-quiz-list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 20px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tml-examtag-quiz-link {
	color: var(--tml-text);
	text-decoration: underline;
	font-size: 20px;
	font-family: var(--tml-topic-font);
}

.tml-examtag-quiz-link:hover {
	color: var(--tml-header-bg);
}

.tml-back-link {
	display: inline-block;
	margin-bottom: 14px;
	color: var(--tml-header-bg);
	text-decoration: none;
	font-size: 14px;
}

.tml-back-link:hover {
	text-decoration: underline;
}

.tml-chapter-body {
	font-size: 16px;
	line-height: 1.6;
	font-family: var(--tml-studynotes-font);
	font-size: var(--tml-studynotes-font-size);
}

.tml-empty {
	color: #888;
	padding-left: 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.tml-sidebar {
		width: 220px;
		min-width: 220px;
	}
}

@media (max-width: 768px) {
	.tml-mobile-toggle {
		display: inline-block;
	}

	.tml-header-nav {
		gap: 4px;
	}

	.tml-nav-btn {
		padding: 5px 8px;
		font-size: 12px;
	}

	.tml-main {
		position: relative;
		height: calc(100vh - 46px);
	}

	.tml-sidebar {
		position: absolute;
		top: 0;
		left: 12px;
		width: 260px;
		min-width: 260px;
		max-width: calc(100vw - 24px);
		height: calc(100% - 0px);
		max-height: 100%;
		z-index: 10;
		box-shadow: 0 2px 8px rgba(0,0,0,0.15);
		display: none;
	}

	.tml-sidebar.tml-open {
		display: flex;
	}

	.tml-content {
		width: 100%;
	}
}
