/*
Theme Name: کلاس‌یار
Theme URI: https://example.com/kelasyar
Author: Claude
Description: قالب فارسی و راست‌چین برای دبیرها: ثبت‌نام آنلاین دانش‌آموزان در کلاس‌ها، تأیید ثبت‌نام توسط دبیر، و پنل دانش‌آموزی با جزوه و فایل‌های هر جلسه.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kelasyar
Tags: rtl-language-support, education, custom-logo, custom-colors
*/

@font-face { font-family: "Vazirmatn"; src: url("assets/fonts/Vazirmatn-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("assets/fonts/Vazirmatn-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("assets/fonts/Vazirmatn-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("assets/fonts/Vazirmatn-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
	--primary: #2F5BEA;
	--accent: #FFB938;
	--primary-soft: color-mix(in srgb, var(--primary) 10%, #fff);
	--primary-dark: color-mix(in srgb, var(--primary) 80%, #000);
	--accent-soft: color-mix(in srgb, var(--accent) 22%, #fff);
	--bg: #F5F6FA;
	--surface: #FFFFFF;
	--text: #161A2B;
	--muted: #5E6478;
	--border: #E3E6EF;
	--success: #12875A;
	--success-soft: #E3F5EC;
	--warning: #A86400;
	--warning-soft: #FFF3D9;
	--danger: #C2362F;
	--danger-soft: #FDE8E7;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(22, 26, 43, .04), 0 8px 24px rgba(22, 26, 43, .06);
	--font: "Vazirmatn", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.85; color: var(--text); background: var(--bg); direction: rtl; text-align: right; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
.ky-icon { flex-shrink: 0; vertical-align: middle; }
.ky-skip { position: absolute; right: -999px; top: 8px; background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.ky-skip:focus { right: 8px; }
.ky-muted { color: var(--muted); }
.ky-small { font-size: 14px; }
.ky-center { text-align: center; }
.ky-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.ky-container { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
.ky-main { min-height: 60vh; }
.ky-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Buttons ---------- */
.ky-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 700; font-size: 15px; line-height: 1.4; cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; white-space: nowrap; }
.ky-btn:active { transform: translateY(1px); }
.ky-btn--primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 28%, transparent); }
.ky-btn--primary:hover { background: var(--primary-dark); }
.ky-btn--accent { background: var(--accent); color: #2A1E00; }
.ky-btn--accent:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.ky-btn--ghost { background: var(--surface); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.ky-btn--ghost:hover { background: var(--primary-soft); }
.ky-btn--success { background: var(--success); color: #fff; }
.ky-btn--lg { min-height: 52px; padding: 10px 24px; font-size: 16px; }
.ky-btn--sm { min-height: 36px; padding: 4px 12px; font-size: 14px; border-radius: 9px; }
.ky-btn--block { width: 100%; }
.ky-btn.is-loading { opacity: .65; pointer-events: none; }
.ky-inline-form { display: inline; margin: 0; }
.ky-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }

.ky-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ky-badge--pending { background: var(--warning-soft); color: var(--warning); }
.ky-badge--approved { background: var(--success-soft); color: var(--success); }
.ky-badge--rejected, .ky-badge--closed { background: var(--danger-soft); color: var(--danger); }

.ky-alert { padding: 12px 16px; border-radius: 12px; margin: 0 0 16px; font-size: 15px; border: 1px solid transparent; }
.ky-alert ul { margin: 0; padding-right: 18px; }
.ky-alert--success { background: var(--success-soft); color: #0B5E3E; border-color: #BFE6D2; }
.ky-alert--error { background: var(--danger-soft); color: #8E211C; border-color: #F6C6C3; }
.ky-alert--info { background: var(--primary-soft); color: var(--primary-dark); border-color: color-mix(in srgb, var(--primary) 20%, #fff); }

/* ---------- Header ---------- */
.ky-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.admin-bar .ky-header { top: 32px; }
.ky-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.ky-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; text-decoration: none !important; margin-left: auto; }
.ky-brand__logo { max-height: 44px; width: auto; }
.ky-brand__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.5px; box-shadow: 3px 3px 0 var(--accent); }
.ky-nav { display: flex; align-items: center; gap: 24px; }
.ky-nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ky-nav__list a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
.ky-nav__list a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.ky-nav__actions { display: flex; gap: 8px; }
.ky-nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; align-items: center; justify-content: center; color: var(--text); }
.ky-nav-toggle__close { display: none; }
.ky-nav-open .ky-nav-toggle__open { display: none; }
.ky-nav-open .ky-nav-toggle__close { display: inline; }

@media (max-width: 900px) {
	.ky-nav-toggle { display: inline-flex; }
	.ky-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
	.ky-nav-open .ky-nav { display: flex; }
	.ky-nav__list { flex-direction: column; }
	.ky-nav__list a { padding: 12px; }
	.ky-nav__actions .ky-btn { flex: 1; }
	.admin-bar .ky-header { top: 46px; }
}
@media (max-width: 600px) { .admin-bar .ky-header { top: 0; } }

/* ---------- Hero ---------- */
.ky-hero { position: relative; overflow: hidden; padding: 56px 0 64px; background:
	linear-gradient(transparent 31px, color-mix(in srgb, var(--primary) 7%, transparent) 32px) 0 0 / 100% 32px,
	linear-gradient(180deg, var(--primary-soft), var(--bg)); }
.ky-hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.ky-eyebrow { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--accent-soft); color: #6B4A00; font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.ky-hero__title { font-size: clamp(30px, 5vw, 48px); line-height: 1.35; letter-spacing: -.5px; }
.ky-hero__lead { font-size: 18px; color: var(--muted); max-width: 52ch; }
.ky-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.ky-board { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px 24px 24px; box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--primary) 35%, transparent); transform: rotate(-1.5deg); }
.ky-board__line { display: flex; margin-bottom: 12px; }
.ky-board__line--me { justify-content: flex-start; }
.ky-board__line:not(.ky-board__line--me) { justify-content: flex-end; }
.ky-board__en { font-family: ui-rounded, "Segoe UI", system-ui, sans-serif; font-weight: 600; font-size: 17px; padding: 10px 16px; border-radius: 18px; background: var(--primary); color: #fff; border-bottom-left-radius: 4px; }
.ky-board__line--me .ky-board__en { background: var(--bg); color: var(--text); border-bottom-left-radius: 18px; border-bottom-right-radius: 4px; }
.ky-board__card { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); }
.ky-board__card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface); color: var(--primary); }
.ky-board__card strong { display: block; }
.ky-board__card small { color: var(--muted); }
.ky-board__sticker { position: absolute; bottom: -20px; left: -14px; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #2A1E00; font-weight: 800; font-size: 22px; transform: rotate(12deg); box-shadow: 0 8px 20px rgba(0,0,0,.12); font-family: ui-rounded, system-ui, sans-serif; }

@media (max-width: 900px) {
	.ky-hero { padding: 36px 0 44px; }
	.ky-hero__inner { grid-template-columns: 1fr; gap: 36px; }
	.ky-hero__art { max-width: 420px; margin-inline: auto; width: 100%; padding: 0 8px; }
	.ky-hero__cta .ky-btn { flex: 1 1 200px; }
}

/* ---------- Sections ---------- */
.ky-section { padding: 56px 0; }
.ky-section--tight { padding: 0; margin-top: -24px; position: relative; }
.ky-section__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.ky-section__head h1, .ky-section__head h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); }

.ky-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ky-step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.ky-step__num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.ky-step h3 { font-size: 18px; margin-bottom: 4px; }
.ky-step p { margin: 0; color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .ky-steps { grid-template-columns: 1fr; } }

.ky-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.ky-class-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.ky-class-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -12px rgba(22,26,43,.18); }
.ky-class-card__media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--primary) 22%, #fff)); }
.ky-class-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ky-class-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; font-weight: 800; color: color-mix(in srgb, var(--primary) 45%, #fff); }
.ky-chip { position: absolute; top: 12px; right: 12px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.94); }
.ky-chip--open { color: var(--success); }
.ky-chip--closed { color: var(--danger); }
.ky-class-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.ky-class-card__level { font-size: 13px; font-weight: 700; color: var(--primary); }
.ky-class-card__title { font-size: 19px; margin: 4px 0 6px; }
.ky-class-card__title a { color: var(--text); }
.ky-class-card__excerpt { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.ky-class-card .ky-link { margin-top: auto; padding-top: 8px; }

.ky-meta { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.ky-meta li { display: inline-flex; align-items: center; gap: 6px; }

.ky-about { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ky-about__inner { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.ky-about__photo { width: 220px; height: 220px; border-radius: 32px; overflow: hidden; background: var(--primary); display: grid; place-items: center; color: #fff; font-size: 80px; font-weight: 800; box-shadow: 10px 10px 0 var(--accent); }
.ky-about__photo img { width: 100%; height: 100%; object-fit: cover; }
.ky-about h2 { font-size: 28px; }
.ky-about p { color: var(--muted); font-size: 17px; max-width: 62ch; }
@media (max-width: 760px) {
	.ky-about__inner { grid-template-columns: 1fr; text-align: center; gap: 28px; }
	.ky-about__photo { margin-inline: auto; width: 180px; height: 180px; font-size: 64px; }
	.ky-about p { margin-inline: auto; }
}

.ky-empty { text-align: center; padding: 40px 20px; }
.ky-empty p { color: var(--muted); }
.ky-empty__icon { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.ky-404 { font-size: 72px; font-weight: 800; color: var(--primary); margin: 0; line-height: 1.2; }

/* ---------- Single class ---------- */
.ky-single { padding-block: 32px 56px; }
.ky-single__grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.ky-single__main { padding: 28px; }
.ky-single__cover { margin: -28px -28px 24px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.ky-single__cover img { width: 100%; }
.ky-single__title { font-size: clamp(24px, 3.4vw, 34px); }
.ky-single__side { padding: 22px; position: sticky; top: 92px; }
.ky-single__side-title { font-size: 18px; }
.ky-facts { list-style: none; margin: 0 0 20px; padding: 0; }
.ky-facts li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.ky-facts li .ky-icon { color: var(--primary); }
.ky-facts span { color: var(--muted); }
.ky-facts strong { text-align: left; font-weight: 700; }
.ky-single__cta { display: grid; gap: 8px; }
.ky-single__cta .ky-badge { justify-content: center; padding: 12px; font-size: 15px; border-radius: 12px; }
.ky-single__cta .ky-inline-form { display: block; }
@media (max-width: 900px) {
	.ky-single__grid { grid-template-columns: 1fr; }
	.ky-single__side { position: static; order: -1; }
	.ky-single__main { padding: 20px; }
	.ky-single__cover { margin: -20px -20px 20px; }
}

.ky-content { font-size: 17px; overflow-wrap: anywhere; }
.ky-content > *:last-child { margin-bottom: 0; }
.ky-content img { border-radius: 12px; }
.ky-content ul, .ky-content ol { padding-right: 22px; }
.ky-content blockquote { margin: 1em 0; padding: 12px 18px; border-right: 4px solid var(--accent); background: var(--accent-soft); border-radius: 8px; }
.ky-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.ky-content td, .ky-content th { border: 1px solid var(--border); padding: 8px 10px; }
.ky-content .wp-block-file { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ky-content .wp-block-file__button { background: var(--primary); color: #fff; border-radius: 9px; padding: 4px 12px; }
.ky-article { padding: 28px; max-width: 820px; margin-inline: auto; }
.ky-list { display: grid; gap: 16px; }
.ky-list__item { padding: 20px 24px; }
.ky-list__item h2 { font-size: 20px; margin: 0; }
.ky-pagination { margin-top: 24px; }
.ky-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.ky-pagination .page-numbers { padding: 6px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.ky-pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Forms & Auth ---------- */
.ky-auth { display: grid; place-items: center; padding: 40px 16px 64px; background: linear-gradient(180deg, var(--primary-soft), var(--bg) 60%); min-height: calc(100vh - 220px); }
.ky-auth__card { width: 100%; max-width: 480px; padding: 32px 28px; }
.ky-auth__title { font-size: 26px; margin-bottom: 4px; }
.ky-auth__alt { text-align: center; margin: 20px 0 6px; }
.ky-auth__alt a { font-weight: 700; }
@media (max-width: 480px) { .ky-auth__card { padding: 24px 18px; } }

.ky-form { display: grid; gap: 16px; margin-top: 20px; }
.ky-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .ky-form__row { grid-template-columns: 1fr; } }
.ky-field { display: grid; gap: 6px; }
.ky-field > span { font-weight: 700; font-size: 15px; }
.ky-field small { color: var(--muted); font-size: 13px; }
.ky-field input, .ky-field select, .ky-field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.ky-field input[dir="ltr"] { text-align: left; }
.ky-field input:focus, .ky-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.ky-field input:disabled { background: var(--bg); color: var(--muted); }
.ky-check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.ky-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.ky-fieldset { border: 1px dashed var(--border); border-radius: 12px; padding: 12px 16px 16px; margin: 0; }
.ky-fieldset legend { padding: 0 6px; font-weight: 700; color: var(--muted); font-size: 14px; }

/* ---------- Panel ---------- */
.ky-panel { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding-block: 28px 56px; align-items: start; }
.ky-panel__side { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.ky-panel__user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.ky-panel__user strong { display: block; line-height: 1.5; }
.ky-panel__user small { color: var(--muted); }
.ky-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; flex-shrink: 0; box-shadow: 3px 3px 0 var(--accent); }
.ky-panel__nav { display: grid; gap: 4px; }
.ky-panel__nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text); font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.ky-panel__nav a:hover { background: var(--bg); }
.ky-panel__nav a.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; border-color: color-mix(in srgb, var(--primary) 18%, #fff); }
.ky-panel__nav .ky-panel__logout { color: var(--danger); margin-top: 8px; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; padding-top: 14px; }
.ky-panel__main, .ky-panel__side { min-width: 0; }
.ky-panel__title { font-size: 26px; }
.ky-panel__hello h1 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 0; }
.ky-panel__hello { margin-bottom: 20px; }

@media (max-width: 900px) {
	.ky-panel { grid-template-columns: minmax(0, 1fr); padding-top: 16px; gap: 16px; }
	.ky-panel__side { position: static; padding: 8px; }
	.ky-panel__user { display: none; }
	.ky-panel__nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; margin: 0; }
	.ky-panel__nav::-webkit-scrollbar { display: none; }
	.ky-panel__nav a { flex-direction: column; gap: 2px; padding: 8px 12px; font-size: 13px; white-space: nowrap; flex: 1 0 auto; text-align: center; }
	.ky-panel__nav .ky-panel__logout { margin: 0; border: 0; border-radius: 12px; padding-top: 8px; }
}

.ky-notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, #fff); margin-bottom: 20px; color: #4D3600; }
.ky-notice p { margin: 0; }
.ky-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.ky-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.ky-stat strong { display: block; font-size: 30px; line-height: 1.2; color: var(--primary); }
.ky-stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 480px) { .ky-stats { gap: 8px; } .ky-stat { padding: 12px; } .ky-stat strong { font-size: 24px; } .ky-stat span { font-size: 12px; } }

.ky-divider-title { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 700; color: var(--muted); margin: 28px 0 14px; }
.ky-divider-title::before, .ky-divider-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.ky-sessions { display: grid; gap: 12px; }
.ky-session { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ky-session[open] { border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.ky-session__head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.ky-session__head::-webkit-details-marker { display: none; }
.ky-session__no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 18px; flex-shrink: 0; }
.ky-session[open] .ky-session__no { background: var(--primary); color: #fff; }
.ky-session__titles { flex: 1; min-width: 0; }
.ky-session__titles strong { display: block; font-size: 17px; line-height: 1.5; }
.ky-session__titles small { color: var(--muted); font-size: 13px; }
.ky-session__titles small bdi + bdi::before { content: " · "; }
.ky-my-class__info small bdi + bdi::before { content: " · "; }
.ky-session__chev { color: var(--muted); transform: rotate(-90deg); transition: transform .2s; }
.ky-session[open] .ky-session__chev { transform: rotate(90deg); }
.ky-session__body { padding: 4px 18px 20px; border-top: 1px solid var(--border); padding-top: 16px; }
.ky-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin: 16px 0; }
.ky-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ky-files__title { font-size: 15px; color: var(--muted); margin: 18px 0 10px; }
.ky-files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ky-file { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.ky-file__ext { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .5px; font-family: system-ui, sans-serif; }
.ky-file__ext--pdf { background: #D9433B; }
.ky-file__ext--mp3, .ky-file__ext--m4a, .ky-file__ext--wav, .ky-file__ext--ogg { background: #8A4FD8; }
.ky-file__ext--mp4, .ky-file__ext--mov { background: #E0761A; }
.ky-file__ext--doc, .ky-file__ext--docx { background: #2F6FD6; }
.ky-file__ext--jpg, .ky-file__ext--jpeg, .ky-file__ext--png { background: #14946A; }
.ky-file__info { flex: 1 1 160px; min-width: 0; }
.ky-file__info strong { display: block; font-size: 15px; overflow-wrap: anywhere; line-height: 1.5; }
.ky-file__info small { color: var(--muted); font-size: 13px; }
.ky-file audio { flex: 1 1 100%; width: 100%; height: 40px; order: 3; }
.ky-file__actions { display: flex; gap: 6px; }
@media (max-width: 480px) { .ky-file__actions { flex: 1 1 100%; } .ky-file__actions .ky-btn { flex: 1; } }

.ky-my-classes { display: grid; gap: 10px; }
.ky-my-class { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: border-color .15s; }
.ky-my-class:hover { border-color: var(--primary); }
.ky-my-class__thumb { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--primary-soft), color-mix(in srgb, var(--primary) 22%, #fff)); color: var(--primary); flex-shrink: 0; }
.ky-my-class__thumb img { width: 100%; height: 100%; object-fit: cover; }
.ky-my-class__info { flex: 1; min-width: 0; }
.ky-my-class__info strong { display: block; }
.ky-my-class__info small { color: var(--muted); }
.ky-my-class__go { color: var(--muted); }
@media (max-width: 480px) { .ky-my-class { flex-wrap: wrap; } .ky-my-class__go { display: none; } .ky-my-class .ky-badge { margin-right: 70px; } }

.ky-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; margin-bottom: 12px; }
.ky-back .ky-icon { transform: rotate(180deg); }
.ky-class-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; margin-bottom: 16px; }
.ky-class-head h1 { font-size: clamp(20px, 3vw, 26px); margin-bottom: 6px; }
.ky-class-head .ky-meta { margin: 0; }

.ky-join-list { display: grid; gap: 12px; margin-top: 16px; }
.ky-join { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 20px; }
.ky-join h3 { font-size: 18px; margin-bottom: 4px; }
.ky-join h3 a { color: var(--text); }
.ky-join .ky-meta { margin: 0; }
@media (max-width: 480px) { .ky-join__action, .ky-join__action .ky-inline-form, .ky-join__action .ky-btn { width: 100%; } }

.ky-profile { padding: 24px; margin-top: 8px; max-width: 720px; }

/* ---------- Footer ---------- */
.ky-footer { background: #12162A; color: #C5CAE0; padding: 36px 0 24px; }
.ky-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: center; }
.ky-footer__brand strong { display: block; color: #fff; font-size: 18px; }
.ky-footer__brand span { font-size: 14px; }
.ky-footer__links { display: flex; flex-wrap: wrap; gap: 8px; }
.ky-footer__links a { display: inline-flex; align-items: center; gap: 6px; color: #fff; padding: 8px 14px; border-radius: 10px; background: rgba(255,255,255,.08); }
.ky-footer__links a:hover { background: rgba(255,255,255,.16); text-decoration: none; }
.ky-footer__copy { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
@media (max-width: 600px) { .ky-footer__inner { grid-template-columns: 1fr; } }

/* WordPress core */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.wp-caption-text { font-size: 14px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* =========================================================================
   پنل مدیریت دبیر + اجزای مشترک نسخه ۲
   ========================================================================= */
.ky-manage { grid-template-columns: 240px minmax(0, 1fr); }
.ky-panel__nav a { position: relative; }
.ky-count { font-style: normal; margin-right: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.ky-tabs .ky-count { margin-right: 4px; }
.ky-panel__nav .ky-panel__site { margin-top: 8px; border-top: 1px solid var(--border); border-radius: 0; padding-top: 14px; color: var(--muted); }
.ky-panel__nav .ky-panel__site + .ky-panel__logout { margin-top: 0; border-top: 0; padding-top: 11px; border-radius: 12px; }

.ky-m-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.ky-m-head h1 { font-size: clamp(22px, 3vw, 28px); margin: 0; }
.ky-m-head p { margin: 2px 0 0; font-size: 15px; }
.ky-m-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.ky-stats--4 { grid-template-columns: repeat(4, 1fr); }
a.ky-stat { color: inherit; text-decoration: none; transition: border-color .15s; }
a.ky-stat:hover { border-color: var(--primary); }
.ky-stat--good strong { color: var(--success); }
.ky-stat--bad strong { color: var(--danger); }
.ky-stat strong { font-size: clamp(20px, 2.4vw, 28px); overflow-wrap: anywhere; }
@media (max-width: 1000px) { .ky-stats--4 { grid-template-columns: repeat(2, 1fr); } }

.ky-m-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.ky-m-grid > .ky-box { margin-bottom: 0; }
.ky-m-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ky-m-split { grid-template-columns: 1fr; } }

.ky-box { padding: 18px 20px; margin-bottom: 16px; }
.ky-box__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.ky-box__head h2 { font-size: 17px; margin: 0; display: flex; align-items: center; gap: 8px; }
.ky-box__head h2 .ky-icon { color: var(--primary); }
.ky-box__head > a, .ky-box__head > span > a { font-size: 14px; font-weight: 700; }
.ky-box__sub { font-size: 15px; color: var(--muted); margin: 20px 0 8px; }
.ky-box__empty { margin: 4px 0 8px; }
.ky-box__toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 12px; }

.ky-rows { list-style: none; margin: 0; padding: 0; }
.ky-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.ky-rows li:first-child { border-top: 0; }
.ky-rows--tight li { padding: 8px 0; }
.ky-rows li.is-current { background: var(--primary-soft); margin-inline: -12px; padding-inline: 12px; border-radius: 10px; }
.ky-rows__main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; color: var(--text); text-decoration: none !important; }
.ky-rows__main strong { line-height: 1.6; }
.ky-rows__main small { color: var(--muted); font-size: 13px; }
a.ky-rows__main:hover strong { color: var(--primary); }
.ky-rows__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ky-num { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 14px; margin-left: 6px; }

.ky-kv { list-style: none; margin: 0; padding: 0; }
.ky-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--border); }
.ky-kv li:first-child { border-top: 0; }
.ky-kv span { color: var(--muted); }
.ky-kv--inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; }
.ky-kv--inline li { flex-direction: column; gap: 2px; border: 0; padding: 0; }
.ky-kv--inline a { font-weight: 700; text-align: right; }

.ky-amount--in { color: var(--success); }
.ky-amount--out { color: var(--danger); }
.ky-amount { white-space: nowrap; }

.ky-profile-card { padding: 18px 20px; margin-bottom: 16px; }
.ky-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: #4D3600; font-size: 15px; }
.ky-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 500; vertical-align: middle; }

.ky-mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ky-mini-stats > div { background: var(--bg); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.ky-mini-stats span { font-size: 13px; color: var(--muted); }
.ky-mini-stats strong { font-size: 17px; }

/* جدول‌ها */
.ky-table-wrap { overflow-x: auto; }
.ky-card.ky-table-wrap { padding: 4px 0; }
.ky-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ky-table th { text-align: right; font-size: 13px; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ky-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ky-table tbody tr:last-child td { border-bottom: 0; }
.ky-table tbody tr:hover { background: color-mix(in srgb, var(--primary) 3%, transparent); }
.ky-table tfoot th { color: var(--text); border-top: 2px solid var(--border); border-bottom: 0; font-size: 15px; }
.ky-table--compact td { padding: 9px 12px; }
.ky-table tr.is-muted td { opacity: .5; }
.ky-table tr.is-highlight td { background: var(--warning-soft); }
.ky-table__go { text-align: left; white-space: nowrap; }
.ky-table__go > * { margin-right: 4px; }
.ky-table__check { width: 36px; }
.ky-table__check input { width: 18px; height: 18px; accent-color: var(--primary); }
.ky-strong-link { font-weight: 700; color: var(--text); }
.ky-ltr { text-align: right; unicode-bidi: plaintext; }
.ky-box .ky-table-wrap { margin-inline: -20px; }
.ky-box .ky-table th:first-child, .ky-box .ky-table td:first-child { padding-right: 20px; }
.ky-box .ky-table th:last-child, .ky-box .ky-table td:last-child { padding-left: 20px; }

@media (max-width: 760px) {
	.ky-table thead { display: none; }
	.ky-table, .ky-table tbody, .ky-table tr, .ky-table td, .ky-table tfoot { display: block; width: 100%; }
	.ky-table tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
	.ky-table tbody tr:last-child { border-bottom: 0; }
	.ky-table td { border: 0; padding: 3px 0 !important; display: flex; justify-content: space-between; gap: 12px; text-align: left; }
	.ky-table td::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: right; flex-shrink: 0; }
	.ky-table td:first-child { font-size: 16px; }
	.ky-table td.ky-table__go { justify-content: flex-start; flex-wrap: wrap; padding-top: 8px !important; }
	.ky-table td.ky-table__go::before, .ky-table td.ky-table__check::before { content: none; }
	.ky-table td.ky-table__check { width: auto; }
	.ky-table tfoot tr { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 12px 16px; border-top: 2px solid var(--border); }
	.ky-table tfoot th { display: inline; border: 0; padding: 0; }
	.ky-box .ky-table-wrap { margin-inline: -20px; }
}

.ky-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-bottom: 16px; }
.ky-filter select, .ky-filter input { min-height: 42px; border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 12px; background: var(--surface); }
.ky-filter__search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.ky-filter__search input { border: 0; padding: 0; flex: 1; min-width: 0; outline: none; }

.ky-chip-s { display: inline-block; padding: 1px 9px; margin: 2px 0 2px 4px; border-radius: 999px; font-size: 13px; background: var(--primary-soft); color: var(--primary-dark); white-space: nowrap; }
.ky-chip-s--pending { background: var(--warning-soft); color: var(--warning); }
.ky-chip-s--rejected { background: var(--danger-soft); color: var(--danger); text-decoration: line-through; }
.ky-badge--neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* کلاس‌ها */
.ky-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.ky-mclass { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.ky-mclass:hover { border-color: var(--primary); transform: translateY(-2px); }
.ky-mclass__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ky-mclass__top strong { font-size: 17px; line-height: 1.6; }
.ky-mclass__nums { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--border); }
.ky-mclass__nums b { color: var(--text); }

.ky-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; scrollbar-width: none; }
.ky-tabs::-webkit-scrollbar { display: none; }
.ky-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 500; white-space: nowrap; text-decoration: none !important; }
.ky-tabs a:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.ky-tabs a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* فرم‌ها */
.ky-form-card { padding: 24px; margin-top: 0; max-width: 820px; }
.ky-box.ky-form, .ky-card.ky-form { margin-top: 0; }
.ky-form__row--3 { grid-template-columns: repeat(3, 1fr); }
.ky-form__row--4 { grid-template-columns: 2fr 1fr 1.3fr 1fr; }
@media (max-width: 760px) { .ky-form__row--3, .ky-form__row--4 { grid-template-columns: 1fr; } }
.ky-form__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ky-field textarea { min-height: auto; resize: vertical; line-height: 1.8; }
.ky-field input[type="color"] { padding: 4px; height: 48px; cursor: pointer; }
.ky-field input[type="file"] { padding: 9px; font-size: 14px; }
.ky-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; }
.ky-checks--days { gap: 6px; margin-bottom: 14px; }
.ky-daybox input { position: absolute; opacity: 0; pointer-events: none; }
.ky-daybox span { display: inline-block; padding: 7px 14px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; font-size: 15px; user-select: none; }
.ky-daybox input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.ky-daybox input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); }
.ky-fieldset .ky-form__row { margin-bottom: 12px; }
.ky-more { border: 1px dashed var(--border); border-radius: 12px; padding: 0 16px; }
.ky-more summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--muted); }
.ky-more[open] { padding-bottom: 16px; }
.ky-more[open] .ky-field { margin-bottom: 12px; }
.ky-money { display: flex; align-items: stretch; }
.ky-money input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; flex: 1; min-width: 0; text-align: left; }
.ky-money > span { display: grid; place-items: center; padding: 0 12px; border: 1.5px solid var(--border); border-right: 0; border-radius: 12px 0 0 12px; background: var(--bg); color: var(--muted); font-size: 14px; }
.ky-field .ky-money input { width: auto; }
.ky-date { text-align: left; }
.ky-inline-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.ky-inline-add select { min-height: 40px; border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 10px; background: var(--surface); max-width: 100%; flex: 1 1 220px; }
.ky-inline-field { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.ky-inline-field input { width: 140px; min-height: 40px; border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 10px; }
.ky-check--box { padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); line-height: 1.6; }
.ky-check--danger { color: var(--danger); font-size: 14px; }
.ky-self-end { align-self: end; min-height: 48px; }
.ky-sticky-actions { position: sticky; bottom: 12px; z-index: 5; }
.ky-sticky-actions .ky-btn { box-shadow: 0 10px 30px -6px color-mix(in srgb, var(--primary) 45%, transparent); }
.ky-pay-who { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.ky-grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.ky-btn--icon { min-width: 36px; padding-inline: 8px; }
.ky-btn--danger-ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.ky-btn--danger-ghost:hover { background: var(--danger-soft); }
.ky-danger-zone { margin: 20px 0 8px; display: flex; justify-content: flex-end; }
.ky-btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* فایل‌ها */
.ky-file-edit { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.ky-file-edit li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ky-file-edit .ky-file__ext { min-width: 44px; height: 40px; font-size: 11px; }
.ky-upload { display: block; position: relative; }
.ky-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.ky-upload span { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 22px 16px; border: 2px dashed color-mix(in srgb, var(--primary) 35%, var(--border)); border-radius: 14px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; text-align: center; }
.ky-upload span small { font-weight: 400; color: var(--muted); }
.ky-upload input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); }
.ky-upload-list { margin: 8px 0 0; }

/* حضور و غیاب */
.ky-att-quick { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.ky-att-list { list-style: none; margin: 0 0 16px; padding: 0; }
.ky-att-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--border); }
.ky-att-name { font-weight: 700; }
.ky-att { display: inline-flex; border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.ky-att__opt input { position: absolute; opacity: 0; pointer-events: none; }
.ky-att__opt span { display: block; padding: 7px 12px; font-size: 14px; cursor: pointer; border-left: 1px solid var(--border); user-select: none; }
.ky-att__opt:last-child span { border-left: 0; }
.ky-att__opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: -3px; }
.ky-att__opt--present input:checked + span { background: var(--success); color: #fff; font-weight: 700; }
.ky-att__opt--late input:checked + span { background: #E0A100; color: #fff; font-weight: 700; }
.ky-att__opt--absent input:checked + span { background: var(--danger); color: #fff; font-weight: 700; }
.ky-att__opt--excused input:checked + span { background: #6B7280; color: #fff; font-weight: 700; }
@media (max-width: 480px) { .ky-att { width: 100%; } .ky-att__opt { flex: 1; text-align: center; } .ky-att__opt span { padding: 8px 4px; font-size: 13px; } }
.ky-att-count { font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--bg); }
.ky-att-present { color: var(--success); }
.ky-att-late { color: #B07E00; }
.ky-att-absent { color: var(--danger); }
.ky-att-excused { color: #6B7280; }

.ky-score-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 16px; }
.ky-score-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.ky-score-list input { width: 80px; min-height: 40px; border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 10px; text-align: center; }
.ky-score-list input:focus { outline: none; border-color: var(--primary); }
.ky-score { font-size: 18px; color: var(--primary); }

/* نمودار */
.ky-legend { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ky-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.ky-legend__in { background: var(--primary); }
.ky-legend__out { background: #F2A9A4; }
.ky-bars { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding: 12px 4px 0; margin-bottom: 16px; border-bottom: 1px solid var(--border); direction: ltr; flex-direction: row-reverse; }
.ky-bars__col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.ky-bars__pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.ky-bars__bar { width: min(22px, 40%); min-height: 2px; border-radius: 6px 6px 0 0; transition: height .4s; }
.ky-bars__bar--in { background: var(--primary); }
.ky-bars__bar--out { background: #F2A9A4; }
.ky-bars__label { font-size: 12px; color: var(--muted); white-space: nowrap; direction: rtl; padding-bottom: 4px; }
.ky-hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ky-hbars li { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr auto; align-items: center; gap: 10px; font-size: 14px; }
.ky-hbars li > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ky-hbars__track { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.ky-hbars__track i { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.ky-hbars--out .ky-hbars__track i { background: #E5736A; }
.ky-month-nav { justify-content: center; }
.ky-month-nav h2 { min-width: 150px; justify-content: center; }

/* شهریه در پنل دانش‌آموز */
.ky-bill { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; padding: 18px 20px; margin-bottom: 12px; align-items: center; border-right: 4px solid var(--accent); }
.ky-bill__info { display: flex; flex-direction: column; }
.ky-bill__remain { display: flex; flex-direction: column; text-align: left; }
.ky-bill__remain span { font-size: 13px; color: var(--muted); }
.ky-bill__remain strong { font-size: 20px; color: var(--danger); }
.ky-bill__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.ky-bill__card { grid-column: 1 / -1; margin: 0; padding-top: 12px; border-top: 1px dashed var(--border); }
@media (max-width: 480px) { .ky-bill { grid-template-columns: 1fr; } .ky-bill__remain { text-align: right; } .ky-bill__actions .ky-btn, .ky-bill__actions .ky-inline-form { flex: 1; } .ky-bill__actions .ky-inline-form .ky-btn { width: 100%; } }
.ky-cardno { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 18px; margin-bottom: 16px; }
.ky-cardno strong { font-size: 20px; letter-spacing: 1px; font-family: ui-monospace, "SF Mono", Menlo, monospace; flex: 1; text-align: left; }
.ky-alert p { margin: 0; }
.ky-box .ky-alert { margin-bottom: 12px; }

/* فرم‌های وردپرس (تنظیمات پیامک) داخل پنل */
.ky-wp-embed .wrap { margin: 0; }
.ky-wp-embed .wrap > h1 { display: none; }
.ky-wp-embed h2 { font-size: 17px; margin: 22px 0 8px; }
.ky-wp-embed h3 { font-size: 15px; margin: 16px 0 6px; }
.ky-wp-embed hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.ky-wp-embed .form-table { width: 100%; border-collapse: collapse; }
.ky-wp-embed .form-table th { width: 170px; text-align: right; vertical-align: top; padding: 12px 0 12px 16px; font-size: 15px; }
.ky-wp-embed .form-table td { padding: 8px 0; }
.ky-wp-embed input[type="text"], .ky-wp-embed input[type="password"], .ky-wp-embed input[type="number"], .ky-wp-embed input:not([type]), .ky-wp-embed textarea { min-height: 42px; border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 12px; background: var(--surface); max-width: 100%; }
.ky-wp-embed .regular-text { width: 320px; }
.ky-wp-embed .large-text { width: 100%; }
.ky-wp-embed .description { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.ky-wp-embed .widefat { width: 100%; border-collapse: collapse; font-size: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ky-wp-embed .widefat th, .ky-wp-embed .widefat td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--border); }
.ky-wp-embed .widefat thead th { background: var(--bg); color: var(--muted); font-size: 13px; }
.ky-wp-embed .button { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 10px; border: 1.5px solid color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--surface); color: var(--primary); font-weight: 700; cursor: pointer; }
.ky-wp-embed .button-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ky-wp-embed .notice { padding: 10px 14px; border-radius: 10px; margin: 0 0 12px; border: 1px solid var(--border); background: var(--bg); }
.ky-wp-embed .notice p { margin: 0; }
.ky-wp-embed .notice-success { background: var(--success-soft); border-color: #BFE6D2; }
.ky-wp-embed .notice-error { background: var(--danger-soft); border-color: #F6C6C3; }
.ky-wp-embed .notice-warning, .ky-wp-embed .notice-info { background: var(--warning-soft); border-color: #F5DFA8; }
.ky-wp-embed code { font-size: 13px; }
@media (max-width: 760px) {
	.ky-wp-embed .form-table, .ky-wp-embed .form-table tbody, .ky-wp-embed .form-table tr, .ky-wp-embed .form-table th, .ky-wp-embed .form-table td { display: block; width: 100%; }
	.ky-wp-embed .form-table th { padding: 10px 0 2px; }
	.ky-wp-embed .regular-text { width: 100%; }
	.ky-wp-embed .widefat { display: block; overflow-x: auto; }
}

@media (max-width: 900px) {
	.ky-manage { grid-template-columns: minmax(0, 1fr); }
	.ky-count { position: absolute; top: 2px; left: 4px; min-width: 18px; height: 18px; font-size: 11px; }
	.ky-panel__nav .ky-panel__site { margin: 0; border: 0; border-radius: 12px; padding-top: 8px; }
}

[hidden] { display: none !important; }
.ky-cardno strong { white-space: nowrap; }
@media (max-width: 480px) { .ky-cardno strong { font-size: 17px; letter-spacing: 0; text-align: right; flex-basis: 100%; } }
.ky-m-head p bdi + bdi::before, .ky-rows__main small bdi + bdi::before { content: " · "; }
