/* NK1 v3: Language, appearance, owner imprint — no external fonts or assets. */
.lang-toggle{display:inline-flex;align-items:center;justify-content:center;gap:5px;direction:ltr;white-space:nowrap;min-height:38px;padding:5px 9px;border:1px solid #d9ddf0;border-radius:12px;background:#fff;color:#596482;box-shadow:0 4px 14px rgba(23,30,66,.06);font-family:system-ui,'Segoe UI',sans-serif;font-size:12px;font-weight:850;line-height:1;letter-spacing:.02em;cursor:pointer}
.lang-toggle [data-lang]{padding:5px 7px;border-radius:7px;transition:background .2s,color .2s}
.lang-toggle .sep{opacity:.36}
.lang-toggle [data-lang].selected{background:#654ee8;color:#fff}
.lang-toggle:focus-visible,.mini-theme:focus-visible{outline:3px solid #a18eff;outline-offset:3px}
.mini-theme{width:38px;height:38px;flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:11px;border:1px solid #d9ddf0;background:#fff;color:#453d89;font-size:20px;cursor:pointer}
.admin-header .lang-toggle,.certificate-topbar .lang-toggle{background:#282449;border-color:#5a5579;color:#f4f1ff}
.admin-header .mini-theme,.certificate-topbar .mini-theme{background:#282449;border-color:#5a5579;color:#fff}
.admin-header .lang-toggle .selected,.certificate-topbar .lang-toggle .selected{background:#beabff;color:#1e1845}
.owner-legal{display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap}
.owner-signature{display:inline-block;direction:rtl;unicode-bidi:isolate;font-family:'Noto Naskh Arabic','Amiri','Traditional Arabic',Georgia,serif;font-size:clamp(16px,1.8vw,21px);font-weight:800;line-height:1.55;letter-spacing:.02em;color:#d5b477;text-shadow:0 2px 10px rgba(12,9,30,.1);border-block-end:1px solid currentColor;padding:1px 5px}
.site-footer .owner-signature{color:#ad8b54}
.nk1-legal-footer{font-family:system-ui,'Noto Sans Arabic',sans-serif;text-align:center;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:9px;margin:38px auto 0;padding:17px 16px;border-top:1px solid #d7d7e8;color:#716b89;font-size:12px}
.nk1-legal-footer .owner-signature{color:#90724a}
.admin-header .right-links{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.certificate-tools{display:flex;gap:8px;align-items:center;flex:none}
.translation-fields{border:1px solid #dcdaf2;border-radius:17px;margin:20px 0;padding:15px 17px;background:#faf9ff}
.translation-fields legend{font-size:13px;font-weight:800;color:#6250a2;padding-inline:8px}
.translation-fields p{font-size:12px;line-height:1.8;color:#6d6786;margin:0 0 12px}
.translation-fields label{margin-block:8px}
/* Directional polish: keep native Arabic content right-aligned even on French pages. */
html[dir="ltr"] .hero-copy,html[dir="ltr"] .section-intro,html[dir="ltr"] .lesson-card-content,html[dir="ltr"] .modal-body{direction:ltr;text-align:left}
html[dir="ltr"] .hero-grid,html[dir="ltr"] .section-intro,html[dir="ltr"] .progress-layout{direction:ltr}
html[dir="ltr"] .hero-visual,html[dir="ltr"] .fraction-value,html[dir="ltr"] .speed-readout{direction:ltr}
html[dir="ltr"] .hero-copy h1{line-height:1.35}
html[dir="ltr"] .section-intro h2{line-height:1.45}
html[dir="ltr"] .detail-list{padding-left:25px;padding-right:0}
html[dir="ltr"] .hero-actions span[aria-hidden="true"],html[dir="ltr"] .text-link span[aria-hidden="true"]{transform:rotate(180deg)}
html[dir="ltr"] .certificate-sheet{direction:ltr}
html[dir="ltr"] .certificate-sheet .paper-content{direction:ltr}
html[dir="ltr"] .owner-signature{direction:rtl}
/* Dark mode for the public interface already exists in style.css. */
html[data-theme="dark"] .lang-toggle{background:#282d4b;color:#e3dfff;border-color:#4a5070}
html[data-theme="dark"] .lang-toggle .selected{background:#9584f6;color:#100b31}
html[data-theme="dark"] .mini-theme{background:#282d4b;border-color:#4a5070;color:#f0eaff}
html[data-theme="dark"] .nk1-legal-footer{border-color:#393a5e;color:#a9a7c3}
html[data-theme="dark"] .nk1-legal-footer .owner-signature{color:#dfc18c}
html[data-theme="dark"] .translation-fields{background:#202441;border-color:#464a72}
html[data-theme="dark"] .translation-fields legend{color:#d7cbff}
html[data-theme="dark"] .translation-fields p{color:#c5c2dc}
/* Admin palette: the CSS of v2 was predominantly hard-coded, so this adds true dark surfaces. */
html[data-theme="dark"]:has(.admin-header),html[data-theme="dark"]:has(.certificate-topbar){background:#111426;color:#f2efff;color-scheme:dark}
html[data-theme="dark"]:has(.admin-header) body,html[data-theme="dark"]:has(.certificate-topbar) body{background:#111426;color:#f0edfb}
html[data-theme="dark"] .login-screen,html[data-theme="dark"] .panel,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .locked{background:#222641!important;color:#f3edff!important;border-color:#434665!important}
html[data-theme="dark"] .dash-title h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel-head h2,html[data-theme="dark"] .stat-card strong,html[data-theme="dark"] .login-screen h1,html[data-theme="dark"] .locked h1,html[data-theme="dark"] .workspace-intro h1{color:#f3edff!important}
html[data-theme="dark"] .panel p,html[data-theme="dark"] .login-screen p,html[data-theme="dark"] .stat-card small,html[data-theme="dark"] .dash-title p,html[data-theme="dark"] .locked p,html[data-theme="dark"] .workspace-intro p,html[data-theme="dark"] .support-note{color:#c0bfd5!important}
html[data-theme="dark"] .login-screen input,html[data-theme="dark"] .panel input,html[data-theme="dark"] .panel textarea,html[data-theme="dark"] .panel select,html[data-theme="dark"] .cert-controls input{background:#111629!important;color:#f7f2ff!important;border-color:#4f547c!important}
html[data-theme="dark"] .dash-tabs button:not(.selected),html[data-theme="dark"] .outline,html[data-theme="dark"] .wide-select{background:#2a2c47!important;color:#e7e5fa!important;border-color:#565577!important}
html[data-theme="dark"] .workspace-intro .eyebrow{color:#c7b2ff}
html[data-theme="dark"] .certificate-wrap{background:#262a44}
html[data-theme="dark"] .privacy-tip{background:#252642;color:#d7d3ee}
/* The printable sheet keeps its original white/gold design even in dark mode. */
html[data-theme="dark"] .certificate-sheet{color:#292044;color-scheme:light}
@media(max-width:740px){.admin-header{gap:9px}.admin-header .right-links{justify-content:flex-end}.certificate-topbar{gap:8px}.certificate-tools{gap:5px}.certificate-tools .lang-toggle{min-height:32px;padding:3px 4px;font-size:10px}.certificate-tools .mini-theme{width:32px;height:32px}.nk1-legal-footer{margin-top:24px}.owner-signature{font-size:17px}.site-header .lang-toggle{min-height:35px;padding:4px 5px;font-size:10px}.site-header .lang-toggle [data-lang]{padding:4px}}
@media(max-width:440px){.certificate-topbar strong{display:none}.admin-header .right-links>a{display:none}}
@media print{.nk1-legal-footer,.certificate-tools{display:none!important}}

.mobile-nav .mobile-saved{width:100%;border:0;background:transparent;color:inherit;font-weight:800;text-align:start;padding:11px 15px}
@media(max-width:600px){.site-header .brand-name strong{font-size:18px}.site-header .brand-name small{display:none}.site-header .brand-logo{width:35px;height:35px}.site-header .icon-btn{width:31px;min-width:31px;height:33px}.site-header .nav-actions{gap:4px}.site-header .nav-inner{gap:4px}}
@media(max-width:350px){.site-header #savedBtn{display:none}.site-header .lang-toggle{padding:2px 3px}.site-header .lang-toggle [data-lang]{padding:3px}.site-header .brand-logo{width:31px;height:31px}}
