/* ZEDNI presentation layer. Legacy rfk identifiers remain compatible with page scripts. */
@font-face{font-family:Cairo;src:url('../fonts/Cairo/Cairo-VariableFont_slnt,wght.ttf') format('truetype');font-weight:200 900;font-display:swap}
:root{--zedni-primary-dark:#0f5d50;--zedni-primary:#17856f;--zedni-secondary:#43a77f;--zedni-soft-green:#8cc084;--zedni-accent:#f9733e;--zedni-background:#f7f9f8;--zedni-surface:#fff;--zedni-text:#1f2937;--zedni-muted:#64748b;--zedni-border:#e5e7eb;--zedni-soft:#edf6ef;--zedni-shadow:0 3px 14px rgb(15 93 80 / .045);--rfk-primary:var(--zedni-primary);--rfk-secondary:var(--zedni-primary);--rfk-primary-rgb:23,133,111;--rfk-secondary-rgb:23,133,111;--rfk-accent:var(--zedni-accent);--rfk-panel-bg:var(--zedni-surface);--rfk-panel-soft:var(--zedni-soft);--rfk-panel-border:var(--zedni-border);--bs-body-bg:var(--zedni-background);--bs-body-color:var(--zedni-text)}
html.dark,[data-bs-theme=dark]{--zedni-background:#0c1916;--zedni-surface:#142820;--zedni-text:#edf6ef;--zedni-muted:#adbfba;--zedni-border:#2c453c;--zedni-soft:#20382e;--bs-body-bg:var(--zedni-background);--bs-body-color:var(--zedni-text);--bs-border-color:var(--zedni-border)}
html body{font-family:Inter,Cairo,sans-serif;background:var(--zedni-background);color:var(--zedni-text);line-height:1.65}
html[lang=ar] body,html[lang=ar] .font-sans,.lang-ar{font-family:Tajawal,Cairo,sans-serif}
[dir=rtl]{text-align:start}
input[type=email],input[type=url],input[type=tel]{direction:ltr;text-align:start}
:where(a,button,input,select,textarea):focus-visible{outline:3px solid var(--zedni-secondary);outline-offset:3px}
button:disabled,.btn:disabled{opacity:.55;cursor:not-allowed}
[x-cloak]{display:none!important}
.zedni-logo{object-fit:contain;min-width:5rem}
html.dark .zedni-logo{background:#edf6ef;border-radius:12px;padding:4px}
/* Sidebar: quiet default rows, explicit active states, and a persistent footer. */
#app-sidebar{background:linear-gradient(165deg,#126553,#0b493f)!important;color:#fff;border:0;border-inline-end:1px solid rgb(255 255 255 / .1);box-shadow:0 8px 30px rgb(8 55 45 / .12)}
#app-sidebar>div{border-color:rgb(255 255 255 / .12)!important}
#app-sidebar>div:first-child,#app-sidebar .rfk-sidebar-controls,#app-sidebar .rfk-sidebar-footer{background:transparent!important}
#app-sidebar :is(a,button,span){color:inherit}
#app-sidebar .rfk-sidebar-logo{border-radius:0;max-height:72px;object-fit:contain}
#app-sidebar .rfk-sidebar-scroll{overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#599988 transparent}
#app-sidebar .rfk-sidebar-nav{gap:6px}
#app-sidebar nav :is(a,button){border-radius:12px;min-height:44px;color:#e0f0e9!important;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
#app-sidebar .rfk-sidebar-nav>a,#app-sidebar .rfk-sidebar-nav>div>button{min-height:48px;padding:10px 12px;gap:12px;font-size:14px;font-weight:600;text-align:start}
#app-sidebar .rfk-sidebar-nav>div>button>span:first-child{min-width:0;gap:12px}
#app-sidebar nav :is(a,button):hover{background:rgb(255 255 255 / .09)!important;color:#fff!important}
#app-sidebar nav :is(a,button):is(.bg-blue-100,.bg-indigo-100,.bg-cyan-100,.bg-emerald-100,.bg-violet-100,.bg-amber-100,[aria-current=page]){background:rgb(140 192 132 / .2)!important;color:#fff!important;box-shadow:inset 3px 0 #a6d49e}
[dir=rtl] #app-sidebar nav :is(a,button):is(.bg-blue-100,.bg-indigo-100,.bg-cyan-100,.bg-emerald-100,.bg-violet-100,.bg-amber-100,[aria-current=page]){box-shadow:inset -3px 0 #a6d49e}
#app-sidebar nav ul{margin-inline:16px 0;margin-block:6px;background:rgb(0 0 0 / .1)!important;border:0;border-inline-start:1px solid rgb(255 255 255 / .22);border-radius:0 0 10px 10px;box-shadow:none;padding:6px}
#app-sidebar nav li a{font-size:13px;min-height:38px;padding:8px 12px}
#app-sidebar nav li a.font-bold{background:rgb(255 255 255 / .12)!important;color:#fff!important}
#app-sidebar :is(a,button):focus-visible{outline:2px solid #c7e9be!important;outline-offset:-2px}
#app-sidebar .rfk-sidebar-controls{padding:8px 12px 0;border-top:1px solid rgb(255 255 255 / .12)}
#app-sidebar .rfk-sidebar-controls button{min-height:40px;padding:8px;color:#d7eae3;font-size:12px}
#app-sidebar .rfk-sidebar-controls button:hover{background:rgb(255 255 255 / .08)}
#app-sidebar .rfk-sidebar-footer{border-top:0;padding:8px 12px 12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
#app-sidebar .rfk-sidebar-footer button{background:rgb(255 255 255 / .07);border:1px solid rgb(255 255 255 / .15);box-shadow:none;color:#ffe3df;font-weight:600}
#app-sidebar .rfk-sidebar-footer button:hover{background:#a73535;border-color:#bc5050;color:#fff}
#app-sidebar[data-collapsed=true] .rfk-sidebar-nav>a,#app-sidebar[data-collapsed=true] .rfk-sidebar-nav>div>button{padding:8px;gap:0}
#app-sidebar[data-collapsed=true] :is(.rfk-sidebar-controls,.rfk-sidebar-footer){padding-inline:8px}
#app-sidebar[data-collapsed=true] .rfk-sidebar-footer button{padding-inline:0;gap:0}
/* Keep navigation symbols centered in both writing directions. */
#app-sidebar .rfk-sidebar-nav>a::before,
#app-sidebar .rfk-sidebar-nav>div>button>span:first-child::before,
#app-sidebar .rfk-sidebar-nav .grid,
#app-sidebar .rfk-sidebar-footer button>span:first-child{display:grid;place-items:center;text-align:center;line-height:1}
#app-sidebar[data-collapsed=true] .rfk-sidebar-scroll{padding-inline:8px;scrollbar-width:none}
#app-sidebar[data-collapsed=true] .rfk-sidebar-scroll::-webkit-scrollbar{display:none}
#app-sidebar[data-collapsed=true] .rfk-sidebar-nav>a,
#app-sidebar[data-collapsed=true] .rfk-sidebar-nav>div>button{justify-content:center;padding-inline:0}
#app-sidebar[data-collapsed=true] .rfk-sidebar-nav>div>button>span:first-child{justify-content:center;gap:0}
.rfk-navbar-menu-button{display:grid;place-items:center;width:44px;height:44px;padding:0;flex-shrink:0}
@media(prefers-reduced-motion:reduce){#app-sidebar,#app-sidebar *{transition:none!important;animation:none!important}}
#announcement-bar{background:var(--zedni-soft);border-color:var(--zedni-border);color:var(--zedni-text)}
body header{box-shadow:none!important;border-color:var(--zedni-border)!important}
#content{padding:clamp(1rem,2.3vw,2rem);background:var(--zedni-background)}
html body :is(.dashboard-shell,.learning-dashboard-shell){background:transparent!important}
html body :is(.dashboard-shell)::before{display:none}
html body :is(.card,.dashboard-surface,.dashboard-kpi-card,.kpi-card,.chart-card,.widget-card,.modal-content){background:var(--zedni-surface);border:1px solid var(--zedni-border);border-radius:16px;box-shadow:var(--zedni-shadow);backdrop-filter:none;color:var(--zedni-text)}
html body :is(.dashboard-kpi-card,.kpi-card){padding:20px;min-height:108px}
html body :is(.dashboard-kpi-card,.kpi-card):hover{transform:none;box-shadow:0 4px 18px rgb(15 93 80 / .08);border-color:var(--zedni-secondary)}
html body :is(.dashboard-kpi-card,.kpi-card)::before{display:none}
html body :is(.dashboard-kpi-grid,.kpi-grid){gap:16px;margin-block:20px}
html body :is(.chart-card,.widget-card){padding:20px}
.rfk-responsive-content :is(.bg-white,.bg-gray-50){background-color:var(--zedni-surface)}
.rfk-responsive-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=submit]),select,textarea),.auth-palette :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-radius:10px;border-color:var(--zedni-border);background-color:var(--zedni-surface);color:var(--zedni-text);min-height:44px}
:is(input,select,textarea):focus{border-color:var(--zedni-primary)!important;--tw-ring-color:rgb(23 133 111 / .18);box-shadow:0 0 0 3px rgb(23 133 111 / .14)}
input[type=checkbox],input[type=radio]{accent-color:var(--zedni-primary)}
.btn,.zedni-button{min-height:42px;border-radius:10px;font-weight:600;padding:.6rem 1rem}
.btn-primary,.zedni-button--primary{background:var(--zedni-primary);border-color:var(--zedni-primary);color:#fff}
.btn-primary:hover,.zedni-button--primary:hover{background:var(--zedni-primary-dark);border-color:var(--zedni-primary-dark);color:#fff}
.zedni-button--secondary{background:var(--zedni-soft);color:var(--zedni-primary-dark);border:1px solid var(--zedni-border)}
.zedni-button--cta{background:var(--zedni-accent);color:#281208;border:1px solid var(--zedni-accent)}
.zedni-button--cta:hover{background:#ee6933}
.rfk-responsive-content table{width:100%;border-color:var(--zedni-border);font-size:.875rem}
.rfk-responsive-content table thead{background:var(--zedni-soft);color:var(--zedni-text)}
.rfk-responsive-content table :is(th,td){padding:1rem;text-align:start;border-color:var(--zedni-border);vertical-align:middle}
.rfk-responsive-content table th{font-weight:700;white-space:nowrap}
.rfk-responsive-content tbody tr:hover{background:var(--zedni-soft)}
.dropdown-menu{border-radius:12px;border-color:var(--zedni-border);box-shadow:var(--zedni-shadow);padding:.5rem}
.dropdown-item{border-radius:8px;text-align:start}
.alert{border-radius:12px}
.page-link{color:var(--zedni-primary-dark);border-color:var(--zedni-border)}
.active>.page-link{background:var(--zedni-primary);border-color:var(--zedni-primary)}
.zedni-badge{display:inline-flex;align-items:center;padding:.2rem .65rem;border-radius:99px;font-size:.75rem;font-weight:700;white-space:nowrap}
.zedni-badge--active,.zedni-badge--completed,.zedni-badge--published{background:#dcf1e5;color:#0f5d50}
.zedni-badge--inactive,.zedni-badge--draft{background:#eef1f4;color:#475569}
.zedni-badge--pending{background:#fff0dc;color:#884500}
.zedni-badge--cancelled{background:#fee2e2;color:#991b1b}
/* Auth pages share the same accessible palette in both existing theme modes. */
html body.auth-palette{--auth-shell:var(--zedni-background);--auth-surface:var(--zedni-surface);--auth-border:var(--zedni-border);--auth-text-strong:var(--zedni-text);--auth-text:var(--zedni-text);--auth-text-soft:var(--zedni-muted);--auth-text-muted:var(--zedni-muted);--auth-primary:var(--zedni-primary);--auth-primary-hover:var(--zedni-primary-dark);--auth-primary-soft:#dcefe4;--auth-brand-from:#0f5d50;--auth-brand-via:#0f5d50;--auth-brand-to:#0f5d50}
.auth-palette .zedni-auth-story{background:var(--zedni-primary-dark);box-shadow:none;border-radius:20px;min-height:500px;display:flex;align-items:center}
.zedni-auth-story>.absolute{display:none}
.auth-palette .zedni-auth-card{background:var(--zedni-surface);box-shadow:var(--zedni-shadow);border-radius:20px;border-top:3px solid var(--zedni-accent);backdrop-filter:none}
.auth-palette .hover\:bg-slate-50:hover{background:var(--zedni-soft)!important}
.preloader-spinner{border-color:#dcefe4!important;border-top-color:var(--zedni-primary)!important;box-shadow:none!important}
@media(max-width:767px){#content{padding:1rem}.rfk-responsive-content table :is(th,td){padding:.8rem}.auth-palette .zedni-auth-card{padding:1.5rem}.rfk-responsive-content :is(button,.btn){min-height:44px}html body :is(.dashboard-kpi-card,.kpi-card){padding:16px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media print{#app-sidebar,body header,.rfk-back-button-shell{display:none!important}#content{padding:0;background:white}}
html body .zedni-student-welcome{background:var(--zedni-primary-dark);border-radius:18px}
.zedni-student-welcome>.absolute{display:none}
.zedni-student-welcome .text-cyan-200{color:#c8e9d4}
.auth-palette .zedni-auth-card{border-top-color:var(--zedni-accent)!important}
.auth-palette a>img[alt='ZEDNI | زدني']{height:44px;width:auto}
