/* Droocy UI V11 — final global polish, compact LMS layout and visible tables */
:root{
 --d11-primary:#5b46d8;--d11-primary2:#8069ee;--d11-pink:#ef5da8;--d11-cyan:#18a6c9;
 --d11-success:#0d9b6c;--d11-warning:#d98a12;--d11-danger:#d64545;
 --d11-bg:#f5f7fb;--d11-surface:#fff;--d11-ink:#182230;--d11-text:#344054;--d11-muted:#667085;
 --d11-line:#cfd4dc;--d11-line-soft:#e1e5eb;--d11-shadow:0 12px 34px rgba(52,44,116,.08);
}
html{scroll-behavior:smooth} body{background:var(--d11-bg)!important;color:var(--d11-text);font-family:"Cairo",Tahoma,Arial,sans-serif!important}
main,.wrap,.container,.page,.page-wrap,.content,.admin-wrap,.teacher-wrap,.student-wrap{box-sizing:border-box}
/* tighten the pages without crushing content */
.wrap,.container,.page-wrap,.admin-wrap,.teacher-wrap,.student-wrap{max-width:1450px!important;margin-inline:auto!important}
.wrap,.page-wrap,.admin-wrap,.teacher-wrap,.student-wrap{padding-top:18px!important;padding-bottom:28px!important}
section+section,.card+.card,.panel+.panel{margin-top:12px}
h1,h2,h3{color:var(--d11-ink);letter-spacing:-.25px} h1{line-height:1.35} p{line-height:1.75}
/* universal cards/panels */
.card,.panel,.box,.section-card,.stat,.stat-card,.summary-card,.filter-box,.form-card,.table-card{
 border-color:var(--d11-line-soft)!important;box-shadow:0 7px 24px rgba(31,35,67,.045);background:#fff
}
.card,.panel,.box,.section-card,.form-card,.table-card{border-radius:15px!important}
/* visible neutral text */
.muted,.meta,.hint,.helper-text,.subtitle,.description,small,.card small,.card p,.course-meta,.lesson-meta,.section-meta{color:#5f6c7b!important;opacity:1!important}
/* tables: visible grey grid, compact rows, sticky header where possible */
.table-wrap,.table-responsive,.table-container{overflow:auto!important;border:1px solid var(--d11-line)!important;border-radius:14px!important;background:#fff}
table{border-collapse:separate!important;border-spacing:0!important;background:#fff!important}
table:not(.no-d11-grid){border:1px solid var(--d11-line)!important;border-radius:12px;overflow:hidden}
table:not(.no-d11-grid) th,table:not(.no-d11-grid) td{border-left:1px solid #d9dde4!important;border-bottom:1px solid #d9dde4!important;padding:9px 10px!important;vertical-align:middle!important}
table:not(.no-d11-grid) th:last-child,table:not(.no-d11-grid) td:last-child{border-left:0!important}
table:not(.no-d11-grid) tbody tr:last-child td{border-bottom:0!important}
table:not(.no-d11-grid) thead th{background:#f0f2f6!important;color:#344054!important;font-weight:900!important;white-space:nowrap!important}
table:not(.no-d11-grid) tbody tr:nth-child(even){background:#fafbfc!important}
table:not(.no-d11-grid) tbody tr:hover{background:#f4f2ff!important}
/* forms */
input:not([type=checkbox]):not([type=radio]),select,textarea{border:1px solid #cdd3dc!important;border-radius:10px!important;background:#fff!important;color:#182230!important;min-height:41px}
textarea{min-height:105px!important} input:focus,select:focus,textarea:focus{outline:0!important;border-color:#8069ee!important;box-shadow:0 0 0 3px rgba(128,105,238,.12)!important}
label{color:#344054;font-weight:800}
/* buttons */
button,.btn,.button,.action-btn{border-radius:10px!important;transition:transform .15s ease,box-shadow .15s ease,filter .15s ease}
button:hover,.btn:hover,.button:hover,.action-btn:hover{transform:translateY(-1px)}
.btn-primary,.primary,.save-btn{box-shadow:0 6px 16px rgba(91,70,216,.16)}
/* headers */
.droocy-site-header{border-bottom:1px solid #dfe3ea!important;box-shadow:0 6px 24px rgba(28,25,70,.055)!important}
.droocy-header-inner{max-width:1480px!important}.droocy-nav-link{font-size:10.5px!important;padding-inline:10px!important}
.droocy-nav-link.active{box-shadow:inset 0 0 0 1px #d7d0fb!important}
.droocy-admin-utility{background:linear-gradient(90deg,#28214f,#453779)!important}
/* page title banner, used by new LMS/AI pages */
.d11-shell{max-width:1450px;margin:auto;padding:18px 20px 32px;direction:rtl}
.d11-hero{position:relative;overflow:hidden;background:linear-gradient(135deg,#fff,#f5f2ff 58%,#eefbff);border:1px solid #dadfea;border-radius:18px;padding:18px 20px;box-shadow:var(--d11-shadow);display:flex;justify-content:space-between;align-items:center;gap:18px}
.d11-hero:after{content:"";position:absolute;left:-75px;top:-95px;width:230px;height:230px;border-radius:50%;background:radial-gradient(circle,rgba(239,93,168,.14),rgba(91,70,216,0) 68%)}
.d11-hero h1{font-size:25px;margin:0 0 5px}.d11-hero p{font-size:12px;margin:0;color:#667085}.d11-badge{display:inline-flex;align-items:center;gap:6px;background:#eeeaff;color:#5b46d8;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:900;margin-bottom:8px}
.d11-actions{display:flex;gap:7px;flex-wrap:wrap}.d11-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px;padding:0 13px;border:1px solid #d6dbe4;border-radius:10px;background:#fff;color:#344054;text-decoration:none;font-size:11px;font-weight:900;cursor:pointer}.d11-btn.primary{background:linear-gradient(135deg,#5b46d8,#8069ee)!important;color:#fff!important;border-color:transparent!important}.d11-btn.soft{background:#f2efff;border-color:#ded7ff;color:#5b46d8}.d11-btn.success{background:#ecfdf3;border-color:#b7ebce;color:#087a55}.d11-btn.danger{background:#fff1f1;border-color:#f5c8c8;color:#b42318}
.d11-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-top:12px}.d11-card{background:#fff;border:1px solid var(--d11-line-soft);border-radius:15px;padding:14px;box-shadow:0 5px 20px rgba(31,35,67,.045)}.d11-card h2,.d11-card h3{margin:0 0 7px;font-size:15px}.d11-card p{font-size:11px;color:#667085;margin:0 0 10px}.d11-card strong.metric{font-size:25px;color:#2f255d;display:block;line-height:1.2}.d11-card .metric-label{font-size:10px;color:#667085}.d11-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(135deg,#eeeaff,#f9eff8);color:#6048d2;font-size:17px;margin-bottom:9px}
.d11-two{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);gap:12px;margin-top:12px}.d11-panel{background:#fff;border:1px solid var(--d11-line-soft);border-radius:15px;padding:14px;box-shadow:0 5px 20px rgba(31,35,67,.04)}.d11-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.d11-panel-head h2{font-size:17px;margin:0}.d11-empty{padding:24px;text-align:center;border:1px dashed #cfd5de;border-radius:12px;background:#fafbfc;color:#667085;font-size:11px}
.d11-list{display:grid;gap:8px}.d11-list-item{border:1px solid #dfe3e9;border-radius:12px;padding:11px;background:#fff;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.d11-list-item h3{font-size:13px;margin:0 0 4px}.d11-list-item p{font-size:10.5px;margin:0;color:#667085}.d11-pill{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;background:#f0edff;color:#5b46d8;font-size:9px;font-weight:900;white-space:nowrap}.d11-pill.green{background:#eaf9f2;color:#087a55}.d11-pill.orange{background:#fff5e8;color:#a15c00}.d11-pill.red{background:#fff0f0;color:#b42318}
.d11-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.d11-field{display:grid;gap:5px}.d11-field.full{grid-column:1/-1}.d11-field label{font-size:10px}.d11-field input,.d11-field select,.d11-field textarea{width:100%;padding:9px 10px;font:700 11px "Cairo",sans-serif}.d11-note{padding:10px 11px;border:1px solid #d8d1ff;background:#f5f2ff;border-radius:11px;color:#4c3baa;font-size:10.5px;line-height:1.7}.d11-error{padding:10px 11px;border:1px solid #f2c4c4;background:#fff3f3;border-radius:11px;color:#a92727;font-size:10.5px}.d11-success{padding:10px 11px;border:1px solid #bfe8d3;background:#effbf5;border-radius:11px;color:#087a55;font-size:10.5px}
.d11-ai-console{border:1px solid #cfd5df;border-radius:14px;overflow:hidden;background:#fff}.d11-ai-output{min-height:230px;max-height:520px;overflow:auto;padding:15px;white-space:pre-wrap;line-height:1.9;font-size:12px;background:linear-gradient(180deg,#fbfbff,#fff)}
/* reduce exaggerated vertical whitespace in legacy screens */
@media(min-width:761px){.spacer,.big-spacer{min-height:0!important;height:auto!important}.hero,.page-hero{min-height:0!important}}
@media(max-width:1050px){.d11-grid{grid-template-columns:repeat(2,1fr)}.d11-two{grid-template-columns:1fr}}
@media(max-width:700px){.d11-shell{padding:12px 10px 24px}.d11-hero{padding:14px;display:block}.d11-hero h1{font-size:21px}.d11-actions{margin-top:10px}.d11-grid{grid-template-columns:1fr}.d11-form-grid{grid-template-columns:1fr}.d11-field.full{grid-column:auto}table:not(.no-d11-grid) th,table:not(.no-d11-grid) td{padding:8px!important;font-size:10.5px!important}.droocy-nav-link{font-size:10px!important}}

/* V12 — AI Studio source-file uploader */
.d11-subtext{margin:3px 0 0;color:#667085;font-size:10.5px}.d11-file-input{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
.d11-upload{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px;border:1.5px dashed #bdb5f2;border-radius:14px;background:linear-gradient(135deg,#faf9ff,#f7fbff);cursor:pointer;transition:.18s ease;min-height:78px}.d11-upload:hover{border-color:#735ce5;background:#f6f3ff;box-shadow:0 7px 20px rgba(91,70,216,.08);transform:translateY(-1px)}
.d11-upload-icon{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,#5b46d8,#8069ee);display:grid;place-items:center;color:#fff;font-size:22px;font-weight:900;box-shadow:0 7px 18px rgba(91,70,216,.19)}.d11-upload strong{display:block;color:#27223f;font-size:12px;margin-bottom:2px}.d11-upload small{display:block;color:#667085!important;font-size:9.5px}.d11-upload-status{max-width:290px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 9px;border-radius:9px;background:#fff;border:1px solid #e0e3ea;color:#667085;font-size:9.5px;font-weight:800}.d11-upload-status.selected{color:#087a55;background:#ecfdf3;border-color:#b7ebce}.d11-optional{font-size:9px;color:#8069ee;background:#f1efff;padding:2px 6px;border-radius:999px;margin-right:5px}.d11-prompt{min-height:160px!important}.d11-create-btn{min-width:150px}.d11-ai-console-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;background:#f6f7fb;border-bottom:1px solid #dde1e8;font-size:10.5px}.d11-ai-console-head strong{font-size:12px;color:#28233e}.d11-ai-console-head span{color:#667085;direction:ltr;max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){.d11-upload{grid-template-columns:42px 1fr}.d11-upload-status{grid-column:1/-1;max-width:none;width:100%;box-sizing:border-box}.d11-ai-console-head{align-items:flex-start;flex-direction:column}.d11-ai-console-head span{max-width:100%}}
/* Droocy V13 AI workflow */
.ai13-shell{max-width:1540px}.ai13-grid{display:grid;grid-template-columns:260px minmax(0,1fr) 280px;gap:14px;margin-top:14px;align-items:start}.ai13-main{min-height:620px}.ai13-sidebar,.ai13-settings{position:sticky;top:86px}.ai13-side-head,.ai13-project-head,.ai13-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.ai13-projects{display:grid;gap:7px;margin-top:12px;max-height:620px;overflow:auto}.ai13-project{display:block;padding:11px 12px;border:1px solid #e2e5ec;border-radius:12px;text-decoration:none;color:#20243a;background:#fff}.ai13-project:hover,.ai13-project.active{border-color:#8067ef;background:#f7f4ff}.ai13-project strong{display:block;font-size:13px}.ai13-project span{display:block;font-size:11px;color:#777b8f;margin-top:3px}.ai13-project-head{border-bottom:1px solid #e7e9ef;padding-bottom:12px;margin-bottom:12px}.ai13-project-head h2{margin:5px 0 2px}.ai13-project-head p{margin:0;color:#777b8f;font-size:12px}.ai13-status{display:inline-flex;padding:4px 9px;border-radius:999px;background:#f0edff;color:#6046d8;font-size:11px;font-weight:800}.ai13-status.approved{background:#e8f8ef;color:#147b46}.ai13-textarea{width:100%;min-height:500px;resize:vertical;border:1px solid #d9dde7;border-radius:14px;padding:18px;font:500 14px/2 Cairo,sans-serif;background:#fff;box-sizing:border-box}.ai13-actions{justify-content:flex-start;margin-top:10px;flex-wrap:wrap}.ai13-scenes{opacity:.75}.ai13-details{margin-top:14px;border:1px solid #e2e5ec;border-radius:12px;padding:10px 12px}.ai13-details summary{cursor:pointer;font-weight:800}.ai13-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.ai13-meta>div{border:1px solid #e2e5ec;border-radius:12px;padding:12px;display:grid;gap:5px}.ai13-meta span,.ai13-meta small{font-size:11px;color:#6e7284}.ai13-create{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:1180px){.ai13-grid{grid-template-columns:230px minmax(0,1fr)}.ai13-settings{grid-column:1/-1;position:static}}@media(max-width:780px){.ai13-grid{grid-template-columns:1fr}.ai13-sidebar,.ai13-settings{position:static}.ai13-create,.ai13-meta{grid-template-columns:1fr}.ai13-textarea{min-height:420px}}

/* V13.2 — AI project academic context */
.ai13-context{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.ai13-context span{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border:1px solid #ded9fa;border-radius:999px;background:#f8f6ff;color:#5440bf;font-size:9.5px;font-weight:850}.ai13-create select:disabled{background:#f4f5f7!important;color:#8a8f9c!important;cursor:not-allowed}

/* ===== V13.8 cross-platform visual polish ===== */
/* Force readable white headings on branded/colored surfaces. */
.hero[style*="background"] h1,.hero[style*="background"] h2,
.course-banner h1,.course-banner h2,.cover h1,.cover h2,
.sd-progress-card h1,.sd-progress-card h2,.sd-progress-card h3,
[class*="hero"] .is-on-color,.on-color-title{color:#fff!important}
/* Student course screen has generic class names which can be overridden by platform CSS loaded later. */
body .page>.hero h1,body .page>.hero .hero-count strong,body .grid .cover h2{color:#fff!important;text-shadow:0 1px 1px rgba(0,0,0,.08)}
body .page>.hero p,body .page>.hero .hero-count span{color:#e9e5ff!important}
/* Consistent text spacing and long-content protection. */
.droocy-rich-text,.rich-content,.course-rich-copy,.hero-rich-text,.sd-ann-rich{overflow-wrap:anywhere;word-break:normal}
.droocy-rich-text img,.rich-content img{max-width:100%;height:auto}.droocy-rich-text table,.rich-content table{max-width:100%;display:block;overflow-x:auto}
/* Prevent huge accidental empty blocks on common panels. */
.d11-panel:empty{display:none}.d11-list-item{align-items:flex-start}.d11-list-item h3{overflow-wrap:anywhere}
/* V13.8 layout audit fixes */
.d11-two{align-items:start!important}.d11-panel{align-self:start}.d11-shell{width:min(1500px,calc(100% - 24px));max-width:1500px}
.d11-panel,.d11-card{min-width:0}.d11-form-grid textarea{line-height:1.8}
@media(max-width:700px){.d11-shell{width:100%;}.droocy-site-header{position:relative}}

/* ===== V13.9 AI Studio project management + true rich editor ===== */
.ai13-head-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.ai13-head-actions form{margin:0}.ai13-project-edit{margin:0 0 14px;background:#fbfaff;border-color:#ddd7fb}.ai13-project-edit[open]{padding-bottom:14px}.ai13-project-edit summary{color:#503bb9}.ai13-editor-label{display:block;margin:0 0 7px;font-size:11px;font-weight:900;color:#2b3042}.ai13-editor-label small{color:#746f89;font-weight:700}.ai13-editor .droocy-rte{min-height:480px}.ai13-editor .droocy-rte-editor{min-height:420px;font-size:14px;line-height:2}.ai13-editor .droocy-rte-source{min-height:420px;direction:ltr;text-align:left;font:13px/1.7 Consolas,monospace}.ai13-model-state{display:grid;gap:6px;margin:10px 0 12px;padding:9px 10px;border:1px solid #e4e0f8;border-radius:11px;background:#fbfaff}.ai13-model-state small{font-size:9.5px;color:#6c6880}.ai13-settings .d11-note strong{font-size:11px}.ai13-project-edit select option[hidden]{display:none}.droocy-rte-editor:empty:before{content:'اكتب النص أو استخدم زر </> HTML لإدخال كود HTML مباشرة';color:#9aa0ad;pointer-events:none}.droocy-rte-source{white-space:pre;tab-size:2}
@media(max-width:780px){.ai13-head-actions{width:100%;justify-content:flex-start}.ai13-project-head{align-items:flex-start;flex-direction:column}.ai13-editor .droocy-rte{min-height:360px}.ai13-editor .droocy-rte-editor,.ai13-editor .droocy-rte-source{min-height:320px}}

/* V13.15 long-summary processing note */
.ai-long-summary-note{margin-top:8px;padding:9px 11px;border:1px solid #dbe4ff;border-radius:11px;background:#f7f9ff;color:#4b5563;font-size:10px;line-height:1.8}
\n\n


/* V13.18 — AI project multi-selection */
.ai18-project-selection-form{margin:0}
.ai18-selection-toolbar{
 display:grid;
 grid-template-columns:1fr;
 gap:6px;
 padding:8px;
 margin:8px 0 10px;
 border:1px solid #e2e6ef;
 border-radius:11px;
 background:#fafbff;
}
.ai18-select-all{display:flex;align-items:center;gap:6px;font-size:10px;font-weight:800;color:#566074;cursor:pointer}
.ai18-select-all input{accent-color:#6552e8}
.ai18-selection-count{font-size:9px;color:#8a91a0}
.ai18-selection-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.ai18-edit-selected,.ai18-delete-selected{
 min-height:30px;border-radius:8px;font-family:Cairo,sans-serif;font-size:10px;font-weight:900;cursor:pointer;transition:.16s ease
}
.ai18-edit-selected{border:1px solid #d5ccff;background:#f5f2ff;color:#5d45dc}
.ai18-delete-selected{border:1px solid #ffd0d0;background:#fff5f5;color:#c92e2e}
.ai18-edit-selected:disabled,.ai18-delete-selected:disabled{opacity:.38;cursor:not-allowed}
.ai13-project-row{position:relative}
.ai18-project-selector{
 position:absolute;left:10px;top:50%;transform:translateY(-50%);z-index:5;width:25px;height:25px;cursor:pointer
}
.ai18-project-selector input{position:absolute;opacity:0;pointer-events:none}
.ai18-checkbox-ui{
 display:flex;width:23px;height:23px;align-items:center;justify-content:center;
 border:2px solid #cfd5df;border-radius:6px;background:#fff;color:transparent;
 font-size:12px;font-weight:900;box-sizing:border-box;transition:.15s ease
}
.ai18-project-selector input:checked + .ai18-checkbox-ui{background:#6552e8;border-color:#6552e8;color:#fff}
.ai13-project-row .ai13-project{padding-left:47px!important}
.ai13-project-row.ai18-selected{outline:2px solid rgba(101,82,232,.22);border-color:#8d7ff0!important;background:#faf9ff}
.ai13-project-row.ai18-selected .ai13-project{background:#faf9ff!important}


/* =====================================================================
   V13.22 — FULL PLATFORM QA: admin + teacher + student + public
   ===================================================================== */
:root{
 --droocy-page-max:1500px;
 --droocy-radius:15px;
 --droocy-focus:rgba(101,71,216,.18);
}
/* Typography is now identical across legacy and new screens. */
html,body,button,input,select,textarea,optgroup{font-family:"Cairo",Tahoma,Arial,sans-serif!important}
button,input,select,textarea{font-size:inherit}
.droocy-rte-source,pre,code,kbd,samp{font-family:Consolas,"Courier New",monospace!important}

/* Global layout safety. */
html,body{max-width:100%;overflow-x:hidden}
main,section,article,aside,header,footer,nav,form,div{min-width:0}
img,video,canvas,svg{max-width:100%;height:auto}
iframe{max-width:100%}
figure{max-width:100%;margin-inline:0}
pre{max-width:100%;overflow:auto;direction:ltr;text-align:left;border-radius:10px}
.droocy-rich-text,.rich-content,.course-rich-copy,.lesson-content,.content-html{max-width:100%;overflow-wrap:anywhere}
.droocy-rich-text iframe,.rich-content iframe,.lesson-content iframe{width:100%;aspect-ratio:16/9;height:auto;border:0;border-radius:12px}

/* Tables never destroy mobile layouts. */
.table-wrap,.table-responsive,.table-container,.panel:has(>table){max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
table{max-width:100%}
@media(max-width:760px){
 table:not(.no-mobile-scroll){display:block!important;width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch}
 table:not(.no-mobile-scroll) thead,table:not(.no-mobile-scroll) tbody,table:not(.no-mobile-scroll) tr{width:max-content;min-width:100%}
}

/* Forms, filters and controls. */
input:not([type=checkbox]):not([type=radio]),select,textarea{max-width:100%;box-sizing:border-box}
button,.btn,.d11-btn,.action-btn,a.btn{min-height:36px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
 outline:2px solid #8069ee!important;outline-offset:2px!important;box-shadow:0 0 0 4px var(--droocy-focus)!important
}
button:disabled,.btn.disabled,[aria-disabled="true"]{cursor:not-allowed!important;opacity:.5!important;transform:none!important}
.droocy-coming-soon{display:inline-flex;align-items:center;min-height:30px;padding:0 9px;border-radius:8px;background:#f4f5f7;color:#7b8492;font-size:9px;font-weight:800}

/* One navigation system: hide obsolete fixed sidebars/topbars when unified header exists. */
body>.droocy-site-header~.side,
body>.droocy-site-header~.td-side,
body>.droocy-site-header~.t5-sidebar,
body>.droocy-site-header~.sd-sidebar,
body>.droocy-site-header~.dc-sidebar,
body>.droocy-site-header~.a6-sidebar{display:none!important}
body>.droocy-site-header~.logout,
body>.droocy-site-header~.dc-logout{display:none!important}
body>.droocy-site-header~.app,
body>.droocy-site-header~.td-app,
body>.droocy-site-header~.t5-app,
body>.droocy-site-header~.sd-app,
body>.droocy-site-header~.dc-app,
body>.droocy-site-header~.a6-app{margin-right:0!important;margin-inline-start:0!important;width:100%!important;max-width:100%!important}
body>.droocy-site-header~.app>.top,
body>.droocy-site-header~.td-app>.td-top,
body>.droocy-site-header~.t5-app>.t5-topbar,
body>.droocy-site-header~.sd-app>.sd-top,
body>.droocy-site-header~.dc-app>.dc-top,
body>.droocy-site-header~.a6-app>.a6-topbar{display:none!important}

/* Normalize legacy content shells after sidebar removal. */
.app>.content,.td-app>.td-content,.t5-app>.t5-content,.sd-app>.sd-content,.dc-app>.dc-content,.a6-app>.a6-content{
 width:min(var(--droocy-page-max),calc(100% - 28px))!important;max-width:var(--droocy-page-max)!important;margin-inline:auto!important;padding-inline:14px!important
}

/* Consistent card language without flattening branded sections. */
.card,.panel,.d11-panel,.d11-card,.section-card,.form-card,.table-card{
 border-radius:var(--droocy-radius)!important;border-color:#e2e6ee!important
}
.card h1,.card h2,.card h3,.panel h1,.panel h2,.panel h3{overflow-wrap:anywhere}

/* White text on known dark branded hero surfaces. */
.hero[style*="#251d59"] h1,.hero[style*="#251d59"] h2,
.t5-hero h1,.t5-hero h2,.t5-hero h3,
.sd-hero h1,.sd-hero h2,.sd-hero h3,
.a6-hero h1,.a6-hero h2,.a6-hero h3{color:#fff!important}
.t5-hero p,.sd-hero p,.a6-hero p{color:#eeeaff!important}

/* Lists, action rows and long names. */
.actions,.form-actions,.d11-actions,.student-actions,.row-actions{flex-wrap:wrap!important}
.actions>a,.actions>button,.form-actions>a,.form-actions>button{white-space:normal;text-align:center}
.name-cell,.course-title,.lesson-title,.user-name{overflow-wrap:anywhere}

/* Mobile density and readability. */
@media(max-width:760px){
 body{font-size:14px}
 .wrap,.page,.content,.d11-shell,.droocy-page-shell{padding-inline:10px!important}
 .stats,.kpis,.metrics,.cards{gap:9px!important}
 .card,.panel,.d11-panel,.d11-card{padding:12px!important}
 h1{font-size:clamp(21px,7vw,28px)!important}
 h2{font-size:clamp(17px,5.5vw,23px)}
 .toolbar,.page-head,.panel-head,.card-head{align-items:flex-start!important;gap:9px!important}
 .toolbar form,.search{max-width:100%!important;width:100%!important;min-width:0!important}
}


/* V13.23 — Desktop scale/layout regression fix
   Restores normal full-width desktop presentation after V13.22 QA polish. */
@media (min-width: 1100px){
  html{font-size:16px!important}
  body{zoom:1!important;transform:none!important}
  .platform-shell,
  .platform-main,
  .d11-shell,
  .d11-page,
  .admin-page,
  .teacher-page,
  .student-page{
    width:auto!important;
    max-width:none!important;
    transform:none!important;
    zoom:1!important;
  }

  /* Main application content should use the desktop viewport rather than
     looking like a tablet page centered in a large empty canvas. */
  main,
  .d11-main{
    font-size:1rem;
  }
}

/* Keep deliberate content containers spacious on desktop. */
@media (min-width: 1200px){
  .d11-container,
  .platform-container{
    width:calc(100% - 48px)!important;
    max-width:1440px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
}
