﻿/* ================================================================
   Online Huy Academy – Main Stylesheet
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Custom Properties
---------------------------------------------------------------- */
:root {
	--oha-primary:          #6C63FF;
	--oha-primary-dark:     #5754D6;
	--oha-primary-light:    #EEF2FF;
	--oha-primary-grad:     linear-gradient(135deg, #6C63FF 0%, #8B7FF8 100%);

	--oha-bg:               #F0F2F8;
	--oha-white:            #FFFFFF;
	--oha-text-dark:        #1A1A2E;
	--oha-text-medium:      #4A4A6A;
	--oha-text-light:       #9A9AB4;
	--oha-text-label:       #AAAABC;
	--oha-border:           #E8E8F4;

	--oha-sidebar-w:        240px;
	--oha-right-panel-w:    280px;
	--oha-topbar-h:         64px;

	--oha-radius:           14px;
	--oha-radius-sm:        8px;
	--oha-radius-xs:        6px;

	--oha-shadow:           0 2px 10px rgba(108, 99, 255, 0.07);
	--oha-shadow-md:        0 6px 20px rgba(108, 99, 255, 0.13);

	/* Stat icon colours */
	--oha-blue:             #4A90E2;
	--oha-blue-bg:          #EEF4FF;
	--oha-orange:           #FF7A2F;
	--oha-orange-bg:        #FFF4EC;
	--oha-green:            #2DC78B;
	--oha-green-bg:         #EDFBF4;
	--oha-red:              #FF4D4F;
	--oha-red-bg:           #FFF0F0;
}

/* ----------------------------------------------------------------
   Reset & Base
---------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background-color: var(--oha-bg);
	color: var(--oha-text-dark);
	line-height: 1.55;
	overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; }

/* Admin bar offset */
.admin-bar .oha-sidebar,
.admin-bar .oha-right-panel { top: 32px; }
.admin-bar .oha-topbar { top: 32px; }
.admin-bar .oha-content-wrapper { padding-top: calc(var(--oha-topbar-h) + 32px); }

/* ================================================================
   LAYOUT
================================================================ */
.oha-layout {
	display: flex;
	min-height: 100vh;
	position: relative;
}

/* ================================================================
   LEFT SIDEBAR
================================================================ */
.oha-sidebar {
	width: var(--oha-sidebar-w);
	background: var(--oha-white);
	border-right: 1px solid var(--oha-border);
	display: flex;
	flex-direction: column;
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 200;
	overflow-y: auto;
	overflow-x: hidden;
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s;
}

.oha-sidebar::-webkit-scrollbar { width: 4px; }
.oha-sidebar::-webkit-scrollbar-track { background: transparent; }
.oha-sidebar::-webkit-scrollbar-thumb { background: var(--oha-border); border-radius: 4px; }

/* ── Logo ── */
.oha-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 18px;
	min-height: var(--oha-topbar-h);
	border-bottom: 1px solid var(--oha-border);
	flex-shrink: 0;
}

.oha-logo-icon {
	width: 38px;
	height: 38px;
	background: var(--oha-primary-grad);
	border-radius: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.oha-logo-icon svg { width: 22px; height: 22px; }

.oha-logo-text {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--oha-text-dark);
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.oha-logo-text span {
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: var(--oha-text-light);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Custom logo image */
.oha-logo .custom-logo-link { display: flex; align-items: center; }
.oha-logo .custom-logo { max-height: 44px; width: auto; }

/* ── Nav ── */
.oha-nav {
	flex: 1;
	padding: 14px 0;
	display: flex;
	flex-direction: column;
}

.oha-nav-section { padding: 0 0 6px; }

.oha-nav-setting {
	margin-top: auto;
	padding-top: 6px;
	border-top: 1px solid var(--oha-border);
}

.oha-nav-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--oha-text-label);
	padding: 0 20px 6px;
}

.oha-nav-list {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.oha-nav-list a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	margin: 0 8px;
	border-radius: var(--oha-radius-sm);
	font-size: 13.5px;
	font-weight: 500;
	color: var(--oha-text-medium);
	transition: background 0.18s, color 0.18s;
	white-space: nowrap;
}

.oha-nav-list a:hover {
	background: var(--oha-primary-light);
	color: var(--oha-primary);
}

.oha-nav-list a:hover .oha-nav-icon svg { stroke: var(--oha-primary); }

.oha-nav-list li.active a,
.oha-nav-list li.current-menu-item a {
	background: var(--oha-primary-light);
	color: var(--oha-primary);
	font-weight: 600;
}

.oha-nav-list li.active .oha-nav-icon svg,
.oha-nav-list li.current-menu-item .oha-nav-icon svg {
	stroke: var(--oha-primary);
}

.oha-nav-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.oha-nav-icon svg {
	width: 18px;
	height: 18px;
	stroke: var(--oha-text-light);
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 0.18s;
}

/* ================================================================
   CONTENT WRAPPER  (between sidebars)
================================================================ */
.oha-content-wrapper {
	margin-left: var(--oha-sidebar-w);
	margin-right: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding-top: var(--oha-topbar-h);
	min-width: 0;
}

/* ================================================================
   TOP BAR
================================================================ */
.oha-topbar {
	height: var(--oha-topbar-h);
	background: var(--oha-white);
	border-bottom: 1px solid var(--oha-border);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 22px;
	position: fixed;
	top: 0;
	left: var(--oha-sidebar-w);
	right: 0;
	z-index: 210;
}

/* Search */
.oha-search {
	flex: 1;
	max-width: 380px;
	position: relative;
}

.oha-search-icon {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.oha-search-icon svg {
	width: 15px;
	height: 15px;
	stroke: var(--oha-text-light);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
}

.oha-search input {
	width: 100%;
	height: 40px;
	background: var(--oha-bg);
	border: 1.5px solid var(--oha-border);
	border-radius: 20px;
	padding: 0 16px 0 38px;
	font-size: 13.5px;
	color: var(--oha-text-dark);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.oha-search input::placeholder { color: var(--oha-text-light); }

.oha-search input:focus {
	border-color: var(--oha-primary);
	box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.12);
}

/* Topbar actions */
.oha-topbar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.oha-topbar-icon-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--oha-bg);
	border: 1.5px solid var(--oha-border);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	transition: background 0.18s, border-color 0.18s;
	flex-shrink: 0;
}

.oha-topbar-icon-btn:hover {
	background: var(--oha-primary-light);
	border-color: var(--oha-primary);
}

.oha-topbar-icon-btn svg {
	width: 16px;
	height: 16px;
	stroke: var(--oha-text-medium);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.oha-notif-badge {
	position: absolute;
	top: 1px;
	right: 1px;
	width: 9px;
	height: 9px;
	background: var(--oha-red);
	border-radius: 50%;
	border: 2px solid var(--oha-white);
}

/* User menu / dropdown */
.oha-user-menu {
	position: relative;
}

.oha-user-info {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	background: none;
	border: none;
	font-family: inherit;
	padding: 4px 6px;
	border-radius: var(--oha-radius-sm);
	transition: background 0.15s;
}
.oha-user-info:hover { background: var(--oha-bg); }

.oha-user-chevron {
	color: var(--oha-text-light);
	transition: transform 0.2s;
	flex-shrink: 0;
}
.oha-user-menu.is-open .oha-user-chevron { transform: rotate(180deg); }

.oha-user-dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 220px;
	background: var(--oha-white);
	border: 1px solid var(--oha-border);
	border-radius: var(--oha-radius);
	box-shadow: var(--oha-shadow-md);
	z-index: 200;
	overflow: hidden;
	animation: ohaDropIn 0.15s ease;
}
.oha-user-dropdown[hidden] { display: none; }

@keyframes ohaDropIn {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.oha-user-dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
}

.oha-user-avatar-lg {
	width: 42px;
	height: 42px;
	font-size: 16px;
}

.oha-dropdown-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--oha-text-dark);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 140px;
}
.oha-dropdown-role {
	font-size: 12px;
	color: var(--oha-text-light);
	margin-top: 2px;
}

.oha-user-dropdown-divider {
	height: 1px;
	background: var(--oha-border);
	margin: 0;
}

.oha-user-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--oha-text-medium);
	text-decoration: none;
	transition: background 0.14s, color 0.14s;
}
.oha-user-dropdown-item:hover { background: var(--oha-bg); color: var(--oha-text-dark); }

.oha-dropdown-logout { color: var(--oha-red); }
.oha-dropdown-logout:hover { background: #fff0f0; color: var(--oha-red); }

.oha-user-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--oha-primary-grad);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--oha-white);
	font-size: 14px;
	font-weight: 700;
	flex-shrink: 0;
	overflow: hidden;
}

.oha-user-name {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--oha-text-dark);
	white-space: nowrap;
}

/* Mobile toggle */
.oha-mobile-toggle {
	display: none;
	width: 38px;
	height: 38px;
	background: transparent;
	border: none;
	border-radius: var(--oha-radius-sm);
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.18s;
}

.oha-mobile-toggle:hover { background: var(--oha-bg); }

.oha-mobile-toggle svg {
	width: 22px;
	height: 22px;
	stroke: var(--oha-text-dark);
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
}

/* Overlay */
.oha-sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.42);
	z-index: 199;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.28s;
}

.oha-sidebar-overlay.active { opacity: 1; pointer-events: auto; }

/* ================================================================
   MAIN CONTENT AREA
================================================================ */
.oha-main-content {
	flex: 1;
	padding: 24px;
	min-height: 0;
}

/* ================================================================
   HERO BANNER
================================================================ */
.oha-hero {
	background: linear-gradient(135deg, #5E54FF 0%, #7E74FF 45%, #9B8FFF 100%);
	border-radius: var(--oha-radius);
	padding: 34px 36px;
	position: relative;
	overflow: hidden;
	margin-bottom: 24px;
	min-height: 160px;
	display: flex;
	align-items: center;
}

.oha-hero-content {
	position: relative;
	z-index: 2;
	max-width: 440px;
}

.oha-hero h2 {
	font-size: 26px;
	font-weight: 800;
	color: var(--oha-white);
	margin-bottom: 8px;
}

.oha-hero-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.7);
	margin-bottom: 8px;
	white-space: nowrap;
}

.oha-hero p {
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.88);
	margin-bottom: 22px;
	white-space: pre-line;
	line-height: 1.65;
}

.oha-hero-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* Buttons */
.oha-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 10px 22px;
	border-radius: var(--oha-radius-sm);
	font-size: 13.5px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
	font-family: inherit;
	text-decoration: none;
}

.oha-btn:hover { transform: translateY(-1px); }

.oha-btn-white {
	background: var(--oha-white);
	color: var(--oha-primary);
}

.oha-btn-white:hover {
	background: #f0eeff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.oha-btn-outline-white {
	background: rgba(255, 255, 255, 0.15);
	color: var(--oha-white);
	border: 1.5px solid rgba(255, 255, 255, 0.42);
	backdrop-filter: blur(6px);
}

.oha-btn-outline-white:hover {
	background: rgba(255, 255, 255, 0.26);
}

.oha-btn-primary {
	background: var(--oha-primary);
	color: var(--oha-white);
}

.oha-btn-primary:hover {
	background: var(--oha-primary-dark);
	box-shadow: 0 4px 14px rgba(108, 99, 255, 0.32);
}

.oha-btn-outline-primary {
	background: transparent;
	color: var(--oha-primary);
	border: 1.5px solid var(--oha-primary);
}

.oha-btn-outline-primary:hover {
	background: var(--oha-primary-light);
}

/* Hero decorative icons */
.oha-hero-decor {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 300px;
	pointer-events: none;
}

.oha-hero-icon {
	position: absolute;
	width: 54px;
	height: 54px;
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(10px);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
}

/* ================================================================
   STATS GRID
================================================================ */
.oha-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 28px;
}

.oha-stat-card {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	padding: 20px 20px 18px;
	box-shadow: var(--oha-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.oha-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--oha-shadow-md);
}

.oha-stat-icon {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}

.oha-stat-icon svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.oha-stat-icon.color-blue  { background: var(--oha-blue-bg); }
.oha-stat-icon.color-blue svg { stroke: var(--oha-blue); }

.oha-stat-icon.color-orange { background: var(--oha-orange-bg); }
.oha-stat-icon.color-orange svg { stroke: var(--oha-orange); }

.oha-stat-icon.color-green { background: var(--oha-green-bg); }
.oha-stat-icon.color-green svg { stroke: var(--oha-green); }

.oha-stat-icon.color-red   { background: var(--oha-red-bg); }
.oha-stat-icon.color-red svg { stroke: var(--oha-red); }

.oha-stat-label {
	font-size: 12px;
	color: var(--oha-text-light);
	font-weight: 500;
	margin-bottom: 4px;
}

.oha-stat-value {
	font-size: 30px;
	font-weight: 800;
	color: var(--oha-text-dark);
	line-height: 1.1;
}

/* ================================================================
   SECTION HEADER
================================================================ */
.oha-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.oha-section-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--oha-text-dark);
}

.oha-see-all {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--oha-primary);
	white-space: nowrap;
	transition: opacity 0.18s;
}

.oha-see-all:hover { opacity: 0.72; }

/* ================================================================
   CONTINUE LEARNING CARD
================================================================ */
.oha-continue-learning { margin-bottom: 28px; }

.oha-course-continue-card {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	padding: 18px 20px;
	box-shadow: var(--oha-shadow);
	display: flex;
	align-items: center;
	gap: 20px;
	transition: transform 0.2s, box-shadow 0.2s;
}

.oha-course-continue-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--oha-shadow-md);
}

.oha-course-continue-img {
	width: 108px;
	height: 76px;
	border-radius: 10px;
	flex-shrink: 0;
	background: linear-gradient(135deg, #5E54FF 0%, #9B8FFF 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.oha-course-continue-img svg {
	stroke: rgba(255, 255, 255, 0.9);
}

.oha-course-continue-body {
	flex: 1;
	min-width: 0;
}

.oha-course-continue-body h3 {
	font-size: 15px;
	font-weight: 700;
	color: var(--oha-text-dark);
	margin: 6px 0 4px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.oha-course-next {
	font-size: 12.5px;
	color: var(--oha-text-light);
	margin-bottom: 10px;
}

.oha-course-next strong { color: var(--oha-text-medium); }

/* Course category badges */
.oha-course-category {
	display: inline-block;
	font-size: 9.5px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 4px;
	margin-bottom: 4px;
}

.cat-coding   { background: var(--oha-green-bg); color: var(--oha-green); }
.cat-design   { background: var(--oha-blue-bg);  color: var(--oha-blue); }
.cat-business { background: var(--oha-orange-bg); color: var(--oha-orange); }
.cat-personal { background: var(--oha-primary-light); color: var(--oha-primary); }

/* Progress bar */
.oha-progress-bar {
	width: 100%;
	height: 5px;
	background: var(--oha-border);
	border-radius: 3px;
	overflow: hidden;
}

.oha-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--oha-primary), #8B7FF8);
	border-radius: 3px;
	transition: width 0.4s ease;
}

/* ================================================================
   COURSE CARDS GRID  (For You)
================================================================ */
.oha-for-you { margin-bottom: 28px; }

.oha-courses-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.oha-course-card {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	overflow: hidden;
	box-shadow: var(--oha-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.oha-course-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--oha-shadow-md);
}

.oha-course-thumb {
	width: 100%;
	height: 164px;
	object-fit: cover;
}

/* Gradient placeholder thumbs */
.thumb-gradient-1 {
	width: 100%;
	height: 164px;
	background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.thumb-gradient-2 {
	width: 100%;
	height: 164px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.thumb-gradient-3 {
	width: 100%;
	height: 164px;
	background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.thumb-gradient-4 {
	width: 100%;
	height: 164px;
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	display: flex;
	align-items: center;
	justify-content: center;
}

.oha-course-card-body {
	padding: 14px 16px 16px;
}

.oha-course-title {
	font-size: 14.5px;
	font-weight: 700;
	color: var(--oha-text-dark);
	margin: 7px 0 5px;
	line-height: 1.4;
}

.oha-course-lessons {
	font-size: 12.5px;
	color: var(--oha-text-light);
	margin-bottom: 12px;
}

.oha-course-instructor {
	display: flex;
	align-items: center;
	gap: 9px;
}

.oha-instructor-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--oha-primary-grad);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--oha-white);
	font-size: 11px;
	font-weight: 700;
	flex-shrink: 0;
}

.oha-instructor-avatar.avatar-orange { background: linear-gradient(135deg, #FF7A2F, #FFaa6e); }
.oha-instructor-avatar.avatar-green  { background: linear-gradient(135deg, #2DC78B, #5fefc1); }

.oha-instructor-name {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--oha-text-medium);
}

.oha-instructor-role {
	display: block;
	font-size: 11px;
	color: var(--oha-text-light);
}

/* Widget styles */
.oha-widget { padding: 20px; }
.oha-widget-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--oha-text-dark);
	margin-bottom: 12px;
}

/* ================================================================
   PAGE / SINGLE / INDEX STYLES
================================================================ */
.oha-page-header { margin-bottom: 22px; }

.oha-page-title {
	font-size: 24px;
	font-weight: 800;
	color: var(--oha-text-dark);
	margin-bottom: 6px;
}

.oha-page-article,
.oha-single-article {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	padding: 28px 32px;
	box-shadow: var(--oha-shadow);
	max-width: 800px;
}

.oha-page-content,
.oha-post-content {
	font-size: 15px;
	line-height: 1.75;
	color: var(--oha-text-medium);
}

.oha-page-content p,
.oha-post-content p { margin-bottom: 1.1em; }

.oha-page-featured-img,
.oha-post-featured-img { margin-bottom: 22px; border-radius: var(--oha-radius-sm); overflow: hidden; }

.oha-featured-img { width: 100%; height: auto; border-radius: var(--oha-radius-sm); }

/* Post meta */
.oha-post-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	color: var(--oha-text-light);
	margin-top: 8px;
	margin-bottom: 18px;
}

.oha-meta-sep { color: var(--oha-border); }

.oha-post-footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--oha-border); }

/* Posts grid */
.oha-posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
	margin-bottom: 24px;
}

.oha-post-card {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	overflow: hidden;
	box-shadow: var(--oha-shadow);
	transition: transform 0.2s, box-shadow 0.2s;
}

.oha-post-card:hover { transform: translateY(-3px); box-shadow: var(--oha-shadow-md); }

.oha-post-thumb-link { display: block; overflow: hidden; }

.oha-post-thumb {
	width: 100%;
	height: 170px;
	object-fit: cover;
	transition: transform 0.3s;
}

.oha-post-thumb-link:hover .oha-post-thumb { transform: scale(1.04); }

.oha-post-card-body { padding: 14px 16px 16px; }

.oha-post-card-title { font-size: 15px; font-weight: 700; margin: 6px 0 8px; }

.oha-post-card-title a { color: var(--oha-text-dark); transition: color 0.18s; }
.oha-post-card-title a:hover { color: var(--oha-primary); }

.oha-post-excerpt { font-size: 13.5px; color: var(--oha-text-medium); margin-bottom: 14px; line-height: 1.6; }

/* Pagination */
.oha-pagination { margin-top: 24px; }
.oha-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.oha-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 36px; height: 36px; padding: 0 10px;
	border-radius: var(--oha-radius-sm); border: 1.5px solid var(--oha-border);
	font-size: 13.5px; font-weight: 500; color: var(--oha-text-medium);
	transition: background 0.18s, color 0.18s;
}
.oha-pagination .page-numbers.current,
.oha-pagination .page-numbers:hover {
	background: var(--oha-primary); color: white; border-color: var(--oha-primary);
}

/* 404 */
.oha-404-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
}

.oha-404-inner { text-align: center; max-width: 440px; }

.oha-404-code {
	font-size: 96px;
	font-weight: 800;
	background: var(--oha-primary-grad);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	line-height: 1;
	margin-bottom: 10px;
}

.oha-404-title { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.oha-404-desc { font-size: 14px; color: var(--oha-text-medium); margin-bottom: 22px; line-height: 1.65; }

/* Empty state */
.oha-empty-state {
	text-align: center;
	padding: 60px 20px;
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	box-shadow: var(--oha-shadow);
}

.oha-empty-icon { font-size: 48px; margin-bottom: 14px; }

/* ================================================================
   RESPONSIVE
================================================================ */



/* 2-col grids */
@media (max-width: 992px) {
	.oha-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.oha-courses-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: collapse sidebar */
@media (max-width: 768px) {
	.oha-sidebar {
		transform: translateX(-100%);
		box-shadow: none;
		pointer-events: none;
	}

	.oha-sidebar.open {
		transform: translateX(0);
		box-shadow: 6px 0 28px rgba(0, 0, 0, 0.16);
		pointer-events: auto;
	}

	.oha-content-wrapper { margin-left: 0; padding-top: var(--oha-topbar-h); }
	.oha-topbar { left: 0; }

	.oha-mobile-toggle { display: flex; }

	.oha-sidebar-overlay { display: block; pointer-events: none; }

	.oha-hero { padding: 24px 20px; }
	.oha-hero h2 { font-size: 20px; }
	.oha-hero-decor { display: none; }

	.oha-main-content { padding: 16px; }

	.oha-course-continue-card {
		flex-direction: column;
		align-items: flex-start;
	}

	.oha-course-continue-img { width: 100%; height: 120px; }
}

/* WordPress admin bar is 46px tall on mobile (≤782px) */
@media screen and (max-width: 782px) {
	.admin-bar .oha-topbar           { top: 46px; }
	.admin-bar .oha-sidebar          { top: 46px; }
	.admin-bar .oha-content-wrapper  { padding-top: calc(var(--oha-topbar-h) + 46px); }
}

@media (max-width: 576px) {
	.oha-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.oha-courses-grid { grid-template-columns: 1fr; }
	.oha-page-article, .oha-single-article { padding: 18px 16px; }
	.oha-posts-grid { grid-template-columns: 1fr; }
	.oha-user-name { display: none; }
}

/* ================================================================
   FRONTEND COURSE MANAGEMENT UI
================================================================ */

/* ── Wrapper ── */
.oha-mgmt { max-width: 1080px; }
.oha-mgmt:has(.oha-learn-layout) { max-width: none; }

/* ── Notice ── */
.oha-mgmt-notice {
	padding: 13px 18px;
	border-radius: var(--oha-radius-sm);
	font-size: 13.5px;
	font-weight: 500;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.oha-mgmt-notice-success { background: #ecfdf5; color: #15803d; border: 1px solid #bbf7d0; }
.oha-mgmt-notice-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ── Breadcrumb ── */
.oha-breadcrumb {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: var(--oha-text-light);
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.oha-breadcrumb a { color: var(--oha-primary); font-weight: 500; }
.oha-breadcrumb a:hover { text-decoration: underline; }
.oha-bc-sep { color: var(--oha-text-label); }
.oha-bc-current { color: var(--oha-text-dark); font-weight: 600; }

/* ── Page header ── */
.oha-mgmt-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 22px;
}
.oha-mgmt-subtitle {
	font-size: 13px;
	color: var(--oha-text-light);
	margin-top: 4px;
}
.oha-link { color: var(--oha-primary); font-size: 13px; font-weight: 500; }
.oha-link:hover { text-decoration: underline; }

/* ── White card ── */
.oha-mgmt-card {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	padding: 20px 22px;
	box-shadow: var(--oha-shadow);
	margin-bottom: 16px;
}
.oha-card-section-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--oha-text-dark);
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--oha-border);
}

/* ── Empty state ── */
.oha-mgmt-empty {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	padding: 56px 24px;
	text-align: center;
	box-shadow: var(--oha-shadow);
}
.oha-mgmt-empty h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.oha-mgmt-empty p  { font-size: 13.5px; color: var(--oha-text-light); margin-bottom: 20px; }

/* ── Management table ── */
.oha-mgmt-table-wrap {
	background: var(--oha-white);
	border-radius: var(--oha-radius);
	box-shadow: var(--oha-shadow);
	overflow: hidden;
}
.oha-mgmt-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}
.oha-mgmt-table thead th {
	background: #f8f8fc;
	text-align: left;
	padding: 12px 16px;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--oha-text-light);
	border-bottom: 1px solid var(--oha-border);
	white-space: nowrap;
}
.oha-mgmt-table tbody tr { border-bottom: 1px solid var(--oha-border); transition: background 0.14s; }
.oha-mgmt-table tbody tr:last-child { border-bottom: none; }
.oha-mgmt-table tbody tr:hover { background: #fbfbfe; }
.oha-mgmt-table tbody td { padding: 13px 16px; vertical-align: middle; color: var(--oha-text-medium); }

/* Lesson group header in table */
.oha-lesson-group-header {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--oha-primary-light);
	color: var(--oha-primary);
	font-size: 12.5px;
	font-weight: 700;
	padding: 10px 16px;
	border-top: 1px solid var(--oha-border);
}
.oha-lesson-group-header:first-child { border-top: none; }
.oha-lesson-group-count { margin-left: auto; font-weight: 500; font-size: 11.5px; background: var(--oha-primary); color: white; border-radius: 20px; padding: 1px 8px; }

/* Specific columns */
.oha-td-order  { color: var(--oha-text-label) !important; font-size: 12px; font-weight: 600; text-align: center; width: 40px; }
.oha-td-title  { font-weight: 600; }
.oha-td-group, .oha-td-video, .oha-td-dur, .oha-td-free { white-space: nowrap; }

/* Course info cell */
.oha-table-course-info {
	display: flex;
	align-items: center;
	gap: 12px;
}
.oha-table-thumb {
	width: 56px;
	height: 42px;
	border-radius: 8px;
	object-fit: cover;
	flex-shrink: 0;
}
.oha-table-thumb-placeholder .oha-table-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
}
.oha-table-course-title { font-weight: 600; font-size: 13.5px; color: var(--oha-text-dark); }
.oha-table-course-excerpt { font-size: 12px; color: var(--oha-text-light); margin-top: 2px; }
.oha-table-count-link { font-size: 13px; font-weight: 600; color: var(--oha-primary); }
.oha-table-count-link:hover { text-decoration: underline; }
.oha-lesson-link { font-weight: 600; color: var(--oha-text-dark); }
.oha-lesson-link:hover { color: var(--oha-primary); }

/* Badges */
.oha-mgmt-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 11.5px;
	font-weight: 600;
	white-space: nowrap;
}
.oha-badge-green  { background: var(--oha-green-bg);  color: var(--oha-green); }
.oha-badge-gray   { background: #f0f0f4;               color: #888; }
.oha-badge-orange { background: var(--oha-orange-bg);  color: var(--oha-orange); }
.oha-badge-blue   { background: var(--oha-blue-bg);    color: var(--oha-blue); }
.oha-badge-red    { background: var(--oha-red-bg);     color: var(--oha-red); }
.oha-badge-free   { color: var(--oha-green); font-weight: 700; font-size: 14px; }
.oha-mgmt-text-sm { font-size: 13px; color: var(--oha-text-medium); }

/* Action buttons in table */
.oha-table-actions { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

.oha-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	transition: background 0.16s, color 0.16s;
	border: 1px solid transparent;
}
.oha-action-view   { background: var(--oha-primary-light);  color: var(--oha-primary); }
.oha-action-view:hover { background: #e0dbff; }
.oha-action-edit   { background: var(--oha-blue-bg);    color: var(--oha-blue); }
.oha-action-edit:hover { background: #dceeff; }
.oha-action-delete { background: var(--oha-red-bg);     color: var(--oha-red); }
.oha-action-delete:hover { background: #ffe0e0; }

/* Icon-only action buttons */
.oha-action-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 7px;
	border: 1.5px solid var(--oha-border);
	background: var(--oha-white);
	color: var(--oha-text-light);
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	flex-shrink: 0;
}
.oha-action-icon:hover { background: var(--oha-primary-light); color: var(--oha-primary); border-color: var(--oha-primary); }
.oha-action-icon-enroll:hover  { background: #f0f9ff; color: #0284c7; border-color: #7dd3fc; }
.oha-action-icon-edit:hover    { background: var(--oha-blue-bg); color: var(--oha-blue); border-color: #93c5fd; }
.oha-action-icon-extend:hover  { background: #f0fdf4; color: #16a34a; border-color: #86efac; }
.oha-action-icon-delete:hover  { background: var(--oha-red-bg);  color: var(--oha-red);  border-color: #fca5a5; }

/* ── Form layout ── */
.oha-mgmt-form-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 20px;
	align-items: start;
}
.oha-mgmt-form-main    { min-width: 0; }
.oha-mgmt-form-sidebar { min-width: 0; }

/* Form groups */
.oha-form-group { margin-bottom: 16px; }
.oha-form-group:last-child { margin-bottom: 0; }
.oha-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--oha-text-dark);
	margin-bottom: 6px;
}
.oha-form-group-required label::after { content: ' *'; color: var(--oha-red); }

.oha-form-group input[type="text"],
.oha-form-group input[type="url"],
.oha-form-group input[type="number"],
.oha-form-group select,
.oha-form-group textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1.5px solid var(--oha-border);
	border-radius: var(--oha-radius-sm);
	font-size: 13.5px;
	font-family: inherit;
	color: var(--oha-text-dark);
	background: var(--oha-white);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}
.oha-form-group input:focus,
.oha-form-group select:focus,
.oha-form-group textarea:focus {
	border-color: var(--oha-primary);
	box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}
.oha-form-group textarea { resize: vertical; line-height: 1.6; }
.oha-form-hint { font-size: 11.5px; color: var(--oha-text-light); margin-top: 4px; }

.oha-form-inline { display: flex; gap: 10px; align-items: center; }
.oha-form-inline input, .oha-form-inline select { flex: 1; padding: 9px 12px; border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm); font-size: 13.5px; font-family: inherit; outline:none; }
.oha-form-inline input:focus, .oha-form-inline select:focus { border-color: var(--oha-primary); box-shadow: 0 0 0 3px rgba(108,99,255,.1); }
.oha-input-short { width: auto !important; max-width: 100px !important; }

.oha-checkbox-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 500 !important; font-size: 13px; }
.oha-checkbox-label input { width: auto !important; margin: 0; }

/* Form actions */
.oha-form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.oha-btn-full { width: 100%; justify-content: center; }
.oha-btn-ghost { background: transparent; color: var(--oha-text-medium); border: 1.5px solid var(--oha-border); }
.oha-btn-ghost:hover { background: var(--oha-bg); }
.oha-btn-ghost-danger { background: transparent; color: var(--oha-red); border: 1.5px solid var(--oha-red-bg); }
.oha-btn-ghost-danger:hover { background: var(--oha-red-bg); }

/* Thumbnail picker */
.oha-thumb-picker { display: flex; flex-direction: column; gap: 12px; }
.oha-thumb-preview {
	width: 100%;
	max-width: 260px;
	height: 160px;
	border-radius: var(--oha-radius-sm);
	overflow: hidden;
	border: 2px dashed var(--oha-border);
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--oha-bg);
}
.oha-thumb-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--oha-radius-sm) - 2px); }
.oha-thumb-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--oha-text-label); font-size: 12px; }
.oha-thumb-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* Video type tabs */
.oha-video-type-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.oha-video-tab {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1.5px solid var(--oha-border);
	border-radius: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: var(--oha-text-medium);
	transition: all 0.16s;
}
.oha-video-tab:hover { border-color: var(--oha-primary); color: var(--oha-primary); }
.oha-video-tab.active { border-color: var(--oha-primary); background: var(--oha-primary-light); color: var(--oha-primary); }
.oha-video-tab input[type="radio"] { display: none; }
.oha-video-panel { margin-top: 0; }
.oha-yt-preview { margin-top: 12px; }
.oha-yt-preview iframe { width: 100%; max-width: 480px; height: 270px; border-radius: 8px; border: none; }
.oha-hidden { display: none !important; }

/* Responsive management */
@media (max-width: 860px) {
	.oha-mgmt-form-layout { grid-template-columns: 1fr; }
	.oha-mgmt-form-sidebar { display: contents; }
}
@media (max-width: 640px) {
	.oha-mgmt-table thead { display: none; }
	.oha-mgmt-table tbody td { display: block; padding: 6px 14px; }
	.oha-mgmt-table tbody td:first-child { padding-top: 14px; }
	.oha-mgmt-table tbody td:last-child  { padding-bottom: 14px; }
	.oha-table-actions { flex-wrap: wrap; }
}

/* ================================================================
   COURSE CARD GRID
================================================================ */

.oha-courses-mgmt-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 22px;
margin-top: 4px;
}

.oha-course-card {
background: var(--oha-white);
border-radius: var(--oha-radius);
box-shadow: var(--oha-shadow);
overflow: hidden;
display: flex;
flex-direction: column;
transition: transform 0.18s, box-shadow 0.18s;
}
.oha-course-card[hidden] { display: none; }
.oha-course-card:hover {
transform: translateY(-3px);
box-shadow: var(--oha-shadow-md);
}

/* Thumbnail */
.oha-course-card-thumb {
position: relative;
display: block;
width: 100%;
padding-top: 56.25%; /* 16:9 */
overflow: hidden;
background: var(--oha-bg);
}
.oha-course-card-thumb img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s;
}
.oha-course-card:hover .oha-course-card-thumb img { transform: scale(1.04); }

/* Title overlay on gradient */
.oha-course-card-thumb-title {
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 32px 16px 14px;
font-size: 15px;
font-weight: 700;
line-height: 1.35;
color: #fff;
background: linear-gradient(to top, rgba(0,0,0,.52) 0%, transparent 100%);
text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.oha-course-card-gradient {
position: absolute;
inset: 0;
}
.oha-gradient-1 { background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%); }
.oha-gradient-2 { background: linear-gradient(135deg, #FF7A2F 0%, #fbbf24 100%); }
.oha-gradient-3 { background: linear-gradient(135deg, #2DC78B 0%, #34d399 100%); }
.oha-gradient-4 { background: linear-gradient(135deg, #4A90E2 0%, #60a5fa 100%); }
.oha-gradient-5 { background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%); }
.oha-gradient-6 { background: linear-gradient(135deg, #8b5cf6 0%, #c4b5fd 100%); }

.oha-grad-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.22;
	pointer-events: none;
}

.oha-course-card-status-badge {
position: absolute;
top: 10px;
right: 10px;
padding: 3px 10px;
border-radius: 20px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.02em;
backdrop-filter: blur(4px);
}

/* Body */
.oha-course-card-body {
padding: 16px 18px 12px;
flex: 1;
}
.oha-course-card-title {
font-size: 14.5px;
font-weight: 700;
line-height: 1.4;
margin-bottom: 6px;
}
.oha-course-card-title a { color: var(--oha-text-dark); }
.oha-course-card-title a:hover { color: var(--oha-primary); }
.oha-course-card-excerpt {
font-size: 12.5px;
color: var(--oha-text-light);
line-height: 1.55;
margin-bottom: 10px;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.oha-course-card-meta {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 6px;
}
.oha-course-card-count {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--oha-text-light);
margin-left: auto;
}

/* Footer */
.oha-course-card-footer {
padding: 10px 18px 14px;
display: flex;
align-items: center;
gap: 8px;
border-top: 1px solid var(--oha-border);
}
.oha-course-card-actions {
display: flex;
gap: 6px;
margin-left: auto;
}
.oha-btn-sm {
padding: 7px 14px;
font-size: 13px;
gap: 5px;
border-radius: 8px;
}

@media (max-width: 900px) {
.oha-courses-mgmt-grid { grid-template-columns: repeat(2, 1fr); }
/* 2-col: stack footer vertically */
.oha-course-card-footer    { flex-direction: column; align-items: stretch; padding: 10px 14px 12px; gap: 8px; }
.oha-course-card-footer .oha-btn-sm { justify-content: center; width: 100%; }
.oha-course-card-actions   { margin-left: 0; gap: 5px; justify-content: flex-end; }
.oha-action-icon           { width: 30px; height: 30px; border-radius: 7px; }
.oha-action-icon svg       { width: 13px; height: 13px; }
}
@media (max-width: 560px) {
.oha-courses-mgmt-grid { grid-template-columns: 1fr; }
/* 1-col: row layout again — enough space */
.oha-course-card-footer    { flex-direction: row; align-items: center; padding: 10px 16px 12px; gap: 8px; }
.oha-course-card-footer .oha-btn-sm { width: auto; }
.oha-course-card-actions   { margin-left: auto; gap: 6px; justify-content: flex-end; }
.oha-action-icon           { width: 36px; height: 36px; border-radius: 8px; }
.oha-action-icon svg       { width: 15px; height: 15px; }
}

/* ================================================================
   LEARNING VIEW
================================================================ */

.oha-learn-layout {
display: flex;
gap: 0;
min-height: calc(100vh - var(--oha-topbar-h) - 80px);
margin: -28px -32px;         /* break out of .oha-mgmt inner padding */
}

/* Sidebar */
.oha-learn-sidebar {
width: 300px;
flex-shrink: 0;
background: var(--oha-white);
border-right: 1px solid var(--oha-border);
display: flex;
flex-direction: column;
overflow-y: auto;
position: sticky;
top: var(--oha-topbar-h);
max-height: calc(100vh - var(--oha-topbar-h));
}
.oha-learn-sidebar-header {
padding: 20px 18px 14px;
border-bottom: 1px solid var(--oha-border);
}
.oha-learn-back-link {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 12px;
color: var(--oha-text-light);
font-weight: 500;
margin-bottom: 12px;
transition: color 0.15s;
}
.oha-learn-back-link:hover { color: var(--oha-primary); }
.oha-learn-course-title {
font-size: 14px;
font-weight: 700;
color: var(--oha-text-dark);
line-height: 1.4;
margin-bottom: 5px;
}
.oha-learn-course-meta {
font-size: 12px;
color: var(--oha-text-light);
}

/* Progress bar */
.oha-learn-progress-bar {
height: 3px;
background: var(--oha-border);
}
.oha-learn-progress-fill {
height: 100%;
background: var(--oha-primary);
transition: width 0.4s;
}

/* TOC */
.oha-learn-toc { flex: 1; overflow-y: auto; padding: 8px 0; }
.oha-learn-section { }
.oha-learn-section-name {
display: flex;
align-items: center;
gap: 7px;
padding: 10px 18px 6px;
margin: 6px 10px 2px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #6b7280;
background: #f3f4f6;
border-radius: 6px;
}
.oha-learn-section-count {
margin-left: auto;
background: rgba(0,0,0,.08);
color: #6b7280;
font-size: 10.5px;
font-weight: 700;
padding: 1px 7px;
border-radius: 10px;
}

/* Ungrouped section divider */
.oha-learn-section-ungrouped {
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.07em;
color: #9ca3af;
padding: 8px 18px 4px;
margin: 4px 0 0;
}

/* Grouped lessons: indent under section header */
.oha-learn-section.has-group .oha-learn-lesson-item a {
padding-left: 28px;
}

/* Ungrouped lesson items — flush, slightly muted */
.oha-learn-lesson-item.ungrouped > a {
padding-left: 18px;
border-left: none;
margin: 0;
border-radius: 0;
color: var(--oha-text-medium);
}
.oha-learn-lesson-item.ungrouped .oha-learn-li-name {
color: var(--oha-text-medium);
font-style: normal;
}
.oha-learn-lesson-list { list-style: none; }
.oha-learn-lesson-item a {
display: flex;
align-items: center;
gap: 10px;
padding: 9px 18px;
font-size: 13px;
color: var(--oha-text-medium);
transition: background 0.13s, color 0.13s;
}
.oha-learn-lesson-item a:hover {
background: var(--oha-bg);
color: var(--oha-text-dark);
}
.oha-learn-lesson-item.active a {
background: var(--oha-primary-light);
color: var(--oha-primary);
font-weight: 600;
}
.oha-learn-li-icon {
flex-shrink: 0;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--oha-bg);
display: flex;
align-items: center;
justify-content: center;
color: var(--oha-text-light);
}
.oha-learn-lesson-item.active .oha-learn-li-icon {
background: var(--oha-primary);
color: white;
}
.oha-learn-li-name {
flex: 1;
line-height: 1.4;
}
.oha-learn-li-right {
display: flex;
align-items: center;
gap: 5px;
flex-shrink: 0;
}
.oha-learn-li-dur {
font-size: 11px;
color: var(--oha-text-label);
}
.oha-learn-li-free {
font-size: 10px;
font-weight: 700;
color: var(--oha-green);
background: var(--oha-green-bg);
padding: 1px 5px;
border-radius: 4px;
}

/* Main content */
.oha-learn-main {
flex: 1;
min-width: 0;
padding: 28px 36px 40px;
overflow-y: auto;
}

/* Video player */
.oha-learn-video-wrap {
position: relative;
width: 100%;
padding-top: 56.25%;
border-radius: var(--oha-radius);
overflow: hidden;
background: #000;
margin-bottom: 24px;
box-shadow: var(--oha-shadow-md);
}
.oha-learn-video-wrap iframe {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border: none;
}

/* Lesson header */
.oha-learn-lesson-header {
margin-bottom: 20px;
}
.oha-learn-lesson-meta-row {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
flex-wrap: wrap;
}
.oha-learn-lesson-index {
font-size: 12px;
font-weight: 600;
color: var(--oha-primary);
background: var(--oha-primary-light);
padding: 3px 10px;
border-radius: 20px;
}
.oha-learn-dur-badge {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--oha-text-light);
}
.oha-learn-edit-link {
margin-left: auto;
display: flex;
align-items: center;
gap: 5px;
font-size: 12px;
color: var(--oha-text-light);
font-weight: 500;
transition: color 0.15s;
}
.oha-learn-edit-link {
margin-left: auto;
display: flex;
align-items: center;
gap: 5px;
font-size: 12px;
color: var(--oha-text-light);
font-weight: 500;
transition: color 0.15s;
}
.oha-learn-edit-link:hover { color: var(--oha-primary); }

/* Mark complete button */
.oha-complete-btn {
margin-left: auto;
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 13px;
font-size: 12px;
font-weight: 600;
border-radius: 20px;
cursor: pointer;
border: 1.5px solid #d1d5db;
background: transparent;
color: #6b7280;
transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.oha-complete-btn:hover {
border-color: #16a34a;
color: #16a34a;
}
.oha-complete-btn.is-done {
background: #16a34a;
border-color: #16a34a;
color: #fff;
}
.oha-complete-btn.is-done:hover {
background: #15803d;
border-color: #15803d;
}
.oha-complete-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* TOC — completed lesson */
.oha-li-icon-done { display: none; }
.oha-learn-lesson-item.completed .oha-li-icon-default { display: none; }
.oha-learn-lesson-item.completed .oha-li-icon-done {
display: flex;
align-items: center;
justify-content: center;
}
.oha-learn-lesson-item.completed .oha-learn-li-icon {
background: #dcfce7;
color: #16a34a;
}
.oha-learn-lesson-item.completed a {
color: var(--oha-text-medium);
}

.oha-learn-lesson-title {
font-size: 22px;
font-weight: 800;
color: var(--oha-text-dark);
line-height: 1.35;
}

/* Description – rich content */
.oha-learn-lesson-desc {
background: var(--oha-white);
border-radius: var(--oha-radius);
padding: 24px 28px;
margin-bottom: 28px;
box-shadow: var(--oha-shadow);
font-size: 14.5px;
color: var(--oha-text-medium);
line-height: 1.75;
}
.oha-learn-lesson-desc > *:first-child { margin-top: 0; }
.oha-learn-lesson-desc > *:last-child  { margin-bottom: 0; }
.oha-learn-lesson-desc p  { margin-bottom: 12px; }
.oha-learn-lesson-desc h1,.oha-learn-lesson-desc h2,.oha-learn-lesson-desc h3,
.oha-learn-lesson-desc h4,.oha-learn-lesson-desc h5,.oha-learn-lesson-desc h6 {
  color: var(--oha-text-dark); font-weight: 700; line-height: 1.35;
  margin: 20px 0 10px;
}
.oha-learn-lesson-desc h2 { font-size: 1.2em; }
.oha-learn-lesson-desc h3 { font-size: 1.05em; }
.oha-learn-lesson-desc ul, .oha-learn-lesson-desc ol { padding-left: 22px; margin-bottom: 12px; }
.oha-learn-lesson-desc ul { list-style: disc; }
.oha-learn-lesson-desc ol { list-style: decimal; }
.oha-learn-lesson-desc li { margin-bottom: 4px; }
.oha-learn-lesson-desc blockquote {
  border-left: 3px solid var(--oha-primary); margin: 16px 0;
  padding: 8px 16px; background: var(--oha-primary-light);
  border-radius: 0 var(--oha-radius-sm) var(--oha-radius-sm) 0;
  color: var(--oha-text-dark);
}
.oha-learn-lesson-desc a { color: var(--oha-primary); text-decoration: underline; }
.oha-learn-lesson-desc a:hover { opacity: .8; }
.oha-learn-lesson-desc img {
  max-width: 100%; height: auto;
  border-radius: var(--oha-radius-sm);
  margin: 12px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.oha-learn-lesson-desc iframe {
  max-width: 100%; border-radius: var(--oha-radius-sm);
  margin: 12px 0;
}
.oha-learn-lesson-desc pre, .oha-learn-lesson-desc code {
  background: #f4f4f8; border-radius: 5px;
  font-family: 'Fira Code', 'Consolas', monospace; font-size: 13px;
}
.oha-learn-lesson-desc pre { padding: 14px 16px; overflow-x: auto; margin-bottom: 12px; }
.oha-learn-lesson-desc code { padding: 2px 6px; }
.oha-learn-lesson-desc hr { border: none; border-top: 1px solid var(--oha-border); margin: 20px 0; }
/* wp-editor form fix */
.oha-form-group-editor .wp-editor-wrap { border-radius: var(--oha-radius-sm); overflow: hidden; }
.oha-form-group-editor .wp-media-buttons { margin-bottom: 6px; }

/* Navigation */
.oha-learn-nav {
display: flex;
justify-content: space-between;
gap: 16px;
margin-top: 32px;
padding-top: 24px;
border-top: 1px solid var(--oha-border);
}
.oha-learn-nav-btn {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 18px;
border-radius: var(--oha-radius-sm);
border: 1.5px solid var(--oha-border);
background: var(--oha-white);
color: var(--oha-text-medium);
max-width: 48%;
transition: border-color 0.15s, background 0.15s;
}
.oha-learn-nav-btn:hover { border-color: var(--oha-primary); background: var(--oha-primary-light); color: var(--oha-primary); }
.oha-learn-nav-btn span { display: flex; flex-direction: column; }
.oha-learn-nav-btn small { font-size: 11px; color: var(--oha-text-label); }
.oha-learn-nav-btn strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.oha-learn-nav-prev { flex-direction: row; }
.oha-learn-nav-next { flex-direction: row-reverse; text-align: right; }
.oha-learn-nav-primary {
background: var(--oha-primary);
border-color: var(--oha-primary);
color: white;
}
.oha-learn-nav-primary:hover { background: #5a52e0; border-color: #5a52e0; color: white; }
.oha-learn-nav-primary small { color: rgba(255,255,255,0.7); }

/* Responsive learn layout */
@media (max-width: 860px) {
.oha-learn-layout { flex-direction: column; margin: -28px -16px; }
.oha-learn-sidebar {
width: 100%;
max-height: 340px;
position: static;
border-right: none;
border-bottom: 1px solid var(--oha-border);
}
.oha-learn-main { padding: 20px 16px 32px; }
}
@media (max-width: 560px) {
.oha-learn-lesson-title { font-size: 18px; }
.oha-learn-nav-btn strong { max-width: 120px; }
}

/* =====================================================================
   Inline group select (lesson table)
===================================================================== */
.oha-td-group { min-width: 130px; }
.oha-inline-group-sel {
  font-size: 12px;
  padding: 4px 6px;
  border: 1px solid var(--oha-border);
  border-radius: 6px;
  background: var(--oha-bg);
  color: var(--oha-text-medium);
  cursor: pointer;
  max-width: 160px;
  width: 100%;
  transition: border-color .15s, background .4s;
  outline: none;
}
.oha-inline-group-sel:focus { border-color: var(--oha-primary); }
.oha-inline-group-sel:hover { border-color: var(--oha-primary); }

/* =====================================================================
   Group management panel
===================================================================== */
.oha-groups-mgmt-panel {
  margin-top: 18px;
  border: 1px solid var(--oha-border);
  border-radius: var(--oha-radius);
  background: var(--oha-white);
  overflow: hidden;
}
.oha-groups-panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--oha-text-dark);
  gap: 8px;
  transition: background .15s;
}
.oha-groups-panel-toggle:hover { background: var(--oha-bg); }
.oha-groups-toggle-left { display: flex; align-items: center; gap: 7px; flex: 1; }
.oha-groups-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--oha-primary-light); color: var(--oha-primary);
  border-radius: 10px; font-size: 11px; font-weight: 700;
}
.oha-groups-chevron { transition: transform .2s; flex-shrink: 0; }
.oha-groups-chevron.is-open { transform: rotate(180deg); }
.oha-groups-panel-toggle.is-open .oha-groups-chevron { transform: rotate(180deg); }
.oha-groups-body {
  padding: 6px 18px 18px;
  border-top: 1px solid var(--oha-border);
}
.oha-groups-hint {
  font-size: 12.5px;
  color: var(--oha-text-light);
  margin-bottom: 14px;
  line-height: 1.5;
}
.oha-groups-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.oha-groups-empty {
  font-size: 13px;
  color: var(--oha-text-label);
  padding: 10px 0;
}
.oha-group-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--oha-radius-sm);
  background: var(--oha-bg);
  transition: background .15s, opacity .2s;
}
.oha-group-row svg { flex-shrink: 0; color: var(--oha-text-label); }
.oha-group-label { flex: 1; font-size: 13px; font-weight: 500; color: var(--oha-text-dark); }
.oha-group-del-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: none; background: none;
  border-radius: 5px; color: var(--oha-text-label); cursor: pointer;
  transition: background .15s, color .15s; flex-shrink: 0;
}
.oha-group-del-btn:hover { background: #fee2e2; color: #ef4444; }
.oha-group-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.oha-group-add-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--oha-border);
  border-radius: var(--oha-radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.oha-group-add-row input:focus { border-color: var(--oha-primary); }
.oha-btn-sm { padding: 8px 14px; font-size: 13px; }

/* =====================================================================
   Drag & drop reorder
===================================================================== */
.oha-th-drag { width: 28px; padding: 0 !important; }
.oha-td-drag  { width: 28px; padding: 0 6px; text-align: center; }
.oha-drag-handle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 4px;
  color: var(--oha-text-label); cursor: grab;
  transition: color .15s, background .15s;
}
.oha-drag-handle:hover  { color: var(--oha-primary); background: var(--oha-primary-light); }
.oha-drag-handle:active { cursor: grabbing; }
.oha-drag-ghost  { opacity: .4 !important; background: var(--oha-primary-light) !important; }
.oha-drag-chosen { background: var(--oha-bg); box-shadow: 0 4px 16px rgba(108,99,255,.18); }
.oha-mgmt-table tbody tr[data-id] { transition: background .12s; }

/* Drop zone (empty group) */
.oha-drop-zone-row { pointer-events: none; }
.oha-drop-zone-cell {
  text-align: center;
  padding: 14px 0 !important;
  font-size: 12px;
  color: var(--oha-text-label);
  font-style: italic;
  border: 1.5px dashed var(--oha-border) !important;
  border-radius: var(--oha-radius-sm);
  background: var(--oha-bg) !important;
}

/* Buffer between groups — truly empty tbody, visual hint via sibling */
.oha-buffer-wrap {
  position: relative;
  margin: 4px 0;
}
.oha-buffer-label {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  font-style: italic;
  padding: 2px 0;
  pointer-events: none;
}
.oha-lessons-buffer {
  margin: 0 !important;
}
.oha-lessons-buffer .oha-sortable-tbody {
  display: block;
  min-height: 36px;
  border: 1.5px dashed #e5e7eb;
  border-radius: var(--oha-radius-sm);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.oha-lessons-buffer .oha-sortable-tbody.sortable-drag-over,
.oha-lessons-buffer .oha-sortable-tbody:has(.oha-drag-ghost) {
  background: #f0fdf4;
  border-color: #86efac;
}
/* When buffer has lessons, show them */
.oha-lessons-buffer tbody tr[data-id] {
  display: table-row;
}

/* ============================================================
   STUDENT MANAGEMENT
============================================================ */
.oha-mgmt-header-actions { display: flex; gap: 10px; align-items: center; }

.oha-stu-add-wrap { background: #fff; border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius); padding: 20px 24px 24px; margin-bottom: 24px; }
.oha-stu-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--oha-border); margin-bottom: 18px; }
.oha-stu-tab { background: none; border: none; padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--oha-text-medium); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; border-radius: 0; }
.oha-stu-tab.is-active { color: var(--oha-primary); border-bottom-color: var(--oha-primary); }
.oha-stu-tab:hover:not(.is-active) { color: var(--oha-text); }
.oha-stu-pane { }
.oha-stu-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; }
@media (max-width: 768px) { .oha-stu-form-row { grid-template-columns: 1fr; } }
.oha-stu-bulk-hint { font-size: 13px; color: var(--oha-text-medium); margin: 0 0 10px; }
.oha-stu-bulk-hint code { background: var(--oha-bg); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.oha-textarea { display: block; width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit; border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm); background: var(--oha-bg); color: var(--oha-text); resize: vertical; box-sizing: border-box; line-height: 1.6; }
.oha-textarea:focus { outline: none; border-color: var(--oha-primary); background: #fff; }
.oha-stu-bulk-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.oha-stu-msg { font-size: 13px; font-weight: 500; }
.oha-phone-code { font-family: 'Courier New', monospace; font-size: 13px; background: var(--oha-bg); padding: 2px 6px; border-radius: 4px; color: var(--oha-primary); }

/* Student enrollment info under name */
.oha-stu-courses-info {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 5px;
}

.oha-stu-no-course {
	font-size: 11.5px;
	color: #9ca3af;
	font-style: italic;
}

.oha-stu-enr-tag {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 5px;
	padding: 1px 5px 1px 5px;
	font-size: 10px;
	line-height: 1.5;
	white-space: nowrap;
}

.oha-stu-enr-name {
	color: #374151;
	font-weight: 500;
}

.oha-stu-enr-exp {
	font-size: 9.5px;
	font-weight: 600;
	padding: 0 4px;
	border-radius: 3px;
}

.oha-stu-enr-days {
	font-size: 9px;
	font-weight: 500;
	color: #6b7280;
	padding: 0 3px;
	border-left: 1px solid #d1d5db;
	margin-left: 1px;
}

.oha-stu-enr-lifetime { background: #dcfce7; color: #15803d; }
.oha-stu-enr-active   { background: #dbeafe; color: #1d4ed8; }
.oha-stu-enr-warning  { background: #fef9c3; color: #a16207; }
.oha-stu-enr-expired  { background: #fee2e2; color: #b91c1c; }
.oha-mgmt-text-sm { font-size: 13px; color: var(--oha-text-medium); }
.oha-td-order { color: var(--oha-text-medium); font-size: 13px; width: 40px; text-align: center; }

/* ============================================================
   MODAL
============================================================ */
.oha-modal-backdrop[hidden] { display: none; }
.oha-modal-backdrop {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(0,0,0,.45);
	display: flex; align-items: center; justify-content: center;
	padding: 16px;
	animation: ohaFadeIn .18s ease;
}
@keyframes ohaFadeIn { from { opacity: 0; } to { opacity: 1; } }

.oha-modal {
	background: #fff; border-radius: var(--oha-radius); width: 100%; max-width: 520px;
	box-shadow: 0 20px 60px rgba(0,0,0,.18);
	animation: ohaSlideUp .2s ease;
	overflow: hidden;
}
@keyframes ohaSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.oha-modal-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 24px 0;
}
.oha-modal-title { font-size: 17px; font-weight: 700; color: var(--oha-text); margin: 0; }
.oha-modal-close {
	background: none; border: none; cursor: pointer; padding: 4px;
	color: var(--oha-text-medium); border-radius: 6px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.oha-modal-close:hover { background: var(--oha-bg); color: var(--oha-text); }

.oha-modal-body { padding: 16px 24px 0; }
.oha-modal-footer {
	display: flex; gap: 10px; justify-content: flex-end;
	padding: 16px 24px 20px;
}

.oha-stu-form-col { margin-bottom: 18px; }
.oha-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--oha-text); margin-bottom: 6px; letter-spacing: .01em;
}
.oha-req { color: #dc2626; margin-left: 2px; }
.oha-input {
  display: block; width: 100%; box-sizing: border-box;
  padding: 10px 14px; font-size: 14px; font-family: inherit;
  color: var(--oha-text); background: #fff;
  border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm);
  transition: border-color .18s, box-shadow .18s;
  outline: none;
}
.oha-input::placeholder { color: #b0b7c3; }
.oha-input:hover { border-color: #a5b4fc; }
.oha-input:focus {
  border-color: var(--oha-primary);
  box-shadow: 0 0 0 3px rgba(108,99,255,.13);
}

/* ============================================================
   STUDENT TOOLBAR (search row)
============================================================ */
.oha-stu-toolbar {
	display: flex; align-items: center; gap: 14px;
	margin-bottom: 18px; flex-wrap: wrap;
}
.oha-stu-search-wrap {
	position: relative; flex: 1; min-width: 220px; max-width: 380px;
}
.oha-stu-search-icon {
	position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
	width: 15px; height: 15px; color: var(--oha-text-medium); pointer-events: none;
}
.oha-stu-search {
	width: 100%; padding: 8px 12px 8px 34px; font-size: 14px;
	border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm);
	background: var(--oha-bg); color: var(--oha-text); box-sizing: border-box;
}
.oha-stu-search:focus { outline: none; border-color: var(--oha-primary); background: #fff; }
.oha-stu-search-count { font-size: 13px; color: var(--oha-text-medium); white-space: nowrap; }

/* ============================================================
   PAGINATION
============================================================ */
.oha-stu-pagination {
	display: flex; align-items: center; justify-content: center;
	gap: 4px; margin-top: 20px; flex-wrap: wrap;
}
.oha-page-btn {
	min-width: 34px; height: 34px; padding: 0 6px;
	border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm);
	background: #fff; color: var(--oha-text); font-size: 13px; font-weight: 500;
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
	transition: border-color .15s, background .15s, color .15s;
}
.oha-page-btn:hover:not([disabled]):not(.is-active) { border-color: var(--oha-primary); color: var(--oha-primary); }
.oha-page-btn.is-active { background: var(--oha-primary); border-color: var(--oha-primary); color: #fff; }
.oha-page-btn[disabled] { opacity: .4; cursor: default; }
.oha-page-ellipsis { font-size: 14px; color: var(--oha-text-medium); padding: 0 4px; line-height: 34px; }

/* ============================================================
   ACTION BUTTONS (edit / delete per row)
============================================================ */
.oha-td-actions { white-space: nowrap; }
.oha-action-edit {
background: #eff6ff; color: #2563eb; border: 1.5px solid #bfdbfe;
}
.oha-action-edit:hover { background: #dbeafe; border-color: #2563eb; }
.oha-hint { font-size: 12px; color: var(--oha-text-medium); font-weight: 400; margin-left: 4px; }
.oha-stu-msg { font-size: 13px; margin-top: 8px; }

/* ============================================================
   DANGER BUTTON + DELETE CONFIRM MODAL
============================================================ */
.oha-btn-danger {
  background: #dc2626; color: #fff; border: 1.5px solid #dc2626;
}
.oha-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }
.oha-del-modal { max-width: 420px; }
.oha-del-modal .oha-modal-header { border-bottom: 1.5px solid #fee2e2; }
.oha-del-modal .oha-modal-title { color: #dc2626; }

/* ============================================================
   ENROLLMENT — course card count link
============================================================ */
.oha-course-enroll-count {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--oha-primary); text-decoration: none;
  font-weight: 500; transition: opacity .15s;
}
.oha-course-enroll-count:hover { opacity: .75; }
.oha-action-enroll {
  background: #f0f9ff; color: #0284c7; border: 1.5px solid #bae6fd;
}
.oha-action-enroll:hover { background: #e0f2fe; border-color: #0284c7; }

/* ============================================================
   ENROLLMENT — status badges
============================================================ */
.oha-enr-badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.oha-enr-active   { background: #dcfce7; color: #15803d; }
.oha-enr-expired  { background: #fee2e2; color: #dc2626; }
.oha-enr-lifetime { background: #ede9fe; color: #6d28d9; }
.oha-enr-warning  { background: #fff7ed; color: #ea580c; }

/* ── Enrollment toolbar (search + count) ── */
.oha-enr-toolbar,
.oha-courses-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.oha-enr-search-wrap {
  position: relative; flex: 1; max-width: 360px;
}
.oha-enr-search-wrap .oha-input { padding-left: 36px; }
.oha-enr-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--oha-text-light); pointer-events: none;
}
.oha-enr-count-label { font-size: 13px; color: var(--oha-text-medium); white-space: nowrap; }

/* ── Pagination ── */
#enr-pagination { margin-top: 16px; }
.oha-enr-pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.oha-pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid var(--oha-border); background: var(--oha-white);
  color: var(--oha-text); font-size: 16px; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.oha-pager-btn:hover:not([disabled]) { background: var(--oha-primary-light); color: var(--oha-primary); border-color: var(--oha-primary); }
.oha-pager-btn[disabled] { opacity: .4; cursor: default; }
.oha-pager-info { font-size: 13px; color: var(--oha-text-medium); min-width: 80px; text-align: center; }

/* ── Actions cell in enrollment table ── */
.oha-td-actions { display: flex; gap: 4px; align-items: center; }

/* ── Edit expiry modal ── */
.oha-modal-sm { max-width: 420px; }
.oha-expiry-lifetime-label {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
  font-size: 14px; color: var(--oha-text); cursor: pointer;
}
.oha-expiry-lifetime-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--oha-primary); flex-shrink: 0;
}

/* ============================================================
   ENROLLMENT — modal student list
============================================================ */
.oha-enr-modal-hint {
  font-size: 13px; color: var(--oha-text-medium);
  margin: 0 0 14px; line-height: 1.5;
}
.oha-enr-list {
  max-height: 320px; overflow-y: auto;
  border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm);
  margin-bottom: 4px;
}
.oha-enr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--oha-border);
  transition: background .12s;
}
.oha-enr-item:last-child { border-bottom: none; }
.oha-enr-item:hover:not(.oha-enr-item-enrolled) { background: #f5f3ff; }
.oha-enr-item-enrolled { opacity: .55; cursor: default; }
.oha-enr-item input[type="checkbox"] { flex-shrink: 0; accent-color: var(--oha-primary); width: 16px; height: 16px; }
.oha-enr-item-name { flex: 1; font-size: 14px; font-weight: 500; }
.oha-enr-item-reg { font-size: 11px; color: var(--oha-text-light); white-space: nowrap; }
.oha-enr-item-tag {
  font-size: 11px; background: #e0e7ff; color: #4338ca;
  padding: 1px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap;
}

/* ============================================================
   NO ACCESS page
============================================================ */
.oha-noaccess-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 60px 24px; gap: 12px;
}
.oha-noaccess-icon { color: var(--oha-border); margin-bottom: 8px; }
.oha-noaccess-wrap h2 { font-size: 22px; margin: 0; }
.oha-noaccess-wrap p  { color: var(--oha-text-medium); margin: 0; }

/* ============================================================
   ADMIN DASHBOARD (front-page.php)
============================================================ */
.oha-admin-dash { display: flex; flex-direction: column; gap: 28px; }
.oha-admin-stats { margin-bottom: 0; }
.oha-admin-recent-table-wrap { overflow-x: auto; }
.oha-admin-empty { color: var(--oha-text-light); font-size: 14px; padding: 20px 0; }

/* ============================================================
   LOGIN HISTORY (detail view)
============================================================ */
.oha-log-history-header {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 4px;
}
.oha-btn-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--oha-text-medium);
	text-decoration: none;
	padding: 6px 12px;
	border-radius: var(--oha-radius-sm);
	border: 1.5px solid var(--oha-border);
	background: var(--oha-white);
	transition: color 0.15s, border-color 0.15s;
	width: fit-content;
}
.oha-btn-back:hover { color: var(--oha-primary); border-color: var(--oha-primary); }

.oha-log-history-user {
	display: flex;
	align-items: center;
	gap: 14px;
}
.oha-log-user-name {
	font-size: 17px;
	font-weight: 700;
	color: var(--oha-text-dark);
	margin-bottom: 4px;
}
.oha-log-user-meta {
	font-size: 13px;
	color: var(--oha-text-medium);
}

/* IP code badge */
.oha-ip-code {
	font-family: 'Courier New', monospace;
	font-size: 12px;
	background: #f0f4ff;
	color: #3b4ec8;
	padding: 2px 7px;
	border-radius: 4px;
	white-space: nowrap;
}

/* Small action button */
.oha-btn-sm {
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	background: var(--oha-primary-light);
	color: var(--oha-primary);
	border: 1.5px solid transparent;
	border-radius: var(--oha-radius-xs);
	white-space: nowrap;
	transition: background 0.15s, border-color 0.15s;
	text-decoration: none;
}
.oha-btn-sm:hover { background: var(--oha-primary); color: #fff; }

/* Pagination */
.oha-log-pagination {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 20px;
	flex-wrap: wrap;
}
.oha-log-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	font-size: 13px;
	font-weight: 600;
	border-radius: var(--oha-radius-sm);
	border: 1.5px solid var(--oha-border);
	background: var(--oha-white);
	color: var(--oha-text-medium);
	text-decoration: none;
	transition: background 0.14s, color 0.14s, border-color 0.14s;
	cursor: pointer;
}
.oha-log-page-btn:hover { border-color: var(--oha-primary); color: var(--oha-primary); }
.oha-log-page-btn.is-active { background: var(--oha-primary); border-color: var(--oha-primary); color: #fff; cursor: default; }

/* ============================================================
   STUDENT DASHBOARD – enrolled courses
============================================================ */
/* Warning strip in hero */
.oha-hero-warning {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin-top: 14px;
	padding: 10px 14px;
	background: rgba(255,200,80,.18);
	border: 1px solid rgba(255,200,80,.45);
	border-radius: 8px;
	font-size: 12.5px;
	line-height: 1.5;
	color: rgba(255,255,255,.92);
	max-width: 480px;
}
.oha-hero-warning svg { flex-shrink: 0; margin-top: 2px; color: #ffd166; }

/* ── Student body 2-col layout ── */
.oha-stu-body-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 28px;
	align-items: start;
	margin-top: 0;
}

.oha-stu-main-col {
	min-width: 0;
}

.oha-stu-news-col {
	position: sticky;
	top: 20px;
	padding-top: 4px;
}

/* Notification cards */
.oha-news-card {
	border-radius: 14px;
	padding: 16px;
	margin-bottom: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	border: 1.5px solid transparent;
}

.oha-news-card-icon {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.oha-news-card-body {
	flex: 1;
}

.oha-news-card-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .6px;
	opacity: .65;
	margin-bottom: 4px;
}

.oha-news-card-title {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.45;
	color: inherit;
}

.oha-news-card-meta {
	font-size: 11.5px;
	opacity: .55;
	margin-top: 5px;
}

.oha-news-card-btn {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 8px;
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity .15s, transform .12s;
	align-self: flex-start;
}

.oha-news-card-btn:hover { opacity: .82; transform: translateY(-1px); }

/* Purple */
.oha-news-purple {
	background: #f5f0ff;
	border-color: #e0d3ff;
	color: #4b1fa1;
}
.oha-news-purple .oha-news-card-icon { background: #e6d9ff; color: #6d28d9; }
.oha-news-purple .oha-news-card-btn  { background: #6d28d9; color: #fff; }

/* Blue */
.oha-news-blue {
	background: #eff6ff;
	border-color: #c7dffe;
	color: #1e3a6e;
}
.oha-news-blue .oha-news-card-icon { background: #d1e9ff; color: #1d4ed8; }
.oha-news-blue .oha-news-card-btn  { background: #1d4ed8; color: #fff; }

/* Orange */
.oha-news-orange {
	background: #fff7ed;
	border-color: #fde8c4;
	color: #7c3506;
}
.oha-news-orange .oha-news-card-icon { background: #fed7aa; color: #ea580c; }
.oha-news-orange .oha-news-card-btn  { background: #ea580c; color: #fff; }

/* ── Notice vertical cards (student dashboard) ── */
.oha-nc-vcard { border-radius: 16px; padding: 22px 24px; margin-bottom: 14px; border: 1.5px solid transparent; }
.oha-nc-vcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.oha-nc-vcard-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; opacity: .75; }
.oha-nc-vcard-date { font-size: 10.5px; opacity: .55; white-space: nowrap; }
.oha-nc-vcard-title { font-size: 26px; font-weight: 900; line-height: 1.2; margin: 0 0 22px; color: inherit; letter-spacing: -0.5px; }
.oha-nc-vcard-title + .oha-nc-vcard-btn { margin-top: 0; }
/* Animated border for the latest notice */
@keyframes oha-border-pulse {
  0%   { box-shadow: 0 0 0 0px rgba(var(--_pulse-rgb), 0.55), inset 0 0 0 2px rgba(var(--_pulse-rgb), 0.9); }
  60%  { box-shadow: 0 0 0 8px rgba(var(--_pulse-rgb), 0), inset 0 0 0 2px rgba(var(--_pulse-rgb), 0.9); }
  100% { box-shadow: 0 0 0 0px rgba(var(--_pulse-rgb), 0), inset 0 0 0 2px rgba(var(--_pulse-rgb), 0.9); }
}
.oha-nc-vcard.is-latest { border-width: 0; animation: oha-border-pulse 2.2s ease-out infinite; }
.oha-nc-v-blue.is-latest   { --_pulse-rgb: 29,78,216; }
.oha-nc-v-red.is-latest    { --_pulse-rgb: 190,58,58; }
.oha-nc-v-green.is-latest  { --_pulse-rgb: 22,101,52; }
.oha-nc-v-orange.is-latest { --_pulse-rgb: 234,88,12; }
.oha-nc-v-purple.is-latest { --_pulse-rgb: 109,40,217; }
.oha-nc-vcard-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-decoration: none; opacity: .75; color: inherit; padding: 0; background: none; border: none; cursor: pointer; font-family: inherit; transition: opacity .15s; }
.oha-nc-vcard-btn:hover { opacity: 1; }
.oha-nc-vcard-btn svg { flex-shrink: 0; }
/* Notice detail modal */
.oha-nc-detail-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.oha-nc-detail-modal[hidden] { display: none; }
.oha-nc-detail-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); }
.oha-nc-detail-box { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.oha-nc-detail-head { padding: 24px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.oha-nc-detail-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.oha-nc-detail-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; opacity: .65; display: inline-flex; align-items: center; gap: 5px; }
.oha-nc-detail-date { font-size: 11px; opacity: .5; }
.oha-nc-detail-title { font-size: 22px; font-weight: 900; line-height: 1.25; letter-spacing: -.3px; color: var(--oha-text-dark); margin: 0 0 20px; padding-bottom: 16px; border-bottom: 2px solid #e5e7eb; }
.oha-nc-detail-close { flex-shrink: 0; background: #f3f4f6; border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--oha-text-medium); transition: background .15s; }
.oha-nc-detail-close:hover { background: #e5e7eb; }
.oha-nc-detail-body { padding: 18px 24px 28px; font-size: 14.5px; line-height: 1.8; color: var(--oha-text-dark); }
.oha-nc-detail-body img { max-width: 100%; border-radius: 10px; margin: 10px 0; }
.oha-nc-detail-body iframe, .oha-nc-detail-body video { max-width: 100%; }
.oha-nc-detail-body p { margin: 0 0 12px; }
.oha-nc-detail-body p:last-child { margin-bottom: 0; }
.oha-nc-detail-body ul, .oha-nc-detail-body ol { padding-left: 22px; margin: 0 0 12px; }

/* Colour variants */
.oha-nc-v-blue   { background: #eff6ff; border-color: #c7dffe; color: #1e3a6e; }
.oha-nc-v-red    { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.oha-nc-v-green  { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.oha-nc-v-orange { background: #fff7ed; border-color: #fde8c4; color: #7c3506; }
.oha-nc-v-purple { background: #f5f0ff; border-color: #e0d3ff; color: #4b1fa1; }

/* Responsive */
@media (max-width: 900px) {
	.oha-stu-body-layout {
		grid-template-columns: 1fr;
	}
	.oha-stu-news-col {
		position: static;
	}
}

/* Section wrapper */
.oha-stu-courses {
	margin-top: 28px;
}
.oha-stu-courses .oha-section-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}
.oha-stu-course-count {
	font-size: 12px;
	font-weight: 600;
	color: var(--oha-text-muted, #888);
	background: var(--oha-surface, #f4f4f5);
	padding: 2px 10px;
	border-radius: 20px;
}

/* Grid */
.oha-stu-courses-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}

/* Card */
.oha-stu-course-card {
	display: flex;
	flex-direction: column;
	background: var(--oha-card-bg, #fff);
	border: 1px solid var(--oha-border, #e5e7eb);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.18s, transform 0.18s;
}
.oha-stu-course-card:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,.10);
	transform: translateY(-2px);
}

/* Thumbnail area */
.oha-stu-course-thumb {
	position: relative;
	height: 150px;
	background: #dde2ee;
	overflow: hidden;
}
.oha-stu-course-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.oha-stu-course-thumb .oha-course-card-gradient {
	width: 100%;
	height: 100%;
}

/* Expiry badge – student card thumbnail (positioned absolute over the thumb) */
.oha-stu-course-thumb .oha-enr-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 20px;
	line-height: 1.4;
}
.oha-stu-course-thumb .oha-enr-lifetime { background: rgba(16,185,129,.9); color: #fff; }
.oha-stu-course-thumb .oha-enr-active   { background: rgba(59,130,246,.9);  color: #fff; }
.oha-stu-course-thumb .oha-enr-warning  { background: rgba(239,68,68,.9);   color: #fff; }

/* Body */
.oha-stu-course-body {
	padding: 14px 16px 8px;
	flex: 1;
}
.oha-stu-course-title {
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1.45;
	margin: 0 0 6px;
	color: var(--oha-text, #111);
}
.oha-stu-course-excerpt {
	font-size: 12.5px;
	color: var(--oha-text-muted, #888);
	margin: 0 0 8px;
	line-height: 1.5;
}
.oha-stu-course-meta {
	display: flex;
	gap: 12px;
	font-size: 12px;
	color: var(--oha-text-muted, #888);
}
.oha-stu-course-meta span {
	display: flex;
	align-items: center;
	gap: 4px;
}

/* CTA strip */
.oha-stu-course-action {
	padding: 10px 16px 14px;
}
.oha-stu-course-action .oha-btn {
	width: 100%;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
}

/* Expired card state */
.oha-stu-course-card.is-expired {
	cursor: default;
	pointer-events: none;
}
.oha-stu-course-card.is-expired:hover {
	box-shadow: none;
	transform: none;
}
.oha-stu-course-card.is-expired .oha-stu-course-thumb img,
.oha-stu-course-card.is-expired .oha-course-card-gradient {
	filter: grayscale(60%) brightness(0.92);
}
.oha-stu-course-card.is-expired .oha-stu-course-title {
	color: var(--oha-text-light, #9ca3af);
}
.oha-stu-course-thumb .oha-enr-expired {
	background: rgba(107,114,128,.88);
	color: #fff;
}

/* Expired button */
.oha-btn-expired {
	background: #f3f4f6;
	color: #9ca3af;
	border: 1.5px solid #e5e7eb;
	cursor: default;
	pointer-events: none;
}

/* Empty state */
.oha-stu-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 48px 24px;
	background: var(--oha-card-bg, #fff);
	border: 1px dashed var(--oha-border, #e5e7eb);
	border-radius: 12px;
	text-align: center;
	color: var(--oha-text-muted, #888);
	font-size: 14px;
}
.oha-empty-icon {
	opacity: 0.4;
}

/* ============================================================
   POSTS PAGE  (page-posts.php)
============================================================ */

/* Category filter bar */
.oha-lp-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.oha-lp-filter-btn {
	padding: 5px 14px;
	border-radius: 20px;
	border: 1.5px solid var(--oha-border, #e5e7eb);
	background: transparent;
	color: var(--oha-text, #374151);
	font-size: 12.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	white-space: nowrap;
}

.oha-lp-filter-btn:hover {
	border-color: var(--oha-primary);
	color: var(--oha-primary);
}

.oha-lp-filter-btn.active {
	background: var(--oha-primary);
	border-color: var(--oha-primary);
	color: #fff;
}

.oha-lp-filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: rgba(0,0,0,.12);
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	margin-left: 3px;
}

.oha-lp-filter-btn.active .oha-lp-filter-count {
	background: rgba(255,255,255,.25);
}

/* Category checkboxes in form */
.oha-lp-cat-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 10px 0 2px;
}

.oha-lp-cat-cb {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	color: var(--oha-text, #374151);
	cursor: pointer;
	user-select: none;
}

.oha-lp-cat-cb input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: var(--oha-primary);
	cursor: pointer;
	flex-shrink: 0;
}

/* Card grid */
.oha-lp-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
	margin-top: 4px;
}
@media (max-width: 1199px) { .oha-lp-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .oha-lp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .oha-lp-grid { grid-template-columns: repeat(2, 1fr); } }

/* Individual card */
.oha-lp-card {
	background: var(--oha-card-bg, #fff);
	border: 1px solid var(--oha-border, #e5e7eb);
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	transition: box-shadow 0.18s, transform 0.18s;
	position: relative;
	display: flex;
	flex-direction: column;
}
.oha-lp-card:hover {
	box-shadow: 0 6px 24px rgba(0,0,0,.10);
	transform: translateY(-2px);
}

/* Thumbnail */
.oha-lp-card-thumb {
	position: relative;
	height: 160px;
	background: #dde2ee;
	overflow: hidden;
}
.oha-lp-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.22s;
}
.oha-lp-card:hover .oha-lp-card-thumb img {
	transform: scale(1.04);
}
.oha-lp-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #6C63FF 0%, #a78bfa 100%);
}

/* Play button overlay */
.oha-lp-play-btn {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,.3);
	opacity: 0;
	transition: opacity 0.18s;
}
.oha-lp-card:hover .oha-lp-play-btn { opacity: 1; }
.oha-lp-play-btn svg {
	filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}

/* Type pill badge */
.oha-lp-type-pill {
	position: absolute;
	top: 10px;
	left: 10px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10.5px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 20px;
	line-height: 1.4;
	background: rgba(0,0,0,.55);
	color: #fff;
	backdrop-filter: blur(4px);
}
.oha-lp-type-pill.is-yt {
	background: rgba(255,0,0,.75);
}

/* Card body */
.oha-lp-card-body {
	padding: 12px 14px 10px;
	flex: 1;
}
.oha-lp-card-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	margin: 0 0 5px;
	color: var(--oha-text, #111);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.oha-lp-card-host {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	color: var(--oha-text-muted, #888);
	margin: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* Admin actions strip */
.oha-lp-card-footer {
	display: flex;
	gap: 6px;
	padding: 8px 12px 10px;
	border-top: 1px solid var(--oha-border, #e5e7eb);
}

/* ── Add / Edit Form ── */
.oha-lp-form {
	background: var(--oha-card-bg, #fff);
	border: 1px solid var(--oha-border, #e5e7eb);
	border-radius: 14px;
	padding: 28px 28px 24px;
	max-width: 860px;
}
.oha-lp-form-body {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 28px;
	align-items: start;
}
@media (max-width: 640px) {
	.oha-lp-form-body { grid-template-columns: 1fr; }
}

/* Thumb column */
.oha-lp-thumb-col { display: flex; flex-direction: column; gap: 10px; }
.oha-lp-thumb-preview {
	width: 100%;
	aspect-ratio: 16/10;
	background: var(--oha-surface, #f4f4f5);
	border: 2px dashed var(--oha-border, #e5e7eb);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.oha-lp-thumb-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.oha-lp-thumb-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--oha-text-muted, #aaa);
	font-size: 12px;
	text-align: center;
	padding: 10px;
}
.oha-lp-thumb-placeholder p { margin: 0; }
.oha-lp-thumb-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* URL row */
.oha-lp-url-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
}
.oha-lp-url-wrap .oha-input { flex: 1; }

/* Type pill in form */
.oha-lp-type-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 20px;
	white-space: nowrap;
	flex-shrink: 0;
	background: rgba(0,0,0,.55);
	color: #fff;
}
.oha-lp-type-pill.is-yt { background: #dc2626; }

.oha-lp-form-footer {
	display: flex;
	gap: 10px;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--oha-border, #e5e7eb);
}

/* ── YouTube Modal ── */
.oha-yt-modal[hidden],
#oha-lp-del-modal[hidden] {
	display: none !important;
}
.oha-yt-modal {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.oha-yt-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.82);
}
.oha-yt-modal-inner {
	position: relative;
	z-index: 1;
	width: min(860px, 94vw);
	background: #000;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.oha-yt-iframe-wrap {
	position: relative;
	padding-top: 56.25%; /* 16:9 */
}
.oha-yt-iframe-wrap iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
}
.oha-yt-modal-close {
	position: absolute;
	top: -40px;
	right: 0;
	z-index: 2;
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.8;
	transition: opacity 0.15s;
}
.oha-yt-modal-close:hover { opacity: 1; }

/* ============================================================
   LOGIN PAGE  (page-login.php)
============================================================ */
.oha-login-body {
	background: var(--oha-bg);
	min-height: 100vh;
	display: flex;
	align-items: stretch;
}
.oha-login-page {
	display: flex;
	min-height: 100vh;
	width: 100%;
}
.oha-login-brand {
	width: 420px;
	flex-shrink: 0;
	background: var(--oha-primary-grad);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 40px;
	position: relative;
	overflow: hidden;
}
.oha-login-brand-inner { position: relative; z-index: 1; text-align: center; color: #fff; }
.oha-login-logo { margin-bottom: 28px; }
.oha-login-logo img { max-height: 56px; margin: 0 auto; }
.oha-login-logo-text { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.oha-login-brand-title { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; color: #fff; }
.oha-login-brand-sub { font-size: 15px; opacity: 0.85; color: #fff; line-height: 1.55; }
.oha-login-decor { position: absolute; inset: 0; pointer-events: none; }
.oha-login-decor-c { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.08); }
.oha-login-decor-c1 { width: 300px; height: 300px; bottom: -80px; left: -80px; }
.oha-login-decor-c2 { width: 180px; height: 180px; top: -40px; right: -40px; }
.oha-login-decor-c3 { width: 100px; height: 100px; bottom: 60px; right: 60px; background: rgba(255,255,255,0.05); }
.oha-login-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.oha-login-card { background: var(--oha-white); border-radius: var(--oha-radius); box-shadow: var(--oha-shadow-md); padding: 40px 40px 36px; width: 100%; max-width: 440px; }
.oha-login-heading { font-size: 22px; font-weight: 700; color: var(--oha-text-dark); margin-bottom: 24px; letter-spacing: -0.3px; }
.oha-login-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
.oha-login-role-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; border: 2px solid var(--oha-border); border-radius: var(--oha-radius-sm); background: var(--oha-bg); color: var(--oha-text-medium); cursor: pointer; transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s; font-family: inherit; }
.oha-login-role-btn:hover { border-color: var(--oha-primary); color: var(--oha-primary); background: var(--oha-primary-light); }
.oha-login-role-btn.active { border-color: var(--oha-primary); background: var(--oha-primary-light); color: var(--oha-primary); box-shadow: 0 0 0 3px rgba(108,99,255,0.12); }
.oha-role-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.oha-role-icon svg { width: 24px; height: 24px; }
.oha-role-label { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.3; }
.oha-login-field { margin-bottom: 18px; }
.oha-login-label { display: block; font-size: 13px; font-weight: 600; color: var(--oha-text-dark); margin-bottom: 7px; }
.oha-login-input-wrap { position: relative; display: flex; align-items: center; }
.oha-login-input-icon { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--oha-text-light); pointer-events: none; display: flex; align-items: center; }
.oha-login-input-icon svg { width: 16px; height: 16px; }
.oha-login-input-wrap input[type="text"],
.oha-login-input-wrap input[type="password"] { width: 100%; padding: 10px 42px 10px 38px; font-size: 14px; font-family: inherit; border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm); background: var(--oha-bg); color: var(--oha-text-dark); outline: none; transition: border-color 0.18s, background 0.18s; }
.oha-login-input-wrap input:focus { border-color: var(--oha-primary); background: #fff; }
.oha-login-toggle-pw { position: absolute; right: 10px; background: none; border: none; color: var(--oha-text-light); display: flex; align-items: center; padding: 4px; border-radius: 4px; transition: color 0.15s; }
.oha-login-toggle-pw:hover { color: var(--oha-text-medium); }
.oha-login-toggle-pw svg { width: 16px; height: 16px; }
.oha-login-options { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.oha-login-remember { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--oha-text-medium); cursor: pointer; user-select: none; }
.oha-login-remember input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--oha-primary); }
.oha-login-submit { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; background: var(--oha-primary-grad); color: #fff; font-size: 15px; font-weight: 600; font-family: inherit; border: none; border-radius: var(--oha-radius-sm); cursor: pointer; transition: opacity 0.18s, transform 0.12s; box-shadow: 0 4px 14px rgba(108,99,255,0.3); }
.oha-login-submit:hover { opacity: 0.92; }
.oha-login-submit:active { transform: scale(0.98); }
.oha-login-submit-icon { width: 18px; height: 18px; flex-shrink: 0; }
.oha-login-error { display: flex; align-items: center; gap: 8px; background: #fff0f0; border: 1px solid #fca5a5; color: #dc2626; border-radius: var(--oha-radius-sm); padding: 10px 14px; font-size: 13px; font-weight: 500; margin-bottom: 18px; }
@media (max-width: 900px) {
	.oha-login-brand { width: 320px; padding: 40px 28px; }
	.oha-login-brand-title { font-size: 22px; }
}
@media (max-width: 680px) {
	.oha-login-page { flex-direction: column; }
	.oha-login-brand { width: 100%; padding: 32px 24px; min-height: 180px; }
	.oha-login-brand-inner { display: flex; align-items: center; gap: 16px; text-align: left; }
	.oha-login-logo { margin-bottom: 0; }
	.oha-login-decor-c1 { width: 200px; height: 200px; }
	.oha-login-card { padding: 28px 20px 24px; }
}

/* ================================================================
   Notices Page (page-notices.php)
================================================================ */

/* Form */
.oha-nc-form { max-width: 860px; }
.oha-nc-cat-select { max-width: 320px; }
.oha-nc-editor-group { margin-top: 8px; }
.oha-nc-editor-wrap { border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm); overflow: hidden; }
.oha-nc-editor-wrap .wp-editor-container { border: none; }
.oha-nc-editor-wrap .wp-editor-tools { background: #f8f8fa; border-bottom: 1px solid var(--oha-border); }
.oha-nc-form-footer { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--oha-border-light); }

/* List: each notice item */
.oha-nc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.oha-nc-item { display: grid; grid-template-columns: 130px 1fr auto; align-items: start; gap: 16px; background: var(--oha-bg-card); border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius); padding: 16px 18px; transition: box-shadow 0.18s, border-color 0.18s; grid-template-areas: "left body actions" "left content content"; }
.oha-nc-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); border-color: var(--oha-border-hover, var(--oha-primary)); }

.oha-nc-item-left  { grid-area: left;    display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.oha-nc-item-body  { grid-area: body;    min-width: 0; }
.oha-nc-item-actions { grid-area: actions; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.oha-nc-item-content { grid-area: content; padding-top: 14px; padding-left: 2px; }

/* Category badges */
.oha-nc-cat-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.oha-nc-cat-lich-khai-giang  { background: #e8f4fd; color: #1a6fa8; }
.oha-nc-cat-thong-bao-nghi   { background: #fef3f2; color: #be3a3a; }
.oha-nc-cat-ho-tro            { background: #f0fdf4; color: #166534; }
.oha-nc-cat-uu-dai            { background: #fff7ed; color: #9a3412; }
.oha-nc-cat-default           { background: #f3f4f6; color: #6b7280; }

/* Item body text */
.oha-nc-item-title   { font-size: 15px; font-weight: 700; color: var(--oha-text-dark); margin: 0 0 6px; line-height: 1.4; }
.oha-nc-item-excerpt { font-size: 13px; color: var(--oha-text-medium); margin: 0 0 8px; line-height: 1.6; }
.oha-nc-item-meta    { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--oha-text-light); margin: 0; }

/* Bump-timestamp button */
.oha-nc-bump-btn { display: flex; align-items: center; padding: 5px; border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm); color: var(--oha-text-light); text-decoration: none; transition: color 0.15s, border-color 0.15s; }
.oha-nc-bump-btn:hover { color: #d97706; border-color: #d97706; }

/* Expand button */
.oha-nc-expand-btn { background: none; border: 1.5px solid var(--oha-border); color: var(--oha-text-light); padding: 5px; border-radius: var(--oha-radius-sm); display: flex; align-items: center; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.oha-nc-expand-btn:hover { color: var(--oha-primary); border-color: var(--oha-primary); }
.oha-nc-expand-btn svg { transition: transform 0.22s; }
.oha-nc-expand-btn.is-open svg { transform: rotate(180deg); }

/* Expandable content area */
.oha-nc-content-inner { background: #f8f9fb; border-radius: var(--oha-radius-sm); padding: 18px 20px; font-size: 14px; line-height: 1.75; color: var(--oha-text-dark); border: 1px solid var(--oha-border-light); }
.oha-nc-content-inner img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.oha-nc-content-inner iframe, .oha-nc-content-inner video { max-width: 100%; }
.oha-nc-content-inner p { margin: 0 0 10px; }
.oha-nc-content-inner p:last-child { margin-bottom: 0; }
.oha-nc-content-inner ul, .oha-nc-content-inner ol { padding-left: 22px; margin: 0 0 10px; }

/* Responsive */
@media (max-width: 700px) {
  .oha-nc-item { grid-template-columns: 1fr auto; grid-template-areas: "body actions" "left left" "content content"; gap: 10px; }
  .oha-nc-item-left { flex-direction: row; }
}

/* ================================================================
   Notices Page (page-notices.php)
================================================================ */

/* Form */
.oha-nc-form { max-width: 860px; }
.oha-nc-cat-select { max-width: 320px; }
.oha-nc-editor-group { margin-top: 8px; }
.oha-nc-editor-wrap { border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius-sm); overflow: hidden; }
.oha-nc-editor-wrap .wp-editor-container { border: none; }
.oha-nc-editor-wrap .wp-editor-tools { background: #f8f8fa; border-bottom: 1px solid var(--oha-border); }
.oha-nc-form-footer { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--oha-border-light); }

/* List */
.oha-nc-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.oha-nc-item { display: grid; grid-template-columns: 130px 1fr auto; align-items: start; gap: 16px; background: var(--oha-bg-card); border: 1.5px solid var(--oha-border); border-radius: var(--oha-radius); padding: 16px 18px; transition: box-shadow 0.18s, border-color 0.18s; grid-template-areas: 'left body actions' 'left content content'; }
.oha-nc-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); border-color: var(--oha-primary); }
.oha-nc-item-left { grid-area: left; display: flex; flex-direction: column; align-items: flex-start; padding-top: 2px; }
.oha-nc-item-body { grid-area: body; min-width: 0; }
.oha-nc-item-actions { grid-area: actions; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.oha-nc-item-content { grid-area: content; padding-top: 14px; }

/* Category badges */
.oha-nc-cat-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 4px 9px; border-radius: 20px; white-space: nowrap; }
.oha-nc-cat-lich-khai-giang { background: #e8f4fd; color: #1a6fa8; }
.oha-nc-cat-thong-bao-nghi { background: #fef3f2; color: #be3a3a; }
.oha-nc-cat-ho-tro { background: #f0fdf4; color: #166534; }
.oha-nc-cat-uu-dai { background: #fff7ed; color: #9a3412; }
.oha-nc-cat-default { background: #f3f4f6; color: #6b7280; }

/* Item text */
.oha-nc-item-title { font-size: 15px; font-weight: 700; color: var(--oha-text-dark); margin: 0 0 6px; line-height: 1.4; }
.oha-nc-item-excerpt { font-size: 13px; color: var(--oha-text-medium); margin: 0 0 8px; line-height: 1.6; }
.oha-nc-item-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--oha-text-light); margin: 0; }

/* Expand button */
.oha-nc-expand-btn { background: none; border: 1.5px solid var(--oha-border); color: var(--oha-text-light); padding: 5px; border-radius: var(--oha-radius-sm); display: flex; align-items: center; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.oha-nc-expand-btn:hover { color: var(--oha-primary); border-color: var(--oha-primary); }
.oha-nc-expand-btn svg { transition: transform 0.22s; }
.oha-nc-expand-btn.is-open svg { transform: rotate(180deg); }

/* Expandable content */
.oha-nc-content-inner { background: #f8f9fb; border-radius: var(--oha-radius-sm); padding: 18px 20px; font-size: 14px; line-height: 1.75; color: var(--oha-text-dark); border: 1px solid var(--oha-border-light); }
.oha-nc-content-inner img { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; }
.oha-nc-content-inner iframe, .oha-nc-content-inner video { max-width: 100%; }
.oha-nc-content-inner p { margin: 0 0 10px; }
.oha-nc-content-inner p:last-child { margin-bottom: 0; }
.oha-nc-content-inner ul, .oha-nc-content-inner ol { padding-left: 22px; margin: 0 0 10px; }

@media (max-width: 700px) {
  .oha-nc-item { grid-template-columns: 1fr auto; grid-template-areas: 'body actions' 'left left' 'content content'; gap: 10px; }
  .oha-nc-item-left { flex-direction: row; }
}

/* ================================================================
   FRONT-PAGE – MOBILE IMPROVEMENTS
================================================================ */

/* ── Hero: hide decoration, remove hard min-height, unlock content ── */
@media (max-width: 768px) {
  .oha-hero-decor  { display: none; }
  .oha-hero        { min-height: 0; }
  .oha-hero-content { max-width: 100%; }
}
@media (max-width: 480px) {
  .oha-hero          { padding: 20px 20px 22px; }
  .oha-hero h2       { font-size: 18px; }
  .oha-hero p        { font-size: 12.5px; margin-bottom: 14px; }
  .oha-hero-warning  { font-size: 12px; gap: 6px; }
}

/* ── Admin login / history tables: keep scroll-x on mobile (override global stacking) ── */
@media (max-width: 640px) {
  .oha-admin-dash .oha-admin-recent-table-wrap .oha-mgmt-table thead            { display: table-header-group; }
  .oha-admin-dash .oha-admin-recent-table-wrap .oha-mgmt-table thead th         { font-size: 11px; padding: 10px 12px; }
  .oha-admin-dash .oha-admin-recent-table-wrap .oha-mgmt-table tbody td         { display: table-cell; padding: 10px 12px; }
  .oha-admin-dash .oha-admin-recent-table-wrap .oha-mgmt-table tbody td:first-child { padding-top: 10px; }
  .oha-admin-dash .oha-admin-recent-table-wrap .oha-mgmt-table tbody td:last-child  { padding-bottom: 10px; }
}

/* ── Notice vcards: reduce size on phones ── */
@media (max-width: 600px) {
  .oha-nc-vcard         { padding: 16px 18px; margin-bottom: 10px; border-radius: 12px; }
  .oha-nc-vcard-title   { font-size: 19px; margin-bottom: 14px; letter-spacing: -0.2px; }
  .oha-nc-vcard-date    { display: none; }
}

/* ── Notice detail modal → bottom sheet on mobile ── */
@media (max-width: 640px) {
  .oha-nc-detail-modal  { padding: 0; align-items: flex-end; }
  .oha-nc-detail-box    { border-radius: 20px 20px 0 0; max-height: 88vh; }
  .oha-nc-detail-head   { padding: 20px 18px 0; }
  .oha-nc-detail-title  { font-size: 18px; }
  .oha-nc-detail-body   { padding: 16px 18px 24px; font-size: 14px; }
}

/* ================================================================
   PAGE-COURSES – MOBILE FIXES
================================================================ */

/* ── Action icons: bigger touch target on mobile (1-col only) ── */
@media (max-width: 560px) {
  .oha-pager-btn { width: 40px; height: 40px; }
  .oha-btn       { min-height: 44px; }
}

/* ── Course card footer: already handled by 900/560 breakpoints above ── */

/* ── Courses toolbar: stack vertically on very small screens ── */
@media (max-width: 480px) {
  .oha-courses-toolbar,
  .oha-enr-toolbar    { flex-wrap: wrap; }
  .oha-enr-search-wrap { max-width: 100%; }
}

/* ── Lessons table: horizontal scroll (override global block-stacking) ── */
@media (max-width: 640px) {
  .oha-lessons-table thead                  { display: table-header-group; }
  .oha-lessons-table thead th               { font-size: 11px; padding: 9px 10px; white-space: nowrap; }
  .oha-lessons-table tbody td               { display: table-cell; padding: 9px 10px; }
  .oha-lessons-table tbody td:first-child   { padding-top: 9px; }
  .oha-lessons-table tbody td:last-child    { padding-bottom: 9px; }
  /* Hide non-essential columns */
  .oha-lessons-table .oha-td-drag,
  .oha-lessons-table th.oha-th-drag         { display: none; }
  .oha-lessons-table .oha-td-group,
  .oha-lessons-table th:nth-child(4)        { display: none; }
}

/* ── Enrollment table: horizontal scroll (override global block-stacking) ── */
@media (max-width: 640px) {
  #enr-table-wrap                           { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #enr-table thead                          { display: table-header-group; }
  #enr-table thead th                       { font-size: 11px; padding: 9px 10px; white-space: nowrap; }
  #enr-table tbody td                       { display: table-cell; padding: 9px 10px; }
  #enr-table tbody td:first-child           { padding-top: 9px; }
  #enr-table tbody td:last-child            { padding-bottom: 9px; }
  /* Enrolled-at column less important on small screens */
  #enr-table thead th:nth-child(4),
  #enr-table tbody td:nth-child(4)          { display: none; }
}

/* ── Learn view: collapsible TOC sidebar on mobile ── */
/* Toggle button — hidden on desktop */
.oha-learn-toc-toggle { display: none; }

@media (max-width: 860px) {
  .oha-learn-sidebar { max-height: none; overflow: visible; }

  /* Toggle button strip */
  .oha-learn-toc-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 18px;
    background: var(--oha-bg);
    border: none;
    border-top: 1px solid var(--oha-border);
    border-bottom: 1px solid var(--oha-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--oha-text-dark);
    cursor: pointer;
    font-family: inherit;
    gap: 8px;
  }
  .oha-learn-toc-toggle svg.oha-toc-chevron { transition: transform 0.22s; flex-shrink: 0; }
  .oha-learn-sidebar.toc-open .oha-learn-toc-toggle svg.oha-toc-chevron { transform: rotate(180deg); }

  .oha-learn-toc-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    background: var(--oha-primary-light);
    color: var(--oha-primary);
    padding: 1px 8px;
    border-radius: 20px;
  }

  /* TOC hidden by default on mobile */
  .oha-learn-toc {
    display: none;
    max-height: 300px;
    overflow-y: auto;
  }
  .oha-learn-sidebar.toc-open .oha-learn-toc { display: block; }

  /* Progress bar only visible when open */
  .oha-learn-progress-bar { display: none; }
  .oha-learn-sidebar.toc-open .oha-learn-progress-bar { display: block; }

  /* Tighten sidebar header */
  .oha-learn-sidebar-header { padding-bottom: 10px; border-bottom: none; }
}

/* ── Learn nav buttons: stack on very small screens ── */
@media (max-width: 480px) {
  .oha-learn-nav             { flex-direction: column; }
  .oha-learn-nav-btn         { max-width: 100%; }
  .oha-learn-nav-btn strong  { max-width: none; white-space: normal; }
  .oha-learn-main            { padding: 16px 14px 28px; }
  .oha-learn-lesson-title    { font-size: 17px; }
}

/* ================================================================
   PAGE-STUDENTS – MOBILE FIXES
================================================================ */

/* ── Header: "Thêm học viên" button stretches full width on phones ── */
@media (max-width: 560px) {
  /* oha-mgmt-header đã có flex-wrap; chỉ cần kéo button full width */
  #stu-open-modal { width: 100%; justify-content: center; }
}

/* ── Toolbar: full-width search, stack vertically ── */
@media (max-width: 560px) {
  .oha-stu-toolbar     { flex-direction: column; align-items: stretch; gap: 8px; }
  .oha-stu-search-wrap { max-width: 100%; }
  .oha-stu-search-count { font-size: 12px; }
}

/* ── Table: card-view tweaks for students ── */
@media (max-width: 640px) {
  /* Ẩn cột # (vô nghĩa khi xếp dọc) */
  #oha-stu-table tbody td.oha-td-order { display: none !important; }

  /* Name cell: là "first-child" thực sau khi ẩn # nên cần padding-top */
  #oha-stu-table tbody td:nth-child(2) { padding-top: 14px; padding-bottom: 2px; }

  /* Phone cell: thêm nhãn */
  #oha-stu-table tbody td:nth-child(3)::before {
    content: "SĐT: ";
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--oha-text-label);
    margin-right: 4px;
  }

  /* Date cell: thêm nhãn */
  #oha-stu-table tbody td:nth-child(4)::before {
    content: "Ngày thêm: ";
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--oha-text-label);
    margin-right: 4px;
  }

  /* Actions: 2 nút cạnh nhau, tap-friendly */
  #oha-stu-table td.oha-td-actions {
    display: flex !important;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 14px;
  }
  #oha-stu-table .oha-action-btn {
    flex: 1;
    justify-content: center;
    min-height: 40px;
    font-size: 13px;
    padding: 8px 10px;
  }

  /* Enrollment tags: cho phép wrap nhưng không tràn */
  #oha-stu-table .oha-stu-courses-info { gap: 4px; }
  #oha-stu-table .oha-stu-enr-tag      { white-space: normal; }
  #oha-stu-table .oha-stu-enr-name     { white-space: normal; word-break: break-word; }
}

/* ── Modal → bottom sheet trên điện thoại ── */
@media (max-width: 560px) {
  #stu-modal-backdrop,
  #stu-edit-backdrop            { padding: 0; align-items: flex-end; }
  #stu-modal-backdrop .oha-modal,
  #stu-edit-backdrop .oha-modal {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    overflow-y: auto;
  }
  .oha-modal-header  { padding: 20px 20px 0; }
  .oha-modal-body    { padding: 14px 20px 0; }
  .oha-modal-footer  { padding: 14px 20px 20px; }
}

/* ================================================================
   PAGE-POSTS – MOBILE FIXES
================================================================ */

/* ── Header: nút "Thêm bài viết" full-width trên điện thoại ── */
@media (max-width: 560px) {
  .oha-page-wrap .oha-mgmt-header a.oha-btn-primary { width: 100%; justify-content: center; }
}

/* ── Filter bar: scroll ngang thay vì xuống dòng trên màn nhỏ ── */
@media (max-width: 600px) {
  .oha-lp-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    gap: 6px;
  }
  .oha-lp-filter-btn {
    scroll-snap-align: start;
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 12px;
  }
}

/* ── Search toolbar: full-width trên điện thoại ── */
@media (max-width: 560px) {
  .oha-enr-toolbar                    { flex-wrap: wrap; gap: 8px; }
  .oha-enr-toolbar .oha-enr-search-wrap { max-width: 100%; flex: 1 1 100%; }
}

/* ── Thẻ card: thumbnail thấp hơn trên 2-col để text đỡ bị cắt ── */
@media (max-width: 600px) {
  .oha-lp-card-thumb { height: 120px; }
  .oha-lp-card-title { font-size: 12.5px; }
  .oha-lp-card-body  { padding: 9px 10px 7px; }
  /* Admin footer: icon lớn hơn, tap-friendly */
  .oha-lp-card-footer { padding: 8px 10px 10px; gap: 8px; }
  .oha-lp-card-footer .oha-action-icon { width: 34px; height: 34px; }
}

/* ── Add/Edit form: stack dọc (đã có ≤640px), điều chỉnh padding ── */
@media (max-width: 560px) {
  .oha-lp-form             { padding: 18px 16px 20px; border-radius: 10px; }
  .oha-lp-form-body        { gap: 18px; }
  .oha-lp-thumb-col        { order: 2; /* thumb xuống dưới, fields lên trên */ }
  .oha-lp-fields-col       { order: 1; }
  .oha-lp-url-wrap         { flex-wrap: wrap; }
  .oha-lp-url-wrap .oha-input { min-width: 0; }
  .oha-lp-type-pill        { order: -1; /* pill lên trên trường URL */ align-self: flex-start; }
  .oha-lp-form-footer      { flex-direction: column; }
  .oha-lp-form-footer .oha-btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* ── YouTube modal: video chiếm gần full màn, nút đóng dễ nhấn ── */
@media (max-width: 600px) {
  .oha-yt-modal-inner  { width: 100vw; border-radius: 0; }
  .oha-yt-modal-close  {
    top: auto;
    bottom: calc(56.25vw + 10px); /* phía dưới video + khoảng cách */
    right: 10px;
    background: rgba(0,0,0,.55);
    border-radius: 50%;
    padding: 8px;
    opacity: 1;
  }
}

/* ── Delete confirm modal: tap-friendly buttons ── */
@media (max-width: 560px) {
  #oha-lp-del-modal .oha-modal-actions  { flex-direction: column-reverse; gap: 10px; }
  #oha-lp-del-modal .oha-modal-actions .oha-btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* ================================================================
   PAGE-NOTICES – MOBILE FIXES
================================================================ */

/* ── Header: nút "Thêm thông báo" full-width ── */
@media (max-width: 560px) {
  .oha-page-wrap .oha-mgmt-header a.oha-btn-primary,
  .oha-page-wrap .oha-mgmt-header button.oha-btn-primary { width: 100%; justify-content: center; }
}

/* ── Filter bar + search toolbar: đã có rule chung ở PAGE-POSTS ── */

/* ── Notice item: layout gọn hơn trên điện thoại ── */
@media (max-width: 560px) {
  /* Badge lên hàng đầu, body + actions hàng dưới */
  .oha-nc-item {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "left  left"
      "body  actions"
      "content content";
    padding: 14px 14px 12px;
    gap: 8px;
  }
  .oha-nc-item-left   { flex-direction: row; padding-top: 0; }
  /* Icons tap-friendly */
  .oha-nc-item-actions { gap: 8px; }
  .oha-nc-item-actions .oha-action-icon,
  .oha-nc-item-actions .oha-nc-expand-btn { width: 36px; height: 36px; }
  /* Text */
  .oha-nc-item-title   { font-size: 14px; }
  .oha-nc-item-excerpt {
    font-size: 12.5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Nội dung mở rộng */
  .oha-nc-content-inner { padding: 14px; font-size: 13.5px; }
}

/* ── Form: nút full-width, select full-width ── */
@media (max-width: 560px) {
  .oha-nc-cat-select     { max-width: 100%; }
  .oha-nc-form-footer    { flex-direction: column; }
  .oha-nc-form-footer .oha-btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* ── Delete confirm: tap-friendly buttons ── */
@media (max-width: 560px) {
  #oha-nc-del-modal .oha-modal-actions  { flex-direction: column-reverse; gap: 10px; }
  #oha-nc-del-modal .oha-modal-actions .oha-btn { width: 100%; justify-content: center; min-height: 44px; }
}