.had-shell{--had-bg:#fff;--had-border:#dcdcde;--had-muted:#646970;--had-accent:#2271b1;--had-good:#00a32a;--had-warn:#dba617;--had-bad:#d63638;--had-radius:10px}
.had{font-size:14px}
.had *{box-sizing:border-box}
.hustoj-ai-dashboard.hustoj-platform-page{width:min(var(--hustoj-shell-width,1120px),calc(100% - (var(--hustoj-shell-padding-x,1rem)*2)));max-width:var(--hustoj-shell-width,1120px);margin-inline:auto}
.had-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px}
.had-card{grid-column:span 12;background:var(--had-bg);border:1px solid var(--had-border);border-radius:var(--had-radius);padding:12px}
.had-card__title{margin:0 0 8px;font-size:14px;font-weight:700}
.had-kpi{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.had-kpi__label{color:var(--had-muted);font-size:12px}
.had-kpi__value{font-size:22px;font-weight:800;line-height:1}
.had-kpi__sub{color:var(--had-muted);font-size:12px}
.had-row{display:flex;align-items:center;justify-content:space-between;gap:10px}
.had-badge{display:inline-block;padding:2px 8px;border-radius:999px;border:1px solid var(--had-border);background:#f6f7f7;font-size:12px}
.had-badge--good{border-color:#b8e6c1;background:#ecf7ee;color:#0a5d1e}
.had-badge--warn{border-color:#f2dfa4;background:#fff7e6;color:#7a4d00}
.had-badge--bad{border-color:#f1b7b7;background:#fff0f0;color:#7a0000}
.had-muted{color:var(--had-muted)}
.had-progress{height:10px;background:#f0f0f1;border-radius:999px;overflow:hidden;border:1px solid var(--had-border)}
.had-progress>span{display:block;height:100%;background:var(--had-accent)}
.had-bars{display:flex;flex-direction:column;gap:8px}
.had-bar{display:grid;grid-template-columns:160px 1fr 48px;gap:10px;align-items:center}
.had-bar__label{font-size:12px;color:var(--had-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.had-bar__track{height:10px;background:#f0f0f1;border-radius:999px;overflow:hidden;border:1px solid var(--had-border)}
.had-bar__fill{height:100%;background:var(--had-accent)}
.had-bar__value{text-align:right;font-size:12px;color:var(--had-muted)}
.had-table{width:100%;border-collapse:collapse}
.had-table th,.had-table td{border-bottom:1px solid var(--had-border);padding:8px 6px;vertical-align:top}
.had-table th{font-size:12px;color:var(--had-muted);text-align:left}
.had-pill{display:inline-block;padding:3px 10px;border-radius:999px;background:#f0f6fc;border:1px solid #c5d9ed;color:#0a4b78;font-size:12px}
.had-list{margin:0;padding-left:18px}
.had-list li{margin:4px 0}
.had-donut{--p:0;--c:var(--had-accent);width:88px;height:88px;border-radius:50%;background:conic-gradient(var(--c) calc(var(--p)*1%), #f0f0f1 0);display:grid;place-items:center;border:1px solid var(--had-border)}
.had-donut__inner{width:62px;height:62px;border-radius:50%;background:#fff;border:1px solid var(--had-border);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.had-donut__num{font-weight:800;font-size:16px;line-height:1}
.had-donut__txt{font-size:11px;color:var(--had-muted);line-height:1}
.hustoj-ai-level-panel{background:#fff;border:1px solid #dcdcde;border-radius:10px;padding:14px;color:#1d2327}
.hustoj-ai-level-panel__header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}
.hustoj-ai-level-panel__title{margin:0 0 4px;font-size:16px;font-weight:800}
.hustoj-ai-level-panel__meta{margin:0;color:#646970;font-size:12px}
.hustoj-ai-level-panel__level{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.had-level-badge{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:4px 10px;border-radius:999px;border:1px solid #dcdcde;background:#f6f7f7;font-size:12px;font-weight:700;white-space:nowrap}
.had-level-badge--good{border-color:#b8e6c1;background:#ecf7ee;color:#0a5d1e}
.had-level-badge--warn{border-color:#f2dfa4;background:#fff7e6;color:#7a4d00}
.had-level-badge--bad{border-color:#f1b7b7;background:#fff0f0;color:#7a0000}
.had-level-badge--muted{border-color:#dcdcde;background:#f6f7f7;color:#50575e}
.hustoj-ai-level-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.hustoj-ai-level-kpi{border:1px solid #dcdcde;border-radius:8px;padding:10px;background:#fbfbfc;min-width:0}
.hustoj-ai-level-kpi__label{font-size:12px;color:#646970}
.hustoj-ai-level-kpi__value{margin-top:4px;font-size:24px;font-weight:800;line-height:1.05}
.hustoj-ai-level-kpi__sub{margin-top:4px;font-size:12px;color:#646970;overflow-wrap:anywhere}
.hustoj-ai-level-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.hustoj-ai-level-section{border:1px solid #dcdcde;border-radius:8px;padding:12px;background:#fff;min-width:0}
.hustoj-ai-level-section h4{margin:0 0 10px;font-size:13px;font-weight:800}
.hustoj-ai-level-bars{display:grid;gap:9px}
.hustoj-ai-level-bar__top{display:flex;justify-content:space-between;gap:10px;font-size:12px}
.hustoj-ai-level-bar__track{height:9px;background:#f0f0f1;border:1px solid #dcdcde;border-radius:999px;overflow:hidden}
.hustoj-ai-level-bar__track span{display:block;height:100%;background:#2271b1}
.hustoj-ai-level-table{width:100%;border-collapse:collapse}
.hustoj-ai-level-table th,.hustoj-ai-level-table td{border-bottom:1px solid #dcdcde;padding:7px 5px;text-align:left;font-size:12px}
.hustoj-ai-level-table th{color:#646970;font-weight:700}
.hustoj-ai-level-list{margin:0;padding-left:18px}
.hustoj-ai-level-list li{margin:4px 0}
.hustoj-ai-level-muted{margin:0;color:#646970;font-size:12px}

/* Form controls */
.had-shell .had-card input[type="text"],
.had-shell .had-card input[type="number"],
.had-shell .had-card select,
.had-shell .had-card textarea{width:100%;max-width:100%}
.had-shell .had-card label{display:block}

@media (min-width: 900px){
  .had-card--span12{grid-column:span 12}
  .had-card--span8{grid-column:span 8}
  .had-card--span6{grid-column:span 6}
  .had-card--span4{grid-column:span 4}
  .had-card--span3{grid-column:span 3}
  .had-card--span2{grid-column:span 2}
}
/* Student frontend: align with hustoj-platform visual system */
body:not(.wp-admin) .hustoj-ai-dashboard--student {
	font-family: var(--hustoj-font-sans, 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif);
	color: var(--hustoj-text, #172033);
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-stat-card {
	padding: 1.1rem 1rem;
	min-height: 100%;
}
body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-stat-split {
	min-width: 0;
	flex-wrap: wrap;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-stat-main {
	flex: 1 1 9rem;
	min-width: 0;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-stat-label {
	font-size: .82rem;
	font-weight: 700;
	color: var(--hustoj-text-muted, #667085);
	letter-spacing: .02em;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-stat-value {
	margin-top: .4rem;
	font-size: clamp(1.55rem, 2.5vw, 2rem);
	font-weight: 800;
	line-height: 1.1;
	color: var(--hustoj-text, #172033);
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-donut {
	--hustoj-ai-color: var(--hustoj-primary, #0d6efd);
	width: clamp(3.85rem, 10vw, 4.75rem);
	height: clamp(3.85rem, 10vw, 4.75rem);
	border-radius: 999px;
	background: conic-gradient(var(--hustoj-ai-color) calc(var(--hustoj-ai-pct, 0) * 1%), #e9eef5 0);
	display: grid;
	place-items: center;
	flex: 0 0 auto;
}


body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-donut span {
	display: grid;
	place-items: center;
	width: clamp(2.8rem, 7vw, 3.35rem);
	height: clamp(2.8rem, 7vw, 3.35rem);
	border-radius: 999px;
	background: #fff;
	font-weight: 800;
	font-size: .95rem;
	color: var(--hustoj-text, #172033);
	box-shadow: inset 0 0 0 1px var(--hustoj-border, #dbe3ef);
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-result-list {
	display: grid;
	gap: .8rem;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-result-row {
	display: grid;
	grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr) minmax(2.5rem, auto);
	gap: .75rem;
	align-items: center;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-result-label {
	min-width: 0;
	font-size: .9rem;
	font-weight: 600;
	color: var(--hustoj-text, #172033);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-result-count {
	font-size: .9rem;
	font-weight: 700;
	color: var(--hustoj-text-muted, #667085);
	text-align: right;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-progress {
	height: .85rem;
	border-radius: 999px;
	background: #e9eef5;
	overflow: hidden;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-progress .progress-bar {
	background: var(--hustoj-primary, #0d6efd);
	border-radius: inherit;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-progress-cell {
	min-width: 11rem;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-list {
	padding-left: 1.15rem;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-list li + li {
	margin-top: .5rem;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-pill-warning {
	background: #fff7e6;
	border-color: #ffd98a;
	color: #8a5a00;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-problem-list {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem;
}

body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-problem-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

@media (max-width: 1199.98px) {
	body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-stat-split {
		align-items: flex-start;
	}

	body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-donut {
		margin-left: auto;
	}
}
@media (max-width: 767.98px) {
	.hustoj-ai-level-panel__header {
		display:block;
	}

	.hustoj-ai-level-panel__level {
		justify-content:flex-start;
		margin-top:10px;
	}

	.hustoj-ai-level-kpis,
	.hustoj-ai-level-grid {
		grid-template-columns:1fr;
	}

	body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-result-row {
		grid-template-columns: 1fr;
		gap: .45rem;
	}

	body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-result-count {
		text-align: left;
	}

	body:not(.wp-admin) .hustoj-ai-dashboard--student .hustoj-ai-progress-cell {
		min-width: 0;
	}
}
