/* EduIndex EAD Theme — main.css */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

/* ══════════════════════════════════════════
   TOKENS
══════════════════════════════════════════ */
:root {
    --c-primary:   #1a56db;
    --c-primary-d: #1746c0;
    --c-accent:    #f59e0b;
    --c-accent-d:  #d97706;
    --c-success:   #10b981;
    --c-danger:    #ef4444;
    --c-dark:      #0b1524;
    --c-dark2:     #0f1e34;
    --c-sidebar:   #0d1a2e;
    --c-sidebar2:  #111f35;
    --c-border:    #1e3050;
    --c-text:      #e2e8f0;
    --c-muted:     #6b83a0;
    --c-white:     #ffffff;
    --c-bg:        #f0f4f8;
    --c-card:      #ffffff;
    --c-body:      #1e293b;

    --font-head: 'Sora', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
    --shadow-md: 0 8px 30px rgba(0,0,0,.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--c-body); background: var(--c-bg); line-height: 1.6; }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; }

/* ── Container ── */
.eidt-container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.eidt-header {
    position: sticky; top: 0; z-index: 900;
    background: rgba(11,21,36,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--c-border);
    height: 64px;
}
.eidt-header-inner {
    height: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.eidt-logo {
    font-family: var(--font-head); font-size: 22px; font-weight: 900;
    color: var(--c-white); letter-spacing: -1px;
}
.eidt-logo span { color: var(--c-accent); }
.eidt-logo em   { font-style: normal; font-size: 14px; font-weight: 600; color: var(--c-muted); margin-left: 4px; }
.eidt-nav { display: flex; align-items: center; gap: 20px; }
.eidt-nav-link { color: var(--c-text); font-size: 14px; font-weight: 600; transition: color .2s; }
.eidt-nav-link:hover { color: var(--c-accent); }
.eidt-btn-header {
    background: var(--c-accent); color: var(--c-dark);
    padding: 9px 20px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 700; font-family: var(--font-head);
    transition: background .2s;
}
.eidt-btn-header:hover { background: var(--c-accent-d); }

/* Avatar dropdown */
.eidt-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--c-primary); color: #fff;
    font-size: 16px; font-weight: 800; font-family: var(--font-head);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
}
.eidt-dropdown {
    display: none; position: absolute; top: 52px; right: 0;
    background: #fff; border-radius: var(--radius-md);
    box-shadow: 0 8px 40px rgba(0,0,0,.18); min-width: 240px; padding: 8px;
    border: 1px solid #e2e8f0; z-index: 9999;
    animation: dropIn .15s ease;
}
.eidt-dropdown.open { display: block; }
.eidt-avatar.open   { background: var(--c-primary-d); outline: 3px solid rgba(255,255,255,.2); }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.eidt-dropdown-name { padding: 10px 14px 2px; font-weight: 700; font-size: 14px; color: var(--c-body); }
.eidt-dropdown-cpf  { padding: 0 14px 10px; font-size: 12px; color: #94a3b8; }
.eidt-dropdown hr   { border: none; border-top: 1px solid #e2e8f0; margin: 4px 0; }
.eidt-dropdown a    { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--c-body); transition: background .15s; }
.eidt-dropdown a:hover { background: var(--c-bg); }
.eidt-dropdown a.eidt-dd-logout { color: #dc2626; }
.eidt-dropdown a.eidt-dd-logout:hover { background: #fee2e2; }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.eidt-footer {
    background: var(--c-dark); border-top: 1px solid var(--c-border);
    padding: 30px 0; margin-top: 80px;
}
.eidt-footer-inner {
    max-width: 1160px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.eidt-footer-logo { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: #fff; }
.eidt-footer-logo span { color: var(--c-accent); }
.eidt-footer-logo em { font-style: normal; font-size: 12px; color: var(--c-muted); }
.eidt-footer-copy { font-size: 13px; color: var(--c-muted); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.eidt-hero {
    background: var(--c-dark); position: relative; overflow: hidden;
    min-height: 90vh; display: flex; align-items: center;
    padding: 80px 0;
}
.eidt-hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(26,86,219,.25) 0%, transparent 70%),
                radial-gradient(ellipse 50% 40% at 20% 80%, rgba(245,158,11,.1) 0%, transparent 60%);
}
.eidt-hero .eidt-container {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
    position: relative; z-index: 1;
}
@media(max-width:900px){ .eidt-hero .eidt-container { grid-template-columns: 1fr; } .eidt-hero-visual { display: none; } }

.eidt-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(245,158,11,.15); color: var(--c-accent);
    border: 1px solid rgba(245,158,11,.3);
    padding: 6px 14px; border-radius: 20px;
    font-size: 13px; font-weight: 700; margin-bottom: 20px;
    font-family: var(--font-head);
}
.eidt-hero-title {
    font-family: var(--font-head); font-size: clamp(38px, 5vw, 62px);
    font-weight: 900; color: #fff; line-height: 1.1; margin-bottom: 20px;
    letter-spacing: -2px;
}
.eidt-hero-title span { color: var(--c-accent); }
.eidt-hero-sub { color: var(--c-muted); font-size: 18px; line-height: 1.65; margin-bottom: 32px; max-width: 480px; }

.eidt-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--c-accent); color: var(--c-dark);
    padding: 14px 28px; border-radius: var(--radius-md);
    font-family: var(--font-head); font-size: 15px; font-weight: 800;
    transition: all .2s; border: none; cursor: pointer;
}
.eidt-btn-primary:hover { background: var(--c-accent-d); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(245,158,11,.35); }
.eidt-btn-primary.eidt-btn-lg { padding: 16px 36px; font-size: 17px; }

/* Hero visual (mockup card) */
.eidt-hero-visual { display: flex; justify-content: center; }
.eidt-hero-card {
    background: #1a2a45; border-radius: 16px; padding: 0;
    box-shadow: 0 30px 80px rgba(0,0,0,.5); width: 100%; max-width: 400px;
    overflow: hidden; border: 1px solid var(--c-border);
}
.eidt-hc-top { display: flex; gap: 6px; padding: 12px 14px; background: #0f1b2d; }
.eidt-hc-dot { width: 10px; height: 10px; border-radius: 50%; }
.eidt-hc-dot.r { background: #ef4444; } .eidt-hc-dot.y { background: var(--c-accent); } .eidt-hc-dot.g { background: var(--c-success); }
.eidt-hc-screen {
    height: 180px; background: linear-gradient(135deg,#1a3a6b,#0f1b2d);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.eidt-hc-play {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(245,158,11,.9); color: #0f1b2d;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; cursor: pointer;
}
.eidt-hc-wm {
    position: absolute; bottom: 12px; left: 12px;
    font-size: 11px; color: rgba(255,255,255,.2);
    font-family: var(--font-body);
}
.eidt-hc-bar { height: 4px; background: rgba(255,255,255,.15); margin: 0; }
.eidt-hc-fill { height: 100%; width: 42%; background: var(--c-accent); }
.eidt-hc-controls {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; color: var(--c-muted); font-size: 12px; font-family: var(--font-body);
    background: #0f1b2d;
}

/* ════════════════════════════════════════
   FEATURES
════════════════════════════════════════ */
.eidt-features { padding: 100px 0; background: var(--c-bg); }
.eidt-section-title {
    font-family: var(--font-head); font-size: 36px; font-weight: 800;
    color: var(--c-body); text-align: center; margin-bottom: 52px; letter-spacing: -1px;
}
.eidt-features-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 24px; }
.eidt-feature-card {
    background: var(--c-card); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0; transition: transform .25s, box-shadow .25s;
}
.eidt-feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.eidt-feature-icon { font-size: 36px; margin-bottom: 14px; }
.eidt-feature-card h3 { font-family: var(--font-head); font-size: 17px; font-weight: 800; margin-bottom: 8px; color: var(--c-body); }
.eidt-feature-card p  { font-size: 14px; color: #64748b; line-height: 1.65; }

/* ════════════════════════════════════════
   CTA
════════════════════════════════════════ */
.eidt-cta {
    background: var(--c-primary); padding: 80px 0; text-align: center;
}
.eidt-cta h2 { font-family: var(--font-head); font-size: 36px; font-weight: 900; color: #fff; margin-bottom: 12px; }
.eidt-cta p  { color: rgba(255,255,255,.7); font-size: 16px; margin-bottom: 30px; }
.eidt-cta .eidt-btn-primary { background: var(--c-accent); }

/* ════════════════════════════════════════
   AUTH PAGES (Login / Set Password)
════════════════════════════════════════ */
.eidt-auth-page {
    min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
    font-family: var(--font-body);
}
@media(max-width:768px){ .eidt-auth-page { grid-template-columns: 1fr; } .eidt-auth-left { display: none; } }
.eidt-auth-left {
    background: var(--c-dark);
    background-image: radial-gradient(ellipse 70% 60% at 30% 60%, rgba(26,86,219,.3) 0%, transparent 70%);
    padding: 60px; display: flex; flex-direction: column; justify-content: center; gap: 24px;
}
.eidt-auth-logo {
    font-family: var(--font-head); font-size: 26px; font-weight: 900;
    color: #fff; letter-spacing: -1px;
}
.eidt-auth-logo span { color: var(--c-accent); }
.eidt-auth-logo em   { font-style: normal; font-size: 14px; color: var(--c-muted); margin-left: 4px; }
.eidt-auth-tagline { font-family: var(--font-head); font-size: 36px; font-weight: 900; color: #fff; line-height: 1.15; letter-spacing: -1px; }
.eidt-auth-sub { color: var(--c-muted); font-size: 16px; line-height: 1.65; }
.eidt-auth-features { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.eidt-auth-feat { display: flex; align-items: center; gap: 10px; color: var(--c-text); font-size: 14px; }
.eidt-auth-feat span { font-size: 20px; }
.eidt-auth-right {
    background: var(--c-bg); display: flex; align-items: center; justify-content: center; padding: 40px;
}
.eidt-auth-box {
    background: var(--c-card); border-radius: var(--radius-xl);
    padding: 44px; width: 100%; max-width: 420px;
    box-shadow: var(--shadow-lg); border: 1px solid #e2e8f0;
}
.eidt-auth-box-logo {
    font-family: var(--font-head); font-size: 22px; font-weight: 900;
    color: var(--c-primary); text-align: center; letter-spacing: -1px; margin-bottom: 4px;
}
.eidt-auth-box-logo span { color: var(--c-accent); }
.eidt-auth-box-title { font-family: var(--font-head); font-size: 22px; font-weight: 800; text-align: center; color: var(--c-body); margin-bottom: 28px; }

.eidt-input-group { margin-bottom: 18px; }
.eidt-input-group label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #64748b; margin-bottom: 7px; }
.eidt-input-wrap { position: relative; }
.eidt-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }
.eidt-input-wrap input {
    width: 100%; padding: 12px 14px 12px 42px;
    border: 2px solid #e2e8f0; border-radius: var(--radius-sm);
    font-size: 15px; font-family: var(--font-body); outline: none;
    transition: border-color .2s; color: var(--c-body);
}
.eidt-input-wrap input:focus { border-color: var(--c-primary); }
.eidt-input-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; font-size: 16px;
}
.eidt-btn-auth {
    width: 100%; padding: 14px;
    background: var(--c-primary); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-family: var(--font-head); font-size: 15px; font-weight: 800;
    cursor: pointer; transition: background .2s; margin-top: 4px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.eidt-btn-auth:hover { background: var(--c-primary-d); }
.eidt-btn-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.eidt-auth-links { text-align: center; margin-top: 18px; font-size: 13px; color: #94a3b8; }
.eidt-auth-links a { color: var(--c-primary); font-weight: 600; }
.eidt-alert {
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.eidt-alert-error   { background: #fee2e2; color: #991b1b; }
.eidt-alert-success { background: #d1fae5; color: #065f46; }

/* ════════════════════════════════════════
   STUDENT AREA
════════════════════════════════════════ */
.eidt-area-page { min-height: 100vh; padding-bottom: 60px; }
.eidt-area-header {
    background: var(--c-dark);
    border-bottom: 1px solid var(--c-border);
    padding: 20px 0;
    margin-bottom: 40px;
}
.eidt-area-header-inner {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.eidt-area-greeting { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: #fff; }
.eidt-area-sub { font-size: 13px; color: var(--c-muted); margin-top: 2px; }
.eidt-logout-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.08); border: 1px solid var(--c-border);
    color: var(--c-text); padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s;
    font-family: var(--font-head);
}
.eidt-logout-btn:hover { background: rgba(239,68,68,.15); border-color: var(--c-danger); color: #fca5a5; }

.eidt-area-section-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--c-body); margin-bottom: 20px; }
.eidt-courses-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 24px; }

.eidt-course-card {
    background: var(--c-card); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid #e2e8f0;
    transition: transform .25s, box-shadow .25s;
}
.eidt-course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.eidt-course-thumb {
    height: 190px; background: linear-gradient(135deg,#1a56db,#0f172a);
    background-size: cover; background-position: center;
    position: relative; overflow: hidden;
}
.eidt-course-thumb-fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center; font-size: 56px;
}
.eidt-course-badge-pct {
    position: absolute; top: 12px; right: 12px;
    background: var(--c-accent); color: var(--c-dark);
    padding: 4px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 800; font-family: var(--font-head);
}
.eidt-course-body { padding: 22px; }
.eidt-course-title { font-family: var(--font-head); font-size: 17px; font-weight: 800; margin-bottom: 6px; color: var(--c-body); }
.eidt-course-desc  { font-size: 13px; color: #64748b; margin-bottom: 14px; line-height: 1.55; }
.eidt-course-stats { display: flex; gap: 14px; font-size: 12px; color: #94a3b8; margin-bottom: 14px; }
.eidt-course-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.eidt-course-progress-bar { flex: 1; height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.eidt-course-progress-fill { height: 100%; background: var(--c-success); border-radius: 3px; transition: width .4s; }
.eidt-course-progress span { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.eidt-course-btn {
    display: block; text-align: center;
    background: var(--c-primary); color: #fff;
    padding: 11px; border-radius: var(--radius-sm);
    font-family: var(--font-head); font-size: 14px; font-weight: 700;
    transition: background .2s;
}
.eidt-course-btn:hover { background: var(--c-primary-d); color: #fff; }

.eidt-empty-state { text-align: center; padding: 100px 20px; }
.eidt-empty-icon  { font-size: 60px; margin-bottom: 16px; }
.eidt-empty-state h3 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--c-body); margin-bottom: 8px; }
.eidt-empty-state p  { color: #64748b; }

/* ════════════════════════════════════════
   PLAYER PAGE LAYOUT
════════════════════════════════════════ */
.page-player body, .eidt-player-layout { margin: 0; padding: 0; }
.eidt-player-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100vh; overflow: hidden;
    background: var(--c-dark);
    font-family: var(--font-body);
}
@media(max-width:960px){
    .eidt-player-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .eidt-sidebar { position: fixed; left: -300px; top: 0; bottom: 0; z-index: 500; width: 300px; transition: left .3s; overflow-y: auto; }
    .eidt-sidebar.open { left: 0; }
    .eidt-player-main { height: auto; overflow: visible; }
}

/* ── Sidebar ── */
.eidt-sidebar {
    background: var(--c-sidebar);
    border-right: 1px solid var(--c-border);
    display: flex; flex-direction: column;
    overflow-y: auto;
    height: 100vh;
}
.eidt-sb-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--c-border);
    position: sticky; top: 0; z-index: 10; background: var(--c-sidebar);
}
.eidt-sb-logo { font-family: var(--font-head); font-size: 18px; font-weight: 900; color: #fff; }
.eidt-sb-logo span { color: var(--c-accent); }
.eidt-sb-close { background: none; border: none; color: var(--c-muted); font-size: 18px; cursor: pointer; display: none; }
@media(max-width:960px){ .eidt-sb-close { display: block; } }

.eidt-sb-course-info { padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
.eidt-sb-course-title { font-size: 13px; font-weight: 700; color: var(--c-text); margin-bottom: 8px; line-height: 1.4; }
.eidt-sb-course-progress { display: flex; align-items: center; gap: 8px; }
.eidt-sb-pbar { flex: 1; height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.eidt-sb-pbar-fill { height: 100%; background: var(--c-success); border-radius: 2px; transition: width .4s; }
.eidt-sb-course-progress span { font-size: 11px; color: var(--c-muted); white-space: nowrap; }

.eidt-sb-toggle {
    display: flex; gap: 6px; padding: 10px 14px;
    border-bottom: 1px solid var(--c-border);
}
.eidt-toggle-btn {
    flex: 1; padding: 7px; border: none; border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s;
    font-family: var(--font-head); background: rgba(255,255,255,.06); color: var(--c-muted);
}
.eidt-toggle-btn.active { background: var(--c-accent); color: var(--c-dark); }

/* Module accordion */
.eidt-module { border-bottom: 1px solid var(--c-border); }
.eidt-mod-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px; cursor: pointer; user-select: none; transition: background .15s;
}
.eidt-mod-header:hover { background: rgba(255,255,255,.04); }
.eidt-mod-left { display: flex; align-items: center; gap: 8px; }
.eidt-mod-chevron {
    font-size: 9px; color: var(--c-muted);
    transition: transform .25s; display: inline-block;
}
.eidt-module.open .eidt-mod-chevron { transform: rotate(90deg); }
.eidt-mod-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--c-accent); }
.eidt-mod-pct  { font-size: 11px; color: var(--c-muted); }
.eidt-mod-lessons { display: none; }
.eidt-module.open .eidt-mod-lessons { display: block; }

/* Lesson row */
.eidt-lesson-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px 10px 22px;
    border-left: 3px solid transparent;
    transition: background .15s; cursor: pointer; color: var(--c-text);
}
.eidt-lesson-row:hover { background: rgba(255,255,255,.05); }
.eidt-lesson-row.active {
    background: rgba(26,86,219,.2);
    border-left-color: var(--c-accent);
}
.eidt-lr-num {
    min-width: 22px; font-size: 11px; color: var(--c-muted);
    padding-top: 2px; text-align: center; flex-shrink: 0;
}
.eidt-lesson-row.done .eidt-lr-num { color: var(--c-success); }
.eidt-lr-check { color: var(--c-success); font-size: 13px; }
.eidt-lr-body { flex: 1; min-width: 0; }
.eidt-lr-title { font-size: 13px; font-weight: 500; line-height: 1.35; color: inherit; }
.eidt-lesson-row.active .eidt-lr-title { font-weight: 700; color: #fff; }
.eidt-lr-dur   { font-size: 11px; color: var(--c-muted); margin-top: 2px; }
/* Lesson progress bar (thin line under title) */
.eidt-lr-bar { height: 2px; background: rgba(255,255,255,.08); border-radius: 1px; margin-top: 5px; overflow: hidden; }
.eidt-lr-bar-fill { height: 100%; background: var(--c-success); border-radius: 1px; }
.eidt-lesson-row.done .eidt-lr-bar-fill { width: 100% !important; }
.eidt-lr-type { font-size: 12px; color: var(--c-muted); flex-shrink: 0; padding-top: 2px; }

.eidt-sb-footer { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--c-border); }
.eidt-sb-back { font-size: 12px; color: var(--c-muted); transition: color .2s; }
.eidt-sb-back:hover { color: #fff; }

/* ── Player Main ── */
.eidt-player-main {
    display: flex; flex-direction: column;
    height: 100vh; overflow-y: auto;
    background: #0b1524;
}

/* Topbar */
.eidt-player-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; background: var(--c-dark2);
    border-bottom: 1px solid var(--c-border);
    flex-shrink: 0; flex-wrap: wrap; gap: 10px;
}
.eidt-topbar-left { display: flex; align-items: center; gap: 14px; }
.eidt-menu-toggle {
    display: none; flex-direction: column; gap: 4px;
    background: none; border: none; cursor: pointer; padding: 4px;
}
@media(max-width:960px){ .eidt-menu-toggle { display: flex; } }
.eidt-menu-toggle span { display: block; width: 22px; height: 2px; background: var(--c-text); border-radius: 1px; }
.eidt-topbar-aula  { font-size: 15px; font-weight: 700; color: #fff; font-family: var(--font-head); }
.eidt-topbar-course{ font-size: 11px; color: var(--c-muted); }
.eidt-topbar-sep   { color: var(--c-border); margin: 0 6px; }
.eidt-topbar-right { display: flex; align-items: center; gap: 8px; }
.eidt-topbar-btn {
    padding: 7px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 700;
    cursor: pointer; border: none; font-family: var(--font-head); transition: all .2s;
}
.eidt-topbar-btn-ghost   { background: rgba(255,255,255,.1); color: #fff; }
.eidt-topbar-btn-ghost:hover { background: rgba(255,255,255,.18); }
.eidt-topbar-btn-complete { background: rgba(16,185,129,.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.eidt-topbar-btn-complete:hover { background: var(--c-success); color: #fff; }
.eidt-topbar-btn-complete.done { background: rgba(255,255,255,.06); color: var(--c-muted); cursor: default; border-color: transparent; }
@media(max-width:600px){ .eidt-hide-sm { display: none; } }

/* Video area */
.eidt-video-area { padding: 20px 24px 0; }
.eidt-player-box {
    position: relative; width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000; border-radius: var(--radius-md);
    overflow: hidden; user-select: none;
}
.eidt-player-box.fullscreen {
    position: fixed !important; inset: 0 !important;
    width: 100vw !important; height: 100vh !important;
    padding-top: 0 !important;
    border-radius: 0 !important; z-index: 9999;
}
.eidt-player-box iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: none; pointer-events: none;
}
.eidt-shield  { position: absolute; inset: 0; z-index: 10; background: transparent; cursor: default; }
.eidt-wm      { position: absolute; z-index: 20; pointer-events: none; white-space: nowrap; text-shadow: 1px 1px 4px rgba(0,0,0,.9); transition: left .7s ease, top .7s ease; user-select: none; }

/* Auto-advance overlay */
.eidt-advance {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(10,18,30,.9);
    display: none; flex-direction: column;
    align-items: center; justify-content: center; gap: 14px;
    border-radius: var(--radius-md);
}
.eidt-advance.show { display: flex; }
.eidt-advance-ring {
    width: 72px; height: 72px; border-radius: 50%;
    border: 4px solid rgba(255,255,255,.12);
    border-top-color: var(--c-accent);
    animation: spin .9s linear infinite;
}
.eidt-advance-label { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: #fff; }
.eidt-advance-count { font-size: 14px; color: var(--c-muted); }
.eidt-advance-cancel {
    background: rgba(255,255,255,.1); color: #fff; border: none;
    padding: 8px 20px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 13px; font-family: var(--font-head);
}

/* ── Custom Controls ── */
.eidt-controls {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 30;
    background: linear-gradient(transparent, rgba(0,0,0,.92));
    padding: 40px 14px 10px;
    opacity: 0; transition: opacity .3s;
}
.eidt-player-box:hover .eidt-controls,
.eidt-player-box.controls-pinned .eidt-controls { opacity: 1; }

.eidt-track-row { margin-bottom: 8px; }
.eidt-track {
    position: relative; height: 4px; background: rgba(255,255,255,.2);
    border-radius: 2px; cursor: pointer;
}
.eidt-track:hover { height: 6px; }
.eidt-track-fill  { height: 100%; background: var(--c-accent); border-radius: 2px; pointer-events: none; }
.eidt-track-thumb {
    position: absolute; top: 50%; transform: translate(-50%,-50%);
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--c-accent); pointer-events: none;
    opacity: 0; transition: opacity .2s;
}
.eidt-track:hover .eidt-track-thumb { opacity: 1; }

.eidt-ctrl-row   { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eidt-ctrl-left  { display: flex; align-items: center; gap: 8px; }
.eidt-ctrl-right { display: flex; align-items: center; gap: 6px; }

.eidt-ctrl-btn {
    background: none; border: none; color: #fff;
    font-size: 16px; cursor: pointer; padding: 4px 6px;
    transition: opacity .2s; display: flex; align-items: center;
}
.eidt-ctrl-btn:hover { opacity: .75; }

.eidt-volume-wrap { display: flex; align-items: center; gap: 4px; }
.eidt-volume-slider {
    width: 70px; height: 3px; accent-color: var(--c-accent);
    cursor: pointer; background: rgba(255,255,255,.2); border-radius: 2px;
}
.eidt-time-display { color: #fff; font-size: 12px; font-family: monospace; white-space: nowrap; }
.eidt-time-sep { color: rgba(255,255,255,.4); margin: 0 2px; }

/* Speed menu */
.eidt-speed-wrap { position: relative; }
.eidt-speed-btn {
    font-size: 12px; font-weight: 700; font-family: var(--font-head);
    background: rgba(255,255,255,.12) !important;
    padding: 4px 10px; border-radius: 6px;
}
.eidt-speed-menu {
    display: none; position: absolute; bottom: 36px; right: 0;
    background: rgba(15,27,46,.97);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm); padding: 6px; min-width: 100px;
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.eidt-speed-wrap.open .eidt-speed-menu { display: block; }
.eidt-speed-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--c-muted); padding: 4px 8px; }
.eidt-speed-opt {
    display: block; width: 100%; padding: 7px 10px;
    background: none; border: none; color: var(--c-text);
    font-size: 13px; font-weight: 600; text-align: left;
    cursor: pointer; border-radius: 6px; transition: background .15s;
    font-family: var(--font-head);
}
.eidt-speed-opt:hover { background: rgba(255,255,255,.08); }
.eidt-speed-opt.active { color: var(--c-accent); }

/* ── Audio area ── */
.eidt-audio-area {
    padding: 30px 24px 0;
    display: flex; align-items: center; justify-content: center;
}
.eidt-audio-box {
    background: var(--c-sidebar2); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); padding: 40px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    max-width: 560px; width: 100%;
}
.eidt-audio-icon  { font-size: 52px; }
.eidt-audio-title { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: #fff; text-align: center; }
.eidt-audio-player { width: 100%; border-radius: var(--radius-sm); }

/* ── Content tabs ── */
.eidt-content-tabs { padding: 20px 24px 40px; flex-shrink: 0; }
.eidt-tabs-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--c-border); margin-bottom: 20px; }
.eidt-tab-nav {
    padding: 9px 18px; background: none; border: none;
    font-size: 13px; font-weight: 700; color: var(--c-muted); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all .2s; font-family: var(--font-head);
}
.eidt-tab-nav.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.eidt-tab-panel { display: none; }
.eidt-tab-panel.active { display: block; }
.eidt-lesson-desc { color: var(--c-text); font-size: 14px; line-height: 1.75; }

.eidt-mats-grid { display: flex; flex-direction: column; gap: 10px; }
.eidt-mat-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--c-sidebar2); border: 1px solid var(--c-border);
    border-radius: var(--radius-sm); padding: 14px 18px;
    color: var(--c-text); transition: background .2s, border-color .2s;
}
.eidt-mat-card:hover { background: rgba(26,86,219,.15); border-color: var(--c-primary); color: #fff; }
.eidt-mat-icon { font-size: 28px; flex-shrink: 0; }
.eidt-mat-body { flex: 1; }
.eidt-mat-name { font-size: 14px; font-weight: 600; color: #fff; }
.eidt-mat-type { font-size: 11px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.eidt-mat-dl   { font-size: 20px; color: var(--c-muted); flex-shrink: 0; }

/* ════════════════════════════════════════
   MISC
════════════════════════════════════════ */
@keyframes spin { to { transform: rotate(360deg); } }

/* Scrollbar */
.eidt-sidebar::-webkit-scrollbar,
.eidt-player-main::-webkit-scrollbar { width: 5px; }
.eidt-sidebar::-webkit-scrollbar-track,
.eidt-player-main::-webkit-scrollbar-track { background: transparent; }
.eidt-sidebar::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }
.eidt-player-main::-webkit-scrollbar-thumb { background: #1e3050; border-radius: 3px; }

@media(max-width:600px){
    .eidt-player-topbar { padding: 10px 14px; }
    .eidt-video-area    { padding: 12px 14px 0; }
    .eidt-content-tabs  { padding: 14px 14px 30px; }
}

/* ── v1.1 Player Improvements ── */

/* FIX #9 — video slightly smaller, more content visible below */
.eidt-player-box { padding-top: 50%; }
.eidt-player-box.fullscreen { padding-top: 0 !important; }

/* FIX #9 — lesson title larger in topbar */
.eidt-topbar-aula { font-size: 17px; font-weight: 800; }

/* FIX #9 — back button bigger + accent color */
.eidt-sb-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 700;
    color: var(--c-accent) !important;
    background: rgba(245,158,11,.1);
    border: 1px solid rgba(245,158,11,.2);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    transition: all .2s;
}
.eidt-sb-back:hover {
    background: rgba(245,158,11,.2) !important;
    color: var(--c-accent) !important;
}

/* FIX #3 — quality button (same style as speed) */
.eidt-quality-wrap { position: relative; }
.eidt-quality-btn {
    font-size: 12px; font-weight: 700; font-family: var(--font-head);
    background: rgba(255,255,255,.12) !important;
    padding: 4px 10px; border-radius: 6px;
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center;
}
.eidt-quality-menu {
    display: none; position: absolute; bottom: 36px; right: 0;
    background: rgba(15,27,46,.97);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-sm); padding: 6px; min-width: 90px;
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.eidt-quality-wrap.open .eidt-quality-menu { display: block; }
.eidt-quality-opt {
    display: block; width: 100%; padding: 7px 10px;
    background: none; border: none; color: var(--c-text);
    font-size: 13px; font-weight: 600; text-align: left;
    cursor: pointer; border-radius: 6px; transition: background .15s;
    font-family: var(--font-head);
}
.eidt-quality-opt:hover { background: rgba(255,255,255,.08); }
.eidt-quality-opt.active { color: var(--c-accent); }

/* FIX #4 — shield cursor shows pointer so user knows it's clickable */
.eidt-shield { cursor: pointer; }

/* FIX #7 — Texto da Aula layout */
/* text-mode rules moved to v1.1.4 */
.eidt-text-aula-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.eidt-text-aula-title { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--c-body); }
.eidt-text-aula-btn-pdf {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--c-accent); color: var(--c-dark);
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 700; font-family: var(--font-head);
    text-decoration: none; transition: background .2s;
}
.eidt-text-aula-btn-pdf:hover { background: var(--c-accent-d); }
.eidt-text-aula-body {
    font-size: 15px; line-height: 1.8; color: #1e293b;
    max-width: 800px;
}
.eidt-text-aula-body h1,.eidt-text-aula-body h2,.eidt-text-aula-body h3 {
    font-family: var(--font-head); color: var(--c-primary); margin: 20px 0 8px;
}
.eidt-text-aula-body p { margin: 0 0 14px; }
.eidt-text-aula-body a { color: var(--c-primary); }

/* Bottom nav bar (like Uninter) */
.eidt-bottom-nav {
    position: fixed; bottom: 0; left: 300px; right: 0; z-index: 200;
    background: var(--c-dark2); border-top: 1px solid var(--c-border);
    display: flex; align-items: stretch; height: 56px;
}
@media(max-width:960px){ .eidt-bottom-nav { left: 0; } }
.eidt-bnav-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; background: none; border: none; cursor: pointer;
    color: var(--c-muted); font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .4px; font-family: var(--font-head);
    border-bottom: 3px solid transparent; transition: all .2s;
}
.eidt-bnav-btn:hover { color: #fff; }
.eidt-bnav-btn.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.eidt-bnav-icon { font-size: 18px; }

/* Adjust main area to leave room for bottom nav */
.eidt-player-main { padding-bottom: 56px; }

/* pulse animation for play overlay */
@keyframes pulseIn { from { transform:scale(.7); opacity:0; } to { transform:scale(1); opacity:1; } }

/* Quill HTML content rendering in frontend */
.eidt-lesson-desc h1,.eidt-lesson-desc h2,.eidt-lesson-desc h3 {
    font-family: var(--font-head); color: var(--c-accent);
    margin: 18px 0 8px; line-height: 1.3;
}
.eidt-lesson-desc h1 { font-size: 22px; }
.eidt-lesson-desc h2 { font-size: 18px; }
.eidt-lesson-desc h3 { font-size: 15px; }
.eidt-lesson-desc p  { margin: 0 0 12px; color: var(--c-text); }
.eidt-lesson-desc strong { font-weight: 700; color: #fff; }
.eidt-lesson-desc em { font-style: italic; }
.eidt-lesson-desc u  { text-decoration: underline; }
.eidt-lesson-desc a  { color: var(--c-accent); text-decoration: underline; }
.eidt-lesson-desc a:hover { opacity: .8; }
.eidt-lesson-desc ul,.eidt-lesson-desc ol { padding-left: 20px; margin: 0 0 12px; color: var(--c-text); }
.eidt-lesson-desc li { margin-bottom: 4px; }
.eidt-lesson-desc .ql-size-small  { font-size: 12px; }
.eidt-lesson-desc .ql-size-large  { font-size: 18px; }
.eidt-lesson-desc .ql-size-huge   { font-size: 24px; }

/* Same for text da aula panel */
.eidt-text-aula-body h1,.eidt-text-aula-body h2,.eidt-text-aula-body h3 {
    font-family: var(--font-head); color: var(--c-primary); margin: 18px 0 8px;
}
.eidt-text-aula-body strong { font-weight: 700; }
.eidt-text-aula-body a  { color: var(--c-primary); text-decoration: underline; }
.eidt-text-aula-body ul,.eidt-text-aula-body ol { padding-left: 20px; margin: 0 0 12px; }
.eidt-text-aula-body .ql-size-small  { font-size: 12px; }
.eidt-text-aula-body .ql-size-large  { font-size: 18px; }
.eidt-text-aula-body .ql-size-huge   { font-size: 24px; }

/* Pause screen hover effect on play button */
#eidt-pause-play-btn:hover {
    background: rgba(245,158,11,.7) !important;
    transform: scale(1.08) !important;
}

/* ── Texto da Aula — PDF viewer + rich text (Uninter style) ──────── */
.eidt-text-aula-panel {
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px); /* fill below bottom nav */
}

/* Header bar */
.eidt-ta-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; border-bottom: 2px solid #e2e8f0;
    background: #fff; position: sticky; top: 0; z-index: 10;
}
.eidt-ta-title {
    font-family: var(--font-head); font-size: 18px; font-weight: 800;
    color: var(--c-body);
}
.eidt-ta-btn-dl {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--c-accent); color: var(--c-dark);
    padding: 9px 18px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 700; font-family: var(--font-head);
    text-decoration: none; transition: background .2s; white-space: nowrap;
}
.eidt-ta-btn-dl:hover { background: #d97706; color: #fff; }

/* PDF iframe viewer */
.eidt-ta-pdf-wrap {
    flex: 1; display: flex; flex-direction: column;
    min-height: calc(100vh - 120px);
}
.eidt-pdf-iframe {
    flex: 1; width: 100%; min-height: calc(100vh - 120px);
    border: none; display: block;
}
.eidt-pdf-fallback {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px; text-align: center;
    background: #f8fafc;
}

/* Rich text body */
.eidt-ta-body {
    padding: 24px 32px; max-width: 860px; margin: 0 auto; width: 100%;
    font-size: 15px; line-height: 1.8; color: #1e293b;
}
.eidt-ta-body-only { min-height: calc(100vh - 120px); }
.eidt-ta-body h1,.eidt-ta-body h2,.eidt-ta-body h3 {
    font-family: var(--font-head); color: var(--c-primary); margin: 20px 0 8px;
}
.eidt-ta-body h1 { font-size: 22px; }
.eidt-ta-body h2 { font-size: 18px; }
.eidt-ta-body h3 { font-size: 15px; }
.eidt-ta-body p  { margin: 0 0 14px; }
.eidt-ta-body strong { font-weight: 700; }
.eidt-ta-body a  { color: var(--c-primary); text-decoration: underline; }
.eidt-ta-body ul,.eidt-ta-body ol { padding-left: 22px; margin: 0 0 14px; }
.eidt-ta-body .ql-size-small  { font-size: 12px; }
.eidt-ta-body .ql-size-large  { font-size: 18px; }
.eidt-ta-body .ql-size-huge   { font-size: 24px; }

/* Empty state */
.eidt-ta-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px; text-align: center; color: #94a3b8;
    font-size: 15px;
}

/* Text mode: hide the player layout entirely, show full-width text panel */
.eidt-text-mode #eidt-player-layout { display: none; }
.eidt-text-aula-panel { width: 100%; }
