@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --font-cairo: 'Cairo', sans-serif;
    --font-inter: 'Inter', sans-serif;

    /* White/light base */
    --background: 0 0% 97%;
    --foreground:222 47% 11%;
    --card: 0 0% 100%;
    --card-foreground:222 47% 11%;
    --popover: 0 0% 100%;
    --popover-foreground:222 47% 11%;
    --primary:216 98% 52%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 94%;
    --secondary-foreground:222 47% 20%;
    --muted: 0 0% 94%;
    --muted-foreground:215 16% 47%;
    --accent: 35 92% 50%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 88%;
    --input: 0 0% 88%;
    --ring:216 98% 52%;
    --chart-1:216 98% 52%;
    --chart-2:204 94% 58%;
    --chart-3: 35 92% 50%;
    --chart-4: 340 65% 55%;
    --chart-5: 200 70% 50%;
    --radius: 0.75rem;
    --sidebar-background: 0 0% 100%;
    --sidebar-foreground:222 47% 11%;
    --sidebar-primary:216 98% 52%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 0 0% 95%;
    --sidebar-accent-foreground:222 47% 11%;
    --sidebar-border: 0 0% 90%;
    --sidebar-ring:216 98% 52%;
    --success: 152 60% 40%;
    --success-foreground: 0 0% 100%;
    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;
    --hero-bg:218 84% 20%;
  }
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground font-cairo;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.4); }

/* Accessible blue theme overrides for compiled legacy surfaces. */
:root {
  --theme-gradient: linear-gradient(135deg, #082A5E 0%, #0B3D91 55%, #0A58CA 100%);
  --theme-button-gradient: linear-gradient(135deg, #082A5E 0%, #0B3D91 56%, #0A58CA 100%);
  --theme-button-hover: linear-gradient(135deg, #061D42 0%, #082A5E 55%, #0B3D91 100%);
  --theme-focus-ring: #0B3D91;
}
:root{--theme-primary:#0D6EFD;--theme-primary-dark:#0B3D91;--theme-primary-navy:#082A5E;--theme-primary-light:#EAF3FF;--theme-gradient:linear-gradient(135deg,#082A5E 0%,#0B3D91 55%,#0A58CA 100%);--theme-overlay:rgba(8,42,94,.72);--theme-footer-bg:#082A5E;--theme-button-gradient:linear-gradient(135deg,#082A5E 0%,#0B3D91 56%,#0A58CA 100%);--green:#0B3D91;--gold:#f59e0b;--ink:#111827;--muted:#64748b;--line:#e5e5e5;--bg:#f7f7f7;--card:#fff;--danger:#dc2626;--success:#059669;--blue:#2563eb}*{box-sizing:border-box}body{margin:0;font-family:'Cairo',Tahoma,Arial,sans-serif;background:#fff;color:var(--ink);letter-spacing:0}a{color:inherit;text-decoration:none}img{max-width:100%;display:block}button,input,select,textarea{font:inherit}.svg-icon{width:1em;height:1em;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;fill:none;display:inline-block;vertical-align:-.16em}.brand-mark .svg-icon,.icon .svg-icon,.stat-card .svg-icon,.side-nav .svg-icon,.hero-stats .svg-icon,.course-stats .svg-icon{width:1.15em;height:1.15em}.public-nav{height:64px;position:sticky;top:0;z-index:10;background:#fff;border-bottom:1px solid #f3f4f6;box-shadow:0 1px 2px rgba(15,23,42,.04);display:flex;align-items:center;justify-content:space-between;padding:0 clamp(16px,4vw,56px);gap:20px}.brand{display:flex;align-items:center;gap:10px;font-weight:800}.brand-mark{width:38px;height:38px;border-radius:12px;background:var(--green);color:#fff;display:grid;place-items:center}.nav-links,.nav-actions{display:flex;align-items:center;gap:18px}.nav-links a{font-size:14px;font-weight:600;color:#6b7280}.nav-links a:hover{color:#111827}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;border-radius:12px;padding:0 18px;border:1px solid transparent;font-weight:800;cursor:pointer;transition:.2s}.btn.primary{background:var(--green);color:#fff}.btn.primary:hover{filter:brightness(1.08)}.btn.accent{background:var(--gold);color:var(--green)}.btn.ghost{border-color:#e5e7eb;background:#fff}.btn.block{width:100%}.hero{min-height:88vh;position:relative;display:flex;align-items:center;overflow:hidden}.hero>img,.cta>img,.dashboard-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hero-overlay{position:absolute;inset:0;background:linear-gradient(to left,rgba(8, 42, 94,.97) 45%,rgba(8, 42, 94,.75) 75%,rgba(8, 42, 94,.4))}.hero-content{position:relative;max-width:720px;margin-inline:auto 8vw;padding:70px 24px;color:#fff}.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);padding:7px 13px;font-size:13px;font-weight:800}.badge.soft{background:rgba(8, 42, 94,.08);color:var(--green);border-color:rgba(8, 42, 94,.12)}.hero h1{font-size:clamp(42px,7vw,76px);line-height:1.05;margin:22px 0 14px;font-weight:900}.hero h1 span{display:block;color:#fbbf24}.hero p{max-width:620px;color:rgba(255,255,255,.78);font-size:18px;line-height:1.9}.search-panel{display:flex;max-width:520px;margin:30px 0;box-shadow:0 18px 50px rgba(0,0,0,.18);border-radius:16px;overflow:hidden}.search-panel input,.wide-search,.top-search input{border:1px solid var(--line);padding:0 16px;min-height:48px;width:100%;outline:none}.hero-stats{display:flex;flex-wrap:wrap;gap:12px}.hero-stats div{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:10px 14px}.hero-stats .svg-icon{color:#fbbf24}.hero-stats strong{font-weight:900}.hero-stats small{color:rgba(255,255,255,.68)}.section{padding:76px clamp(16px,5vw,72px)}.section.muted,.page-shell{background:var(--bg)}.section-heading{text-align:center;max-width:680px;margin:0 auto 34px}.section-heading h2,.section-row h2,.page-hero h1{font-size:clamp(28px,4vw,44px);font-weight:900;margin:16px 0 8px}.feature-grid,.course-grid,.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.card,.panel,.stat-card{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:0 10px 28px rgba(8, 42, 94,.05)}.feature-card{padding:26px;text-align:center;transition:.25s}.feature-card:hover,.course-card:hover{box-shadow:0 18px 40px rgba(8, 42, 94,.12);transform:translateY(-2px)}.icon,.feature-card .icon{width:56px;height:56px;border-radius:16px;background:#EAF3FF;color:var(--green);display:grid;place-items:center;margin:0 auto 16px;font-size:28px}.section-row{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}.course-card{overflow:hidden;border:0;transition:.25s}.course-cover{position:relative;aspect-ratio:16/9;height:auto;background:var(--theme-button-gradient);overflow:hidden}.course-cover img{width:100%;height:100%;object-fit:cover;transition:transform .7s}.course-card:hover .course-cover img{transform:scale(1.06)}.course-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.58),transparent 60%);opacity:0;transition:.25s}.course-card:hover .course-cover:after{opacity:1}.play-badge{position:absolute;inset:0;margin:auto;width:52px;height:52px;border-radius:50%;background:rgba(255,255,255,.88);color:var(--green);display:grid;place-items:center;opacity:0;transform:scale(.9);transition:.25s;z-index:1}.course-card:hover .play-badge{opacity:1;transform:scale(1)}.course-body{padding:18px}.course-body h3{margin:12px 0 8px;font-size:15px;line-height:1.75}.course-body p{color:var(--muted);line-height:1.7;font-size:13px}.course-stats{display:flex;gap:12px;flex-wrap:wrap;color:#6b7280;font-size:12px;margin:12px 0}.course-stats span{display:inline-flex;align-items:center;gap:4px}.course-stats span:first-child{color:#f59e0b}.progress{height:8px;background:#EAF3FF;border-radius:20px;overflow:hidden}.progress span{display:block;height:100%;background:var(--green)}.course-meta{display:flex;justify-content:space-between;align-items:center;margin-top:14px;border-top:1px solid #f3f4f6;padding-top:12px}.course-meta strong{font-size:19px}.course-meta a{color:var(--green);font-weight:800}.cta{position:relative;min-height:340px;display:grid;place-items:center;text-align:center;color:#fff;overflow:hidden}.cta:after{content:"";position:absolute;inset:0;background:rgba(8, 42, 94,.9)}.cta div{position:relative;z-index:1;max-width:720px;padding:34px}.footer{background:var(--green);color:#fff;padding:38px clamp(16px,5vw,72px);display:grid;grid-template-columns:1fr auto;gap:20px}.footer p,.footer small{color:rgba(255,255,255,.62)}.footer nav{display:flex;gap:18px;color:rgba(255,255,255,.78)}.page-shell{min-height:calc(100vh - 64px);padding:42px clamp(16px,5vw,72px)}.page-hero{background:#fff;border:1px solid var(--line);border-radius:18px;padding:34px;margin-bottom:24px}.page-hero.compact{max-width:1180px}.wide-search{max-width:520px;border-radius:14px;margin-top:18px}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px}.detail-main{background:#fff;border:1px solid var(--line);border-radius:18px;padding:34px}.detail-main h1{font-size:44px;margin:18px 0}.lesson-list{display:grid;gap:12px;margin-top:24px}.lesson{display:flex;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:14px}.lesson span{width:34px;height:34px;border-radius:10px;background:#EAF3FF;color:var(--green);display:grid;place-items:center;font-weight:800}.lesson small{display:block;color:var(--muted);margin-top:4px}.enroll-card{padding:24px;height:max-content}.price{display:block;font-size:30px;margin-bottom:16px}.enroll-card li{margin:10px 0}.dashboard-body{background:var(--bg)}.sidebar{position:fixed;top:0;right:0;width:268px;height:100vh;background:#fff;border-left:1px solid var(--line);box-shadow:0 1px 3px rgba(15,23,42,.06);display:flex;flex-direction:column;z-index:20}.side-brand{padding:18px;border-bottom:1px solid var(--line)}.role-pill{margin:14px 16px;padding:10px 12px;border-radius:12px;background:#EEF5FF;color:var(--green);font-weight:800;font-size:13px}.side-nav{padding:0 12px 12px;overflow:auto;display:grid;gap:4px}.side-nav a,.logout{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;color:#64748b;font-weight:700;font-size:14px}.side-nav a span{width:22px;display:grid;place-items:center}.side-nav a.active{background:var(--green);color:#fff;box-shadow:0 1px 3px rgba(15,23,42,.1)}.logout{margin:auto 12px 12px;border-top:1px solid var(--line);color:#a33}.dashboard{margin-right:268px;min-height:100vh}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:9;display:flex;align-items:center;justify-content:space-between;padding:0 22px;gap:18px}.icon-btn{display:none;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--green);place-items:center}.top-search{max-width:360px;flex:1}.top-search input{border-radius:13px;min-height:40px;background:#F8FBFF}.user-chip{display:flex;align-items:center;gap:10px}.user-chip span{width:34px;height:34px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center}.dashboard-main{padding:24px}.dashboard-hero{position:relative;min-height:190px;border-radius:18px;overflow:hidden;display:flex;align-items:center;margin-bottom:20px;color:#fff;background:var(--green)}.dashboard-hero:after{content:"";position:absolute;inset:0;background:rgba(8, 42, 94,.82)}.dashboard-hero div{position:relative;z-index:1;padding:28px}.dashboard-hero h1{font-size:34px;margin:12px 0 8px;font-weight:900}.dashboard-hero p{color:rgba(255,255,255,.72)}.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:20px}.stat-card{padding:20px;background:linear-gradient(225deg,rgba(8, 42, 94,.08),rgba(8, 42, 94,.03));overflow:hidden;position:relative}.stat-card span{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:16px;background:rgba(8, 42, 94,.1);color:var(--green);margin-bottom:12px}.stat-card small{display:block;color:var(--muted);font-weight:700}.stat-card strong{display:block;font-size:30px;margin-top:5px}.content-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px}.panel{padding:20px}.panel.wide{grid-row:span 2}.panel-head{display:flex;justify-content:space-between;align-items:center}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:620px}th,td{text-align:right;padding:14px;border-bottom:1px solid var(--line)}th{color:var(--muted);font-size:13px}.status{display:inline-flex;background:#EAF3FF;color:var(--green);border-radius:999px;padding:5px 10px;font-weight:800;font-size:12px}.quick-actions{display:grid;gap:10px}.quick-actions button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px;text-align:right;cursor:pointer}.notice-list{padding-right:18px;color:var(--muted);line-height:2}.dialog{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;place-items:center;z-index:40}.dialog.open{display:grid}.dialog>div{background:#fff;border-radius:18px;padding:24px;width:min(420px,92vw);position:relative}.dialog button[data-dialog-close]{position:absolute;left:14px;top:12px;border:0;background:#F4F8FF;border-radius:8px;width:32px;height:32px}.empty-state{text-align:center;display:grid;place-items:center;align-content:center}body.sidebar-open .sidebar{transform:translateX(0)}@media(max-width:980px){.feature-grid,.course-grid,.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-layout,.content-grid{grid-template-columns:1fr}.sidebar{transform:translateX(100%);transition:.25s}.dashboard{margin-right:0}.icon-btn{display:grid}.nav-links{display:none}.public-nav{padding-inline:14px}.footer{grid-template-columns:1fr}.hero-content{margin:auto;padding-top:90px}.section-row{align-items:start;gap:14px;flex-direction:column}}@media(max-width:620px){.feature-grid,.course-grid,.stat-grid{grid-template-columns:1fr}.nav-actions .ghost{display:none}.search-panel{flex-direction:column;border-radius:16px}.hero h1{font-size:42px}.dashboard-main{padding:14px}.top-search{display:none}.footer nav{flex-direction:column}.public-nav .brand span:last-child{display:none}}.public-nav{height:65px;padding-inline:32px}.public-nav .brand span:last-child{font-size:16px;font-weight:700;color:#111827}.public-nav .brand-mark{width:36px;height:36px;border-radius:12px}.nav-links{gap:24px}.nav-links a{font-size:14px;font-weight:500;color:#6b7280}.nav-actions{gap:12px}.nav-actions .btn{height:36px;min-height:36px;border-radius:12px;padding:8px 16px;font-size:14px;font-weight:500}.nav-actions .primary{box-shadow:none}.nav-actions .ghost{color:#111827;border-color:#e5e7eb;box-shadow:0 2px 8px rgba(15,23,42,.06)}.hero{height:560px;min-height:560px;max-height:560px;background:#0B3D91}.hero>img{opacity:.58;filter:saturate(.82)}.hero-overlay{background:linear-gradient(to left,rgba(8, 42, 94,.97) 45%,rgba(8, 42, 94,.75) 75%,rgba(8, 42, 94,.4) 100%)}.hero:before{content:"";position:absolute;inset:0;z-index:1;opacity:.055;background-image:radial-gradient(circle at 1px 1px,#fff 1px,transparent 0);background-size:40px 40px}.hero-content{z-index:2;text-align:right;width:576px;max-width:calc(100% - 64px);margin-right:32px;margin-left:auto;padding:0;color:#fff}.hero .badge{margin-bottom:20px;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.22);border-radius:10px;color:#fff;padding:6px 12px;font-size:12px;font-weight:700}.hero h1{font-size:60px;line-height:1;margin:0 0 16px;font-weight:900;letter-spacing:0}.hero h1 span{color:#fbbf24}.hero p{font-size:18px;line-height:1.55;color:rgba(255,255,255,.7);margin:0 0 32px}.reference-search{margin:0 0 32px 0;width:448px;max-width:100%;height:48px;border-radius:12px;box-shadow:none;background:#fff;display:flex;flex-direction:row-reverse}.reference-search input{height:48px;min-height:48px;border:0;text-align:right;color:#1f2937;padding:4px 40px 4px 12px;border-radius:0 12px 12px 0;font-size:14px}.reference-search input::placeholder{color:#9ca3af}.reference-search .search-action{height:48px;min-height:48px;border-radius:12px 0 0 12px;width:64px;padding:8px 20px;color:#0B3D91;background:#fbbf24;font-size:14px;font-weight:700;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1)}.hero-stats{justify-content:flex-start;gap:16px}.hero-stats div{height:38px;border-radius:12px;padding:8px 12px;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.1);backdrop-filter:blur(8px);flex-direction:row-reverse}.hero-stats .svg-icon{width:16px;height:16px;color:#fbbf24}.hero-stats strong{font-size:14px;font-weight:800}.hero-stats small{font-size:12px;color:rgba(255,255,255,.6)}.section{padding:96px 32px}.section-heading{margin-bottom:64px}.section-heading h2{font-size:36px;line-height:1.12}.section-heading p{color:#64748b}.feature-grid,.course-grid{max-width:954px;margin-inline:auto;gap:24px}.feature-card{height:100%;min-height:197px;padding:24px;border:0;border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.05);transform:none}.feature-card:hover{box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);transform:none}.feature-card h3{font-size:16px;margin:0 0 8px}.feature-card p{font-size:14px;line-height:1.7;color:#64748b}.feature-card .icon{width:56px;height:56px;border-radius:16px;margin-bottom:16px}.section.muted{background:#f9fafb}.section-row{max-width:954px;margin-inline:auto;margin-bottom:32px}.section-row h2{font-size:30px;line-height:1.2;margin:0 0 8px}.section-row p{color:#64748b}.course-grid{grid-template-columns:repeat(4,minmax(0,1fr));justify-content:end}.course-card{width:100%;border:0;border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.05);transform:none}.course-card:hover{box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);transform:none}.course-cover{aspect-ratio:16/9}.course-body{padding:16px}.course-badges{display:flex;gap:8px;margin-bottom:12px}.course-body .badge{font-size:10px;font-weight:400;padding:2px 8px;background:#fff;color:#64748b;border-color:#e5e5e5}.course-body h3{font-size:14px;line-height:1.65;margin:0 0 12px}.course-body p{font-size:12px;line-height:1;color:#64748b;margin:0 0 14px}.course-stats{font-size:12px;margin:0 0 12px;gap:16px;color:#64748b}.course-stats .svg-icon{width:14px;height:14px}.course-meta{margin-top:12px;padding-top:8px;border-color:#e5e5e5}.course-meta strong{font-size:18px}.progress{display:none}@media(max-width:980px){.public-nav{padding-inline:16px}.hero-content{margin-inline:auto;text-align:center}.reference-search{margin-inline:auto}.hero-stats{justify-content:center}.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.hero{height:auto;min-height:640px;max-height:none}.hero h1{font-size:48px}.reference-search{height:auto;flex-direction:column}.reference-search input,.reference-search .search-action{width:100%;border-radius:12px}.reference-search .search-action{height:48px;min-height:48px}.hero-stats div{width:100%;justify-content:center}.course-grid{grid-template-columns:1fr}}.footer{display:block;background:#0B3D91;color:#fff;padding:48px 32px 32px}.footer-inner{max-width:954px;margin-inline:auto;display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px}.footer-brand-row{display:flex;align-items:center;gap:12px;margin-bottom:16px}.footer-brand-row .brand-mark{width:40px;height:40px;border-radius:12px;background:#fff;color:#0B3D91}.footer strong{font-size:16px}.footer h4{font-size:16px;margin:0 0 16px;color:#fff}.footer p{max-width:300px;line-height:1.75;margin:0;color:rgba(255,255,255,.6)}.footer-column{display:grid;align-content:start;gap:8px;color:rgba(255,255,255,.7)}.footer-column a{font-size:14px}.footer-bottom{max-width:954px;margin:32px auto 0;padding-top:32px;border-top:1px solid rgba(255,255,255,.1);text-align:center;color:rgba(255,255,255,.4);font-size:14px}.catalog-page{min-height:calc(100vh - 65px);background:#f9fafb}.catalog-hero{height:280px;position:relative;overflow:hidden;background:#0B3D91}.catalog-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.catalog-hero-overlay{position:absolute;inset:0;background:rgba(8, 42, 94,.74)}.catalog-hero-content{position:relative;z-index:1;max-width:1018px;margin-inline:auto;padding:48px 16px;color:#fff}.catalog-hero-content h1{font-size:36px;line-height:1.12;margin:0 0 16px;font-weight:900}.catalog-hero-content p{max-width:620px;margin:0 0 24px;color:rgba(255,255,255,.72);font-size:16px}.catalog-search-row{display:flex;gap:12px;align-items:center}.catalog-search-row input{width:min(586px,100%);height:48px;border:0;border-radius:12px;padding:0 16px;text-align:right;outline:none}.catalog-search-row .btn{height:48px;min-height:48px;border-radius:12px;background:#fff;color:#111827}.catalog-content{max-width:1018px;margin-inline:auto;padding:32px 16px 64px}.catalog-controls{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.catalog-controls p{font-weight:800;margin:0}.catalog-controls select{height:36px;border:1px solid #e5e5e5;border-radius:10px;background:#fff;padding:0 12px;color:#111827}.catalog-grid{max-width:none}.dashboard-body{background:#f9fafb}.sidebar{width:256px;background:#fff;border-left:1px solid #e5e5e5;box-shadow:0 1px 3px rgba(15,23,42,.06)}.dashboard{margin-right:256px}.topbar{height:65px;background:#fff;border-bottom:1px solid #e5e5e5;box-shadow:0 1px 2px rgba(15,23,42,.04);padding:0 24px}.dashboard-main{padding:24px;background:#f9fafb}.side-brand{height:65px;padding:12px 16px;border-bottom:1px solid #e5e5e5}.side-brand .brand-mark{width:40px;height:40px;border-radius:12px}.side-brand span:last-child{font-size:15px;line-height:1.4}.role-pill{margin:12px 16px;border-radius:10px;background:#EEF5FF;color:#0B3D91}.side-nav{padding:0 12px 12px;gap:4px}.side-nav a,.logout{border-radius:10px;font-size:14px;font-weight:500;color:#64748b}.side-nav a.active{background:#0B3D91;color:#fff;box-shadow:none}.dashboard-hero{border-radius:12px;min-height:180px}.role-university .sidebar{background:#0B3D91;color:#fff;border-left:0;box-shadow:none}.role-university .side-brand{border-bottom-color:rgba(255,255,255,.1)}.role-university .side-brand .brand-mark{background:rgba(255,255,255,.12);color:#fff}.role-university .role-pill{background:rgba(255,255,255,.1);color:#fff}.role-university .side-nav a,.role-university .logout{color:rgba(255,255,255,.72)}.role-university .side-nav a.active{background:rgba(255,255,255,.14);color:#fff}.role-university .logout{border-top-color:rgba(255,255,255,.1)}.role-university .dashboard-main{padding:24px}@media(max-width:980px){.footer-inner{grid-template-columns:1fr 1fr}.catalog-search-row{align-items:stretch;flex-direction:column}.catalog-search-row input,.catalog-search-row .btn{width:100%}.sidebar{transform:translateX(100%);transition:.25s}.dashboard{margin-right:0}.icon-btn{display:grid}}@media(max-width:620px){.footer{padding-inline:20px}.footer-inner{grid-template-columns:1fr}.catalog-hero{height:auto;min-height:320px}.catalog-hero-content h1{font-size:30px}.catalog-controls{align-items:stretch;gap:12px;flex-direction:column}.catalog-controls select{width:100%}}.page-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px}.page-header h1{margin:0;font-size:24px;font-weight:800}.page-header p{margin:4px 0 0;color:#6b7280;font-size:14px}.topbar-title{display:inline-flex;align-items:center;gap:8px;font-weight:800;color:#374151}.react-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:24px}.react-main,.react-side{display:grid;gap:24px;align-content:start}.data-card{overflow:hidden}.stat-card.stat-success span{background:rgba(16,185,129,.1);color:#0B3D91}.stat-card.stat-accent span,.stat-card.stat-warning span{background:rgba(245,158,11,.12);color:#d97706}.stat-card.stat-blue span{background:rgba(37,99,235,.1);color:#2563eb}.learning-list,.session-list,.record-cards{display:grid;gap:12px}.learning-row{display:grid;grid-template-columns:56px minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:14px}.learning-row .thumb{width:56px;height:56px;border-radius:14px;background:#EAF3FF;color:var(--green);display:grid;place-items:center}.learning-row strong,.record-cards strong{display:block;font-size:14px}.learning-row small,.session-list small,.record-cards p{color:#6b7280;font-size:12px}.mini-course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mini-course{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}.mini-course img{aspect-ratio:16/9;width:100%;object-fit:cover}.mini-course strong,.mini-course small{display:block;padding:0 12px}.mini-course strong{padding-top:12px}.mini-course small{padding-bottom:12px;color:#6b7280}.session-list article,.record-cards article{border:1px solid var(--line);border-radius:14px;padding:14px;background:#fff}.session-list .soon,.session-card.live{border-right:4px solid #ef4444;background:#fff7f7}.sessions-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}.session-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}.session-card h3{margin:12px 0 6px}.message-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px}.message-list{display:grid;gap:8px}.message-list button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px;text-align:right;display:grid;gap:4px}.message-list button.active{border-color:rgba(8, 42, 94,.25);background:#EAF3FF}.cert-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.certificate-card{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.04)}.cert-preview{padding:32px;text-align:center;min-height:190px;background:linear-gradient(135deg,#0B3D91,#0D6EFD 60%,#0B3D91);color:#fff;position:relative}.cert-preview:after{content:"";position:absolute;inset:10px;border:1px solid rgba(245,200,66,.25);border-radius:12px}.cert-preview span{font-size:48px;color:#facc15}.cert-preview small{display:inline-block;margin:10px 0;color:#facc15}.cert-preview h3{font-size:16px;line-height:1.5}.cert-body{padding:18px;text-align:center}.cert-body p{color:#6b7280;font-size:12px}.analytics-grid{display:grid;grid-template-columns:2fr 1fr;gap:18px}.wide-chart{grid-column:span 1}.donut{width:150px;height:150px;margin:18px auto;border-radius:50%;background:conic-gradient(#0B3D91 0 76%,#e5e7eb 76%);display:grid;place-items:center}.donut span{width:92px;height:92px;border-radius:50%;background:#fff;display:grid;place-items:center;font-weight:900}.legend{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;color:#6b7280;font-size:12px}.dashboard-catalog .catalog-list{display:grid;gap:12px}.catalog-list article{display:grid;grid-template-columns:88px minmax(0,1fr) auto;align-items:center;gap:14px;border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff}.catalog-list img{width:88px;height:64px;object-fit:cover;border-radius:12px}.catalog-list p{margin:.25rem 0 0;color:#6b7280;font-size:13px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.toolbar input,.settings-form input,.settings-form select,.settings-form textarea,.profile-form input,.profile-form textarea,.message-composer input,.message-composer textarea,.dialog input,.dialog select{border:1px solid var(--line);border-radius:12px;min-height:40px;padding:8px 12px;background:#fff;color:var(--ink)}.toolbar input{min-width:190px}.tabs{display:flex;gap:8px;margin:18px 0;border-bottom:1px solid var(--line);padding-bottom:10px}.tabs button{border:1px solid var(--line);background:#fff;border-radius:12px;padding:9px 14px;cursor:pointer}.tabs button.active{background:var(--green);color:#fff}.mini-input{width:90px;border:1px solid var(--line);border-radius:10px;padding:6px}.row-action{border:0;border-radius:10px;background:#fee2e2;color:#991b1b;padding:7px 10px;cursor:pointer}.settings-form,.profile-form,.message-composer,.quiz{display:grid;gap:14px;max-width:620px}.settings-form label,.profile-form label,.message-composer label,.dialog label{display:grid;gap:6px;font-weight:700;color:#334155}.check-row{display:flex!important;align-items:center;gap:8px}.button-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.certificate-box{border:2px solid var(--green);border-radius:18px;padding:30px;text-align:center;background:#fffdf7}.certificate-box h3{font-size:34px;margin:0 0 12px}.invoice{display:grid;gap:10px;max-width:440px}.invoice div{display:flex;justify-content:space-between;border-bottom:1px solid var(--line);padding:10px 0}.quiz label{border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff}.message-composer textarea,.profile-form textarea{min-height:110px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.calendar-grid button{border:1px solid var(--line);background:#fff;border-radius:14px;padding:16px 8px;display:grid;gap:8px;cursor:pointer}.calendar-grid small{color:var(--muted)}.mini-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.mini-cards article{border:1px solid var(--line);border-radius:16px;padding:18px;background:#fff}.mini-cards progress{width:100%;height:10px}.mini-cards button{margin-top:12px;border:0;border-radius:10px;background:var(--green);color:#fff;padding:9px 12px}.chart-bars{height:230px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(#fff,#F8FBFF);display:flex;align-items:end;gap:18px;padding:18px}.chart-bars span{flex:1;background:linear-gradient(180deg,#f2b84b,#0B3D91);border-radius:10px 10px 0 0}.kanban{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.kanban section{background:#F8FBFF;border:1px solid var(--line);border-radius:16px;padding:14px}.kanban button{width:100%;border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px;text-align:right;cursor:grab}.toast{position:fixed;left:22px;bottom:22px;background:var(--green);color:#fff;border-radius:14px;padding:12px 16px;box-shadow:0 16px 40px rgba(0,0,0,.18);opacity:0;transform:translateY(12px);transition:.2s;z-index:60;pointer-events:none}.toast.show{opacity:1;transform:translateY(0)}.dialog form{background:#fff;border-radius:18px;padding:24px;width:min(460px,92vw);position:relative;display:grid;gap:12px}@media(max-width:980px){.react-grid,.analytics-grid,.message-layout{grid-template-columns:1fr}.sessions-grid,.cert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.page-header{align-items:flex-start;flex-direction:column}.panel-head{align-items:flex-start;gap:12px;flex-direction:column}.calendar-grid,.mini-cards,.kanban,.sessions-grid,.cert-grid,.mini-course-grid{grid-template-columns:1fr}.toolbar input{width:100%}.learning-row{grid-template-columns:44px minmax(0,1fr);}.learning-row .btn,.learning-row small{grid-column:2}.catalog-list article{grid-template-columns:72px minmax(0,1fr)}.catalog-list .status{grid-column:2}}@media print{body>*:not(.dashboard):not(main){display:none!important}.sidebar,.topbar,.button-row,.toolbar,.tabs,.quick-actions{display:none!important}.dashboard{margin:0}.dashboard-main{padding:0}.panel,.certificate-box,.invoice{box-shadow:none;border-color:#111}}



@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --font-cairo: 'Cairo', sans-serif;
    --font-inter: 'Inter', sans-serif;

    /* White/light base */
    --background: 0 0% 97%;
    --foreground:222 47% 11%;
    --card: 0 0% 100%;
    --card-foreground:222 47% 11%;
    --popover: 0 0% 100%;
    --popover-foreground:222 47% 11%;
    --primary:216 98% 52%;
    --primary-foreground: 0 0% 100%;
    --secondary: 0 0% 94%;
    --secondary-foreground:222 47% 20%;
    --muted: 0 0% 94%;
    --muted-foreground:215 16% 47%;
    --accent: 35 92% 50%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 72% 51%;
    --destructive-foreground: 0 0% 100%;
    --border: 0 0% 88%;
    --input: 0 0% 88%;
    --ring:216 98% 52%;
    --chart-1:216 98% 52%;
    --chart-2:204 94% 58%;
    --chart-3: 35 92% 50%;
    --chart-4: 340 65% 55%;
    --chart-5: 200 70% 50%;
    --radius: 0.75rem;
    --sidebar-background: 0 0% 100%;
    --sidebar-foreground:222 47% 11%;
    --sidebar-primary:216 98% 52%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 0 0% 95%;
    --sidebar-accent-foreground:222 47% 11%;
    --sidebar-border: 0 0% 90%;
    --sidebar-ring:216 98% 52%;
    --success: 152 60% 40%;
    --success-foreground: 0 0% 100%;
    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;
    --hero-bg:218 84% 20%;
  }
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground font-cairo;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: hsl(var(--muted-foreground) / 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--muted-foreground) / 0.4); }

/* Accessible blue theme overrides for final compiled legacy surfaces. */
:root {
  --theme-gradient: linear-gradient(135deg, #082A5E 0%, #0B3D91 55%, #0A58CA 100%);
  --theme-button-gradient: linear-gradient(135deg, #082A5E 0%, #0B3D91 56%, #0A58CA 100%);
  --theme-button-hover: linear-gradient(135deg, #061D42 0%, #082A5E 55%, #0B3D91 100%);
  --theme-focus-ring: #0B3D91;
}
