:root {
	--hq-indigo: #4f46e5;
	--hq-purple: #7c3aed;
	--hq-blue: #2563eb;
	--hq-green: #16a34a;
	--hq-red: #dc2626;
	--hq-amber: #d97706;
	--hq-text: #1f2937;
	--hq-muted: #6b7280;
	--hq-line: #e5e7eb;
	--hq-surface: rgba(255, 255, 255, 0.96);
	--hq-shadow: 0 18px 44px -22px rgba(31, 41, 55, 0.35);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f8fafc; }
body {
	margin: 0;
	min-height: 100%;
	background: #f8fafc;
	color: var(--hq-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.hq-container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.hq-header {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, var(--hq-indigo), var(--hq-purple));
	color: #fff;
	box-shadow: 0 18px 40px -26px rgba(49, 46, 129, 0.8);
}
.hq-header::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 85% 10%, rgba(255,255,255,.17), transparent 30%);
	pointer-events: none;
}
.hq-header__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 120px;
	padding-block: 24px;
}
.hq-brand { display: flex; gap: 16px; align-items: center; }
.hq-brand__icon {
	display: grid;
	width: 54px;
	height: 54px;
	place-items: center;
	border-radius: 18px;
	background: rgba(255,255,255,.17);
	box-shadow: 0 0 26px rgba(255,255,255,.18);
	font-size: 28px;
}
.hq-brand__title { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -.03em; }
.hq-brand__subtitle { opacity: .88; font-size: 14px; font-weight: 600; }
.hq-header__meta { display: flex; align-items: center; gap: 12px; }
.hq-welcome { display: grid; text-align: right; }
.hq-welcome span { font-size: 13px; opacity: .86; }
.hq-welcome strong { font-size: 16px; }
.hq-icon-button, .hq-logout {
	display: inline-grid;
	min-height: 44px;
	place-items: center;
	border: 0;
	border-radius: 13px;
	background: rgba(255,255,255,.16);
	color: #fff;
	cursor: pointer;
	text-decoration: none;
}
.hq-icon-button { width: 44px; font-size: 25px; font-weight: 700; }
.hq-logout { padding: 0 14px; font-size: 13px; font-weight: 700; }
.hq-access-label {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	padding: 0 12px;
	border-radius: 999px;
	background: rgba(255,255,255,.16);
	font-size: 12px;
	font-weight: 800;
}
.hq-icon-button:hover, .hq-logout:hover { background: rgba(255,255,255,.26); color: #fff; }
.hq-connection {
	position: absolute;
	top: 18px;
	right: 0;
	width: 12px;
	height: 12px;
	border: 2px solid rgba(255,255,255,.75);
	border-radius: 50%;
	background: #f59e0b;
}
.hq-connection.is-ok { background: #22c55e; }
.hq-connection.is-bad { background: #ef4444; }

.hq-nav { padding-block: 16px; }
.hq-nav__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	padding: 8px;
	border: 1px solid rgba(255,255,255,.7);
	border-radius: 18px;
	background: var(--hq-surface);
	box-shadow: var(--hq-shadow);
}
.hq-nav__item {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 46px;
	padding: 10px 22px;
	border: 2px solid transparent;
	border-radius: 13px;
	color: var(--hq-muted);
	font-weight: 800;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.hq-nav__item:hover { background: #f3f4f6; color: #374151; transform: translateY(-1px); }
.hq-nav__item.is-active {
	background: linear-gradient(135deg, var(--hq-indigo), var(--hq-purple));
	color: #fff;
	box-shadow: 0 10px 24px -13px rgba(79,70,229,.8);
}
.hq-nav__dropdown { position: relative; }
.hq-nav__dropdown > summary { list-style: none; cursor: pointer; }
.hq-nav__dropdown > summary::-webkit-details-marker { display: none; }
.hq-nav__dropdown.is-active > summary,
.hq-nav__dropdown[open] > summary {
	background: linear-gradient(135deg, var(--hq-indigo), var(--hq-purple));
	color: #fff;
	box-shadow: 0 10px 24px -13px rgba(79,70,229,.8);
}
.hq-nav__chevron { margin-left: 2px; font-size: 14px; transition: transform .18s ease; }
.hq-nav__dropdown[open] .hq-nav__chevron { transform: rotate(180deg); }
.hq-nav__submenu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	right: 0;
	min-width: 225px;
	padding: 8px;
	border: 1px solid var(--hq-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 22px 46px -18px rgba(15,23,42,.45);
}
.hq-nav__submenu a {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 11px 12px;
	border-radius: 10px;
	color: #475569;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}
.hq-nav__submenu a:hover, .hq-nav__submenu a.is-active { background: #eef2ff; color: #4338ca; }

.hq-main { padding-block: 32px 56px; }
.hq-body--selector {
	background:
		radial-gradient(circle at 15% 20%, rgba(99,102,241,.12), transparent 28%),
		radial-gradient(circle at 88% 75%, rgba(147,51,234,.1), transparent 30%),
		#f8fafc;
}
.hq-body--selector .hq-header__inner { min-height: 94px; }
.hq-body--selector .hq-main { width: min(920px, calc(100% - 32px)); padding-block: 42px 64px; }
.hq-selector {
	padding: clamp(24px, 5vw, 44px);
	border: 1px solid rgba(226,232,240,.9);
	border-radius: 28px;
	background: rgba(255,255,255,.96);
	box-shadow: 0 28px 70px -38px rgba(30,41,59,.55);
}
.hq-selector__head { max-width: 620px; margin: 0 auto 30px; text-align: center; }
.hq-selector__icon {
	display: grid;
	width: 70px;
	height: 70px;
	margin: 0 auto 15px;
	place-items: center;
	border-radius: 22px;
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	box-shadow: 0 18px 30px -18px #4338ca;
	font-size: 34px;
}
.hq-selector__head h1 { margin: 0 0 8px; font-size: clamp(28px, 5vw, 40px); letter-spacing: -.035em; }
.hq-selector__head p { margin: 0; color: var(--hq-muted); }
.hq-selector__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hq-group-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 13px;
	align-items: center;
	min-height: 78px;
	padding: 13px 15px;
	border: 1px solid #dbe4f0;
	border-radius: 16px;
	background: #fff;
	color: var(--hq-text);
	cursor: pointer;
	text-align: left;
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.hq-group-card:hover, .hq-group-card:focus-visible {
	border-color: #818cf8;
	outline: 0;
	box-shadow: 0 14px 28px -22px #3730a3;
	transform: translateY(-1px);
}
.hq-group-card:disabled { cursor: wait; opacity: .55; transform: none; }
.hq-group-card__icon {
	display: grid;
	width: 46px;
	height: 46px;
	place-items: center;
	border-radius: 14px;
	background: #eef2ff;
	font-size: 23px;
}
.hq-group-card strong, .hq-group-card small { display: block; }
.hq-group-card strong { font-size: 15px; }
.hq-group-card small { margin-top: 2px; color: var(--hq-muted); font-size: 12px; }
.hq-group-card__arrow { color: #94a3b8; font-size: 27px; line-height: 1; }
.hq-group-card--admin {
	grid-column: 1 / -1;
	border-color: #c7d2fe;
	background: linear-gradient(135deg, #eef2ff, #faf5ff);
}
.hq-group-card--admin .hq-group-card__icon { background: #4338ca; }
.hq-selector__note { margin: 22px 0 0; color: var(--hq-muted); font-size: 13px; text-align: center; }
.hq-page-heading { margin: 0 auto 30px; text-align: center; }
.hq-page-heading h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 42px); letter-spacing: -.035em; }
.hq-page-heading p { margin: 0; color: var(--hq-muted); font-size: 17px; }
.hq-section-title { margin: 34px 0 18px; text-align: center; font-size: 23px; }

.hq-panel,
.hq-card {
	border: 1px solid rgba(226,232,240,.9);
	background: var(--hq-surface);
	box-shadow: var(--hq-shadow);
}
.hq-panel { padding: clamp(20px, 4vw, 34px); border-radius: 24px; }
.hq-card { padding: 24px; border-radius: 20px; }
.hq-card--metric { text-align: center; }
.hq-card--metric .hq-card__icon {
	display: grid;
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	place-items: center;
	border-radius: 20px;
	background: var(--card-gradient, linear-gradient(135deg, #3b82f6, #2563eb));
	font-size: 30px;
}
.hq-card--metric small { display: block; color: var(--hq-muted); font-weight: 700; }
.hq-card--metric strong { display: block; margin-top: 4px; font-size: 34px; line-height: 1.1; }
.hq-card--metric h3 { margin: 0 0 4px; font-size: 22px; }
.hq-card--metric p { margin: 8px 0 0; color: var(--hq-muted); }
.hq-card--reward { border-left: 4px solid var(--reward-color, var(--hq-blue)); }
.hq-card--reward strong { color: var(--reward-color, var(--hq-blue)); font-size: 20px; overflow-wrap: anywhere; }

.hq-grid { display: grid; gap: 20px; }
.hq-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hq-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hq-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hq-grid--sidebar { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.hq-mb { margin-bottom: 26px; }

.hq-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
}
.hq-panel__head h2, .hq-panel h2, .hq-panel h3 { margin-top: 0; }
.hq-panel__head h2 { margin-bottom: 2px; font-size: 24px; }
.hq-panel__head p { margin: 0; color: var(--hq-muted); font-size: 14px; }
.hq-filter {
	margin-bottom: 22px;
	padding: 20px;
	border-radius: 18px;
	background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}
.hq-filter h3 { margin: 0 0 16px; font-size: 18px; }
.hq-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hq-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hq-field { display: grid; gap: 7px; }
.hq-field--full { grid-column: 1 / -1; }
.hq-field label { color: #374151; font-size: 14px; font-weight: 750; }
.hq-field input, .hq-field select, .hq-field textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 13px;
	border: 2px solid #d1d5db;
	border-radius: 12px;
	background: #fff;
	color: var(--hq-text);
}
.hq-field textarea { min-height: 110px; resize: vertical; }
.hq-field input:focus, .hq-field select:focus, .hq-field textarea:focus {
	border-color: #6366f1;
	outline: 3px solid rgba(99,102,241,.14);
}
.hq-field .hq-other-input { margin-top: 7px; }
.hq-form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hq-line); }
.hq-mode { display: none; margin-top: 18px; padding: 20px; border-radius: 16px; }
.hq-mode.is-active { display: block; animation: hq-fade .25s ease-out; }
.hq-mode--adiyah { background: #ecfdf5; }
.hq-mode--juziyah { background: #f0f9ff; }
.hq-mode--taraqumiyah { background: #f5f3ff; }
.hq-mode h3 { margin: 0 0 14px; }

.hq-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 17px;
	border: 0;
	border-radius: 13px;
	background: #e5e7eb;
	color: #374151;
	cursor: pointer;
	font-weight: 800;
	text-decoration: none;
	transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.hq-button:hover { color: inherit; filter: brightness(.97); transform: translateY(-1px); }
.hq-button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.hq-button--primary { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.hq-button--success { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
.hq-button--danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.hq-button--muted { background: linear-gradient(135deg, #6b7280, #4b5563); color: #fff; }
.hq-button--small { min-height: 35px; padding: 7px 10px; border-radius: 10px; font-size: 12px; }

.hq-table-wrap { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 8px 25px -22px #111827; }
.hq-table { width: 100%; min-width: 850px; border-collapse: collapse; }
.hq-table th, .hq-table td { padding: 13px 14px; border-bottom: 1px solid #eef2f7; vertical-align: middle; text-align: left; }
.hq-table th { color: #374151; font-size: 13px; white-space: nowrap; }
.hq-table tbody tr:hover { background: linear-gradient(90deg, #eff6ff, #faf5ff); }
.hq-table--rekap thead { background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff; }
.hq-table--rekap th { color: #fff; text-align: center; }
.hq-table--rekap td { text-align: center; }
.hq-table--rekap td:nth-child(2) { text-align: left; font-weight: 800; }
.hq-table__actions { display: flex; gap: 7px; }
.hq-hafalan-cell { min-width: 260px; }
.hq-hafalan-cell strong, .hq-hafalan-cell small, .hq-hafalan-cell span { display: block; }
.hq-hafalan-cell small { margin-top: 3px; color: #4338ca; font-weight: 750; }
.hq-hafalan-cell span {
	max-width: 420px;
	margin-top: 5px;
	overflow: hidden;
	color: var(--hq-muted);
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.hq-empty { padding: 34px !important; color: var(--hq-muted); text-align: center !important; }
.hq-badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #e0e7ff; color: #4338ca; font-size: 12px; font-weight: 800; }
.hq-badge--success { background: #dcfce7; color: #166534; }
.hq-badge--warning { background: #fef3c7; color: #92400e; }
.hq-score {
	display: inline-grid;
	min-width: 54px;
	min-height: 42px;
	place-items: center;
	border-radius: 12px;
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	color: #fff;
	font-size: 17px;
	font-weight: 900;
}

.hq-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; }
.hq-pagination { display: flex; align-items: center; gap: 8px; }
.hq-page-button {
	min-width: 36px;
	height: 36px;
	border: 0;
	border-radius: 10px;
	background: #e5e7eb;
	font-weight: 800;
	cursor: pointer;
}
.hq-page-button.is-active { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.hq-muted { color: var(--hq-muted); font-size: 14px; }
.hq-history { display: grid; gap: 12px; }
.hq-history__item { padding: 14px; border-left: 4px solid #6366f1; border-radius: 12px; background: #f8fafc; }
.hq-history__item strong, .hq-history__item small { display: block; }
.hq-history__item small { margin-top: 4px; color: var(--hq-muted); }

.hq-modal, .hq-loading { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 20px; }
.hq-modal__backdrop, .hq-loading::before { position: absolute; inset: 0; content: ""; background: rgba(15,23,42,.64); backdrop-filter: blur(3px); }
.hq-modal__dialog, .hq-loading__card {
	position: relative;
	z-index: 1;
	width: min(580px, 100%);
	max-height: 90vh;
	overflow: auto;
	padding: 28px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 30px 80px -30px #000;
	text-align: center;
}
.hq-modal__dialog--wide { width: min(780px, 100%); }
.hq-modal__close { position: absolute; top: 10px; right: 14px; border: 0; background: transparent; color: #6b7280; cursor: pointer; font-size: 30px; }
.hq-modal__icon { font-size: 44px; }
.hq-modal h2 { margin: 8px 0 12px; }
.hq-modal__actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
.hq-loading__card { display: flex; width: auto; align-items: center; gap: 14px; padding: 22px 26px; }
.hq-spinner { width: 34px; height: 34px; border: 4px solid #dbeafe; border-top-color: #2563eb; border-radius: 50%; animation: hq-spin .8s linear infinite; }
.hq-notice { padding: 12px 14px; border-radius: 12px; background: #eff6ff; color: #1e40af; font-size: 14px; }
.hq-error { background: #fef2f2; color: #991b1b; }
.hq-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; text-align: left; }
.hq-detail-stat { padding: 14px; border-radius: 14px; background: #f8fafc; }
.hq-detail-stat span { display: block; color: var(--hq-muted); font-size: 12px; }
.hq-detail-stat strong { font-size: 20px; }
.hq-hafalan-editor {
	margin: 4px 0 0;
	padding: 18px;
	border: 1px solid #c7d2fe;
	border-radius: 16px;
	background: #f8fafc;
}
.hq-hafalan-editor legend { padding: 0 8px; color: #3730a3; font-weight: 850; }
.hq-hafalan-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.hq-hafalan-summary div { padding: 12px; border-radius: 12px; background: #eef2ff; text-align: center; }
.hq-hafalan-summary span, .hq-hafalan-summary strong { display: block; }
.hq-hafalan-summary span { color: var(--hq-muted); font-size: 11px; }
.hq-hafalan-summary strong { margin-top: 2px; color: #3730a3; font-size: 18px; }
.hq-hafalan-block + .hq-hafalan-block { margin-top: 18px; padding-top: 17px; border-top: 1px solid #e2e8f0; }
.hq-hafalan-block > p, .hq-hafalan-block__head p { margin: 3px 0 10px; color: var(--hq-muted); font-size: 12px; }
.hq-hafalan-block__head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.hq-juz-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.hq-juz-chip { cursor: pointer; }
.hq-juz-chip input { position: absolute; opacity: 0; pointer-events: none; }
.hq-juz-chip span {
	display: block;
	padding: 7px 5px;
	border: 1px solid #cbd5e1;
	border-radius: 9px;
	background: #fff;
	color: #475569;
	font-size: 12px;
	font-weight: 750;
	text-align: center;
}
.hq-juz-chip input:focus-visible + span { outline: 3px solid rgba(99,102,241,.25); }
.hq-juz-chip input:checked + span { border-color: #4f46e5; background: #4f46e5; color: #fff; }
.hq-partial-list { display: grid; gap: 8px; }
.hq-partial-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) auto; gap: 8px; }
.hq-partial-row select, .hq-partial-row input {
	min-height: 42px;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #fff;
}
.hq-inline-error { min-height: 20px; margin: 12px 0 0; color: #b91c1c; font-size: 13px; font-weight: 750; }
.hq-clear-legacy { display: block; margin-top: 8px; color: #1e40af; font-weight: 750; }
.hq-test-options {
	display: grid;
	gap: 10px;
	margin-top: 20px;
	padding: 18px;
	border: 1px solid #dbe4f0;
	border-radius: 18px;
	background: #f8fafc;
}
.hq-test-options__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e2e8f0;
}
.hq-test-options__head span { color: var(--hq-muted); font-size: 13px; }
.hq-test-options__empty { padding: 22px; color: var(--hq-muted); text-align: center; }
.hq-test-row {
	display: grid;
	grid-template-columns: minmax(180px, .8fr) minmax(130px, .5fr) minmax(220px, 1.2fr);
	gap: 14px;
	align-items: end;
	padding: 14px;
	border: 1px solid #dbe4f0;
	border-radius: 14px;
	background: #fff;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.hq-test-row.is-selected { border-color: #6366f1; box-shadow: 0 10px 25px -22px #312e81; }
.hq-test-row__select { display: flex; align-items: center; gap: 12px; min-height: 46px; cursor: pointer; }
.hq-test-row__select input { width: 20px; height: 20px; accent-color: #4f46e5; }
.hq-test-row__select strong, .hq-test-row__select small { display: block; }
.hq-test-row__select small { margin-top: 2px; color: var(--hq-muted); font-size: 12px; }
.hq-option-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #fffbeb;
	color: #92400e;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}
.hq-option-toggle input { width: 19px; height: 19px; accent-color: #d97706; }
.hq-table--tes td:nth-child(3) { text-align: left; }
.hq-table--tes td:last-child { min-width: 180px; text-align: left; }

@keyframes hq-spin { to { transform: rotate(360deg); } }
@keyframes hq-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

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

@media (max-width: 720px) {
	.hq-container { width: min(100% - 20px, 1180px); }
	.hq-header__inner { min-height: 106px; }
	.hq-brand__icon { width: 46px; height: 46px; border-radius: 15px; }
	.hq-welcome { display: none; }
	.hq-header__meta { gap: 7px; }
	.hq-access-label { max-width: 145px; overflow: hidden; padding-inline: 9px; text-overflow: ellipsis; white-space: nowrap; }
	.hq-logout { min-height: 40px; padding-inline: 10px; }
	.hq-icon-button { width: 40px; min-height: 40px; }
	.hq-nav__inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
	.hq-nav__item { min-width: 0; padding: 10px; justify-content: center; }
	.hq-nav__item span:last-child { display: none; }
	.hq-nav__dropdown { min-width: 0; }
	.hq-nav__dropdown > .hq-nav__item { width: 100%; }
	.hq-nav__dropdown > .hq-nav__item span:nth-child(2), .hq-nav__chevron { display: none; }
	.hq-nav__submenu { position: fixed; top: auto; right: 10px; left: 10px; margin-top: 7px; }
	.hq-main { padding-top: 20px; }
	.hq-grid--3 { grid-template-columns: 1fr; }
	.hq-form-grid, .hq-form-grid--2 { grid-template-columns: 1fr; }
	.hq-panel__head, .hq-toolbar { align-items: stretch; flex-direction: column; }
	.hq-form-actions { flex-direction: column-reverse; }
	.hq-button { width: 100%; }
	.hq-table__actions .hq-button { width: auto; }
	.hq-pagination { flex-wrap: wrap; }
	.hq-juz-grid { grid-template-columns: repeat(5, 1fr); }
	.hq-hafalan-block__head { align-items: stretch; flex-direction: column; }
	.hq-hafalan-block__head .hq-button { width: 100%; }
	.hq-test-row { grid-template-columns: 1fr 1fr; }
	.hq-test-row__select { grid-column: 1 / -1; }
	.hq-selector__grid { grid-template-columns: 1fr; }
	.hq-group-card--admin { grid-column: auto; }
}

@media (max-width: 460px) {
	.hq-grid--4, .hq-grid--2 { grid-template-columns: 1fr; }
	.hq-brand__title { font-size: 23px; }
	.hq-brand__subtitle { font-size: 12px; }
	.hq-page-heading p { font-size: 15px; }
	.hq-card, .hq-panel { padding: 18px; border-radius: 18px; }
	.hq-detail-grid { grid-template-columns: 1fr; }
	.hq-hafalan-summary { grid-template-columns: 1fr; }
	.hq-juz-grid { grid-template-columns: repeat(3, 1fr); }
	.hq-partial-row { grid-template-columns: 1fr; }
	.hq-partial-row .hq-button { width: 100%; }
	.hq-test-row { grid-template-columns: 1fr; }
	.hq-test-row__select { grid-column: auto; }
	.hq-test-options__head { align-items: start; flex-direction: column; }
	.hq-header__inner { flex-wrap: wrap; gap: 12px; }
	.hq-header__meta { width: 100%; justify-content: flex-end; }
	.hq-access-label { max-width: calc(100% - 104px); }
	.hq-body--selector .hq-header__inner { min-height: 88px; }
	.hq-body--selector .hq-main { width: min(100% - 20px, 920px); padding-top: 22px; }
	.hq-selector { padding: 20px 14px; border-radius: 20px; }
}

@media print {
	.hq-header, .hq-nav, .hq-page-heading, .hq-filter, .hq-panel__head .hq-button, .hq-logout, .hq-access-label, .hq-modal, .hq-loading { display: none !important; }
	body { background: #fff; }
	.hq-container { width: 100%; }
	.hq-main { padding: 0; }
	.hq-panel { padding: 0; border: 0; box-shadow: none; }
	.hq-table-wrap { overflow: visible; box-shadow: none; }
	.hq-table { min-width: 0; font-size: 9px; }
	.hq-table th, .hq-table td { padding: 5px; }
}
