/* Cursos · Lilian — tema escuro, acento laranja (identidade Radar) */
:root {
  --bg: #0b0f17;
  --bg2: #111827;
  --bg3: #1a2332;
  --line: #232f45;
  --text: #e5e9f0;
  --muted: #8b98ad;
  --accent: #f97316;
  --accent-2: #fb923c;
  --ok: #22c55e;
  --danger: #ef4444;
  --radius: 12px;
  --sidebar-w: 340px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: Inter, system-ui, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }

/* ---------- LOGIN (liquid glass sobre imagem) ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative; overflow: hidden;
  background: url("assets/login-bg.jpg") center/cover no-repeat fixed, var(--bg);
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 75% 15%, rgba(249,115,22,.16), transparent 60%),
    linear-gradient(165deg, rgba(8,12,20,.28) 0%, rgba(8,12,20,.5) 100%);
}
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  background: linear-gradient(150deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 26px;
  padding: 42px 34px 36px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow:
    0 30px 80px rgba(2,6,14,.45),
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -1px 0 rgba(255,255,255,.08);
}
.login-card::after {
  content: ""; position: absolute; inset: 0; border-radius: 26px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.22) 0%, transparent 28%, transparent 72%, rgba(255,255,255,.1) 100%);
}
.login-logo {
  width: 60px; height: 60px; border-radius: 18px; margin: 6px auto 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center; font-size: 25px; color: #fff;
  box-shadow: 0 10px 26px rgba(249,115,22,.45), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s, filter .3s;
  animation: logo-breathe 4.5s ease-in-out infinite;
}
.login-logo:hover {
  transform: scale(1.14) rotate(-8deg);
  filter: brightness(1.1) saturate(1.15);
  box-shadow: 0 18px 46px rgba(249,115,22,.7), 0 0 0 8px rgba(249,115,22,.15),
              inset 0 1px 0 rgba(255,255,255,.5);
  animation: none;
}
@keyframes logo-breathe {
  0%, 100% { box-shadow: 0 10px 26px rgba(249,115,22,.45), 0 0 0 0 rgba(249,115,22,.28), inset 0 1px 0 rgba(255,255,255,.5); }
  50%      { box-shadow: 0 10px 26px rgba(249,115,22,.45), 0 0 0 12px rgba(249,115,22,0), inset 0 1px 0 rgba(255,255,255,.5); }
}
.login-card h1 {
  text-align: center; margin: 2px 0 0; font-size: 27px; letter-spacing: -.4px;
  color: #fff; text-shadow: 0 2px 18px rgba(2,6,14,.5);
}
.login-sub { text-align: center; color: rgba(255,255,255,.72); margin: 0 0 8px; font-size: 13.5px; }
.login-card label {
  display: flex; flex-direction: column; gap: 6px; font-size: 12.5px;
  color: rgba(255,255,255,.78); font-weight: 600; letter-spacing: .2px;
  position: relative; z-index: 1;
}
.login-card input {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 13px; padding: 13px 15px; font-size: 15px; outline: none;
  box-shadow: inset 0 1px 3px rgba(2,6,14,.15);
  transition: border-color .15s, background .15s;
}
.login-card input::placeholder { color: rgba(255,255,255,.5); }
.login-card input:focus { border-color: rgba(249,115,22,.85); background: rgba(255,255,255,.19); }
.login-error {
  background: rgba(180,30,40,.32); color: #ffd7d7; border: 1px solid rgba(255,120,120,.4);
  padding: 10px 13px; border-radius: 12px; font-size: 13px;
  backdrop-filter: blur(8px);
}
#login-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 700;
  border: none; border-radius: 13px; padding: 13px; font-size: 15px; margin-top: 4px;
  box-shadow: 0 12px 30px rgba(249,115,22,.45), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .12s, box-shadow .12s, filter .12s;
  position: relative; z-index: 1;
}
#login-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
#login-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.login-foot {
  text-align: center; color: rgba(255,255,255,.55); font-size: 11.5px; margin-top: 6px;
  position: relative; z-index: 1;
}

/* ---------- LAYOUT ---------- */
.app { display: flex; flex-direction: column; height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 0 18px; height: 56px;
  background: var(--bg2); border-bottom: 1px solid var(--line); flex-shrink: 0; z-index: 5;
}
.brand { font-weight: 800; font-size: 17px; cursor: pointer; white-space: nowrap; }
.brand span { color: var(--accent); }
.topbar-search { flex: 1; max-width: 460px; }
.topbar-search input {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: 20px; padding: 8px 16px; outline: none; font-size: 14px;
}
.topbar-search input:focus { border-color: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-name { color: var(--muted); font-size: 13px; }
.icon-btn {
  background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px;
  padding: 6px 10px; font-size: 15px;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }

.body { display: flex; flex: 1; min-height: 0; }

/* ---------- SIDEBAR ---------- */
.sidebar {
  width: var(--sidebar-w); background: var(--bg2); border-right: 1px solid var(--line);
  flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden;
}
.course-tabs { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex-shrink: 0; }
.course-tab {
  text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 14px; color: var(--text);
}
.course-tab .ct-title { font-weight: 700; font-size: 13.5px; }
.course-tab .ct-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.course-tab.active { border-color: var(--accent); background: rgba(249,115,22,.08); }
.course-tab .bar { height: 4px; background: var(--bg3); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.course-tab .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

.module-nav { padding: 0 14px 20px; flex: 1; overflow-y: auto; }

/* rodapé da sidebar (engrenagem) */
.sidebar-footer { border-top: 1px solid var(--line); padding: 10px 12px; flex-shrink: 0; }
.settings-btn {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--muted); padding: 9px 10px;
  border-radius: 9px; font-size: 13.5px; font-weight: 600;
}
.settings-btn:hover { background: var(--bg3); color: var(--text); }
.settings-btn.active { background: rgba(249,115,22,.12); color: var(--accent-2); }
.settings-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.mod-block { border-bottom: 1px solid var(--line); }
.mod-head {
  width: 100%; background: none; border: none; color: var(--text); text-align: left;
  padding: 13px 4px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600;
}
.mod-head .chev { color: var(--muted); transition: transform .18s; font-size: 11px; }
.mod-block.open .chev { transform: rotate(90deg); }
.mod-head .mod-progress { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 500; }
.mod-lessons { display: none; padding: 2px 0 10px; }
.mod-block.open .mod-lessons { display: block; }

.lesson-item {
  width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: left;
  background: none; border: none; color: var(--muted); padding: 8px 10px; border-radius: 9px; font-size: 13px; line-height: 1.35;
}
.lesson-item:hover { background: var(--bg3); color: var(--text); }
.lesson-item.active { background: rgba(249,115,22,.12); color: var(--text); }
.lesson-item .li-check { flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%;
  border: 1.6px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent; margin-top: 1px; }
.lesson-item.done .li-check { background: var(--ok); border-color: var(--ok); color: #06220f; }
.lesson-item .li-dur { margin-left: auto; font-size: 11px; color: var(--muted); white-space: nowrap; }
.lesson-item.no-id { opacity: .45; }

.mat-item {
  display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px;
  padding: 6px 10px; text-decoration: none; border-radius: 8px;
}
.mat-item:hover { background: var(--bg3); color: var(--text); }
.mat-item .mi-ico { font-size: 13px; }

/* ---------- MAIN ---------- */
.main { flex: 1; overflow-y: auto; padding: 26px 34px 60px; }

/* home */
.home-hero { max-width: 900px; }
.home-hero h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.home-hero h2 .hero-name { color: var(--accent-2); }
.home-hero p { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; max-width: 1000px; }
.course-card {
  background: linear-gradient(145deg, var(--bg3), var(--bg2)); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; cursor: pointer; transition: border-color .15s;
}
.course-card:hover { border-color: var(--accent); }
.cc-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.cc-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.cc-stats { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.cc-stats b { color: var(--text); }
.cc-bar { height: 6px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.cc-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.cc-pct { font-size: 12px; color: var(--accent-2); margin-top: 7px; font-weight: 600; }

.continue-row { max-width: 1000px; margin-top: 34px; }
.continue-row h3 { font-size: 15px; margin-bottom: 12px; color: var(--muted); font-weight: 600; }
.cont-chip {
  display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; cursor: pointer; max-width: 620px;
}
.cont-chip:hover { border-color: var(--accent); }
.cont-play { width: 34px; height: 34px; border-radius: 50%; background: rgba(249,115,22,.15);
  color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cont-info { min-width: 0; }
.cont-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cont-sub { font-size: 11.5px; color: var(--muted); }

/* player */
.player-wrap { max-width: 1100px; }
.video-shell { background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.video-shell video { display: block; width: 100%; aspect-ratio: 16/9; background: #000; }
.pl-info { display: flex; align-items: flex-start; gap: 14px; margin-top: 18px; }
.pl-info h2 { margin: 0; font-size: 19px; }
.pl-mod { color: var(--accent-2); font-size: 12.5px; font-weight: 600; margin-bottom: 3px; }
.pl-meta { color: var(--muted); font-size: 12.5px; margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.pl-actions { margin-left: auto; display: flex; gap: 8px; flex-shrink: 0; }
.btn {
  background: var(--bg3); color: var(--text); border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 14px; font-size: 13px; font-weight: 600;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; }
.btn.ghost-done { color: var(--ok); border-color: rgba(34,197,94,.4); }
.pl-materials { margin-top: 26px; max-width: 900px; }
.pl-materials h3 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.player-msg {
  background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; text-align: center; color: var(--muted);
}
.player-msg b { color: var(--text); }

/* admin row */
.admin-row { margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--line); max-width: 900px;
  display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12.5px; }

/* configurações */
.settings-sec {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 16px; max-width: 640px;
}
.settings-sec h3 { margin: 0 0 10px; font-size: 12.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px; }
.set-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px;
  padding: 6px 0; color: var(--muted); }
.set-row b { color: var(--text); font-weight: 600; }
.set-desc { font-size: 13px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.set-status { font-size: 13px; color: var(--muted); margin-top: 10px; min-height: 16px; }

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 18px; font-size: 13.5px; z-index: 50;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
}

/* responsive */
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; top: 56px; bottom: 0; transform: translateX(-100%); transition: transform .2s; z-index: 10; }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 18px 16px 60px; }
  #menu-toggle { display: block; }
}
@media (min-width: 901px) { #menu-toggle { display: none; } }
