/**
 * Techlo Builder — Shared UI Components
 *
 * Every class here consumes tokens.css custom properties exclusively —
 * no hardcoded brand colors. Loaded on every admin AND frontend screen
 * under the Techlo Builder design system (see UI\UIManager::enqueue_assets()),
 * so `includes/UI/Components/*` PHP render helpers and any future
 * module plugin can rely on these classes always being present.
 */

/* ===================== Base / Reset ===================== */

.techlo-ds * {
	box-sizing: border-box;
}

.techlo-ds {
	font-family: var(--techlo-font-family);
	color: var(--techlo-color-text);
	font-size: var(--techlo-text-base);
	line-height: var(--techlo-leading-normal);
}

.techlo-ds[dir="rtl"],
.techlo-ds .techlo-urdu {
	font-family: var(--techlo-font-family-urdu);
}

/* ===================== Layout Helpers ===================== */

.techlo-grid {
	display: grid;
	gap: var(--techlo-space-5);
}

.techlo-grid-2 { grid-template-columns: repeat(2, 1fr); }
.techlo-grid-3 { grid-template-columns: repeat(3, 1fr); }
.techlo-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
	.techlo-grid-2, .techlo-grid-3, .techlo-grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.techlo-grid-2, .techlo-grid-3, .techlo-grid-4 {
		grid-template-columns: 1fr;
	}
}

.techlo-flex { display: flex; align-items: center; }
.techlo-flex-between { display: flex; align-items: center; justify-content: space-between; }
.techlo-gap-2 { gap: var(--techlo-space-2); }
.techlo-gap-3 { gap: var(--techlo-space-3); }
.techlo-gap-4 { gap: var(--techlo-space-4); }

/* ===================== Page Header ===================== */

.techlo-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--techlo-space-4);
	margin-bottom: var(--techlo-space-6);
}

.techlo-page-header h1 {
	font-size: var(--techlo-text-2xl);
	font-weight: var(--techlo-font-bold);
	color: var(--techlo-color-primary);
	margin: 0;
}

.techlo-page-header p {
	color: var(--techlo-color-text-muted);
	margin: var(--techlo-space-1) 0 0;
	font-size: var(--techlo-text-sm);
}

/* ===================== Cards ===================== */

.techlo-card {
	background: var(--techlo-color-surface);
	border: 1px solid var(--techlo-color-border);
	border-radius: var(--techlo-radius-lg);
	box-shadow: var(--techlo-shadow-sm);
	padding: var(--techlo-space-6);
	transition: box-shadow var(--techlo-transition-base), transform var(--techlo-transition-base);
}

.techlo-card:hover {
	box-shadow: var(--techlo-shadow-md);
}

.techlo-card-glass {
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.5);
	box-shadow: var(--techlo-shadow-glass);
}

.techlo-card-title {
	font-size: var(--techlo-text-lg);
	font-weight: var(--techlo-font-semibold);
	color: var(--techlo-color-primary);
	margin: 0 0 var(--techlo-space-2);
}

/* ===================== Stat Cards ===================== */

.techlo-stat-card {
	display: flex;
	flex-direction: column;
	gap: var(--techlo-space-2);
	background: var(--techlo-color-surface);
	border: 1px solid var(--techlo-color-border);
	border-left: 4px solid var(--techlo-color-secondary);
	border-radius: var(--techlo-radius-md);
	padding: var(--techlo-space-5);
	box-shadow: var(--techlo-shadow-sm);
}

.techlo-stat-card-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--techlo-radius-md);
	background: var(--techlo-color-secondary-soft);
	color: var(--techlo-color-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--techlo-space-2);
}

.techlo-stat-card-label {
	font-size: var(--techlo-text-xs);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--techlo-color-text-muted);
	font-weight: var(--techlo-font-medium);
}

.techlo-stat-card-value {
	font-size: var(--techlo-text-2xl);
	font-weight: var(--techlo-font-bold);
	color: var(--techlo-color-primary);
}

.techlo-stat-card-trend {
	font-size: var(--techlo-text-xs);
	font-weight: var(--techlo-font-semibold);
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.techlo-stat-card-trend.is-up { color: var(--techlo-color-success); }
.techlo-stat-card-trend.is-down { color: var(--techlo-color-danger); }

.techlo-stat-card--warning { border-left-color: var(--techlo-color-warning); }
.techlo-stat-card--danger  { border-left-color: var(--techlo-color-danger); }
.techlo-stat-card--success { border-left-color: var(--techlo-color-success); }

/* ===================== Charts Container ===================== */

.techlo-chart-container {
	background: var(--techlo-color-surface);
	border: 1px solid var(--techlo-color-border);
	border-radius: var(--techlo-radius-lg);
	padding: var(--techlo-space-6);
	box-shadow: var(--techlo-shadow-sm);
}

.techlo-chart-container canvas,
.techlo-chart-container svg {
	width: 100% !important;
	height: auto !important;
}

/* ===================== Buttons ===================== */

.techlo-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--techlo-space-2);
	font-family: inherit;
	font-size: var(--techlo-text-sm);
	font-weight: var(--techlo-font-semibold);
	padding: 10px 20px;
	border-radius: var(--techlo-radius-md);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all var(--techlo-transition-fast);
	line-height: 1;
	text-decoration: none;
}

.techlo-btn:focus-visible {
	outline: none;
	box-shadow: var(--techlo-shadow-focus);
}

.techlo-btn-primary {
	background: var(--techlo-color-primary);
	color: var(--techlo-color-text-inverse);
}
.techlo-btn-primary:hover { background: var(--techlo-color-primary-hover); }

.techlo-btn-secondary {
	background: var(--techlo-color-secondary);
	color: var(--techlo-color-text-inverse);
}
.techlo-btn-secondary:hover { background: var(--techlo-color-secondary-hover); }

.techlo-btn-outline {
	background: transparent;
	border-color: var(--techlo-color-border-strong);
	color: var(--techlo-color-text);
}
.techlo-btn-outline:hover { border-color: var(--techlo-color-primary); color: var(--techlo-color-primary); }

.techlo-btn-ghost {
	background: transparent;
	color: var(--techlo-color-text-muted);
}
.techlo-btn-ghost:hover { background: var(--techlo-color-bg-subtle); color: var(--techlo-color-text); }

.techlo-btn-danger {
	background: var(--techlo-color-danger);
	color: var(--techlo-color-text-inverse);
}

.techlo-btn-sm { padding: 6px 14px; font-size: var(--techlo-text-xs); border-radius: var(--techlo-radius-sm); }
.techlo-btn-lg { padding: 14px 26px; font-size: var(--techlo-text-md); }
.techlo-btn-icon { padding: 10px; border-radius: var(--techlo-radius-md); }
.techlo-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===================== Badges & Status Labels ===================== */

.techlo-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: var(--techlo-text-xs);
	font-weight: var(--techlo-font-semibold);
	padding: 3px 12px;
	border-radius: var(--techlo-radius-full);
	line-height: 1.6;
}

.techlo-badge-primary  { background: var(--techlo-color-primary-soft); color: var(--techlo-color-primary); }
.techlo-badge-secondary{ background: var(--techlo-color-secondary-soft); color: var(--techlo-color-secondary-hover); }
.techlo-badge-success  { background: var(--techlo-color-success-soft); color: var(--techlo-color-success); }
.techlo-badge-warning  { background: var(--techlo-color-warning-soft); color: var(--techlo-color-warning); }
.techlo-badge-danger   { background: var(--techlo-color-danger-soft); color: var(--techlo-color-danger); }
.techlo-badge-info     { background: var(--techlo-color-info-soft); color: var(--techlo-color-info); }
.techlo-badge-neutral  { background: var(--techlo-color-bg-subtle); color: var(--techlo-color-text-muted); }

.techlo-status-label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--techlo-text-sm); font-weight: var(--techlo-font-medium); }
.techlo-status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.techlo-status-dot.is-success { background: var(--techlo-color-success); }
.techlo-status-dot.is-warning { background: var(--techlo-color-warning); }
.techlo-status-dot.is-danger  { background: var(--techlo-color-danger); }
.techlo-status-dot.is-neutral { background: var(--techlo-color-text-muted); }

/* ===================== Alerts ===================== */

.techlo-alert {
	display: flex;
	align-items: flex-start;
	gap: var(--techlo-space-3);
	padding: var(--techlo-space-4) var(--techlo-space-5);
	border-radius: var(--techlo-radius-md);
	border: 1px solid transparent;
	font-size: var(--techlo-text-sm);
	margin-bottom: var(--techlo-space-4);
}

.techlo-alert-success { background: var(--techlo-color-success-soft); border-color: rgba(18,183,106,0.25); color: #067647; }
.techlo-alert-warning { background: var(--techlo-color-warning-soft); border-color: rgba(247,144,9,0.25); color: #93370D; }
.techlo-alert-danger  { background: var(--techlo-color-danger-soft); border-color: rgba(240,68,56,0.25); color: #B42318; }
.techlo-alert-info    { background: var(--techlo-color-info-soft); border-color: rgba(46,144,250,0.25); color: #175CD3; }

.techlo-alert-icon { flex-shrink: 0; width: var(--techlo-icon-md); height: var(--techlo-icon-md); }
.techlo-alert-title { font-weight: var(--techlo-font-semibold); margin: 0 0 2px; }
.techlo-alert-body { margin: 0; }
.techlo-alert-dismiss { margin-left: auto; background: none; border: none; cursor: pointer; opacity: 0.6; }
.techlo-alert-dismiss:hover { opacity: 1; }

/* ===================== Tables ===================== */

.techlo-table-wrap {
	background: var(--techlo-color-surface);
	border: 1px solid var(--techlo-color-border);
	border-radius: var(--techlo-radius-lg);
	overflow: hidden;
	box-shadow: var(--techlo-shadow-sm);
}

.techlo-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--techlo-text-sm);
}

.techlo-table thead th {
	text-align: left;
	background: var(--techlo-color-bg-subtle);
	color: var(--techlo-color-text-muted);
	font-weight: var(--techlo-font-semibold);
	text-transform: uppercase;
	font-size: var(--techlo-text-xs);
	letter-spacing: 0.04em;
	padding: var(--techlo-space-3) var(--techlo-space-4);
	border-bottom: 1px solid var(--techlo-color-border);
}

.techlo-table tbody td {
	padding: var(--techlo-space-4);
	border-bottom: 1px solid var(--techlo-color-border);
	color: var(--techlo-color-text);
}

.techlo-table tbody tr:last-child td { border-bottom: none; }
.techlo-table tbody tr:hover { background: var(--techlo-color-bg-subtle); }

.techlo-table-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--techlo-space-3);
	flex-wrap: wrap;
	padding: var(--techlo-space-4);
	border-bottom: 1px solid var(--techlo-color-border);
}

/* ===================== Search Box & Filters ===================== */

.techlo-search-box {
	position: relative;
	display: flex;
	align-items: center;
}

.techlo-search-box input {
	padding-left: 38px;
}

.techlo-search-box .techlo-icon {
	position: absolute;
	left: 12px;
	color: var(--techlo-color-text-muted);
	pointer-events: none;
}

.techlo-filters {
	display: flex;
	align-items: center;
	gap: var(--techlo-space-2);
	flex-wrap: wrap;
}

/* ===================== Forms & Inputs ===================== */

.techlo-field { margin-bottom: var(--techlo-space-5); }

.techlo-field-label {
	display: block;
	font-size: var(--techlo-text-sm);
	font-weight: var(--techlo-font-semibold);
	color: var(--techlo-color-text);
	margin-bottom: var(--techlo-space-2);
}

.techlo-field-description {
	font-size: var(--techlo-text-xs);
	color: var(--techlo-color-text-muted);
	margin-top: var(--techlo-space-1);
}
.techlo-field-description code {
	background: var(--techlo-color-bg-subtle, #F6F8FA);
	padding: 2px 6px;
	border-radius: 4px;
	color: var(--techlo-color-primary, #0B1F3A);
}

.techlo-field-error {
	font-size: var(--techlo-text-xs);
	color: var(--techlo-color-danger);
	margin-top: var(--techlo-space-1);
}

.techlo-input,
.techlo-textarea,
.techlo-select {
	width: 100%;
	font-family: inherit;
	font-size: var(--techlo-text-base);
	color: var(--techlo-color-text);
	background: var(--techlo-color-surface);
	border: 1.5px solid var(--techlo-color-border);
	border-radius: var(--techlo-radius-md);
	padding: 12px 14px;
	line-height: 1.4;
	box-sizing: border-box;
	transition: border-color var(--techlo-transition-fast), box-shadow var(--techlo-transition-fast);
}

.techlo-select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
}

.techlo-textarea { min-height: 120px; resize: vertical; }

.techlo-input:focus,
.techlo-textarea:focus,
.techlo-select:focus {
	outline: none;
	border-color: var(--techlo-color-secondary);
	box-shadow: var(--techlo-shadow-focus);
}

.techlo-field.has-error .techlo-input,
.techlo-field.has-error .techlo-textarea,
.techlo-field.has-error .techlo-select {
	border-color: var(--techlo-color-danger);
}

/* Switch (toggle) */
.techlo-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.techlo-switch input { opacity: 0; width: 0; height: 0; }
.techlo-switch-track {
	position: absolute; inset: 0; cursor: pointer;
	background: var(--techlo-color-border-strong);
	border-radius: var(--techlo-radius-full);
	transition: background var(--techlo-transition-fast);
}
.techlo-switch-track::before {
	content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
	background: #fff; border-radius: 50%; transition: transform var(--techlo-transition-fast);
	box-shadow: var(--techlo-shadow-sm);
}
.techlo-switch input:checked + .techlo-switch-track { background: var(--techlo-color-secondary); }
.techlo-switch input:checked + .techlo-switch-track::before { transform: translateX(20px); }
.techlo-switch input:focus-visible + .techlo-switch-track { box-shadow: var(--techlo-shadow-focus); }

/* Checkbox / Radio */
.techlo-checkbox, .techlo-radio {
	display: inline-flex; align-items: center; gap: var(--techlo-space-2);
	font-size: var(--techlo-text-sm); cursor: pointer;
}
.techlo-checkbox input, .techlo-radio input {
	width: 18px; height: 18px; accent-color: var(--techlo-color-secondary); cursor: pointer;
}

/* Color field */
.techlo-color-field { display: flex; align-items: center; gap: var(--techlo-space-3); }
.techlo-color-swatch {
	width: 36px; height: 36px; border-radius: var(--techlo-radius-sm);
	border: 1.5px solid var(--techlo-color-border); cursor: pointer; padding: 0;
}

/* Media field */
.techlo-media-field { display: flex; align-items: center; gap: var(--techlo-space-3); }
.techlo-media-preview {
	width: 72px; height: 72px; border-radius: var(--techlo-radius-md);
	border: 1.5px dashed var(--techlo-color-border-strong); object-fit: cover;
	display: flex; align-items: center; justify-content: center; color: var(--techlo-color-text-muted);
	background: var(--techlo-color-bg-subtle);
}

/* Repeater */
.techlo-repeater-row {
	display: flex; align-items: center; gap: var(--techlo-space-3);
	padding: var(--techlo-space-3); border: 1px solid var(--techlo-color-border);
	border-radius: var(--techlo-radius-md); margin-bottom: var(--techlo-space-2);
	background: var(--techlo-color-bg-subtle);
}
.techlo-repeater-row .techlo-input { flex: 1; }

/* Code editor wrapper (CodeMirror or plain textarea target) */
.techlo-code-editor {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: var(--techlo-text-sm);
	background: #0B1220;
	color: #E4E7EC;
	border-radius: var(--techlo-radius-md);
	min-height: 180px;
	padding: var(--techlo-space-4);
	width: 100%;
	border: 1.5px solid var(--techlo-color-border);
}

/* ===================== Tabs ===================== */

.techlo-tabs-nav {
	display: flex;
	gap: var(--techlo-space-1);
	border-bottom: 1px solid var(--techlo-color-border);
	margin-bottom: var(--techlo-space-6);
	overflow-x: auto;
}

.techlo-tab-btn {
	background: none; border: none; cursor: pointer;
	padding: var(--techlo-space-3) var(--techlo-space-4);
	font-size: var(--techlo-text-sm); font-weight: var(--techlo-font-medium);
	color: var(--techlo-color-text-muted);
	border-bottom: 2px solid transparent;
	white-space: nowrap;
	transition: color var(--techlo-transition-fast), border-color var(--techlo-transition-fast);
}

.techlo-tab-btn:hover { color: var(--techlo-color-primary); }
.techlo-tab-btn.is-active { color: var(--techlo-color-primary); border-bottom-color: var(--techlo-color-secondary); }
.techlo-tab-panel { display: none; }
.techlo-tab-panel.is-active { display: block; }

/* ===================== Accordion ===================== */

.techlo-accordion-item { border: 1px solid var(--techlo-color-border); border-radius: var(--techlo-radius-md); margin-bottom: var(--techlo-space-2); overflow: hidden; }
.techlo-accordion-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: var(--techlo-space-4); cursor: pointer; background: var(--techlo-color-surface);
	font-weight: var(--techlo-font-semibold); font-size: var(--techlo-text-sm);
}
.techlo-accordion-header .techlo-icon { transition: transform var(--techlo-transition-fast); }
.techlo-accordion-item.is-open .techlo-accordion-header .techlo-icon { transform: rotate(180deg); }
.techlo-accordion-body { display: none; padding: 0 var(--techlo-space-4) var(--techlo-space-4); color: var(--techlo-color-text-muted); font-size: var(--techlo-text-sm); }
.techlo-accordion-item.is-open .techlo-accordion-body { display: block; }

/* ===================== Modal ===================== */

.techlo-modal-overlay {
	position: fixed; inset: 0; background: rgba(11, 31, 58, 0.55);
	display: none; align-items: center; justify-content: center;
	z-index: var(--techlo-z-modal); padding: var(--techlo-space-4);
}
.techlo-modal-overlay.is-open { display: flex; }

.techlo-modal {
	background: var(--techlo-color-surface);
	border-radius: var(--techlo-radius-lg);
	box-shadow: var(--techlo-shadow-lg);
	width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
	animation: techlo-modal-in var(--techlo-transition-base);
}

@keyframes techlo-modal-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.techlo-modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--techlo-space-5) var(--techlo-space-6); border-bottom: 1px solid var(--techlo-color-border); }
.techlo-modal-title { font-size: var(--techlo-text-lg); font-weight: var(--techlo-font-semibold); color: var(--techlo-color-primary); margin: 0; }
.techlo-modal-body { padding: var(--techlo-space-6); }
.techlo-modal-footer { display: flex; justify-content: flex-end; gap: var(--techlo-space-3); padding: var(--techlo-space-5) var(--techlo-space-6); border-top: 1px solid var(--techlo-color-border); }
.techlo-modal-close { background: none; border: none; cursor: pointer; color: var(--techlo-color-text-muted); }

/* ===================== Slide Panel ===================== */

.techlo-slide-panel-overlay {
	position: fixed; inset: 0; background: rgba(11, 31, 58, 0.45);
	display: none; z-index: var(--techlo-z-modal);
}
.techlo-slide-panel-overlay.is-open { display: block; }

.techlo-slide-panel {
	position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px;
	background: var(--techlo-color-surface); box-shadow: var(--techlo-shadow-lg);
	transform: translateX(100%); transition: transform var(--techlo-transition-slow);
	display: flex; flex-direction: column;
}
.techlo-slide-panel-overlay.is-open .techlo-slide-panel { transform: translateX(0); }
[dir="rtl"] .techlo-slide-panel { right: auto; left: 0; transform: translateX(-100%); }
[dir="rtl"] .techlo-slide-panel-overlay.is-open .techlo-slide-panel { transform: translateX(0); }

/* ===================== Pagination ===================== */

.techlo-pagination { display: flex; align-items: center; gap: var(--techlo-space-1); }
.techlo-pagination a, .techlo-pagination span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 34px; height: 34px; border-radius: var(--techlo-radius-sm);
	font-size: var(--techlo-text-sm); color: var(--techlo-color-text);
	text-decoration: none; border: 1px solid transparent;
}
.techlo-pagination a:hover { background: var(--techlo-color-bg-subtle); }
.techlo-pagination .is-current { background: var(--techlo-color-primary); color: #fff; font-weight: var(--techlo-font-semibold); }

/* ===================== Breadcrumb ===================== */

.techlo-breadcrumb { display: flex; align-items: center; gap: var(--techlo-space-2); font-size: var(--techlo-text-sm); color: var(--techlo-color-text-muted); margin-bottom: var(--techlo-space-4); }
.techlo-breadcrumb a { color: var(--techlo-color-text-muted); text-decoration: none; }
.techlo-breadcrumb a:hover { color: var(--techlo-color-primary); }
.techlo-breadcrumb .is-current { color: var(--techlo-color-text); font-weight: var(--techlo-font-medium); }
.techlo-breadcrumb-sep { color: var(--techlo-color-border-strong); }

/* ===================== Empty States ===================== */

.techlo-empty-state {
	text-align: center; padding: var(--techlo-space-12) var(--techlo-space-6);
	color: var(--techlo-color-text-muted);
}
.techlo-empty-state-icon {
	width: 56px; height: 56px; margin: 0 auto var(--techlo-space-4);
	color: var(--techlo-color-border-strong);
}
.techlo-empty-state-title { font-size: var(--techlo-text-md); font-weight: var(--techlo-font-semibold); color: var(--techlo-color-text); margin: 0 0 var(--techlo-space-2); }
.techlo-empty-state-desc { font-size: var(--techlo-text-sm); margin: 0 0 var(--techlo-space-5); }

/* ===================== Loaders ===================== */

.techlo-spinner {
	width: 20px; height: 20px; border-radius: 50%;
	border: 2.5px solid var(--techlo-color-border);
	border-top-color: var(--techlo-color-secondary);
	animation: techlo-spin 0.7s linear infinite;
}
@keyframes techlo-spin { to { transform: rotate(360deg); } }

.techlo-skeleton {
	background: linear-gradient(90deg, var(--techlo-color-bg-subtle) 25%, var(--techlo-color-border) 37%, var(--techlo-color-bg-subtle) 63%);
	background-size: 400% 100%;
	animation: techlo-skeleton-loading 1.4s ease infinite;
	border-radius: var(--techlo-radius-sm);
}
@keyframes techlo-skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ===================== Avatar ===================== */

.techlo-avatar {
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; overflow: hidden; flex-shrink: 0;
	background: var(--techlo-color-primary-soft); color: var(--techlo-color-primary);
	font-weight: var(--techlo-font-semibold);
}
.techlo-avatar img { width: 100%; height: 100%; object-fit: cover; }
.techlo-avatar-sm { width: 28px; height: 28px; font-size: var(--techlo-text-xs); }
.techlo-avatar-md { width: 40px; height: 40px; font-size: var(--techlo-text-sm); }
.techlo-avatar-lg { width: 56px; height: 56px; font-size: var(--techlo-text-md); }

/* ===================== Navigation / Sidebar ===================== */

.techlo-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.techlo-sidebar-link {
	display: flex; align-items: center; gap: var(--techlo-space-3);
	padding: var(--techlo-space-3) var(--techlo-space-4);
	border-radius: var(--techlo-radius-md); color: var(--techlo-color-text-muted);
	text-decoration: none; font-size: var(--techlo-text-sm); font-weight: var(--techlo-font-medium);
	transition: background var(--techlo-transition-fast), color var(--techlo-transition-fast);
}
.techlo-sidebar-link:hover { background: var(--techlo-color-bg-subtle); color: var(--techlo-color-text); }
.techlo-sidebar-link.is-active { background: var(--techlo-color-primary-soft); color: var(--techlo-color-primary); }
.techlo-sidebar-link .techlo-icon { flex-shrink: 0; }

/* ===================== Accessibility ===================== */

.techlo-sr-only {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.techlo-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: var(--techlo-z-toast);
	background: var(--techlo-color-primary);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 var(--techlo-radius-sm) 0;
	font-size: var(--techlo-text-sm);
	font-weight: var(--techlo-font-semibold);
	text-decoration: none;
}

.techlo-skip-link:focus {
	left: 0;
}

.techlo-ds :is(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--techlo-color-secondary);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.techlo-ds * {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* ===================== Utilities ===================== */

.techlo-scroll-lock { overflow: hidden !important; }

/* ===================== Icon base ===================== */

.techlo-icon { display: inline-block; width: var(--techlo-icon-md); height: var(--techlo-icon-md); flex-shrink: 0; vertical-align: middle; }
.techlo-icon-sm { width: var(--techlo-icon-sm); height: var(--techlo-icon-sm); }
.techlo-icon-lg { width: var(--techlo-icon-lg); height: var(--techlo-icon-lg); }

/* ===================== Auth (Sign In / Sign Up) ===================== */

.techlo-auth-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	box-sizing: border-box;
	padding: var(--techlo-space-12, 48px) var(--techlo-space-4, 16px);
}

.techlo-auth {
	width: 100%;
	max-width: 420px;
	padding: var(--techlo-space-6, 24px);
	background: #fff;
	border: 1px solid var(--techlo-color-border, #E4E7EC);
	border-radius: var(--techlo-radius-lg, 16px);
	box-shadow: 0 4px 24px rgba(16, 24, 40, 0.06);
	box-sizing: border-box;
}

.techlo-auth-form { display: flex; flex-direction: column; }

.techlo-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	margin-bottom: var(--techlo-space-5, 20px);
}

.techlo-auth-remember { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.techlo-auth-submit { width: 100%; justify-content: center; margin-top: 4px; }

.techlo-auth-signed-in { text-align: center; }

.techlo-auth-legal { margin: var(--techlo-space-5, 20px) 0 0; font-size: 12px; text-align: center; color: var(--techlo-color-text-muted, #667085); }

.techlo-auth-actions {
	display: flex;
	gap: var(--techlo-space-3, 12px);
	justify-content: center;
	margin-top: var(--techlo-space-2, 8px);
}

/* Header account icon/trigger (techlo_auth_icon shortcode) */
.techlo-auth-icon-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--techlo-radius-full, 999px);
	background: var(--techlo-color-bg-subtle, #F6F8FA);
	color: var(--techlo-color-primary, #0B1F3A);
	text-decoration: none;
	transition: background var(--techlo-transition-fast);
}
.techlo-auth-icon-trigger:hover { background: var(--techlo-color-secondary-soft); }

.techlo-auth-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--techlo-radius-full, 999px);
	background: var(--techlo-color-secondary, #10B6A3);
	color: #fff;
	font-weight: var(--techlo-font-semibold);
	text-decoration: none;
	font-size: var(--techlo-text-md);
}
.techlo-auth-avatar-sm { width: 28px; height: 28px; font-size: var(--techlo-text-sm); flex-shrink: 0; }

/* Logged-in header pill: avatar + "Dashboard" — no card/box, just a clean pill */
.techlo-auth-dashboard-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--techlo-space-2, 8px);
	padding: 6px 16px 6px 6px;
	border-radius: var(--techlo-radius-full, 999px);
	background: var(--techlo-color-bg-subtle, #F6F8FA);
	color: var(--techlo-color-primary, #0B1F3A);
	text-decoration: none;
	font-size: var(--techlo-text-sm);
	font-weight: var(--techlo-font-semibold);
	transition: background var(--techlo-transition-fast);
}
.techlo-auth-dashboard-pill:hover { background: var(--techlo-color-secondary-soft); }
.techlo-auth-dashboard-pill-avatar { border-radius: 50%; width: 28px; height: 28px; flex-shrink: 0; }
.techlo-auth-dashboard-pill-icon { width: var(--techlo-icon-sm); height: var(--techlo-icon-sm); }

/* Plain (no card) wrapper — used when the full [techlo_auth] shortcode
   only needs to show a single CTA button (already-signed-in fallback),
   not the whole Sign In / Sign Up card. */
.techlo-auth-wrap-plain { padding: var(--techlo-space-6, 24px) var(--techlo-space-4, 16px); }
.techlo-auth-dashboard-cta { display: inline-flex; align-items: center; gap: var(--techlo-space-2, 8px); }

/* ===================== Profile (Avatar, Info, Security, Log Out) ===================== */

.techlo-profile {
	max-width: 560px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.techlo-profile-avatar-row { display: flex; margin-bottom: var(--techlo-space-6, 24px); }

.techlo-profile-avatar-form { display: flex; align-items: center; gap: var(--techlo-space-4, 16px); }

.techlo-profile-avatar-picker {
	position: relative;
	display: inline-flex;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
	overflow: hidden;
}
.techlo-profile-avatar-picker img { width: 100%; height: 100%; object-fit: cover; }
.techlo-profile-avatar-fallback { width: 72px; height: 72px; font-size: var(--techlo-text-xl, 24px); }

.techlo-profile-avatar-edit {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--techlo-color-secondary, #10B6A3);
	color: #fff;
	border: 2px solid #fff;
}
.techlo-profile-avatar-edit .techlo-icon { width: 14px; height: 14px; }

.techlo-profile-avatar-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.techlo-profile-identity { min-width: 0; }
.techlo-profile-name { font-weight: var(--techlo-font-semibold); font-size: var(--techlo-text-lg); color: var(--techlo-color-text); }
.techlo-profile-email { font-size: var(--techlo-text-sm); color: var(--techlo-color-text-muted); word-break: break-all; }

.techlo-profile-form { display: flex; flex-direction: column; max-width: 420px; }

.techlo-profile-logout-row {
	margin-top: var(--techlo-space-8, 32px);
	padding-top: var(--techlo-space-5, 20px);
	border-top: 1px solid var(--techlo-color-border, #E4E7EC);
}
.techlo-profile-logout {
	display: inline-flex;
	align-items: center;
	gap: var(--techlo-space-2, 8px);
	color: var(--techlo-color-danger, #D92D20);
	text-decoration: none;
	font-weight: var(--techlo-font-medium);
	font-size: var(--techlo-text-sm);
}
.techlo-profile-logout:hover { text-decoration: underline; }

@media (max-width: 480px) {
	.techlo-profile-avatar-form { flex-wrap: wrap; }
}

/* ===================== Dashboard (sidebar shell) ===================== */

.techlo-dashboard {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: var(--techlo-space-8, 32px);
	max-width: 1080px;
	margin: 0 auto;
	padding: var(--techlo-space-8, 32px) var(--techlo-space-4, 16px);
	box-sizing: border-box;
}

.techlo-dashboard-sidebar {
	display: flex;
	flex-direction: column;
	gap: 2px;
	position: sticky;
	top: var(--techlo-space-6, 24px);
	align-self: start;
}

.techlo-dashboard-nav-item {
	display: flex;
	align-items: center;
	gap: var(--techlo-space-3, 12px);
	padding: 10px 14px;
	border-radius: var(--techlo-radius-md, 12px);
	color: var(--techlo-color-text-muted, #667085);
	text-decoration: none;
	font-size: var(--techlo-text-sm);
	font-weight: var(--techlo-font-medium);
	transition: background var(--techlo-transition-fast), color var(--techlo-transition-fast);
}
.techlo-dashboard-nav-item .techlo-icon { width: var(--techlo-icon-sm); height: var(--techlo-icon-sm); }
.techlo-dashboard-nav-item:hover { background: var(--techlo-color-bg-subtle, #F6F8FA); color: var(--techlo-color-text, #1D2939); }
.techlo-dashboard-nav-item.is-active {
	background: var(--techlo-color-secondary-soft);
	color: var(--techlo-color-primary, #0B1F3A);
	font-weight: var(--techlo-font-semibold);
}

.techlo-dashboard-content { min-width: 0; }

.techlo-dashboard-greeting { margin: 0 0 4px; font-size: var(--techlo-text-xl, 22px); color: var(--techlo-color-text); }
.techlo-dashboard-subtitle { margin: 0 0 var(--techlo-space-6, 24px); color: var(--techlo-color-text-muted); }

.techlo-dashboard-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: var(--techlo-space-4, 16px);
}

.techlo-dashboard-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--techlo-space-2, 8px);
	padding: var(--techlo-space-5, 20px);
	border: 1px solid var(--techlo-color-border, #E4E7EC);
	border-radius: var(--techlo-radius-lg, 16px);
	text-decoration: none;
	color: var(--techlo-color-text);
	text-align: center;
	transition: border-color var(--techlo-transition-fast), transform var(--techlo-transition-fast);
}
.techlo-dashboard-card:hover { border-color: var(--techlo-color-secondary, #10B6A3); transform: translateY(-2px); }
.techlo-dashboard-card-icon { color: var(--techlo-color-secondary, #10B6A3); }
.techlo-dashboard-card-thumb { width: 48px; height: 48px; border-radius: var(--techlo-radius-md, 12px); object-fit: cover; }
.techlo-dashboard-card-label { font-size: var(--techlo-text-sm); font-weight: var(--techlo-font-medium); }
.techlo-dashboard-seller-panel { margin-bottom: var(--techlo-space-6, 24px); }

/* Donate CTA (shown at the bottom of Courses/Services/Ebooks/Scholarships) */
.techlo-donate-cta { margin-top: var(--techlo-space-6, 24px); }

/* Donate tab: one block per configured GiveWP fund */
.techlo-donate-fund {
	padding: var(--techlo-space-5, 20px);
	border: 1px solid var(--techlo-color-border, #E4E7EC);
	border-radius: var(--techlo-radius-lg, 16px);
	margin-bottom: var(--techlo-space-5, 20px);
}
.techlo-donate-fund h3 { margin: 0 0 var(--techlo-space-3, 12px); }
.techlo-donate-fund.is-highlighted { border-color: var(--techlo-color-secondary, #10B6A3); box-shadow: 0 0 0 3px var(--techlo-color-secondary-soft); }

@media (max-width: 720px) {
	.techlo-dashboard { grid-template-columns: 1fr; }
	.techlo-dashboard-sidebar {
		position: static;
		flex-direction: row;
		overflow-x: auto;
		gap: var(--techlo-space-2, 8px);
		padding-bottom: var(--techlo-space-2, 8px);
		border-bottom: 1px solid var(--techlo-color-border, #E4E7EC);
	}
	.techlo-dashboard-nav-item { flex-shrink: 0; }
}

@media (max-width: 480px) {
	.techlo-auth-wrap { padding: var(--techlo-space-6, 24px) var(--techlo-space-3, 12px); }
	.techlo-auth { padding: var(--techlo-space-4, 16px); border-radius: var(--techlo-radius-md, 12px); }
}

/* ===================== Social Login (Google/Facebook) ===================== */

.techlo-social-login { margin-top: var(--techlo-space-5, 20px); }

.techlo-social-divider {
	display: flex;
	align-items: center;
	text-align: center;
	color: var(--techlo-color-text-muted, #667085);
	font-size: 12px;
	margin: var(--techlo-space-5, 20px) 0;
}
.techlo-social-divider::before,
.techlo-social-divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid var(--techlo-color-border, #E4E7EC);
}
.techlo-social-divider span { padding: 0 var(--techlo-space-3, 12px); }

.techlo-social-buttons { display: flex; flex-direction: column; gap: var(--techlo-space-3, 12px); }

.techlo-social-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--techlo-space-2, 8px);
	padding: 11px 16px;
	border: 1.5px solid var(--techlo-color-border, #E4E7EC);
	border-radius: var(--techlo-radius-md, 12px);
	text-decoration: none;
	color: var(--techlo-color-text, #1D2939);
	font-weight: var(--techlo-font-medium);
	font-size: var(--techlo-text-sm);
	transition: border-color var(--techlo-transition-fast), background var(--techlo-transition-fast);
}
.techlo-social-btn:hover { background: var(--techlo-color-bg-subtle, #F6F8FA); }
.techlo-social-icon { display: inline-flex; }
