/* Kavir V24.2: conservative UI-only patch layered on the working V18 styles. */
/* Existing Rokh @font-face definitions and font-family declarations are untouched. */
#kv18BootstrapOpen,#kv18BootstrapForm{display:none!important}
#loginModal.kv18-auth-modal{z-index:5000!important}
.kv18-auth-modal{padding:12px max(10px,env(safe-area-inset-right)) 12px max(10px,env(safe-area-inset-left))}
.kv18-auth-modal .kv18-auth-card{
 width:min(100%,560px);max-width:560px;max-height:calc(100dvh - 24px);
 overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;
 border-radius:22px;box-sizing:border-box;
}
.kv18-auth-card,.kv18-auth-card *{box-sizing:border-box}
.kv18-auth-card label{min-width:0;font-size:15px;line-height:1.85;font-weight:700;color:var(--ink)}
.kv18-auth-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.kv18-auth-card .form-grid > *{min-width:0}
.kv18-auth-card input,.kv18-auth-card select{
 display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:49px;
 padding:10px 13px;margin-top:4px;line-height:1.65;font-size:16px;
 border:1.5px solid var(--line);border-radius:12px;
 background:var(--surface-solid);color:var(--ink);color-scheme:light dark;
}
.kv18-auth-card select{appearance:auto;-webkit-appearance:menulist;cursor:pointer}
.kv18-auth-card select option{background:#fff;color:#221e30;font-size:16px}
.kv18-auth-card :is(input,select):focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.kv18-auth-card :is(.btn,.full-btn){min-height:46px;font-size:15px}
.kv18-auth-card :is(.form-note,.text-button,.kv18-otp-actions){font-size:14px;line-height:1.7}
.kv18-auth-card .kv18-auth-steps span{font-size:12px}
.kv18-auth-card .kv-avatar-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.kv18-auth-card .kv-avatar-choice{min-width:0}
#kv18OtpCode{font-size:24px;direction:ltr}
html[data-theme="dark"] .kv18-auth-card{background:#222327;color:#f3f0f6;border-color:rgba(255,255,255,.17)}
html[data-theme="dark"] .kv18-auth-card label{color:#f3f0f6}
html[data-theme="dark"] .kv18-auth-card :is(input,select){
 color-scheme:dark;background:#2d2f34;color:#fff;border-color:#6b6972;
}
html[data-theme="dark"] .kv18-auth-card select option{background:#2d2f34!important;color:#fff!important}
html[data-theme="dark"] .kv18-auth-card select option:checked{background:#53402b!important;color:#fff!important}
html[data-theme="dark"] .kv18-auth-card input::placeholder{color:#c5c2ca;opacity:1}
html[data-theme="dark"] #loginModal .kv18-auth-card select{background-color:#303138!important;color:#fff!important;border-color:#74717b!important;color-scheme:dark!important}
/* Limited type-size improvements; no global selectors, font-family or layout overrides. */
#studentScreen :is(.workspace-side .side-link,.panel-title span,.student-profile-grid small,.kv-v10-profile-avatars p),
#adminScreen :is(.admin-nav button,.panel-title span,.admin-side small){font-size:clamp(14px,1.1vw,16px);line-height:1.85;font-weight:650}
#studentScreen :is(.panel-title h3,.student-profile-grid b),
#adminScreen :is(.panel-title h3,.admin-card h3){font-weight:750}
#studentScreen :is(.admin-form label,.panel-card p,.student-profile-grid b),
#adminScreen :is(.admin-form label,.admin-card p){font-size:clamp(14px,1vw,16px);line-height:1.8}
#studentScreen :is(input,select,textarea),#adminScreen :is(input,select,textarea){font-size:16px;min-width:0}
@media(max-width:700px){
 .kv18-auth-modal .kv18-auth-card{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);padding:20px 15px}
 .kv18-auth-card .form-grid{grid-template-columns:minmax(0,1fr)}
 .kv18-auth-card .kv18-auth-steps{gap:5px}
 .kv18-auth-card .kv18-auth-steps span{font-size:11px;padding:8px 3px}
 .kv18-auth-card .kv-avatar-grid{gap:5px}
 .kv18-auth-card .kv18-otp-actions{flex-wrap:wrap}
 #studentScreen .workspace-side .side-link,#adminScreen .admin-nav button{font-size:15px;font-weight:700}
 #studentScreen :is(.panel-card,.workspace-main),#adminScreen :is(.admin-card,.admin-main){min-width:0;max-width:100%}
}
@media(prefers-reduced-motion:reduce){.kv18-auth-card :is(input,select){transition:none}}
