:root{--primary:#009688;--dark:#263238;--muted:#6b7280;--line:#e5e7eb;--bg:#f6f8fb;--soft:#eef7f6;--danger:#dc2626;--warning:#f59e0b;--blue:#2563eb}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Arial,sans-serif;background:var(--bg);color:#202124}a{color:inherit;text-decoration:none}.topbar{height:58px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:50}.brand{font-weight:800;color:var(--primary);font-size:20px}.brand small{display:block;font-size:11px;color:var(--muted);font-weight:600}.layout{display:grid;grid-template-columns:250px 1fr;min-height:calc(100vh - 58px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:14px 0;position:sticky;top:58px;height:calc(100vh - 58px);overflow:auto}.side-title{font-size:12px;color:#8a8f98;text-transform:uppercase;padding:18px 22px 8px}.side-link{display:flex;gap:10px;align-items:center;padding:11px 22px;color:#384047;border-left:3px solid transparent;font-weight:600}.side-link:hover,.side-link.active{background:#f2fbfa;border-left-color:var(--primary);color:#00796b}.main{padding:26px;overflow:auto}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.page-head h1{margin:0;font-size:28px}.muted{color:var(--muted)}.card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;box-shadow:0 1px 2px rgba(0,0,0,.03)}.grid{display:grid;gap:18px}.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;background:var(--primary);color:#fff;border:0;border-radius:7px;font-weight:700;cursor:pointer}.btn:hover{filter:brightness(.94)}.btn-light{background:#edf2f7;color:#263238}.btn-dark{background:#263238}.btn-danger{background:var(--danger)}.btn-small{padding:7px 10px;font-size:13px}.btn-outline{background:#fff;color:var(--primary);border:1px solid var(--primary)}input,select,textarea{width:100%;padding:10px 11px;border:1px solid #d7dce2;border-radius:7px;background:#fff;font:inherit}textarea{min-height:110px}label{display:block;font-weight:700;font-size:13px;margin:12px 0 6px}.table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}.table th,.table td{padding:12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}.table th{font-size:12px;text-transform:uppercase;color:#64748b;background:#f8fafc}.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:700}.badge.green{background:#dcfce7;color:#166534}.badge.red{background:#fee2e2;color:#991b1b}.badge.orange{background:#ffedd5;color:#9a3412}.badge.gray{background:#f1f5f9;color:#475569}.alert{padding:12px 14px;border-radius:8px;margin-bottom:14px}.alert.success{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}.course-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.course-card{overflow:hidden;padding:0}.course-cover{height:150px;background:linear-gradient(135deg,#dff5f2,#eef2ff);display:flex;align-items:center;justify-content:center;font-size:42px;color:#0f766e}.course-card .body{padding:16px}.builder-shell{display:grid;grid-template-columns:235px 1fr;gap:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}.builder-nav{border-right:1px solid var(--line);background:#fbfbfc;padding:14px}.builder-nav a{display:block;padding:10px 12px;border-radius:6px;color:#59616b;font-weight:650}.builder-nav a.active,.builder-nav a:hover{background:#e7f8f6;color:#00796b}.outline-section{border-top:1px solid var(--line);padding:24px 10px;display:grid;grid-template-columns:90px 1fr;gap:20px}.outline-number{font-size:42px;font-weight:900;color:#3a3d42}.activity-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;color:#555}.activity-row .type{width:30px;height:30px;border-radius:50%;background:#eef2f7;display:inline-flex;align-items:center;justify-content:center}.activity-actions{display:flex;gap:7px;flex-wrap:wrap}.hero{background:#fff;border-bottom:1px solid var(--line);padding:50px 26px}.hero-inner{max-width:1120px;margin:auto;display:grid;grid-template-columns:1.2fr .8fr;gap:28px;align-items:center}.hero h1{font-size:48px;line-height:1.05;margin:0 0 14px}.hero-box{background:linear-gradient(135deg,#e0f7f4,#fff);padding:30px;border-radius:18px;border:1px solid #ccefed}.progress{height:10px;background:#e5e7eb;border-radius:99px;overflow:hidden}.progress>span{display:block;height:100%;background:var(--primary)}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 18px}.tabs a{padding:9px 12px;background:#fff;border:1px solid var(--line);border-radius:7px}.tabs a.active{background:var(--primary);color:#fff}.rtl{direction:rtl;text-align:right}@media(max-width:900px){.layout{grid-template-columns:1fr}.sidebar{position:static;height:auto}.grid-2,.grid-3,.grid-4,.course-grid,.hero-inner,.builder-shell{grid-template-columns:1fr}.main{padding:14px}.outline-section{grid-template-columns:1fr}.topbar{padding:0 12px}.hero h1{font-size:34px}}
.inline-form{display:inline-flex;margin:0}.activity-checks{display:flex;gap:18px;flex-wrap:wrap;margin-top:12px}.activity-checks label{margin:0}.activity-row{align-items:flex-start}.activity-actions .btn{white-space:nowrap}

/* v3.6 inline course player viewers */
.academy-viewer{width:100%;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#111;margin:14px 0;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.academy-pdf-viewer{height:72vh;min-height:620px;background:#f8fafc}
.academy-pdf-viewer iframe{width:100%;height:100%;border:0;background:#fff}
.academy-video-viewer{aspect-ratio:16/9;background:#000}
.academy-video-viewer iframe,.academy-video-viewer video{width:100%;height:100%;border:0;display:block;background:#000}
.academy-embed-viewer{width:100%;border:1px solid var(--line);border-radius:14px;overflow:auto;background:#fff;padding:12px;margin:14px 0}
.file-preview-box{border:1px solid var(--line);border-radius:14px;background:#f8fafc;padding:18px;margin:14px 0}
.small-gap{margin-top:8px}
@media(max-width:900px){.academy-pdf-viewer{height:70vh;min-height:440px}.grid-2[style]{grid-template-columns:1fr!important}}


/* v3.7 support center */
.ticket-message{border:1px solid var(--line);border-radius:12px;padding:12px;margin:10px 0;background:#fff}
.ticket-message.mine{background:#f2fbfa;border-color:#bde9e3}
.support-stats .card:hover{border-color:var(--primary);box-shadow:0 2px 6px rgba(0,0,0,.08)}
@media(max-width:900px){.support-stats{grid-template-columns:1fr!important}}


/* v3.9 notifications popup */
.top-actions{display:flex;gap:12px;align-items:center}
.notification-wrap{position:relative;display:inline-flex}
.notification-button{position:relative;white-space:nowrap}
.notification-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#dc2626;color:#fff;font-size:12px;font-weight:900;margin-left:4px}
.notification-popover{position:absolute;right:0;top:calc(100% + 10px);width:min(390px,calc(100vw - 24px));background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 45px rgba(15,23,42,.18);display:none;z-index:200;overflow:hidden}
.notification-popover.open{display:block}
.notification-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);background:#f8fafc}
.notification-mark-all{padding:10px 16px;border-bottom:1px solid var(--line);background:#fff}
.notification-mark-all button{width:100%;border:0;border-radius:10px;background:var(--primary);color:#fff;font-weight:900;padding:10px 12px;cursor:pointer}
.notification-mark-all button:hover{filter:brightness(.96)}
.notification-list{max-height:420px;overflow:auto}
.notification-item{display:block;padding:12px 16px;border-bottom:1px solid var(--line);background:#fff}
.notification-item:hover{background:#f8fafc}
.notification-item.unread{background:#f0fdfa;border-left:4px solid var(--primary)}
.notification-title{display:block;font-weight:800;color:#111827;margin-bottom:3px}
.notification-message{display:block;color:#4b5563;font-size:13px;line-height:1.35;margin-bottom:5px}
.notification-time{display:block;color:#94a3b8;font-size:12px}
.notification-empty{padding:22px 16px;color:var(--muted);text-align:center}
.notification-foot{padding:11px 16px;background:#f8fafc;text-align:center;font-weight:800;color:var(--primary)}
.notification-page-list{display:grid;gap:10px}
.notification-page-item{display:block;border:1px solid var(--line);border-radius:12px;background:#fff;padding:14px}
.notification-page-item.unread{border-left:4px solid var(--primary);background:#f0fdfa}
@media(max-width:900px){.top-actions{gap:7px}.user-label{display:none}.notification-button{font-size:0}.notification-button:before{content:'🔔';font-size:14px}.notification-badge{font-size:11px;margin-left:2px}.notification-popover{right:-96px}}

.support-attachments{display:grid;gap:10px;margin-top:12px}
.support-attachment{border:1px solid var(--border);border-radius:12px;padding:12px;background:#f8fafc}
.support-attachment-icon{font-size:20px;margin-right:6px}
.support-attachment-thumb{display:block;max-width:280px;max-height:180px;border-radius:10px;border:1px solid var(--border);margin-top:10px;object-fit:cover;background:#fff}

/* v3.11 community badge */
.side-link{justify-content:space-between}
.side-link>span:first-child{display:inline-flex;gap:10px;align-items:center}
.side-badge{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;border-radius:999px;background:#dc2626;color:#fff;font-size:12px;font-weight:900;padding:0 6px;margin-left:auto}
.side-badge[hidden]{display:none!important}

/* v3.12 live session scheduling */
.live-next-card{border-left:4px solid var(--primary)}
.live-countdown{font-weight:900;color:var(--primary);display:inline-block}
.live-course-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#f0fdfa;border:1px solid #bde9e3;border-radius:12px;padding:12px 14px;margin-bottom:18px}
@media(max-width:900px){.live-course-bar{flex-direction:column;align-items:flex-start}.live-course-bar .btn{width:100%}}

/* v3.13 professional quiz builder */
.option-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;margin:8px 0;padding:8px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}
.quiz-question-editor summary{cursor:pointer;list-style:none}
.quiz-question-editor summary::-webkit-details-marker{display:none}
.quiz-meta{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 16px}
.quiz-timer{display:inline-flex;align-items:center;gap:8px;font-weight:900;color:#dc2626;background:#fff1f2;border:1px solid #fecaca;border-radius:999px;padding:8px 12px}
.quiz-choice{display:block;padding:10px 12px;border:1px solid var(--line);border-radius:10px;margin:8px 0;background:#fff}
.quiz-choice:hover{background:#f8fafc}
.quiz-correct{border-color:#16a34a;background:#f0fdf4}
.quiz-wrong{border-color:#dc2626;background:#fff1f2}
@media(max-width:900px){.option-row{grid-template-columns:1fr}.quiz-meta{display:grid}}
/* v3.15 course intro and focused quiz flow */
.course-info-page .lead{font-size:1.15rem;color:#475569;margin-top:-6px}
.course-info-cover{width:100%;max-height:360px;object-fit:cover;border-radius:18px;margin-bottom:22px;border:1px solid #e5e7eb}
.course-rich-content{margin-top:18px;line-height:1.7}
.course-rich-content img{max-width:100%;height:auto;border-radius:14px}
.course-rich-content .course-info-hero{background:linear-gradient(135deg,#ecfeff,#f8fafc);border:1px solid #bae6fd;border-radius:18px;padding:24px;margin-top:12px}
.mini-stat{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:4px}
.mini-stat b{font-size:1.5rem;color:#0f766e}.mini-stat span{color:#64748b;font-size:.9rem}
.quiz-intro-card,.quiz-focus-card{border-left:4px solid #0f766e}
.quiz-focus-card{margin-bottom:14px}

/* v3.30 visual course materials layout */
.view-toggle{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.course-materials-page{max-width:1120px}.course-materials-hero{display:grid;grid-template-columns:1fr 260px;gap:22px;align-items:center;margin-bottom:10px}.course-materials-hero h1{font-size:32px;margin:4px 0 8px}.course-materials-hero img{width:100%;height:170px;object-fit:cover;border-radius:16px;border:1px solid var(--line)}.course-materials-stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.course-materials-stats span{display:inline-flex;padding:7px 10px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:13px;font-weight:800}.materials-section{display:grid;grid-template-columns:96px 1fr;gap:24px;padding:28px 0;border-top:1px solid #d9e2ea}.materials-section-number{font-size:22px;line-height:1;font-weight:900;color:#00558c;border-right:3px solid #d7e6f3;min-height:100%;padding-top:4px}.materials-section-content h2{margin:0 0 22px;font-size:22px;color:#00558c;letter-spacing:.01em}.materials-card-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:34px 16px}.material-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:132px;padding:0 0 36px;border-radius:14px;color:#fff;text-align:center;transition:transform .15s ease,filter .15s ease}.material-tile:hover{transform:translateY(-2px);filter:brightness(1.03)}.material-icon{width:112px;height:90px;display:flex;align-items:center;justify-content:center;margin:0 auto 8px;border-radius:24px;background:linear-gradient(145deg,#f2f6fb,#c8d3de);box-shadow:inset 0 0 0 2px rgba(255,255,255,.75),0 7px 14px rgba(15,23,42,.18);color:#0f766e;font-weight:900;font-size:24px;text-shadow:0 1px 0 rgba(255,255,255,.8)}.material-icon-pdf,.material-icon-ebook{background:linear-gradient(145deg,#e78bd7,#a7158d);color:#fff}.material-icon-video-url,.material-icon-video-upload{background:linear-gradient(145deg,#65c7ff,#0677d8);color:#fff}.material-icon-audio{background:linear-gradient(145deg,#8fd3ff,#2563eb);color:#fff}.material-icon-quiz,.material-icon-exam{background:linear-gradient(145deg,#ffd166,#f97316);color:#fff}.material-icon-assignment{background:linear-gradient(145deg,#86efac,#16a34a);color:#fff}.material-icon-text,.material-icon-html,.material-icon-download,.material-icon-scorm,.material-icon-link,.material-icon-embed{background:linear-gradient(145deg,#f8fafc,#b8c4d1);color:#334155}.material-title{position:absolute;left:0;right:0;bottom:20px;display:flex;align-items:center;justify-content:center;min-height:34px;padding:7px 9px;background:rgba(35,39,43,.74);font-size:15px;line-height:1.25;font-weight:700;word-break:break-word}.material-type{position:absolute;left:0;right:0;bottom:0;padding:3px 8px;background:rgba(35,39,43,.62);font-size:11px;color:#e5e7eb}.material-complete{position:absolute;left:8px;bottom:25px;z-index:2;font-size:16px;font-weight:900;color:#fff}.material-tile.completed .material-complete{color:#dcfce7}.tools-section .material-tile{max-width:220px}.course-player-layout .side-link{justify-content:flex-start}.course-player-layout .side-link .muted{font-weight:500}.course-player-layout .card>h3{color:#00558c;margin:20px 0 8px}.course-materials-page .course-rich-content{margin-top:10px}.tool-tile .material-icon{background:linear-gradient(145deg,#fbbf24,#f97316);color:#fff}@media(max-width:1100px){.materials-card-grid{grid-template-columns:repeat(3,minmax(140px,1fr));gap:28px 14px}.course-materials-hero{grid-template-columns:1fr}}@media(max-width:900px){.view-toggle{justify-content:flex-start}.materials-section{grid-template-columns:1fr;gap:12px}.materials-section-number{border-right:0;border-bottom:3px solid #d7e6f3;padding-bottom:8px}.materials-card-grid{grid-template-columns:repeat(2,minmax(130px,1fr));gap:24px 12px}.material-icon{width:98px;height:78px}.course-materials-hero img{height:150px}}@media(max-width:520px){.materials-card-grid{grid-template-columns:1fr 1fr}.material-title{font-size:13px}.material-icon{width:86px;height:70px}.course-materials-hero h1{font-size:24px}.page-head{flex-direction:column}.view-toggle .btn{width:100%}}
.visual-selected-activity{margin:18px 0 8px;border:1px solid #b7eee6;background:#fbfffe;box-shadow:0 10px 26px rgba(15,118,110,.08)}
.visual-selected-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #d7f3ef}
.material-tile.selected{outline:3px solid #0f766e;outline-offset:4px;transform:translateY(-2px)}
.material-tile.selected .material-title{background:rgba(15,118,110,.9)}
@media(max-width:700px){.visual-selected-head{align-items:flex-start;flex-direction:column}.visual-selected-head .btn{width:100%}}

/* v3.50 course student private notes */
.student-name-button{border:0;background:transparent;padding:0;color:#0f766e;cursor:pointer;text-align:left;font:inherit}
.student-name-button:hover{text-decoration:underline}
.student-detail-modal{width:min(980px,calc(100vw - 32px));max-height:88vh;border:1px solid var(--line);border-radius:18px;padding:18px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.28)}
.student-detail-modal::backdrop{background:rgba(15,23,42,.45)}
.student-modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:16px}
.student-modal-head h2{margin:0 0 4px}.student-modal-card{box-shadow:none}.student-note-list{display:grid;gap:10px}.student-note-item{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:12px}.student-note-meta{color:#64748b;font-size:13px;margin-bottom:7px}
@media(max-width:900px){.student-detail-modal{width:calc(100vw - 16px);padding:12px}.student-modal-head{flex-direction:column}.student-detail-modal .grid-2{grid-template-columns:1fr!important}}

/* v3.71 Automation form contextual UI */
.automation-hint{
  margin:10px 0 14px;
  padding:10px 12px;
  border:1px solid var(--border,#dbe3ea);
  border-radius:12px;
  background:#f8fafc;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
}
.automation-action-option{
  padding:10px 12px;
  border:1px solid var(--border,#dbe3ea);
  border-radius:12px;
  background:#fff;
}

/* v3.76 Professional certificate builder */
.cert-editor-wrap{transform-origin:top left;min-width:1123px;overflow:auto;background:#f8fafc;border:1px solid var(--line);border-radius:16px;padding:22px}.cert-editor-canvas{position:relative;overflow:hidden;border-radius:20px;box-shadow:0 18px 60px rgba(15,23,42,.16);margin:auto}.cert-inner-border{position:absolute;inset:24px;border:2px solid rgba(15,23,42,.12);border-radius:14px;pointer-events:none}.cert-field{position:absolute;border:1px dashed transparent;cursor:move;display:flex;align-items:center;overflow:hidden;padding:2px}.cert-field:hover,.cert-field.active{border-color:#0f766e;background:rgba(240,253,250,.35)}.cert-field .resize-handle{position:absolute;right:0;bottom:0;width:12px;height:12px;background:#0f766e;cursor:nwse-resize;border-radius:2px}.cert-field-editor{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:12px}.cert-field-editor .mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cert-canvas{font-family:Inter,Arial,sans-serif;position:relative;overflow:hidden;display:block;box-sizing:border-box;isolation:isolate}.cert-generated-inner{box-sizing:border-box}.cert-generated-box{box-sizing:border-box;z-index:2}.certificate-template-list{display:grid;gap:18px;margin-top:18px}.certificate-template-card{overflow:hidden}.certificate-template-card-inner{display:grid;grid-template-columns:minmax(260px,430px) minmax(0,1fr);gap:22px;align-items:center}.certificate-template-preview-frame{overflow:auto;max-width:100%;padding:12px;border:1px solid var(--line);border-radius:16px;background:#f8fafc}.certificate-template-preview-frame .cert-canvas{margin:0}.public-cert-wrap .cert-canvas{margin:auto}@media(max-width:1100px){.certificate-template-card-inner{grid-template-columns:1fr}.certificate-template-preview-frame .cert-canvas{margin:auto}}@media(max-width:900px){.cert-editor-wrap{transform:scale(.55);transform-origin:top left;width:181%;margin-bottom:-330px}.public-cert-wrap .cert-canvas{transform:scale(.55);transform-origin:top left;margin-bottom:-330px}}


/* v3.80 White-label branding */
.brand-with-logo{display:flex;align-items:center;gap:10px}
.brand-with-logo img{max-height:34px;max-width:140px;object-fit:contain;display:block}
.public-footer{border-top:1px solid var(--line);background:#fff;margin-top:32px;padding:22px;text-align:center}
.public-footer .legal-links a{font-weight:800;color:var(--primary)}
.white-label-mode .brand small{display:none}
.branded-login-page{min-height:calc(100vh - 120px);background-size:cover;background-position:center;border-radius:0}
.branded-login-grid{display:grid;grid-template-columns:1fr 430px;gap:18px;align-items:stretch}
.branded-login-panel{display:flex;flex-direction:column;justify-content:center;background:linear-gradient(135deg,#ffffff,#f8fafc)}
.login-brand-logo{max-width:210px;max-height:86px;object-fit:contain;margin-bottom:18px}
.login-custom-html{margin-top:18px;line-height:1.7}
.custom-index-page{line-height:1.75}
.legal-page{line-height:1.75}
.branding-preview-logo{max-height:72px;max-width:220px;object-fit:contain;border:1px solid var(--line);border-radius:12px;background:#fff;padding:8px}
.branding-preview-icon{width:64px;height:64px;object-fit:contain;border:1px solid var(--line);border-radius:12px;background:#fff;padding:6px}
.branding-preview-wide{max-width:100%;max-height:180px;object-fit:cover;border:1px solid var(--line);border-radius:14px}
@media(max-width:900px){.branded-login-grid{grid-template-columns:1fr}.brand-with-logo img{max-width:110px}.public-footer{text-align:left}.branded-login-page{padding:14px!important}}


/* v3.81 Calendar System */
.calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px;align-items:start}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.calendar-toolbar h2{margin:0}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.calendar-grid-head div{font-weight:800;color:#475569;text-align:center;background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:8px}.calendar-days{margin-top:8px}.calendar-day{min-height:132px;border:1px solid #e5e7eb;background:#fff;border-radius:14px;padding:8px;overflow:hidden}.calendar-day.empty{background:#f8fafc}.calendar-day.today{box-shadow:0 0 0 2px var(--primary,#009688) inset}.day-number{font-weight:800;margin-bottom:6px;color:#0f172a}.calendar-event-pill{display:block;text-decoration:none;color:#0f172a;font-size:12px;line-height:1.25;margin:4px 0;padding:5px 6px;border-left:4px solid #64748b;background:#f8fafc;border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-event-pill span{font-weight:800;color:#64748b}.calendar-side{display:flex;flex-direction:column;gap:18px}.calendar-agenda{display:flex;flex-direction:column;gap:8px;max-height:440px;overflow:auto}.agenda-item{border-left:4px solid #64748b;background:#f8fafc;border-radius:10px;padding:9px}.tiny{font-size:12px}@media(max-width:1100px){.calendar-layout{grid-template-columns:1fr}.calendar-day{min-height:110px}}@media(max-width:760px){.calendar-grid{gap:4px}.calendar-grid-head div{font-size:11px;padding:5px}.calendar-day{min-height:88px;border-radius:10px;padding:5px}.calendar-event-pill{font-size:10px;padding:4px}.calendar-toolbar{flex-wrap:wrap}.calendar-toolbar h2{width:100%;text-align:center;order:-1}}


.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.58);display:none;align-items:center;justify-content:center;padding:18px;z-index:1000}.modal-backdrop.show{display:flex}.modal-card{background:#fff;border-radius:20px;box-shadow:0 24px 80px rgba(15,23,42,.28);max-width:760px;width:100%;max-height:92vh;overflow:auto;padding:22px}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.modal-head h2{margin:6px 0 0}.modal-close{border:0;background:#f1f5f9;color:#0f172a;border-radius:12px;width:40px;height:40px;font-size:26px;line-height:1;cursor:pointer}.modal-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.calendar-detail-box{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px;margin:12px 0;display:grid;gap:6px}.calendar-event-modal textarea{resize:vertical}@media(max-width:760px){.modal-card{padding:16px;border-radius:16px}.modal-actions{flex-direction:column;align-items:stretch}.modal-actions .btn{width:100%}}


/* v3.105: keep original design, fix responsiveness and footer only */
html,body{
  min-height:100%;
}
body{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.topbar{
  gap:12px;
}
.mobile-menu-btn,
.mobile-sidebar-head{
  display:none;
}
.mobile-menu-overlay{
  display:none;
}
.layout{
  flex:1 0 auto;
}
.main{
  min-width:0;
}
.public-footer{
  flex-shrink:0;
  position:relative;
  z-index:1;
}
img,video,iframe{
  max-width:100%;
}
.card,
.table,
.builder-shell,
.course-card{
  max-width:100%;
}
.table{
  table-layout:auto;
}
.top-actions{
  min-width:0;
}
.user-label{
  max-width:260px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Small professional polish without changing the old visual identity */
.card{
  border-color:#e3e7ec;
}
.btn{
  box-shadow:none;
}
input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(0,150,136,.10);
}
.course-card{
  transition:transform .15s ease, box-shadow .15s ease;
}
.course-card:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 14px rgba(15,23,42,.06);
}

/* Tablet */
@media(max-width:1100px){
  .layout{
    grid-template-columns:220px minmax(0,1fr);
  }
  .main{
    padding:18px;
  }
  .grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .grid-3{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .course-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .calendar-layout{
    grid-template-columns:1fr!important;
  }
}

/* Mobile: sidebar becomes hidden drawer */
@media(max-width:900px){
  .topbar{
    min-height:58px;
    height:auto;
    padding:10px 12px;
    position:sticky;
    top:0;
  }
  .mobile-menu-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fff;
    color:var(--dark);
    font-size:20px;
    cursor:pointer;
  }
  .brand{
    font-size:18px;
    min-width:0;
  }
  .brand span{
    min-width:0;
  }
  .brand-with-logo img{
    max-width:110px;
  }
  .top-actions{
    margin-left:auto;
    gap:7px;
  }
  .top-actions .btn{
    padding:6px 8px;
    font-size:12px;
  }
  .user-label{
    display:none;
  }
  .layout{
    display:block;
    min-height:auto;
  }
  .main{
    padding:14px;
    width:100%;
    overflow-x:hidden;
  }
  .sidebar{
    position:fixed;
    top:0;
    left:0;
    width:min(310px,86vw);
    height:100vh;
    z-index:1000;
    transform:translateX(-105%);
    transition:transform .22s ease;
    border-right:1px solid var(--line);
    box-shadow:18px 0 40px rgba(15,23,42,.18);
    padding-top:0;
    background:#fff;
  }
  body.mobile-menu-open .sidebar{
    transform:translateX(0);
  }
  .mobile-menu-overlay{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.35);
    z-index:999;
    opacity:0;
    visibility:hidden;
    transition:opacity .2s ease, visibility .2s ease;
  }
  body.mobile-menu-open .mobile-menu-overlay{
    opacity:1;
    visibility:visible;
  }
  .mobile-sidebar-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    border-bottom:1px solid var(--line);
    margin-bottom:8px;
    color:var(--dark);
  }
  .mobile-sidebar-head strong{
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.08em;
  }
  .mobile-sidebar-head button{
    width:34px;
    height:34px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#f8fafc;
    color:var(--dark);
    font-size:22px;
    line-height:1;
    cursor:pointer;
  }
  .side-title{
    padding:14px 18px 7px;
  }
  .side-link{
    padding:10px 18px;
  }
  .page-head{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }
  .page-head h1{
    font-size:24px;
    line-height:1.2;
  }
  .page-head>div:last-child{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
  }
  .page-head>div:last-child .btn{
    flex:1 1 auto;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .course-grid,
  .hero-inner,
  .builder-shell{
    grid-template-columns:1fr;
  }
  .builder-nav{
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
    -webkit-overflow-scrolling:touch;
  }
  .branded-login-grid{
    grid-template-columns:1fr;
  }
  .branded-login-page{
    padding:14px!important;
    min-height:auto;
  }
  .hero{
    padding:30px 16px;
  }
  .hero h1{
    font-size:34px;
  }
  .public-footer{
    margin-top:18px;
    padding:16px 14px;
  }
}

/* Small mobile */
@media(max-width:520px){
  .topbar{
    align-items:center;
  }
  .brand small{
    font-size:10px;
  }
  .notification-button{
    font-size:0;
  }
  .notification-button:before{
    content:'🔔';
    font-size:14px;
  }
  .notification-popover{
    position:fixed;
    left:12px;
    right:12px;
    top:64px;
    width:auto;
  }
  .main{
    padding:12px;
  }
  .card{
    padding:14px;
  }
  .course-cover{
    height:130px;
  }
  input,select,textarea{
    font-size:16px;
  }
  .calendar-grid{
    gap:4px;
  }
  .calendar-grid-head div{
    font-size:10px;
    padding:5px 2px;
  }
  .calendar-day{
    min-height:82px;
    padding:5px;
  }
  .calendar-event-pill{
    font-size:10px;
    padding:3px 4px;
  }
}


/* v3.105.1 mobile notification button fix */
@media(max-width:900px){
  .top-actions{gap:6px;flex-wrap:wrap}
  .notification-button{
    position:relative;
    width:38px;
    min-width:38px;
    height:32px;
    padding:0;
    font-size:0 !important;
    line-height:1;
    overflow:hidden;
  }
  .notification-button:before{
    content:'🔔' !important;
    font-size:14px;
    line-height:1;
  }
  .notification-button .notification-badge{
    position:absolute;
    top:-4px;
    right:-4px;
    min-width:16px;
    height:16px;
    padding:0 4px;
    margin-left:0;
    font-size:10px;
  }
}
@media(max-width:520px){
  .top-actions{gap:5px}
  .notification-button{
    width:36px;
    min-width:36px;
  }
}

/* v3.120 strategic LMS upgrade: paths, analytics, onboarding, quality center */
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.metric-card h1{font-size:34px;margin:8px 0 0}.hero-card{background:linear-gradient(135deg,#ffffff,#f0fdfa);border:1px solid rgba(20,184,166,.22)}.clean-list{margin:10px 0 0;padding-left:20px;color:#475569}.clean-list li{margin:8px 0}.inline-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.inline-form select,.inline-form input{min-width:180px}.check{display:flex;align-items:center;gap:6px;color:#475569}.path-timeline{display:flex;flex-direction:column;gap:14px}.path-step{display:grid;grid-template-columns:44px 1fr;gap:14px;padding:16px;border:1px solid #e5e7eb;border-radius:16px;background:#fff}.path-step.locked{opacity:.64;background:#f8fafc}.path-step-no{width:38px;height:38px;border-radius:999px;background:var(--primary,#009688);color:white;display:flex;align-items:center;justify-content:center;font-weight:800}.checklist{display:flex;flex-direction:column;gap:12px}.checklist-item{display:grid;grid-template-columns:44px 1fr;gap:12px;border:1px solid #e5e7eb;border-radius:16px;padding:14px;background:#fff}.checklist-item.done{background:#f0fdf4;border-color:#bbf7d0}.check-toggle{width:34px;height:34px;border-radius:999px;border:1px solid #cbd5e1;background:white;color:#0f766e;font-weight:900;cursor:pointer}.badge.red{background:#fee2e2;color:#991b1b}.badge.orange{background:#ffedd5;color:#9a3412}.course-card{border:1px solid #e5e7eb;border-radius:16px;padding:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.inline-form{display:grid;grid-template-columns:1fr}.inline-form select,.inline-form input{min-width:0;width:100%}.path-step{grid-template-columns:34px 1fr;padding:12px}.path-step-no{width:30px;height:30px}.metric-card h1{font-size:28px}}
/* v3.123 completion UI */
.flag-card{display:block;border:1px solid #e5e7eb;border-radius:14px;padding:14px;background:#fff;line-height:1.4}.flag-card input{margin-right:8px}.flag-card .muted{display:block;font-size:12px}.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.lang-switch select{border:1px solid #e5e7eb;border-radius:999px;padding:7px 10px;background:white}.badge.red{background:#fee2e2;color:#991b1b}.badge.green{background:#dcfce7;color:#166534}.stat{background:white;border:1px solid #e5e7eb;border-radius:16px;padding:16px}.stat b{display:block;font-size:28px}.stat span{color:#64748b}html[dir="rtl"] body{text-align:right}html[dir="rtl"] .layout{direction:rtl}html[dir="rtl"] .sidebar{border-left:1px solid #e5e7eb;border-right:0}html[dir="rtl"] .top-actions{margin-right:auto;margin-left:0}@media(max-width:900px){.grid-4{grid-template-columns:1fr 1fr}}@media(max-width:640px){.grid-4{grid-template-columns:1fr}.flag-card{padding:12px}}

/* v3.126 real i18n/RTL fixes */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.lang-switch{display:inline-flex;align-items:center;margin-inline-start:8px}.lang-switch select{min-width:110px;width:auto}.dir-rtl{direction:rtl}.dir-rtl .topbar{direction:rtl}.dir-rtl .top-actions{direction:rtl}.dir-rtl .brand-with-logo{direction:rtl}.dir-rtl .table th,.dir-rtl .table td{text-align:right}.dir-rtl .page-head{direction:rtl}.dir-rtl input,.dir-rtl select,.dir-rtl textarea{text-align:right}.dir-rtl .notification-popover{left:0;right:auto;text-align:right}.dir-rtl .side-link{border-left:0;border-right:3px solid transparent}.dir-rtl .side-link:hover,.dir-rtl .side-link.active{border-right-color:var(--primary)}.dir-rtl .builder-shell{direction:rtl}.dir-rtl .builder-nav{border-right:0;border-left:1px solid var(--line)}.dir-rtl .activity-row,.dir-rtl .page-head,.dir-rtl .top-actions{flex-direction:row-reverse}.dir-rtl .grid,.dir-rtl .grid-2,.dir-rtl .grid-3,.dir-rtl .grid-4,.dir-rtl .course-grid{direction:rtl}


/* v3.201: fixed desktop sidebar and full-width course player */
@media (min-width:901px){
  .layout{
    grid-template-columns:250px minmax(0,1fr);
    align-items:stretch;
    min-height:calc(100vh - 58px);
  }
  .layout > .sidebar{
    position:fixed;
    top:58px;
    bottom:0;
    left:0;
    width:250px;
    height:auto;
    min-height:calc(100vh - 58px);
    overflow-y:auto;
    overflow-x:hidden;
    z-index:45;
    background:#fff;
    border-right:1px solid var(--line);
  }
  .layout > .main{
    grid-column:2;
    width:100%;
    max-width:none;
    min-width:0;
    overflow:visible;
  }
  .layout + .public-footer{
    margin-left:250px;
  }
  html[dir="rtl"] .layout > .sidebar,
  .dir-rtl .layout > .sidebar{
    left:auto;
    right:0;
    border-right:0;
    border-left:1px solid var(--line);
  }
  html[dir="rtl"] .layout + .public-footer,
  .dir-rtl .layout + .public-footer{
    margin-left:0;
    margin-right:250px;
  }

  .course-materials-page{
    width:100% !important;
    max-width:none !important;
  }
  .course-materials-page .learn-course-top,
  .course-materials-page .learn-substitute-notice,
  .course-materials-page .live-course-bar,
  .course-materials-page .visual-selected-activity,
  .course-materials-page .materials-section{
    width:100%;
    max-width:none;
  }
  .course-materials-page .materials-card-grid{
    grid-template-columns:repeat(auto-fill,minmax(170px,220px));
    justify-content:start;
    align-items:start;
    gap:32px 22px;
  }
  .course-player-layout{
    grid-template-columns:minmax(280px,360px) minmax(0,1fr);
    width:100%;
  }
}
@media (min-width:901px) and (max-width:1100px){
  .layout{
    grid-template-columns:220px minmax(0,1fr);
  }
  .layout > .sidebar{
    width:220px;
  }
  .layout + .public-footer{
    margin-left:220px;
  }
  html[dir="rtl"] .layout + .public-footer,
  .dir-rtl .layout + .public-footer{
    margin-left:0;
    margin-right:220px;
  }
  .course-materials-page .materials-card-grid{
    grid-template-columns:repeat(auto-fill,minmax(150px,200px));
  }
}
@media (max-width:900px){
  .layout + .public-footer{
    margin-left:0;
    margin-right:0;
  }
  .course-materials-page{
    width:100%;
    max-width:none;
  }
}


/* v3.202: collapsible sidebar accordion */
.sidebar .side-section{
  margin:0 8px 6px;
  border-bottom:1px solid rgba(226,232,240,.72);
}
.sidebar .side-section:last-child{
  border-bottom:0;
}
.sidebar .side-section > .side-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  margin:0;
  padding:12px 12px 12px 14px;
  border-radius:11px;
  color:#64748b;
  cursor:pointer;
  user-select:none;
  letter-spacing:.045em;
  transition:background .15s ease,color .15s ease;
}
.sidebar .side-section > .side-title:hover,
.sidebar .side-section.open > .side-title{
  background:#f1f8f7;
  color:#00695c;
}
.sidebar .side-section > .side-title:focus-visible{
  outline:2px solid rgba(0,150,136,.28);
  outline-offset:2px;
}
.sidebar .side-section > .side-title::after{
  content:'›';
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  height:22px;
  border-radius:999px;
  background:#eef2f7;
  color:#64748b;
  font-size:18px;
  line-height:1;
  transition:transform .16s ease,background .16s ease,color .16s ease;
}
.sidebar .side-section.open > .side-title::after{
  transform:rotate(90deg);
  background:var(--primary);
  color:#fff;
}
.sidebar .side-section-content{
  display:none;
  padding:4px 0 8px;
}
.sidebar .side-section.open > .side-section-content{
  display:block;
}
.sidebar .side-section-content .side-link{
  margin:2px 0;
  padding:10px 12px 10px 16px;
  border-radius:10px;
}
.sidebar .side-section-content .side-link:hover,
.sidebar .side-section-content .side-link.active{
  border-left-color:var(--primary);
}
.dir-rtl .sidebar .side-section > .side-title::after,
html[dir="rtl"] .sidebar .side-section > .side-title::after{
  content:'‹';
}
.dir-rtl .sidebar .side-section.open > .side-title::after,
html[dir="rtl"] .sidebar .side-section.open > .side-title::after{
  transform:rotate(-90deg);
}
.dir-rtl .sidebar .side-section-content .side-link,
html[dir="rtl"] .sidebar .side-section-content .side-link{
  padding:10px 16px 10px 12px;
}
@media(max-width:900px){
  .sidebar .side-section{
    margin:0 10px 7px;
  }
  .sidebar .side-section > .side-title{
    padding:12px 14px;
  }
}

/* v3.203: fixed application header while page content scrolls */
:root{
  --app-header-height:58px;
}
html{
  scroll-padding-top:var(--app-header-height);
}
body{
  padding-top:var(--app-header-height);
}
.topbar{
  position:fixed !important;
  top:0 !important;
  left:0;
  right:0;
  width:100%;
  height:var(--app-header-height);
  min-height:var(--app-header-height);
  z-index:1200;
  box-shadow:0 1px 0 rgba(15,23,42,.04);
}
@media (min-width:901px){
  .layout{
    min-height:calc(100vh - var(--app-header-height));
  }
  .layout > .sidebar{
    top:var(--app-header-height);
    height:calc(100vh - var(--app-header-height));
    min-height:calc(100vh - var(--app-header-height));
  }
}
@media (max-width:900px){
  .topbar{
    height:var(--app-header-height);
    min-height:var(--app-header-height);
    padding-top:0;
    padding-bottom:0;
    overflow:visible;
  }
  .sidebar{
    top:0;
  }
}

/* v4.42: persisted sidebar accordion state and server-truth unread section badges */
.sidebar .side-section > .side-title{
  justify-content:flex-start;
}
.sidebar .side-section > .side-title::after{
  flex:0 0 22px;
  margin-inline-start:auto;
}
.sidebar .side-section-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 7px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  font-size:12px;
  font-weight:900;
  line-height:1;
  margin-inline-start:8px;
  box-shadow:0 2px 8px rgba(220,38,38,.18);
}
.sidebar .side-section-badge[hidden]{
  display:none !important;
}
.sidebar .side-section:not(.open) > .side-title .side-section-badge{
  animation:sideBadgePulse 1.8s ease-in-out infinite;
}
@keyframes sideBadgePulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.08)}
}
@media (prefers-reduced-motion:reduce){
  .sidebar .side-section:not(.open) > .side-title .side-section-badge{
    animation:none;
  }
}

/* v3.208: public course page teacher card and button polish */
.public-course-page{
  background:
    radial-gradient(circle at 12% 0%, rgba(0,150,136,.10), transparent 34%),
    linear-gradient(180deg,#ffffff 0%,#f7fafc 48%,#f6f8fb 100%);
  color:#17212b;
}
.public-course-container{
  width:min(1180px,calc(100% - 40px));
  margin:0 auto;
}
.public-course-hero{
  position:relative;
  overflow:hidden;
  padding:68px 0 58px;
  border-bottom:1px solid rgba(226,232,240,.86);
  background:linear-gradient(135deg,#ffffff 0%,#fbfefd 52%,#f1fbfa 100%);
}
.public-course-hero::before,
.public-course-hero::after{
  content:'';
  position:absolute;
  pointer-events:none;
  border-radius:999px;
  opacity:.58;
}
.public-course-hero::before{
  width:300px;
  height:300px;
  right:-100px;
  top:-120px;
  background:rgba(0,150,136,.10);
}
.public-course-hero::after{
  width:220px;
  height:220px;
  left:-90px;
  bottom:-130px;
  background:rgba(37,99,235,.08);
}
.public-course-hero-grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(320px,.72fr);
  gap:46px;
  align-items:center;
}
.public-course-copy h1{
  margin:12px 0 16px;
  max-width:760px;
  font-size:clamp(38px,5vw,66px);
  line-height:1.02;
  letter-spacing:-.055em;
  color:#111827;
}
.public-course-level{
  box-shadow:0 8px 22px rgba(22,101,52,.08);
}
.public-course-subtitle{
  margin:0 0 12px;
  max-width:720px;
  color:#526173;
  font-size:20px;
  line-height:1.5;
}
.public-course-description{
  margin:0;
  max-width:780px;
  color:#475569;
  font-size:18px;
  line-height:1.75;
}
.public-course-teacher-card{
  display:flex;
  align-items:center;
  gap:16px;
  width:min(100%,780px);
  min-height:100px;
  margin:30px 0 0;
  padding:16px 20px 16px 16px;
  border:1px solid rgba(226,232,240,.92);
  border-radius:26px;
  background:rgba(255,255,255,.90);
  box-shadow:0 20px 48px rgba(15,23,42,.085);
  backdrop-filter:blur(10px);
}
.public-course-teacher-avatar{
  width:66px;
  height:66px;
  border-radius:999px;
  object-fit:cover;
  object-position:center;
  border:3px solid #fff;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
  flex:0 0 auto;
}
.public-course-teacher-default{
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,#e0f7f4,#eef2ff);
  color:#00796b;
  font-weight:900;
  font-size:22px;
}
.public-course-teacher-card strong,
.public-course-teacher-card small,
.public-course-eyebrow{
  display:block;
}
.public-course-teacher-card strong{
  color:#111827;
  font-size:17px;
  line-height:1.25;
}
.public-course-teacher-card small{
  margin-top:3px;
  color:#64748b;
}
.public-course-eyebrow{
  margin-bottom:5px;
  color:#00796b;
  font-size:12px;
  font-weight:900;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.public-course-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:28px;
}
.public-course-actions form,
.public-course-access-card form{
  margin:0;
}
.public-course-actions .btn,
.public-course-access-card .btn{
  min-height:46px;
  padding:12px 18px;
  border-radius:12px;
  box-shadow:0 14px 30px rgba(0,150,136,.18), 0 2px 6px rgba(15,23,42,.08);
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.public-course-actions .btn:hover,
.public-course-access-card .btn:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 36px rgba(0,150,136,.20), 0 4px 10px rgba(15,23,42,.10);
}
.public-course-actions .btn-light{
  color:#0f172a;
  background:#eef2f7;
  box-shadow:0 12px 26px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.06);
}
.public-course-actions .btn-light:hover{
  background:#e6edf5;
  box-shadow:0 16px 32px rgba(15,23,42,.10), 0 4px 10px rgba(15,23,42,.08);
}
.public-course-media-card{
  position:relative;
  min-height:320px;
  border:1px solid rgba(190,220,218,.86);
  border-radius:28px;
  padding:18px;
  background:linear-gradient(135deg,rgba(240,253,250,.94),rgba(255,255,255,.96));
  box-shadow:0 26px 70px rgba(15,23,42,.10);
  overflow:hidden;
}
.public-course-media-card::before{
  content:'';
  position:absolute;
  inset:14px;
  border:1px solid rgba(255,255,255,.74);
  border-radius:22px;
  pointer-events:none;
}
.public-course-media-card img{
  display:block;
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  min-height:284px;
  object-fit:cover;
  border-radius:20px;
  background:#fff;
}
.public-course-media-placeholder{
  position:relative;
  z-index:1;
  min-height:284px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:28px;
  border-radius:20px;
  background:linear-gradient(135deg,#ffffff,#eefaf8);
  color:#334155;
}
.public-course-media-placeholder span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  margin-bottom:18px;
  border-radius:16px;
  background:#dff7f3;
  color:#00796b;
  font-size:26px;
}
.public-course-media-placeholder h2{
  margin:0 0 10px;
  color:#0f172a;
  font-size:28px;
  letter-spacing:-.025em;
}
.public-course-media-placeholder p{
  margin:0;
  color:#526173;
  line-height:1.65;
}
.public-course-main{
  padding:36px 0 60px;
}
.public-course-stats{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:22px;
}
.public-course-stats .mini-stat{
  min-height:96px;
  padding:22px;
  border:1px solid rgba(226,232,240,.94);
  border-radius:18px;
  background:rgba(255,255,255,.88);
  box-shadow:0 12px 34px rgba(15,23,42,.045);
}
.public-course-stats .mini-stat b{
  font-size:28px;
}
.public-course-section,
.public-course-access-card{
  border:1px solid rgba(226,232,240,.94);
  border-radius:24px;
  background:rgba(255,255,255,.92);
  box-shadow:0 16px 44px rgba(15,23,42,.055);
}
.public-course-section{
  padding:24px;
  margin-top:18px;
}
.public-course-section-head{
  margin-bottom:16px;
}
.public-course-section-head h2,
.public-course-access-card h2,
.public-course-info-grid h2{
  margin:0 0 10px;
  color:#111827;
  font-size:26px;
  letter-spacing:-.025em;
}
.public-course-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}
.public-course-info-grid .card{
  border-radius:20px;
  box-shadow:none;
  background:#fbfefd;
}
.public-course-info-grid p,
.public-course-info-grid li{
  color:#526173;
  line-height:1.7;
}
.public-course-html{
  overflow:hidden;
  border:1px solid rgba(226,232,240,.95);
  border-radius:22px;
  padding:28px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfefd 100%) !important;
  color:#334155 !important;
  line-height:1.75;
}
.public-course-html *,
.public-course-html *::before,
.public-course-html *::after{
  border-color:#e2e8f0 !important;
  box-shadow:none !important;
}
.public-course-html [style*="background"],
.public-course-html [style*="linear-gradient"],
.public-course-html [style*="#063"],
.public-course-html [style*="#0b"],
.public-course-html [style*="#0f"],
.public-course-html [style*="rgb"]{
  background:#ffffff !important;
}
.public-course-html h1,
.public-course-html h2,
.public-course-html h3,
.public-course-html h4{
  color:#111827 !important;
  letter-spacing:-.02em;
}
.public-course-html h1:first-child,
.public-course-html h2:first-child,
.public-course-html h3:first-child{
  margin-top:0;
}
.public-course-html p,
.public-course-html li,
.public-course-html span,
.public-course-html div{
  color:#475569 !important;
}
.public-course-html a,
.public-course-html button{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  min-height:42px !important;
  margin:8px 10px 8px 0 !important;
  padding:10px 16px !important;
  border:1px solid rgba(0,150,136,.18) !important;
  border-radius:12px !important;
  background:#ffffff !important;
  color:#00796b !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  text-decoration:none !important;
  box-shadow:0 12px 28px rgba(15,23,42,.075), 0 2px 6px rgba(15,23,42,.055) !important;
  cursor:pointer !important;
}
.public-course-html a:hover,
.public-course-html button:hover{
  transform:translateY(-1px) !important;
  background:#f0fdfa !important;
  box-shadow:0 16px 34px rgba(15,23,42,.09), 0 4px 10px rgba(15,23,42,.07) !important;
}
.public-course-html a:first-of-type{
  background:#008f82 !important;
  color:#ffffff !important;
  border-color:#008f82 !important;
  box-shadow:0 14px 30px rgba(0,150,136,.20), 0 2px 6px rgba(15,23,42,.08) !important;
}
.public-course-html a:first-of-type:hover{
  background:#00796b !important;
}
.public-course-html img{
  max-width:100%;
  height:auto;
  border-radius:18px;
}
.public-course-html > div{
  border-radius:20px !important;
}
.public-course-html > div > div{
  border-radius:18px !important;
}
.public-course-access-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-top:20px;
  padding:26px;
  background:linear-gradient(135deg,#ffffff,#f1fbfa);
}
.public-course-access-card p{
  margin:0;
  max-width:680px;
  color:#526173;
  line-height:1.65;
}
@media(max-width:980px){
  .public-course-container{
    width:min(100% - 28px,1180px);
  }
  .public-course-hero{
    padding:42px 0 36px;
  }
  .public-course-hero-grid,
  .public-course-info-grid{
    grid-template-columns:1fr;
  }
  .public-course-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .public-course-media-card{
    min-height:auto;
  }
  .public-course-access-card{
    flex-direction:column;
    align-items:flex-start;
  }
}
@media(max-width:560px){
  .public-course-container{
    width:min(100% - 22px,1180px);
  }
  .public-course-hero{
    padding:28px 0 28px;
  }
  .public-course-copy h1{
    font-size:34px;
  }
  .public-course-subtitle,
  .public-course-description{
    font-size:16px;
  }
  .public-course-teacher-card{
    width:100%;
    min-height:auto;
    padding:14px;
    border-radius:18px;
    align-items:flex-start;
  }
  .public-course-actions,
  .public-course-actions form,
  .public-course-actions .btn,
  .public-course-access-card form,
  .public-course-access-card .btn{
    width:100%;
  }
  .public-course-stats{
    grid-template-columns:1fr;
  }
  .public-course-section,
  .public-course-html,
  .public-course-access-card{
    padding:18px;
    border-radius:18px;
  }
  .public-course-media-card{
    padding:12px;
    border-radius:20px;
  }
  .public-course-media-card img,
  .public-course-media-placeholder{
    min-height:220px;
    border-radius:16px;
  }
}
.public-course-media-fallback{
  display:none;
}


/* v3.211: compact mobile language switch and non-stacking mobile header actions */
@media(max-width:900px){
  .topbar{
    gap:8px;
  }
  .topbar .brand{
    flex:1 1 auto;
    min-width:0;
    line-height:1.12;
  }
  .topbar .brand span{
    min-width:0;
    overflow:hidden;
  }
  .top-actions{
    flex:0 0 auto;
    flex-wrap:nowrap !important;
    align-items:center;
    gap:5px;
    min-width:0;
  }
  .topbar .lang-switch{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:42px;
    min-width:42px;
    height:34px;
    margin-inline-start:0;
    flex:0 0 42px;
    border:1px solid #e5e7eb;
    border-radius:999px;
    background:#fff;
    box-shadow:0 6px 16px rgba(15,23,42,.08);
    overflow:hidden;
  }
  .topbar .lang-switch::after{
    content:attr(data-lang-label);
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#0f172a;
    font-size:12px;
    font-weight:900;
    letter-spacing:.04em;
    pointer-events:none;
  }
  .topbar .lang-switch select{
    position:absolute;
    inset:0;
    width:100% !important;
    min-width:0 !important;
    height:100%;
    padding:0 !important;
    border:0 !important;
    border-radius:999px;
    opacity:0;
    cursor:pointer;
  }
  .topbar .lang-switch:focus-within{
    border-color:var(--primary,#009688);
    box-shadow:0 0 0 3px rgba(0,150,136,.12),0 6px 16px rgba(15,23,42,.08);
  }
}
@media(max-width:520px){
  .topbar{
    padding-left:8px;
    padding-right:8px;
    gap:6px;
  }
  .topbar .brand{
    font-size:16px;
  }
  .topbar .brand small{
    font-size:10px;
  }
  .top-actions{
    gap:4px;
  }
  .top-actions .btn-small{
    padding:6px 7px;
    font-size:12px;
  }
  .topbar .lang-switch{
    width:38px;
    min-width:38px;
    height:32px;
    flex-basis:38px;
  }
  .topbar .lang-switch::after{
    font-size:11px;
  }
}

/* v4.17 professional support operations */
.impersonation-banner{background:#fff3cd;border-bottom:1px solid #f0d98c;color:#6b5200;padding:10px 18px;display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;font-size:14px}
.impersonation-banner form{display:inline;margin:0}.support-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.support-kpi{background:#fff;border:1px solid #e8edf2;border-radius:14px;padding:16px}.support-kpi h2{margin:4px 0 0;font-size:28px}.support-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.support-diagnostic-box{background:#f8fafc;border:1px solid #e7ecf2;border-radius:12px;padding:12px;margin-bottom:10px}.support-danger-note{border-left:4px solid #e55353;background:#fff7f7;padding:10px;border-radius:8px}.support-inline-form{display:inline}.support-filter-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;align-items:end}.support-long-text{white-space:pre-wrap;max-height:220px;overflow:auto;background:#f8fafc;border:1px solid #e7ecf2;border-radius:10px;padding:10px}.support-user-card{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #e7ecf2;border-radius:12px;padding:12px;margin-bottom:10px;background:#fff}.support-user-card .actions{display:flex;gap:8px;flex-wrap:wrap}.support-severity-critical{border-left:4px solid #d22}.support-severity-high{border-left:4px solid #f59e0b}@media(max-width:900px){.support-kpi-grid,.support-meta-grid,.support-filter-row{grid-template-columns:1fr}.support-user-card{display:block}.support-user-card .actions{margin-top:10px}}

/* v4.26 calendar day details popup */
.calendar-day.js-calendar-day{cursor:pointer;transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease}
.calendar-day.js-calendar-day:hover{border-color:var(--primary,#009688);box-shadow:0 10px 26px rgba(15,23,42,.08);transform:translateY(-1px)}
.calendar-day.js-calendar-day:focus-visible{outline:3px solid rgba(0,150,136,.22);outline-offset:2px}
.day-number{display:flex;align-items:center;justify-content:space-between;gap:6px}
.calendar-day-modal{max-width:820px}
.calendar-day-detail-list{display:grid;gap:12px}
.calendar-day-detail-item{border:1px solid #e5e7eb;border-left:5px solid var(--event-color,#64748b);background:#fff;border-radius:16px;padding:14px;box-shadow:0 12px 28px rgba(15,23,42,.06)}
.calendar-day-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}
.calendar-day-chip{display:inline-flex;align-items:center;border:1px solid #e2e8f0;background:#f8fafc;color:#334155;border-radius:999px;font-size:12px;font-weight:700;padding:4px 9px;white-space:nowrap}
.calendar-day-meta{font-size:13px;color:#334155;margin:6px 0;word-break:break-word}
.calendar-day-note{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:10px;margin-top:8px;color:#334155;line-height:1.55;word-break:break-word}
.calendar-day-detail-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.calendar-day-empty-note{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:16px;padding:18px;color:#334155}
@media(max-width:760px){.calendar-day-detail-head{flex-direction:column}.calendar-day-chip{white-space:normal}}

/* v4.28 clearer separators inside calendar day popup */
.calendar-day-detail-list{display:block}
.calendar-day-detail-item{position:relative;margin:0;border:1px solid #dbe4ee;border-left:6px solid var(--event-color,#64748b);background:#fff;border-radius:18px;padding:16px 16px 14px;box-shadow:0 14px 32px rgba(15,23,42,.08)}
.calendar-day-event-separator{border:0;border-top:1px solid #dbe4ee;margin:18px 0;position:relative}
.calendar-day-event-separator::after{content:"";display:block;width:46px;height:4px;border-radius:999px;background:#cbd5e1;margin:-3px auto 0}
.calendar-day-detail-head{padding-bottom:8px;border-bottom:1px solid #eef2f7;margin-bottom:10px}
.calendar-day-detail-item + .calendar-day-detail-item{margin-top:18px}
.calendar-day-note{margin-top:10px}
@media(max-width:760px){.calendar-day-event-separator{margin:14px 0}.calendar-day-detail-item{padding:14px}}


/* v4.43 Sequential learning */
.material-tile.locked{filter:grayscale(.18) saturate(.72);opacity:.78;cursor:pointer}.material-tile.locked:hover{filter:grayscale(.05) saturate(.88);transform:translateY(-1px)}.material-tile.locked .material-icon{background:linear-gradient(145deg,#f8fafc,#d7dee8)!important;color:#64748b!important;box-shadow:inset 0 0 0 2px rgba(255,255,255,.82),0 7px 14px rgba(15,23,42,.10)}.material-tile.locked .material-title{background:rgba(71,85,105,.82)}.material-tile.locked .material-type{background:rgba(71,85,105,.68)}.material-tile.locked .material-complete{color:#fff;font-size:15px}.side-link.locked{opacity:.72;background:#f8fafc;border-style:dashed}.side-link.locked:hover{opacity:.95}.locked-learning-card{display:flex;gap:18px;align-items:flex-start;padding:22px;border:1px solid #dbe5ee;border-radius:18px;background:linear-gradient(135deg,#fff,#f8fafc);box-shadow:0 12px 34px rgba(15,23,42,.06)}.locked-learning-icon{width:54px;height:54px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:#eef2f6;color:#475569;font-size:24px;flex:0 0 auto}.locked-learning-card h2{margin:0 0 8px;color:#0f172a}.locked-learning-card p{margin:0;color:#475569;line-height:1.6}.locked-learning-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}@media(max-width:620px){.locked-learning-card{display:block}.locked-learning-icon{margin-bottom:12px}.locked-learning-actions .btn{width:100%}}
.homework-locked-row{opacity:.76;background:#f8fafc}.homework-locked-row td{border-top-style:dashed}

/* Professional quiz/exam navigation and monitoring indicators */
.quiz-question-map{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}
.quiz-map-dot{width:34px;height:34px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--text);font-weight:600;cursor:pointer}
.quiz-map-dot.is-current{outline:3px solid rgba(15,118,110,.18);border-color:#0f766e}
.quiz-map-dot.is-answered{background:#ecfdf5;border-color:#34d399}
.quiz-answer-warning.alert.warning{border-color:#f59e0b;background:#fffbeb;color:#92400e}
.quiz-nav{gap:10px;flex-wrap:wrap}
.quiz-timer{display:inline-flex;align-items:center;gap:6px;border:1px solid #fecaca;background:#fef2f2;color:#991b1b;border-radius:999px;padding:7px 12px;margin-inline-end:8px;font-weight:600}
.badge.red{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.badge.orange{background:#ffedd5;color:#9a3412;border-color:#fed7aa}

/* v4.48 synchronized competitions */
.competition-list{display:grid;gap:18px}.competition-card{position:relative;overflow:hidden}.competition-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px}.competition-card-head h2{margin-bottom:4px}.competition-message{border:1px solid #e2e8f0;background:#f8fafc;border-radius:14px;padding:12px;margin:12px 0;line-height:1.6}.competition-prize{border:1px solid #fde68a;background:#fffbeb;color:#854d0e;border-radius:14px;padding:12px;margin:12px 0;font-weight:600;line-height:1.6}.competition-meta{margin:14px 0}.competition-countdown{display:inline-flex;align-items:center;border:1px solid #99f6e4;background:#f0fdfa;color:#115e59;border-radius:999px;padding:10px 16px;font-weight:800;font-size:18px;letter-spacing:.02em}.competition-group-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:230px;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:12px;background:#fff}.competition-group-picker label{display:flex;align-items:center;gap:8px;border:1px solid #edf2f7;border-radius:10px;padding:8px;background:#f8fafc}.competition-winners{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-top:14px}.competition-winner-card{position:relative;border:1px solid #e2e8f0;border-radius:22px;padding:22px;text-align:center;background:linear-gradient(145deg,#fff,#f8fafc);box-shadow:0 16px 34px rgba(15,23,42,.08);overflow:hidden}.competition-winner-card.rank-1{background:linear-gradient(145deg,#fff7ed,#fff)}.competition-winner-card.rank-2{background:linear-gradient(145deg,#f8fafc,#fff)}.competition-winner-card.rank-3{background:linear-gradient(145deg,#fff7ed,#fffbeb)}.competition-rank{position:absolute;top:12px;left:12px;background:#0f766e;color:#fff;border-radius:999px;padding:6px 10px;font-weight:800}.competition-avatar{width:76px;height:76px;border-radius:50%;object-fit:cover;border:4px solid #fff;box-shadow:0 12px 24px rgba(15,23,42,.16);margin:8px auto 12px}.competition-avatar-fallback{display:flex;align-items:center;justify-content:center;background:#e0f2fe;color:#075985;font-size:28px;font-weight:800}.competition-publish-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-top:16px;padding-top:14px;border-top:1px solid #e2e8f0}.competition-admin-monitor .grid-4>div,.competition-meta>div{border:1px solid #e2e8f0;border-radius:14px;padding:12px;background:#fff}.badge.green{background:#dcfce7;color:#166534;border-color:#bbf7d0}@media(max-width:900px){.competition-winners{grid-template-columns:1fr}.competition-group-picker{grid-template-columns:1fr}.competition-card-head{display:block}.competition-countdown{font-size:15px;width:100%;justify-content:center}}

/* v4.50 competition dashboard and sidebar refinements */
.dashboard-competition-card{border:1px solid #99f6e4;background:linear-gradient(145deg,#ffffff,#f0fdfa)}
.dashboard-competition-card.live{border-color:#fed7aa;background:linear-gradient(145deg,#ffffff,#fff7ed)}
.dashboard-competition-card .competition-countdown{margin-right:10px;margin-bottom:8px}

/* v4.54 Competition results-only and disqualification UI */
.competition-results-only{max-width:980px;margin:0 auto;text-align:center;padding:34px}.competition-results-only h2{font-size:28px;margin-bottom:18px}.competition-winners-centered{justify-content:center}.competition-results-only .competition-winners{grid-template-columns:repeat(auto-fit,minmax(220px,280px));justify-content:center}.competition-score-percent{font-size:24px;font-weight:900;color:#0f766e;margin:10px 0 0}.competition-results-actions{margin-top:22px}.competition-disqualification-message{text-align:left;margin:0 auto 20px;max-width:760px}.competition-disqualified-row{opacity:.82;background:#fff7ed}.competition-row-action{display:grid;gap:8px;margin-top:8px;min-width:220px}.competition-row-action textarea{min-height:58px;font-size:13px}.badge.red{background:#fee2e2;color:#991b1b;border-color:#fecaca}.inline-form{display:inline-grid}


/* v4.55 competition result badges and winner fireworks */
.competition-celebration-note{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #fde68a;background:#fffbeb;color:#854d0e;border-radius:999px;padding:10px 16px;font-weight:800;margin:0 auto 18px}
.competition-fireworks-overlay{position:fixed;inset:0;z-index:9999;pointer-events:none;overflow:hidden}
.competition-firework-particle{position:absolute;left:var(--x);top:var(--y);width:7px;height:7px;border-radius:999px;background:var(--c);box-shadow:0 0 10px var(--c);animation:competition-firework-burst 1.15s ease-out forwards;transform:translate(0,0) scale(1)}
@keyframes competition-firework-burst{0%{opacity:1;transform:translate(0,0) scale(1)}80%{opacity:.9}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.15)}}
@media (prefers-reduced-motion: reduce){.competition-firework-particle{display:none}}

/* v4.75 unified staff student profile modal inside Course Builder */
.student-detail-modal.full-student-profile-modal{
  width:min(1120px,calc(100vw - 32px));
  padding:0;
  overflow:auto;
}
.student-detail-modal.full-student-profile-modal .student-modal-body{
  padding:22px;
  margin:0;
  max-width:none;
  background:#fff;
  border-radius:0 0 18px 18px;
  box-shadow:none;
}
.student-detail-modal.full-student-profile-modal .student-modal-head{
  margin:0;
  padding:18px 22px;
  max-width:none;
  border-radius:18px 18px 0 0;
}
.student-detail-modal.full-student-profile-modal .inline-form{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
@media(max-width:900px){
  .student-detail-modal.full-student-profile-modal .student-modal-layout{grid-template-columns:1fr!important}
  .student-detail-modal.full-student-profile-modal .student-profile-nav{position:static;display:flex;overflow:auto}
  .student-detail-modal.full-student-profile-modal .student-profile-tab{white-space:nowrap}
}

/* v4.78 student profile additions */
.compact-table th,
.compact-table td{font-size:.92rem;vertical-align:top;}
.note-item.is-highlight{outline:2px solid rgba(37,99,235,.22);background:rgba(37,99,235,.045);}
.comment-inline-message{margin-top:.65rem;padding:.55rem .7rem;border-radius:.65rem;background:#eef6ff;color:#1d4ed8;font-size:.9rem;display:none;}
.comment-inline-message.is-success{display:block;background:#ecfdf5;color:#047857;}
.comment-inline-message.is-error{display:block;background:#fef2f2;color:#b91c1c;}

/* v4.79 compact Users > Student information layout */
.student-info-compact-card{overflow:visible;}
.student-info-course-list{display:grid;gap:12px;margin-top:14px;}
.student-info-course-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid rgba(148,163,184,.28);border-radius:16px;background:rgba(248,250,252,.86);box-shadow:0 8px 24px rgba(15,23,42,.04);min-width:0;}
.student-info-course-main,.student-info-attendance-main{display:flex;align-items:center;gap:10px;min-width:0;flex-wrap:wrap;}
.student-info-course-main{flex:1 1 58%;}
.student-info-attendance-main{flex:0 0 auto;justify-content:flex-end;}
.student-info-course-main strong{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.student-info-course-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;font-weight:700;}
.student-info-empty{padding:16px;border:1px dashed rgba(148,163,184,.55);border-radius:14px;color:#64748b;background:#f8fafc;}
[dir="rtl"] .student-info-attendance-main{justify-content:flex-start;}
@media (max-width: 760px){.student-info-course-row{display:block}.student-info-attendance-main{justify-content:flex-start;margin-top:10px}.student-info-course-main strong{white-space:normal}}

/* v4.80 robust fallback for shared student profile dialogs */
.student-detail-modal.is-open,
.student-modal.is-open{
  display:block;
  position:fixed;
  inset:5vh auto auto 50%;
  transform:translateX(-50%);
  z-index:10050;
  max-height:90vh;
  overflow:auto;
}
.body-modal-open{overflow:hidden;}


/* v4.83 student profile: keep Student information compact and move course attendance into its own tab */
.student-info-basic-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:12px;}
.student-info-basic-grid>div{border:1px solid #e5edf6;background:#fff;border-radius:14px;padding:12px;min-width:0;}
.student-info-basic-grid strong{display:block;margin-top:4px;overflow-wrap:anywhere;}
.student-profile-nav .student-profile-tab[data-student-tab="course_attendance"]{font-weight:700;}
.student-info-course-row{min-width:0;}
.student-info-course-main strong{overflow-wrap:anywhere;}

/* v4.86 Attendance Center calculate results: compact required/credited attendance totals */
.attendance-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:16px;}
.attendance-result-card{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:16px;box-shadow:0 12px 28px rgba(15,23,42,.045);min-width:0;}
.attendance-result-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;}
.attendance-result-head strong{display:block;font-size:1rem;overflow-wrap:anywhere;}
.attendance-result-head .muted{display:block;margin-top:3px;overflow-wrap:anywhere;}
.attendance-percent{min-width:96px;text-align:end;font-weight:800;color:#0f172a;}
.attendance-percent .progress{margin-top:6px;height:7px;min-width:90px;}
.attendance-result-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.attendance-result-metrics>div{border:1px solid #edf2f7;border-radius:14px;background:#f8fafc;padding:10px 12px;min-width:0;}
.attendance-result-metrics span{display:block;font-size:.76rem;line-height:1.25;text-transform:uppercase;letter-spacing:.055em;color:#64748b;font-weight:700;}
.attendance-result-metrics strong{display:block;margin-top:5px;font-size:1.08rem;color:#0f172a;}
.attendance-result-note{margin:12px 0 0;font-size:.88rem;line-height:1.55;}
.attendance-breakdown{margin-top:12px;border-top:1px solid #eef2f7;padding-top:10px;}
.attendance-breakdown summary{cursor:pointer;font-weight:700;color:#0f766e;}
.attendance-breakdown-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;margin-top:10px;font-size:.92rem;}
.attendance-breakdown-grid span{color:#64748b;min-width:0;overflow-wrap:anywhere;}
.attendance-breakdown-grid strong{text-align:end;}
[dir="rtl"] .attendance-percent{text-align:start;}
[dir="rtl"] .attendance-breakdown-grid strong{text-align:start;}
@media(max-width:640px){.attendance-result-head{display:block}.attendance-percent{text-align:start;margin-top:10px}.attendance-result-metrics{grid-template-columns:1fr}}

/* v4.89 Attendance calculate: report-style stacked results and Excel export action */
.attendance-result-list{display:grid;grid-template-columns:1fr;gap:14px;margin-top:16px;max-width:1040px;}
.attendance-result-list .attendance-result-card{width:100%;}
.attendance-export-actions{margin-top:14px;display:flex;justify-content:flex-start;gap:10px;flex-wrap:wrap;}
.attendance-export-actions .btn.secondary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}

/* v4.89 Attendance calculate Excel actions */
.attendance-export-actions{margin-top:14px;display:flex;justify-content:flex-start;gap:10px;flex-wrap:wrap;}
.attendance-export-actions .btn.secondary{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}

/* v4.91 Attendance calculate results: show students side-by-side like compact report cards.
   The layout uses 5 cards per row on very wide screens, 4 on desktop, then falls back responsively. */
.attendance-result-list{display:grid;gap:14px;margin-top:16px;max-width:none;width:100%;grid-template-columns:repeat(1,minmax(0,1fr));}
.attendance-result-list .attendance-result-card{width:100%;min-width:0;}
@media (min-width: 640px){.attendance-result-list{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (min-width: 960px){.attendance-result-list{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (min-width: 1220px){.attendance-result-list{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media (min-width: 1600px){.attendance-result-list{grid-template-columns:repeat(5,minmax(0,1fr));}}
@media (min-width: 1220px){
  .attendance-result-card{padding:14px;}
  .attendance-result-head{gap:10px;margin-bottom:12px;}
  .attendance-percent{min-width:74px;}
  .attendance-percent .progress{min-width:70px;}
  .attendance-result-metrics{gap:8px;}
  .attendance-result-metrics>div{padding:9px 10px;}
  .attendance-result-metrics span{font-size:.68rem;letter-spacing:.04em;}
  .attendance-result-note{font-size:.82rem;}
}
@media (min-width: 1220px) and (max-width: 1450px){
  .attendance-result-metrics{grid-template-columns:1fr;}
}

/* v4.94 Course Builder reports: student report cards inside course reports */
.course-report-student-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:16px;}
.course-report-student-card{border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:16px;box-shadow:0 12px 28px rgba(15,23,42,.045);min-width:0;}
.course-report-student-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:14px;}
.course-report-student-head b{overflow-wrap:anywhere;}
.course-report-student-head .muted{overflow-wrap:anywhere;}
.course-report-metric{border:1px solid #edf2f7;background:#f8fafc;border-radius:14px;padding:10px 12px;min-width:0;}
.course-report-metric.main{margin-bottom:10px;}
.course-report-metric span{display:block;font-size:.72rem;line-height:1.25;text-transform:uppercase;letter-spacing:.055em;color:#64748b;font-weight:800;}
.course-report-metric strong{display:block;margin-top:5px;color:#0f172a;font-size:1.03rem;overflow-wrap:anywhere;}
.course-report-metric small{display:block;margin-top:5px;color:#64748b;line-height:1.35;overflow-wrap:anywhere;}
.course-report-mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.course-report-last{margin:10px 0 0;font-size:.86rem;}
.attendance-good{color:#047857!important;}
.attendance-warn{color:#b45309!important;}
.attendance-bad{color:#b91c1c!important;}
@media (min-width: 1300px){.course-report-student-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media (min-width: 1700px){.course-report-student-grid{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media (max-width: 640px){.course-report-student-head{display:block}.course-report-mini-grid{grid-template-columns:1fr}}

/* v4.97 staff profile modal course/substitute management */
.staff-profile-modal .student-modal-body{max-width:none;}
.staff-summary-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:16px 0;}
.staff-summary-strip>div{border:1px solid #e2e8f0;background:#f8fafc;border-radius:14px;padding:14px;}
.staff-summary-strip b{display:block;font-size:24px;color:#0f766e;line-height:1;}
.staff-summary-strip span{display:block;margin-top:6px;color:#64748b;font-size:13px;}
.staff-course-list{display:grid;gap:12px;margin:14px 0;}
.staff-course-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e2e8f0;background:#fff;border-radius:16px;padding:14px;box-shadow:0 10px 22px rgba(15,23,42,.04);max-width:100%;overflow:hidden;}
.staff-course-row b{overflow-wrap:anywhere;}
.staff-course-row>div:first-child{min-width:0;flex:1 1 auto;}
.staff-course-actions{flex:0 0 auto;display:flex;justify-content:flex-end;align-items:center;}
.staff-course-actions .inline-form{margin:0;}
.staff-profile-modal .student-profile-content,.staff-profile-modal .card{min-width:0;overflow:hidden;}
.staff-profile-modal .student-profile-content{min-width:0;}
.staff-profile-modal .custom-field-create{margin-top:18px;}
@media(max-width:900px){.staff-course-row{flex-direction:column;align-items:stretch}.staff-course-actions{justify-content:flex-start}.staff-profile-modal .student-modal-layout{grid-template-columns:1fr}.staff-profile-modal .student-profile-nav{position:static;display:flex;overflow:auto}.staff-profile-modal .student-profile-tab{white-space:nowrap}}

/* v4.100 primary instructor replacement layout fix */
.staff-course-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
}
.staff-course-row.is-primary-assignment{
  grid-template-columns:1fr;
  align-items:stretch;
}
.staff-course-main{
  min-width:0;
  max-width:100%;
}
.staff-course-titleline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}
.staff-course-titleline b{
  display:block;
  min-width:0;
  overflow-wrap:break-word;
  word-break:normal;
  line-height:1.35;
}
.staff-course-meta{
  display:block;
  margin-top:5px;
  overflow-wrap:break-word;
}
.staff-course-actions{
  min-width:0;
  max-width:100%;
  display:flex;
  justify-content:flex-end;
  align-items:center;
}
.staff-course-row.is-primary-assignment .staff-course-actions{
  justify-content:stretch;
  width:100%;
  margin-top:12px;
}
.staff-primary-replace-box{
  width:100%;
  max-width:100%;
  min-width:0;
}
.staff-primary-replace-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  gap:.65rem;
  align-items:center;
  width:100%;
  max-width:100%;
}
.staff-primary-replace-form select{
  min-width:0;
  width:100%;
  max-width:100%;
}
.staff-primary-replace-form .btn,
.staff-primary-replace-form button{
  white-space:nowrap;
  justify-self:end;
}
.staff-profile-modal .staff-course-row{
  overflow:visible;
}
.course-primary-replace-form{
  min-width:240px;
}
@media (max-width: 900px){
  .staff-course-row,
  .staff-course-row.is-primary-assignment{grid-template-columns:1fr;}
  .staff-course-actions{justify-content:flex-start;margin-top:10px;}
}
@media (max-width: 760px){
  .staff-primary-replace-form{grid-template-columns:1fr;}
  .staff-primary-replace-form .btn,
  .staff-primary-replace-form button{justify-self:stretch;width:100%;}
}

/* v4.104 Users > Student profile Courses tab responsive layout fix */
.student-courses-manage-card{
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.student-course-manage-list{
  display:grid;
  gap:12px;
  margin:14px 0 18px;
  min-width:0;
}
.student-course-manage-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  padding:14px;
  box-shadow:0 10px 24px rgba(15,23,42,.045);
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.student-course-manage-main{
  min-width:0;
  max-width:100%;
}
.student-course-manage-main strong{
  display:block;
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
  line-height:1.35;
}
.student-course-manage-meta{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
  color:#64748b;
  font-size:.9rem;
  min-width:0;
}
.student-course-manage-action{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin:0;
  min-width:0;
}
.student-course-tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
  margin-top:16px;
  min-width:0;
}
.student-course-tool-card{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:16px;
  padding:14px;
  margin:0;
  display:grid;
  gap:10px;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.student-course-tool-card h4{
  margin:0;
  color:#0f172a;
}
.student-course-tool-card select,
.student-course-tool-card input{
  min-width:0;
  width:100%;
  max-width:100%;
}
.student-course-tool-card .btn{
  justify-self:start;
}
.student-course-move-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  min-width:0;
}
.student-profile-panel[data-student-panel="courses"]{
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.student-profile-panel[data-student-panel="courses"] .card,
.student-profile-panel[data-student-panel="courses"] form,
.student-profile-panel[data-student-panel="courses"] select{
  max-width:100%;
}
@media(max-width:760px){
  .student-course-manage-row{grid-template-columns:1fr;align-items:stretch;}
  .student-course-manage-action{justify-content:flex-start;}
  .student-course-move-grid{grid-template-columns:1fr;}
  .student-course-tool-card .btn,
  .student-course-manage-action .btn{width:100%;}
}

/* v4.107 Account & Billing */
.billing-tabs{margin-bottom:18px}.billing-overview-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}.billing-panel h2,.billing-feature-card h3{margin-top:0}.billing-detail-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);padding:10px 0}.billing-detail-row:last-child{border-bottom:0}.billing-detail-row span,.billing-detail-grid span{color:var(--muted);font-size:13px}.billing-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.billing-detail-grid>div{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:14px}.billing-detail-grid b{display:block;margin-top:5px}.billing-seat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.billing-seat-row>div{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:14px}.billing-seat-row b{display:block;font-size:28px}.billing-seat-row span{color:var(--muted);font-weight:650}.billing-main-progress{margin-top:16px}.billing-feature-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:14px}.billing-feature-card{border:1px solid var(--line);border-radius:14px;background:#fff;padding:16px;min-width:0;box-shadow:0 1px 2px rgba(15,23,42,.03);display:flex;flex-direction:column;gap:8px}.billing-feature-card.is-enabled{background:linear-gradient(180deg,#ffffff,#f4fffc)}.billing-feature-card.is-disabled{background:#fff}.billing-feature-icon{width:42px;height:42px;border-radius:12px;background:#eef7f6;color:#00796b;display:inline-flex;align-items:center;justify-content:center;font-size:21px}.billing-usage-line{margin:0}.billing-request-form{margin-top:auto}.billing-request-form textarea{min-height:60px}.billing-request-list{display:grid;gap:12px}.billing-request-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;border:1px solid var(--line);border-radius:14px;background:#fff;padding:14px;align-items:start}.owner-billing-request-row{grid-template-columns:minmax(0,1fr) 340px}.billing-owner-actions{display:grid;gap:10px}.billing-owner-actions form{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:12px}.billing-table-wrap{overflow:auto}.billing-usage-tile .progress{margin-top:auto}@media(max-width:1280px){.billing-feature-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:980px){.billing-overview-grid,.billing-detail-grid,.billing-feature-grid,.billing-request-row,.owner-billing-request-row{grid-template-columns:1fr}.billing-seat-row{grid-template-columns:1fr}.billing-owner-actions{grid-template-columns:1fr}}

/* v4.109 Owner academy feature matrix and packages */
.owner-feature-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:12px;
  margin:14px 0 18px;
  width:100%;
  min-width:0;
}
.owner-feature-toggle{
  display:grid !important;
  grid-template-columns:22px minmax(0,1fr);
  gap:10px;
  align-items:start;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background:#fff;
  min-width:0;
  max-width:100%;
  min-height:96px;
  margin:0 !important;
  overflow:hidden;
}
.owner-feature-toggle.is-on{background:linear-gradient(180deg,#ffffff,#f3fff8);border-color:#b7edd0;}
.owner-feature-toggle.is-off{background:#fffafa;border-color:#f1c6c6;}
.owner-feature-toggle input[type="checkbox"]{
  width:auto !important;
  min-width:16px !important;
  max-width:16px !important;
  height:16px !important;
  padding:0 !important;
  margin:2px 0 0 0 !important;
  flex:none !important;
  justify-self:start;
}
.owner-feature-toggle span{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
.owner-feature-toggle b{
  display:block;
  color:var(--text);
  font-size:13px;
  line-height:1.35;
  white-space:normal;
  word-break:normal;
  overflow-wrap:anywhere;
}
.owner-feature-toggle small{
  display:block;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  margin-top:5px;
  white-space:normal;
  word-break:normal;
  overflow-wrap:anywhere;
}
.owner-feature-section-title{
  margin:20px 0 6px;
  font-size:14px;
  color:#0f172a;
}
.owner-package-limits{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}
.owner-package-feature-note{
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  background:#f8fafc;
  margin:12px 0;
}
.owner-academy-card h3{margin-bottom:4px;}
@media(max-width:1280px){.owner-package-limits{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:900px){.owner-package-limits{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:640px){.owner-feature-grid,.owner-package-limits{grid-template-columns:1fr;}.owner-feature-toggle{min-height:0;}}
.owner-feature-toggle.u-style-no-min-height{min-height:0;margin:12px 0!important;max-width:420px;}

/* v4.110 academy billing lifecycle */
.billing-renewal-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 16px;
  margin:0 0 16px;
  border:1px solid #fecaca;
  border-radius:16px;
  background:#fee2e2;
  color:#7f1d1d;
  box-shadow:0 12px 30px rgba(127,29,29,.08);
}
.billing-renewal-banner b{color:#7f1d1d;}
.billing-renewal-banner span{color:#991b1b;}
.billing-renewal-banner form{margin:0;flex:0 0 auto;}
.billing-owner-checks{display:flex;flex-wrap:wrap;gap:14px;margin:12px 0 18px;align-items:center;}
.billing-owner-checks label{display:flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;font-weight:700;}
@media(max-width:700px){.billing-renewal-banner{align-items:flex-start;flex-direction:column}.billing-owner-checks{flex-direction:column;align-items:stretch}.billing-owner-checks label{width:100%;}}

/* v4.117 Professional Analytics Center */
.analytics-nav{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin:0 0 18px}
.analytics-nav-item{display:block;text-decoration:none;color:var(--text,#0f172a);background:#fff;border:1px solid var(--line,#e5e7eb);border-radius:16px;padding:13px 14px;box-shadow:0 8px 20px rgba(15,23,42,.035);min-height:74px;transition:.16s ease}
.analytics-nav-item strong{display:block;font-size:14px;margin-bottom:4px;color:#0f172a}.analytics-nav-item span{display:block;color:#64748b;font-size:12px;line-height:1.35}.analytics-nav-item:hover{transform:translateY(-1px);border-color:#b7c4d5}.analytics-nav-item.active{background:linear-gradient(180deg,#ecfdf5,#fff);border-color:#99d8cb;box-shadow:0 10px 22px rgba(15,118,110,.10)}
.analytics-filter-card{margin-bottom:18px}.analytics-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}.analytics-filter-grid label{display:block;font-size:12px;font-weight:800;color:#475569}.analytics-filter-grid input,.analytics-filter-grid select{margin-top:6px;width:100%;min-width:0}.analytics-filter-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.analytics-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.analytics-kpi-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}.analytics-kpi{padding:18px;min-height:112px;display:flex;flex-direction:column;justify-content:space-between}.analytics-kpi span{color:#64748b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.analytics-kpi strong{display:block;font-size:28px;line-height:1.1;color:#0f172a;margin:10px 0}.analytics-kpi small{color:#64748b}.analytics-kpi.risk strong{color:#b91c1c}
.analytics-page-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-bottom:18px}.analytics-page-grid.two-one{grid-template-columns:minmax(320px,.75fr) minmax(0,1.25fr)}.analytics-chart-card{min-width:0}.analytics-chart-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}.analytics-chart-head h2,.analytics-table-card h2,.analytics-export-card h2{margin-top:0}.analytics-chart{position:relative;width:100%;min-height:280px}.analytics-chart canvas{display:block;width:100%;max-width:100%;height:280px}.analytics-table-card{min-width:0}.analytics-table-wrap{overflow:auto;max-width:100%}
.analytics-section-links{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}.analytics-section-link{text-decoration:none;color:#0f172a;min-height:120px}.analytics-section-link strong{display:block;font-size:17px;margin-bottom:8px}.analytics-section-link span{display:block;color:#64748b;line-height:1.45}
.analytics-card-list{display:grid;gap:10px}.analytics-row-card{border:1px solid var(--line,#e5e7eb);border-radius:16px;background:#fff;padding:14px;display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(4,minmax(80px,.6fr)) auto;gap:12px;align-items:center}.analytics-row-card strong{display:block;color:#0f172a}.analytics-row-card span,.analytics-row-card small{display:block;color:#64748b;font-size:12px;line-height:1.35}.analytics-row-card b{display:block;color:#0f172a}.analytics-export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.analytics-export-card{min-height:190px;display:flex;flex-direction:column;align-items:flex-start}.analytics-export-card .btn{margin-top:auto}
.empty-state{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:14px;padding:20px;text-align:center}
@media(max-width:1400px){.analytics-nav{grid-template-columns:repeat(4,minmax(0,1fr))}.analytics-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.analytics-section-links{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-export-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-row-card{grid-template-columns:minmax(180px,1fr) repeat(2,minmax(90px,.6fr));}}
@media(max-width:980px){.analytics-nav,.analytics-filter-grid,.analytics-kpi-grid,.analytics-kpi-grid.compact,.analytics-page-grid,.analytics-page-grid.two-one,.analytics-section-links,.analytics-export-grid{grid-template-columns:1fr}.analytics-row-card{grid-template-columns:1fr 1fr}.analytics-row-card .btn{grid-column:1/-1}}
@media(max-width:620px){.analytics-row-card{grid-template-columns:1fr}.analytics-filter-actions .btn{width:100%}}

/* v4.118 notification controls: opening an item no longer marks it read. */
.notification-item{display:block;position:relative;padding:0;border-bottom:1px solid var(--line);background:#fff}
.notification-item.read{background:#fff;color:#64748b}
.notification-item.read .notification-title{color:#64748b;font-weight:700}
.notification-main{display:block;padding:12px 16px;text-decoration:none;color:inherit}
.notification-main:hover{background:#f8fafc;text-decoration:none}
.notification-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:0 16px 12px}
.notification-actions form{margin:0}
.notification-action-btn{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 9px;font-weight:800;font-size:12px;line-height:1;cursor:pointer;color:#0f766e}
.notification-action-btn:hover{background:#f0fdfa;border-color:#99f6e4}
.notification-action-btn.danger{color:#b91c1c}
.notification-action-btn.danger:hover{background:#fef2f2;border-color:#fecaca}
.notification-page-item{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px;border:1px solid var(--line);border-radius:12px;background:#fff}
.notification-page-item.read{background:#fff;color:#64748b;border-left:1px solid var(--line)}
.notification-page-main{display:block;min-width:0;flex:1;text-decoration:none;color:inherit}
.notification-page-main:hover{text-decoration:none}
.notification-page-item-actions{padding:0;flex:0 0 auto;justify-content:flex-end}
.notification-page-actions .inline-form{display:inline-flex;margin:0}
.notification-page-actions .inline-form .btn{white-space:nowrap}
.dir-rtl .notification-item.unread{border-left:0;border-right:4px solid var(--primary)}
@media(max-width:700px){.notification-page-item{flex-direction:column}.notification-page-item-actions{justify-content:flex-start;width:100%}.notification-actions{padding-inline:12px}.notification-main{padding-inline:12px}}

/* v4.119 notification manual read state fix */
.notification-item.opened.unread{background:#fffbeb;border-left:4px solid #f59e0b}
.notification-item.opened.unread .notification-title{color:#92400e}
.notification-page-item.opened.unread{background:#fffbeb;border-left:4px solid #f59e0b}
.notification-action-btn.disabled{cursor:default;color:#64748b;background:#f8fafc;border-color:#e2e8f0}
.notification-action-btn.disabled:hover{background:#f8fafc;border-color:#e2e8f0}
.dir-rtl .notification-item.opened.unread{border-left:0;border-right:4px solid #f59e0b}
.dir-rtl .notification-page-item.opened.unread{border-left:1px solid var(--line);border-right:4px solid #f59e0b}

/* v4.120 notification workflow: popup shows unread only; opened stays unread with a distinct color. */
.notification-list .notification-item.unread{background:#ecfeff;border-left:4px solid var(--primary)}
.notification-list .notification-item.opened.unread{background:#fff7ed;border-left:4px solid #f97316;box-shadow:inset 0 0 0 1px #fed7aa}
.notification-list .notification-item.opened.unread .notification-title{color:#9a3412}
.notification-list .notification-item.opened.unread .notification-time::after{content:' · opened';color:#ea580c;font-weight:800}
.notification-list .notification-item.read{display:none}
.notification-page-item.opened.unread{background:#fff7ed;border-left:4px solid #f97316;box-shadow:inset 0 0 0 1px #fed7aa}
.notification-page-item.opened.unread strong{color:#9a3412}
.dir-rtl .notification-list .notification-item.unread{border-left:0;border-right:4px solid var(--primary)}
.dir-rtl .notification-list .notification-item.opened.unread{border-left:0;border-right:4px solid #f97316}
.dir-rtl .notification-page-item.opened.unread{border-left:1px solid var(--line);border-right:4px solid #f97316}
