/* ===== VARIABLES ===== */
:root {
  --brand: #f97316;
  --brand-dark: #ea6c0a;
  --brand-light: #fff7ed;
  --bg: #0f1117;
  --bg2: #161b27;
  --bg3: #1e2536;
  --bg4: #252d42;
  --border: #2a3347;
  --text: #f0f4ff;
  --text2: #94a3b8;
  --text3: #64748b;
  --blue: #3b82f6;
  --green: #22c55e;
  --orange: #f97316;
  --purple: #a855f7;
  --red: #ef4444;
  --yellow: #eab308;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.35);
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }
input, select, textarea, button { font-family: inherit; }
a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex1 { flex: 1; }
.w200 { width: 200px; }
.w160 { width: 160px; }

/* SCREEN */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* SPLASH */
.splash-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 20% 50%, #1a0a00 0%, #0f1117 60%); overflow: hidden; }
.splash-center { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 32px; }
.splash-spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* LOGIN */
.login-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 20% 50%, #1a0a00 0%, #0f1117 60%); overflow: hidden; }
.login-orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; animation: orbFloat 8s ease-in-out infinite; }
.orb1 { width: 500px; height: 500px; background: var(--brand); top: -150px; left: -100px; }
.orb2 { width: 350px; height: 350px; background: #7c3aed; bottom: -100px; right: -50px; animation-delay: 3s; }
.orb3 { width: 250px; height: 250px; background: #0ea5e9; top: 50%; left: 60%; animation-delay: 6s; }
@keyframes orbFloat { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-30px) scale(1.05); } }
.login-container { position: relative; z-index: 10; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.login-card { background: rgba(22,27,39,0.85); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 24px; padding: 48px 44px; width: 100%; max-width: 440px; box-shadow: 0 24px 80px rgba(0,0,0,0.5); animation: fadeSlideUp 0.6s ease; }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.logo-icon { width: 48px; height: 48px; background: linear-gradient(135deg, var(--brand), #fb923c); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: white; box-shadow: 0 4px 16px rgba(249,115,22,0.4); flex-shrink:0; }
.logo-icon.sm { width: 36px; height: 36px; font-size: 15px; }
.logo-text { display: flex; flex-direction: column; }
.logo-brand { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 18px; color: var(--text); line-height: 1; }
.logo-sub { font-size: 11px; color: var(--brand); font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.login-title { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.login-desc { color: var(--text2); margin-bottom: 28px; font-size: 14px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text2); margin-bottom: 8px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap i:first-child { position: absolute; left: 14px; color: var(--text3); font-size: 14px; pointer-events: none; }
.input-wrap input { width: 100%; padding: 12px 14px 12px 40px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; transition: border-color var(--transition), box-shadow var(--transition); outline: none; }
.input-wrap input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
.eye-toggle { position: absolute; right: 12px; color: var(--text3); cursor: pointer; font-size: 14px; padding: 4px; }
.login-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #f87171; border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.btn-login { width: 100%; padding: 13px; background: linear-gradient(135deg, var(--brand), #fb923c); border: none; border-radius: var(--radius-sm); color: white; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform var(--transition), box-shadow var(--transition); box-shadow: 0 4px 20px rgba(249,115,22,0.4); }
.btn-login:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(249,115,22,0.5); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.login-footer { text-align: center; margin-top: 20px; }
.login-footer a { color: var(--text2); font-size: 13px; transition: color var(--transition); }
.login-footer a:hover { color: var(--brand); }

/* APP LAYOUT */
#appScreen { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar { width: 260px; min-height: 100vh; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; z-index: 200; transition: transform var(--transition); }
.sidebar-close-btn { display: none; background: none; border: none; color: var(--text3); font-size: 18px; cursor: pointer; margin-left: auto; padding: 4px 8px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 190; }
.sidebar-logo { padding: 22px 20px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.sidebar-user { padding: 16px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.user-avatar-sm { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #fb923c); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 14px; color: white; flex-shrink: 0; }
.user-info-sm { display: flex; flex-direction: column; overflow: hidden; }
.uname { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.urole { font-size: 11px; color: var(--brand); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.sidebar-nav { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-section-title { font-size: 10px; font-weight: 700; color: var(--text3); letter-spacing: 1.5px; text-transform: uppercase; padding: 12px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); color: var(--text2); font-size: 14px; font-weight: 500; position: relative; }
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(249,115,22,0.12); color: var(--brand); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 60%; background: var(--brand); border-radius: 0 3px 3px 0; }
.sidebar-bottom { padding: 16px 12px; border-top: 1px solid var(--border); }
.btn-logout { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: none; border: none; cursor: pointer; color: var(--text3); font-size: 14px; transition: all var(--transition); }
.btn-logout:hover { background: rgba(239,68,68,0.1); color: var(--red); }

/* MAIN WRAP */
.main-wrap { flex: 1; margin-left: 260px; display: flex; flex-direction: column; min-height: 100vh; }

/* TOPBAR */
.topbar { height: 64px; background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 90; }
.menu-toggle { display: none; background: none; border: none; color: var(--text2); font-size: 18px; cursor: pointer; padding: 8px; }
.topbar-search { flex: 1; max-width: 440px; display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; gap: 10px; }
.topbar-search i { color: var(--text3); font-size: 13px; }
.topbar-search input { background: none; border: none; outline: none; color: var(--text); font-size: 13px; width: 100%; padding: 9px 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-btn { position: relative; background: none; border: none; color: var(--text2); font-size: 17px; cursor: pointer; padding: 8px; border-radius: 8px; transition: all var(--transition); }
.topbar-btn:hover { background: var(--bg3); color: var(--text); }
.notif-badge { position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); color: white; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.topbar-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #fb923c); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 13px; color: white; cursor: pointer; transition: transform var(--transition); }
.topbar-avatar:hover { transform: scale(1.08); }

/* CONTENT */
.content-area { flex: 1; padding: 28px; overflow-y: auto; }
.page { display: none; animation: pageFade 0.3s ease; }
.page.active { display: block; }
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 700; }
.page-sub { color: var(--text2); font-size: 14px; margin-top: 4px; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; align-items: flex-start; gap: 16px; position: relative; overflow: hidden; transition: transform var(--transition), box-shadow var(--transition); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.stat-card.accent-blue::after { background: var(--blue); }
.stat-card.accent-green::after { background: var(--green); }
.stat-card.accent-orange::after { background: var(--orange); }
.stat-card.accent-purple::after { background: var(--purple); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.accent-blue .stat-icon { background: rgba(59,130,246,0.15); color: var(--blue); }
.accent-green .stat-icon { background: rgba(34,197,94,0.15); color: var(--green); }
.accent-orange .stat-icon { background: rgba(249,115,22,0.15); color: var(--orange); }
.accent-purple .stat-icon { background: rgba(168,85,247,0.15); color: var(--purple); }
.stat-info { flex: 1; }
.stat-num { display: block; font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text2); margin-top: 4px; display: block; }

/* CARD */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-header h3 { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; }
.card-badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(249,115,22,0.12); color: var(--brand); }
.card-badge.warn { background: rgba(234,179,8,0.12); color: var(--yellow); }
.dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ACTIVITY */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg3); }
.act-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.act-text { flex: 1; }
.act-text strong { font-size: 13px; }
.act-text p { font-size: 12px; color: var(--text2); margin-top: 2px; }
.act-time { font-size: 11px; color: var(--text3); white-space: nowrap; }

/* EXPIRING */
.expiring-list { display: flex; flex-direction: column; gap: 10px; }
.expiring-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: var(--bg3); border-radius: var(--radius-sm); }
.exp-info strong { font-size: 13px; }
.exp-info p { font-size: 12px; color: var(--text2); }
.exp-days { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.exp-urgent { background: rgba(239,68,68,0.12); color: var(--red); }
.exp-warn { background: rgba(234,179,8,0.12); color: var(--yellow); }
.exp-ok { background: rgba(34,197,94,0.12); color: var(--green); }

/* STUDENT BANNER */
.student-welcome-banner { background: linear-gradient(135deg, rgba(249,115,22,0.15) 0%, rgba(249,115,22,0.05) 100%); border: 1px solid rgba(249,115,22,0.2); border-radius: var(--radius); padding: 28px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.welcome-text h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; }
.welcome-text p { color: var(--text2); margin-top: 6px; }
.welcome-img { font-size: 64px; opacity: 0.2; }
.student-stats { grid-template-columns: repeat(4, 1fr); }

/* CONTINUE */
.continue-list { display: flex; flex-direction: column; gap: 12px; }
.continue-item { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--bg3); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition); border: 1px solid transparent; }
.continue-item:hover { border-color: var(--brand); background: var(--bg4); }
.ci-thumb { width: 56px; height: 56px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), #fb923c); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ci-info { flex: 1; }
.ci-course { font-size: 12px; color: var(--text2); }
.ci-aula { font-weight: 600; font-size: 14px; margin-top: 2px; }
.ci-prog-wrap { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ci-bar { flex: 1; height: 4px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.ci-bar-fill { height: 100%; background: var(--brand); border-radius: 2px; }
.ci-pct { font-size: 12px; color: var(--text2); white-space: nowrap; }
.ci-play { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; flex-shrink: 0; }
.continue-item:hover .ci-play { box-shadow: 0 4px 16px rgba(249,115,22,0.5); }

/* COURSES GRID */
.courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.course-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all var(--transition); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(249,115,22,0.3); }
.course-thumb { height: 160px; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--bg3), var(--bg4)); }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; opacity: 0.3; }
.course-level-badge { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); color: white; }
.course-body { padding: 18px; }
.course-category { font-size: 11px; color: var(--brand); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px; }
.course-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 16px; margin-bottom: 8px; line-height: 1.3; }
.course-desc { font-size: 13px; color: var(--text2); line-height: 1.5; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text2); margin-bottom: 14px; flex-wrap: wrap; }
.course-meta span { display: flex; align-items: center; gap: 5px; }
.course-prog-bar { height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.course-prog-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #fb923c); border-radius: 3px; }
.course-prog-label { font-size: 12px; color: var(--text2); }
.course-footer { display: flex; gap: 8px; margin-top: 14px; justify-content: flex-end; }

/* BUTTONS */
.btn-primary { background: linear-gradient(135deg, var(--brand), #fb923c); border: none; border-radius: var(--radius-sm); color: white; font-size: 14px; font-weight: 600; padding: 10px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all var(--transition); box-shadow: 0 2px 12px rgba(249,115,22,0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(249,115,22,0.5); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline { background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text2); font-size: 14px; font-weight: 500; padding: 10px 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all var(--transition); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--red); border: none; border-radius: var(--radius-sm); color: white; font-size: 14px; font-weight: 600; padding: 10px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all var(--transition); }
.btn-danger:hover { background: #dc2626; }
.btn-sm { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text2); font-size: 12px; padding: 6px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all var(--transition); }
.btn-sm:hover { background: var(--bg4); color: var(--text); }
.btn-icon { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text2); width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; transition: all var(--transition); }
.btn-icon:hover { background: var(--bg4); color: var(--text); }
.btn-icon.danger:hover { background: rgba(239,68,68,0.1); color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-icon.primary:hover { background: rgba(249,115,22,0.1); color: var(--brand); border-color: rgba(249,115,22,0.3); }

/* TABLE */
.table-filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.table-filters input, .table-filters select { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 9px 14px; font-size: 13px; outline: none; transition: border-color var(--transition); }
.table-filters input { flex: 1; min-width: 200px; }
.table-filters input:focus, .table-filters select:focus { border-color: var(--brand); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th { background: var(--bg3); padding: 12px 16px; font-size: 12px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: left; }
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg3); }
.data-table td { padding: 13px 16px; font-size: 13px; vertical-align: middle; }
.td-user { display: flex; align-items: center; gap: 10px; }
.td-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #fb923c); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: white; flex-shrink: 0; }
.td-name { font-weight: 600; }
.td-email { font-size: 12px; color: var(--text2); }
.progress-pill { display: flex; align-items: center; gap: 8px; }
.pill-bar { width: 60px; height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.pill-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #fb923c); border-radius: 3px; }
.pill-pct { font-size: 12px; font-weight: 600; color: var(--text2); }
.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.status-active { background: rgba(34,197,94,0.12); color: var(--green); }
.status-inactive { background: rgba(100,116,139,0.12); color: var(--text3); }
.status-expired { background: rgba(239,68,68,0.12); color: var(--red); }
.status-active::before, .status-inactive::before, .status-expired::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.td-actions { display: flex; gap: 6px; }
.course-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.course-tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; background: rgba(249,115,22,0.1); color: var(--brand); }

/* AULA PLAYER */
.aula-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.aula-breadcrumb { font-size: 13px; color: var(--text2); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aula-breadcrumb span { cursor: pointer; transition: color var(--transition); }
.aula-breadcrumb span:hover { color: var(--brand); }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-container iframe, .video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.aula-info-bar { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 18px; gap: 16px; flex-wrap: wrap; }
.aula-info-bar h2 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; flex: 1; min-width: 200px; }
.aula-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-mark { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: var(--green); border-radius: var(--radius-sm); padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all var(--transition); }
.btn-mark:hover { background: rgba(34,197,94,0.2); }
.btn-mark.done { background: rgba(34,197,94,0.2); }
.btn-prev, .btn-next-aula { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; transition: all var(--transition); display: flex; align-items: center; gap: 6px; }
.btn-prev { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); }
.btn-next-aula { background: var(--brand); border: none; color: white; font-weight: 600; }
.aula-description { margin-top: 18px; padding: 18px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--text2); line-height: 1.7; }
.aula-sidebar { position: sticky; top: 92px; align-self: flex-start; }
.course-progress-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.cp-title { font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.cp-bar-wrap { height: 6px; background: var(--bg4); border-radius: 3px; overflow: hidden; }
.cp-bar { height: 100%; background: linear-gradient(90deg, var(--brand), #fb923c); border-radius: 3px; transition: width 0.8s ease; }
.cp-pct { font-size: 12px; color: var(--text2); margin-top: 6px; text-align: right; }
.aulas-list-sidebar { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-height: calc(100vh - 260px); overflow-y: auto; }
.sidebar-modulo-title { padding: 10px 14px; font-size: 11px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; background: var(--bg3); border-bottom: 1px solid var(--border); }
.sidebar-aula-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition); }
.sidebar-aula-item:hover { background: var(--bg3); }
.sidebar-aula-item.active { background: rgba(249,115,22,0.08); }
.sai-num { width: 22px; height: 22px; border-radius: 50%; background: var(--bg4); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.sai-check { color: var(--green); font-size: 15px; flex-shrink: 0; }
.sai-info { flex: 1; overflow: hidden; }
.sai-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sai-duration { font-size: 11px; color: var(--text3); }

/* RELATORIOS */
.report-filters { margin-bottom: 0; }
.filter-row { display: flex; gap: 16px; flex-wrap: wrap; }
.filter-row .form-group { flex: 1; min-width: 160px; }
.report-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 20px; }

/* PROFILE */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.profile-card { text-align: center; }
.profile-avatar-big { width: 88px; height: 88px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #fb923c); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 32px; color: white; margin: 0 auto 16px; }
.profile-card h2 { font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 700; }
.role-badge { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; }
.role-admin { background: rgba(249,115,22,0.12); color: var(--brand); }
.role-student { background: rgba(59,130,246,0.12); color: var(--blue); }
.profile-meta { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.pmeta-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text2); }
.pmeta-item i { color: var(--brand); width: 16px; }
.profile-form h3 { font-family: 'Syne', sans-serif; font-size: 16px; margin-bottom: 20px; }

/* CONFIG */
.config-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.config-icon { font-size: 28px; color: var(--brand); margin-bottom: 14px; }
.config-card h3 { font-family: 'Syne', sans-serif; margin-bottom: 18px; }
.toggle-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg4); border-radius: 24px; transition: var(--transition); }
.slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: var(--transition); }
.toggle input:checked + .slider { background: var(--brand); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; animation: modalSlide 0.3s cubic-bezier(.34,1.56,.64,1); box-shadow: 0 32px 100px rgba(0,0,0,0.5); }
.modal-box.large { max-width: 800px; }
@keyframes modalSlide { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 22px 24px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg2); z-index: 1; }
.modal-header h2 { font-family: 'Syne', sans-serif; font-size: 19px; font-weight: 700; }
.modal-close { background: var(--bg3); border: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--text2); display: flex; align-items: center; justify-content: center; font-size: 14px; transition: all var(--transition); }
.modal-close:hover { background: var(--bg4); color: var(--text); }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; position: sticky; bottom: 0; background: var(--bg2); }

/* CONFIRM MODAL */
.confirm-icon { font-size: 48px; text-align: center; margin: 8px 0; }

/* FORMS */
.form-row { display: flex; gap: 14px; }
.form-group input:not([type='color']), .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; outline: none; transition: border-color var(--transition); }
.form-group input:not([type='color']):focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); }
.form-group input[type='color'] { width: 48px; height: 36px; padding: 2px; cursor: pointer; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
select option { background: var(--bg3); }
textarea { resize: vertical; min-height: 80px; }
.checkboxes-wrap { display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox-item input { accent-color: var(--brand); width: 15px; height: 15px; }

/* MODULES */
.modules-section { margin-top: 20px; }
.modules-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modules-header h3 { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; }
.modulo-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; }
.modulo-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.modulo-name-input { flex: 1; background: none; border: none; color: var(--text); font-weight: 600; font-size: 14px; outline: none; font-family: inherit; }
.modulo-aulas { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.aula-item { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; }
.aula-num { width: 24px; height: 24px; border-radius: 6px; background: var(--bg4); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.aula-fields { flex: 1; display: flex; gap: 8px; flex-wrap: wrap; }
.aula-fields input { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 7px 10px; font-size: 13px; outline: none; }
.aula-fields input:focus { border-color: var(--brand); }
.aula-title-input { flex: 1; min-width: 140px; }
.aula-url-input { flex: 2; min-width: 200px; }
.aula-dur-input { width: 80px; }
.add-aula-btn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--brand); background: none; border: 1px dashed rgba(249,115,22,0.3); border-radius: var(--radius-sm); padding: 8px; cursor: pointer; width: 100%; justify-content: center; transition: all var(--transition); }
.add-aula-btn:hover { background: rgba(249,115,22,0.05); }

/* DETAIL */
.detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.detail-avatar { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #fb923c); display: flex; align-items: center; justify-content: center; font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px; color: white; flex-shrink: 0; }
.detail-info h3 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; }
.detail-info p { color: var(--text2); font-size: 13px; margin-top: 3px; }
.detail-course-item { background: var(--bg3); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; }
.dci-name { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.dci-prog { display: flex; align-items: center; gap: 10px; }

/* PREVIEW */
.preview-banner { height: 200px; background: linear-gradient(135deg, var(--bg3), var(--bg4)); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 64px; margin-bottom: 20px; overflow: hidden; }
.preview-banner img { width: 100%; height: 100%; object-fit: cover; }
.preview-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text2); margin-bottom: 16px; flex-wrap: wrap; }
.preview-meta span { display: flex; align-items: center; gap: 6px; }
.preview-desc { font-size: 14px; color: var(--text2); line-height: 1.7; margin-bottom: 20px; }
.preview-modulo { margin-bottom: 12px; }
.preview-modulo-title { font-weight: 700; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.preview-aula-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text2); }
.preview-aula-item i { color: var(--brand); }

/* SKELETON */
.skeleton-list { display: flex; flex-direction: column; gap: 10px; }
.skeleton-list::before, .skeleton-list::after { content: ''; display: block; height: 48px; background: var(--bg3); border-radius: var(--radius-sm); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { opacity: 0.5; } 50% { opacity: 1; } 100% { opacity: 0.5; } }

/* TOAST */
.toast { position: fixed; bottom: 28px; right: 28px; z-index: 9999; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); font-size: 14px; animation: toastIn 0.3s cubic-bezier(.34,1.56,.64,1); max-width: 360px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.success i { color: var(--green); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.error i { color: var(--red); }
.toast.info { border-color: rgba(59,130,246,0.3); }
.toast.info i { color: var(--blue); }

/* NOTIF */
.notif-panel { position: fixed; top: 64px; right: 16px; z-index: 300; width: 340px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); animation: fadeSlideDown 0.2s ease; }
@keyframes fadeSlideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.notif-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-header h4 { font-family: 'Syne', sans-serif; font-weight: 700; }
.notif-header button { background: none; border: none; color: var(--text2); cursor: pointer; font-size: 15px; }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.notif-text p { font-size: 13px; font-weight: 500; }
.notif-text span { font-size: 11px; color: var(--text2); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--text3); }
.empty-state i { font-size: 48px; margin-bottom: 14px; display: block; opacity: 0.4; }
.empty-state p { font-size: 14px; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

/* RESPONSIVE */
@media (max-width: 1200px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .config-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close-btn { display: block; }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: flex; }
  .dash-grid-2 { grid-template-columns: 1fr; }
  .aula-layout { grid-template-columns: 1fr; }
  .aula-sidebar { position: static; }
  .profile-layout { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .content-area { padding: 16px; }
  .stats-grid, .student-stats { grid-template-columns: 1fr 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .w200, .w160 { width: 100%; }
  .login-card { padding: 32px 24px; }
}
