/* Shared visual language. Theme variables remain editable in appearance settings. */
body,.admin-app,.dashboard-app,.dashboard-workspace,.admin-workspace{background:var(--ui-bg,#e5e8ee)!important}
.hero,.hero-wrap,.auth-layout,.auth-side,.dashboard-content,.admin-content{background:var(--ui-bg,#e5e8ee)!important}
.module-card,.performance-card,.change-card,.stat-card,.dashboard-card,.exam-card,.report-stats>div{background:var(--ui-surface,#fff)!important;border-radius:15px;border:1px solid var(--ui-border,#dae2ed);box-shadow:0 4px 16px #14253d06}
.report-workspace .module-card,.report-admin .module-card{padding:18px;border-radius:15px}
.performance-card{padding:16px;margin-bottom:12px}.performance-grid{gap:12px}.topic-chip{padding:9px 12px}.report-stats{gap:12px;margin:16px 0}.report-stats>div{padding:13px 16px}
button,input[type=button],input[type=submit],.button{font-family:inherit;cursor:pointer;border-radius:10px;border:1px solid transparent;padding:9px 14px;min-height:38px;line-height:1.5;transition:background .18s,box-shadow .18s,transform .18s}
button:not(.dashboard-nav-item):not(.admin-nav-link):not(.sidebar-toggle):not(.theme-toggle):not(.notification-button):not(.dashboard-nav-parent),input[type=button],input[type=submit]{background:var(--ui-secondary,#ede9fe)!important;color:var(--ui-secondary-text,#6543a3)!important;border-color:transparent!important}
button[type=submit],button.module-primary,button.admin-primary,.report-actions .button,.report-tabs button.active,.report-filter-pills button.active{background:var(--ui-primary,#6176e5)!important;color:var(--ui-primary-text,#fff)!important;border-color:transparent!important}
button:hover:not(:disabled){box-shadow:0 3px 10px #263b661c}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid color-mix(in srgb,var(--ui-primary,#6176e5) 45%,transparent);outline-offset:3px}button:disabled{opacity:.5;cursor:not-allowed}
.module-table thead,.report-table thead{background:color-mix(in srgb,var(--ui-primary,#6176e5) 7%,var(--ui-surface,#fff))}.module-table tbody tr:hover,.report-table tbody tr:hover{background:color-mix(in srgb,var(--ui-primary,#6176e5) 4%,var(--ui-surface,#fff))}
.record-eye{display:inline-grid;place-items:center;padding:9px!important;margin-inline-start:6px;vertical-align:middle}.record-eye svg{width:21px;height:21px}.student-record .module-dialog-body{max-height:none;overflow:visible;padding:0}.student-record .module-dialog-head{margin-bottom:16px}.student-record .module-detail{padding:14px;border-radius:12px;background:color-mix(in srgb,var(--ui-primary) 7%,var(--ui-surface));margin-bottom:16px}
.result-card{position:relative;padding:18px!important;border-top:3px solid var(--ui-primary)!important}.result-card.passed{border-top-color:#16a077!important}.result-card.failed{border-top-color:#e0606c!important}.result-card h2{font-size:1.15rem!important;margin:8px 0!important;padding-inline-end:40px}.result-card .answer-eyebrow{font-size:.85rem}.result-card-icon{position:absolute;left:16px;top:17px;display:grid;place-items:center;width:38px;height:38px;border-radius:11px;background:color-mix(in srgb,var(--ui-primary) 12%,var(--ui-surface));color:var(--ui-primary)}.report-card-score{font-size:2rem;display:flex;align-items:center;gap:12px}.result-status{font-size:.8rem!important;padding:4px 10px;border-radius:9px;background:#fcecef;color:#bd344a!important}.passed .result-status{background:#e0f6eb;color:#13734f!important}.result-card .report-actions{margin:12px 0 0;gap:8px}.result-card .button{min-height:36px;padding:7px 12px;font-size:.9rem!important}.report-card-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));gap:14px}
.analysis-filter{background:color-mix(in srgb,var(--ui-primary) 12%,var(--ui-surface))!important;border-color:color-mix(in srgb,var(--ui-primary) 35%,var(--ui-border))!important;border-inline-start:4px solid var(--ui-primary)!important}.analysis-filter h2{display:flex;gap:10px;align-items:center;margin-bottom:16px}.report-controls{align-items:end;gap:12px}.report-controls label{min-width:150px;flex:1}.topic-picker{position:relative;flex:1.5;min-width:200px}.topic-picker summary{cursor:pointer;padding:11px 13px;background:var(--ui-surface);border:1px solid var(--ui-border);border-radius:10px}.topic-picker summary b{font-size:.8rem;color:var(--ui-primary);margin-inline-start:10px}.topic-picker-list{position:absolute;z-index:8;top:calc(100% + 6px);right:0;left:0;max-height:300px;overflow:auto;background:var(--ui-surface);padding:12px;box-shadow:0 10px 32px #15233f25;border:1px solid var(--ui-border);border-radius:12px}.topic-picker-list label{display:flex!important;align-items:center;gap:8px;padding:7px;cursor:pointer}.topic-picker-list input{width:18px;height:18px;accent-color:var(--ui-primary)}.selected-topics{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.selected-topics button{min-height:30px;padding:5px 10px;font-size:.85rem!important}
.low-evidence{background:color-mix(in srgb,var(--ui-primary) 5%,var(--ui-surface))!important;padding:13px 16px}.low-evidence summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap;cursor:pointer;list-style:none}.low-evidence summary:after{content:'⌄';margin-inline-start:auto;font-size:22px;color:var(--ui-primary)}.low-evidence[open] summary:after{content:'⌃'}.low-evidence h3{margin:0}.low-evidence .low-summary{margin:12px 0}.low-evidence .topic-chips{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:8px}.low-evidence .topic-chip{padding:9px 12px;min-height:0}.low-evidence .performance-description{margin-bottom:0}
.budget-track{overflow:hidden;padding:0!important}.budget-svg{display:block;width:100%;height:14px;fill:var(--ui-primary,#6176e5)}.comparison-bars>div{position:relative;height:25px;display:block!important;overflow:hidden;border-radius:5px}.comparison-svg{display:block;width:100%;height:100%;fill:#5273de}.comparison-svg.series-b{fill:#20a78c}.comparison-bars strong{position:absolute;left:8px;top:1px;background:var(--ui-surface);padding:0 4px;border-radius:4px}.comparison-row{grid-template-columns:160px minmax(0,1fr) auto;gap:12px}.comparison-chart{padding:13px}.change-badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:5px 9px;border-radius:9px;font-size:.85rem;white-space:nowrap;font-weight:700}.change-badge .report-icon{width:16px;height:16px}.change-badge.rise{background:#dff5e9;color:#087d4d}.change-badge.fall{background:#fde7eb;color:#c33c54}.change-badge.steady{background:#e5ecff;color:#315cd2}.change-cards{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}.change-card{padding:17px;border-top:3px solid #16a077}.change-card.fall{border-top-color:#e45e74}.change-card header{display:flex;align-items:center;gap:9px;color:#118352;margin-bottom:12px}.change-card.fall header{color:#ce455d}.change-card header h2{font-size:1.1rem!important;margin:0!important}.change-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--ui-border)}.change-row:last-child{border:0}.change-chart-row{display:grid;grid-template-columns:160px minmax(0,1fr) auto;gap:12px;align-items:center;margin:12px 0}.change-chart-row svg{width:100%;height:26px;background:color-mix(in srgb,var(--ui-primary) 5%,var(--ui-surface));border-radius:6px}.change-chart rect.rise{fill:#16a077}.change-chart rect.fall{fill:#e45e74}.trend-picker{margin-top:22px;border-top:1px solid var(--ui-border);padding-top:16px}.trend-picker label{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.trend-picker select{min-width:220px;padding:10px;border-radius:10px;background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-border)}
.dashboard-sidebar,.admin-sidebar{background:var(--ui-sidebar,#1e293b)!important;color:var(--ui-sidebar-text,#e2e8f0)!important}.dashboard-brand b,.sidebar-user b,.admin-sidebar .admin-brand b{color:var(--ui-sidebar-text)!important}.dashboard-sidebar small,.admin-sidebar small,.sidebar-section-title{color:color-mix(in srgb,var(--ui-sidebar-text) 65%,var(--ui-sidebar))!important}.dashboard-nav-item,.admin-nav-link{color:var(--ui-sidebar-text)!important;background:transparent!important;border:0!important}.dashboard-nav-item.active,.admin-nav-link.active{background:var(--ui-sidebar-active,var(--ui-primary))!important;color:#fff!important}.sidebar-section-title{padding-top:15px}.dashboard-brand,.sidebar-user{border-color:color-mix(in srgb,var(--ui-sidebar-text) 15%,var(--ui-sidebar))!important}
@media(min-width:781px){
 body.account-page{overflow:visible!important;overflow-x:clip!important}
 #studentDashboard{display:grid;grid-template-columns:278px minmax(0,1fr);align-items:start;overflow:visible;transform:none!important;filter:none!important;contain:none!important}
 #studentSidebar{position:sticky!important;top:var(--sidebar-sticky-top,0px)!important;bottom:auto!important;right:auto!important;width:278px;height:auto!important;max-height:none!important;min-height:100dvh;overflow:visible!important;align-self:start;transform:none!important;scrollbar-gutter:auto;z-index:20}
 #studentDashboard .dashboard-workspace{margin-right:0!important;min-width:0}
 #studentDashboard .dashboard-topbar{right:278px!important}
 #studentSidebar>*{flex-shrink:0}
}
@media(max-width:780px){.comparison-row,.change-chart-row{grid-template-columns:1fr;gap:7px}.change-badge{justify-self:start}.change-cards{grid-template-columns:1fr}.change-row{flex-wrap:wrap}#studentSidebar{height:100dvh!important;max-height:100dvh!important;overflow-y:auto!important;top:0!important}.report-controls{align-items:stretch}.report-controls>*,.topic-picker{flex-basis:100%;min-width:0}.trend-picker select{width:100%}}
@media(prefers-reduced-motion:reduce){button{transition:none!important}}
.dashboard-nav-item:hover,.admin-nav-link:hover{background:color-mix(in srgb,var(--ui-sidebar-text) 10%,var(--ui-sidebar))!important}

/* Release 14: compact choices, independent analysis, and resource emphasis. */
.module-form .profile-interests{grid-column:1/-1;border:1px solid var(--ui-border,#dce2ea);border-radius:14px;padding:14px;display:flex;flex-wrap:wrap;gap:12px 24px}
.module-form .profile-interests label.check{display:inline-flex!important;align-items:center;justify-content:flex-start;gap:9px;cursor:pointer;width:auto;min-height:36px}
.module-form .profile-interests input[type=checkbox]{appearance:auto!important;width:18px!important;height:18px!important;min-height:18px!important;max-width:18px;flex:0 0 18px;margin:0;padding:0;accent-color:var(--ui-primary,#4169db)}
.exam-resource-box,.exam-operation-box{background:#eaf8f0!important;border-color:#c8e6d4!important}
.exam-resource-box .resource-item{background:var(--ui-surface,#fff)!important}
[data-theme=dark] .exam-resource-box,[data-theme=dark] .exam-operation-box{background:#17382b!important;border-color:#2b5742!important}
.independent-trend{border-inline-start:4px solid var(--ui-primary,#4169db)}
.comparison-summary{margin-top:20px}.comparison-summary>p{padding:0 4px}
.comparison-result{padding:18px 0;border-top:1px solid var(--ui-border,#dce2ea)}
.highlight-selector{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}
.highlight-selector select{min-height:42px;max-width:100%}
.selected-exam-trends{margin-top:16px;border:1px solid var(--ui-border,#dce2ea);border-radius:14px;padding:14px}
.selected-exam-trends summary{cursor:pointer;font-weight:700}.selected-exam-trends article{padding:16px 0;border-bottom:1px solid var(--ui-border,#dce2ea)}

.trend-exam-key{display:flex;flex-wrap:wrap;gap:10px 28px;padding-inline-start:25px;color:var(--ui-text,#243247);font-size:.9rem}.trend-exam-key li{padding-inline-start:4px}.trend-exam-key b{color:var(--ui-primary,#4169db);margin-inline-start:6px}

.profile-action-buttons{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.profile-action-buttons .text-button{display:inline-flex;align-items:center;gap:8px;max-width:100%;height:auto;min-height:42px;padding:11px 15px;margin:0;white-space:normal;line-height:1.7;position:static;flex-shrink:0}

button:not(.module-primary):not(.admin-primary):not(.fin-primary):not(.fin-danger):not(.fin-success):not([type=submit]):not(.admin-nav-link):not(.dashboard-nav-item):hover{background:var(--ui-secondary-hover,#ddd6fe)!important}

/* Full-width account cards; keep password and profile controls independent. */
#profileEditor.profile-editor{display:block!important;width:100%;max-width:1060px;margin-inline:auto;min-width:0}#profileEditor>[data-account-section]{width:100%;max-width:none;box-sizing:border-box;grid-column:1/-1;padding:24px;border-radius:18px;margin-top:18px}#profileEditor>[hidden]{display:none!important}#profileEditor .module-heading{align-items:center;gap:12px;margin-bottom:16px}#profileEditor .module-heading h1{font-size:25px!important;margin:5px 0}#profileEditor .module-heading p{margin:0}.profile-eyebrow{color:var(--ui-primary);font-size:14px}.profile-card-heading{display:flex;align-items:center;gap:13px;margin-bottom:20px}.profile-card-heading h2{font-size:21px!important;margin:0 0 5px}.profile-card-heading p{margin:0;color:var(--ui-muted)!important}.profile-card-icon{display:grid;place-items:center;flex:0 0 45px;height:45px;background:var(--ui-secondary);color:var(--ui-secondary-text);border-radius:13px;font-size:25px}#profileEditor .profile-fixed{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;background:none;padding:0;margin-bottom:14px}#profileEditor .profile-fixed>div{background:color-mix(in srgb,var(--ui-primary) 7%,var(--ui-surface));border:1px solid var(--ui-border);border-radius:12px;padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}.profile-support{padding:12px 15px;border-right:3px solid var(--ui-primary);background:color-mix(in srgb,var(--ui-primary) 5%,var(--ui-surface));border-radius:9px;line-height:1.8}#profileEditor .module-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px;align-items:start}#profileEditor .module-form>label{min-width:0;display:grid;gap:7px}#profileEditor .module-form input:not([type=checkbox]),#profileEditor .module-form select{width:100%;box-sizing:border-box;min-width:0;height:46px;padding:10px 13px}#profileEditor .module-form .full,#profileEditor .module-form-footer,#profileEditor .profile-interests{grid-column:1/-1}#profileEditor .profile-interests{padding:14px;border:1px solid var(--ui-border);border-radius:12px;display:flex;gap:20px;flex-wrap:wrap;min-width:0}#profileEditor .profile-interests .check{display:flex;align-items:center;gap:8px}#profileEditor .profile-interests input{width:18px;height:18px}#profileEditor .module-form-footer{display:flex;gap:10px;justify-content:flex-start;flex-wrap:wrap;margin-top:3px}#profileEditor .module-form-footer button{height:auto;min-height:42px;padding:10px 22px;width:auto;min-width:170px}#profileEditor .password-control{display:flex;gap:8px;width:100%;min-width:0}#profileEditor .password-control input{flex:1;min-width:0}#profileEditor .password-control button{flex:0 0 auto;width:auto;min-width:72px;height:46px;padding:8px 12px;position:static}#profileEditor #passwordForm{max-width:650px;margin-left:auto}#profileEditor .profile-tabs{display:flex;flex-wrap:wrap;gap:10px}#profileEditor .profile-tabs button{padding:11px 18px;min-height:42px;height:auto}.profile-extra{margin-top:22px;border-top:1px solid var(--ui-border);padding-top:15px}.profile-extra summary{cursor:pointer;font-weight:bold;color:var(--ui-primary)}.profile-extra .profile-avatar{margin-top:15px}.fin-coupon-stats{margin:18px 0;border-top:3px solid #14a37f}.fin-coupon-stats h2{font-size:20px!important}.fin-coupon-stats .fin-stats>div{padding:12px;background:color-mix(in srgb,var(--ui-primary) 5%,var(--ui-surface));border-radius:12px}.fin-coupon-stats .fin-stats strong{font-size:20px}.fin-coupon-tag{margin-top:5px;background:#e6f6ed;color:#168156;max-width:220px;overflow-wrap:anywhere}.top-user-text b{max-width:220px;display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
@media(max-width:650px){#profileEditor>[data-account-section]{padding:17px}#profileEditor .module-form,#profileEditor .profile-fixed{grid-template-columns:1fr}#profileEditor .module-form-footer button{width:100%}#profileEditor .module-heading{flex-wrap:wrap}#profileEditor .profile-tabs button{flex:1;font-size:14px!important}.top-user-text b{max-width:100px}}

/* Release 20: stable RTL account detail alignment at narrow viewports. */
#profileDetails,
#profileDetails .dashboard-panel-heading,
#profileEditor,
#profileEditor [data-account-section] { min-width: 0; box-sizing: border-box; }
#profileDetails .profile-detail-row { min-width: 0; gap: 12px; }
#profileDetails .profile-detail-row > span { flex: 0 1 42%; min-width: 0; overflow-wrap: anywhere; }
#profileDetails .profile-detail-row > b { flex: 1 1 54%; min-width: 0; overflow-wrap: anywhere; word-break: normal; text-align: end; }
#profileDetails #studentMobile { direction: ltr; unicode-bidi: isolate; }
#profileEditor :is(input,select,textarea),
#profileEditor .module-form > *,
#profileEditor .profile-fixed > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 560px) {
  #profileDetails .dashboard-panel-heading { flex-wrap: wrap; }
  #profileDetails .profile-detail-row { align-items: flex-start; }
  #profileDetails .profile-detail-row > span { flex-basis: 38%; }
  #profileDetails .profile-detail-row > b { flex-basis: 58%; }
  #profileEditor [data-account-section] { padding-inline: 14px; }
}
