/* ===== Eden Modules (scoped) ===== */
.ec-mod { --ec-blue:#2457ff; --ec-text:#1f2937; --ec-muted:#6b7280; --ec-border:#e5e7eb; --ec-bg:#ffffff; }
.ec-mod * { box-sizing: border-box; }
.ec-mod__switcher { position: sticky; top: 0; z-index: 2; background: transparent; padding: 6px 0 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ec-mod__pill { border:1px solid var(--ec-border); background:#f7f8fb; color:var(--ec-text); padding:6px 10px; border-radius:999px; font-size:14px; line-height:1; }
.ec-mod__pill.is-active { background:var(--ec-blue); color:#fff; border-color:var(--ec-blue); }
.ec-mod__pill[disabled] { opacity:.75; cursor:default; }

.ec-mod__grid { display:grid; grid-template-columns: 320px 1fr 300px; gap:16px; align-items: stretch; }
@media (max-width: 1200px){ .ec-mod__grid{ grid-template-columns: 300px 1fr; } .ec-mod__rail{ display:none; } }
@media (max-width: 768px){ .ec-mod__grid{ grid-template-columns: 1fr; } }

.ec-mod__tree{ background:var(--ec-bg); border:1px solid var(--ec-border); border-radius:12px; padding:10px; overflow:auto; max-height: calc(100vh - 220px); }
.ec-mod__module{ border:1px solid var(--ec-border); border-radius:10px; margin-bottom:10px; background:#fff; }
.ec-mod__module-h{ display:flex; align-items:center; gap:8px; padding:10px 12px; }
.ec-mod__module-title{ font-weight:600; color:var(--ec-text); flex:1; }
.ec-mod__count{ font-size:12px; color:var(--ec-muted); }
.ec-mod__toggle{ width:22px; height:22px; border-radius:50%; border:1px solid var(--ec-border); background:#fff; position:relative; }
.ec-mod__toggle::after{ content:""; position:absolute; inset:0; margin:auto; width:8px; height:8px; border-right:2px solid var(--ec-muted); border-bottom:2px solid var(--ec-muted); transform:rotate(45deg); }
.ec-mod__module.is-empty .ec-mod__toggle{ display:none; }
.ec-mod__empty{ padding:10px 12px; font-size:12px; color:var(--ec-muted); }

.ec-mod__items{ list-style:none; margin:0; padding:6px; border-top:1px solid var(--ec-border); }
.ec-mod__item{ border-radius:8px; }
.ec-mod__item + .ec-mod__item{ margin-top:6px; }
.ec-mod__item-link{ display:flex; align-items:center; gap:10px; padding:10px 12px; text-decoration:none; color:var(--ec-text); border:1px solid var(--ec-border); border-radius:8px; background:#fafafa; }
.ec-mod__item-link:hover{ background:#f3f4f6; }
.ec-mod__item.is-locked .ec-mod__item-link{ opacity:.6; cursor:not-allowed; }
.ec-mod__badge{ margin-left:auto; font-size:11px; color:#92400e; background:#fff7ed; border:1px solid #fed7aa; padding:2px 6px; border-radius:999px; }
.ec-mod__icon{ width:16px; height:16px; display:inline-block; background:#e5e7eb; border-radius:3px; }
.ec-i-pdf{ background:#fee2e2; }
.ec-i-video{ background:#e0e7ff; }
.ec-i-quiz{ background:#dcfce7; }

.ec-mod__viewer{ background:var(--ec-bg); border:1px solid var(--ec-border); border-radius:12px; padding:0; min-height:520px; display:flex; flex-direction:column; }
.ec-mod__viewer-toolbar{ display:flex; gap:10px; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--ec-border); }
.ec-mod__viewer-title{ margin:0; font-size:16px; font-weight:600; color:var(--ec-text); }
.ec-mod__stage{ position:relative; flex:1; min-height:420px; }
.ec-mod__stage iframe, .ec-mod__stage object, .ec-mod__stage video{ width:100%; height:100%; border:0; border-radius:0 0 12px 12px; }
.ec-mod__placeholder{ display:flex; height:100%; align-items:center; justify-content:center; color:var(--ec-muted); font-size:14px; }

.ec-mod__rail{ display:flex; flex-direction:column; gap:12px; }
.ec-card{ background:#fff; border:1px solid var(--ec-border); border-radius:12px; }
.ec-card-h{ font-weight:600; padding:10px 12px; border-bottom:1px solid var(--ec-border); }
.ec-card-b{ padding:12px; }
.ec-empty{ color:var(--ec-muted); font-size:13px; }
.ec-progress{ height:8px; background:#eef2ff; border-radius:6px; overflow:hidden; }
.ec-progress-bar{ height:8px; width:0%; background:var(--ec-blue); }
.ec-progress-text{ margin-top:8px; font-size:12px; color:var(--ec-muted); }
