/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; }

/* ── TOKENS — FOCO TOTAL MILITARES ── */
:root {
  /* Marca */
  --gold:        #DDA221;
  --gold-hover:  #C48F1A;
  --gold-light:  #FDF5E0;
  --green-brand: #153C23;
  --navy:        #14266A;
  --dark:        #151515;

  /* UI */
  --accent:       var(--gold);
  --accent-hover: var(--gold-hover);
  --accent-light: var(--gold-light);

  --bg:       #F5F4F0;
  --surface:  #FFFFFF;
  --border:   #E2E0D9;
  --border-2: #CCCAC0;

  --text-1: #151515;
  --text-2: #4A4840;
  --text-3: #9A9890;

  /* Sidebar escura */
  --sidebar-bg:      #151515;
  --sidebar-border:  #252520;
  --sidebar-text:    rgba(255,255,255,.55);
  --sidebar-text-hover: rgba(255,255,255,.9);
  --sidebar-active-bg: rgba(221,162,33,.12);
  --sidebar-active-text: #DDA221;

  /* Status */
  --green:    #16A34A;
  --green-bg: #F0FDF4;
  --red:      #DC2626;
  --red-bg:   #FEF2F2;
  --amber:    #D97706;
  --amber-bg: #FFFBEB;

  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 1px 4px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);

  --sidebar-w: 224px;
  --topbar-h:  52px;
  --nav-h:     40px;
}

/* ── BASE ── */
body {
  font-family: 'Saira', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.sidebar-logo img { height: 28px; width: auto; }

.sidebar-nav { flex: 1; padding: 10px 8px 0; overflow-y: auto; }
.nav-group-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.25);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 8px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  height: 34px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all .1s;
  position: relative;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--sidebar-text-hover); }
.nav-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
  border: 1px solid rgba(221,162,33,.2);
}
.nav-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: .5; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 14px 14px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(221,162,33,.2);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(221,162,33,.3);
}
.avatar-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); }
.avatar-role { font-size: 11px; color: rgba(255,255,255,.35); }

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}
.topbar-title { font-size: 15px; font-weight: 800; color: var(--text-1); letter-spacing: -.2px; }
.topbar-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; font-weight: 400; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ── MAIN ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .12s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text-1); border: 1px solid var(--border-2); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--bg); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); color: var(--text-1); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-lg { height: 40px; padding: 0 20px; font-size: 14px; }

/* ── CARD ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text-1); }
.card-body { padding: 16px 20px; }

/* ── STAT CARD ── */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-1); margin-top: 4px; line-height: 1; letter-spacing: -.5px; }
.stat-delta { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red   { background: var(--red-bg);   color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-gray  { background: #F4F4F5; color: var(--text-2); }
.badge-accent { background: var(--accent-light); color: var(--accent); }

/* ── PROGRESS ── */
.progress { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; }
.pf-accent { background: var(--accent); }
.pf-green  { background: var(--green); }
.pf-amber  { background: var(--amber); }
.pf-red    { background: var(--red); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); }
.divider-v { width: 1px; background: var(--border); align-self: stretch; }

/* ── INPUT ── */
.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-1);
  font-size: 14px;
  outline: none;
  transition: border .12s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(221,162,33,.15); }
.input::placeholder { color: var(--text-3); }
.label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; display: block; }

/* ── GRIDS ── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.g4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.g-auto { display: flex; gap: 16px; }
.g-main { display: grid; grid-template-columns: 1fr 280px; gap: 20px; }

/* ── SECTION TITLE ── */
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── TABLE ── */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg); }

/* ── ICON PLACEHOLDERS ── */
.icon { display: inline-flex; align-items: center; justify-content: center; }

/* ──────────────────────────────────────
   TELA 1 · LOGIN
────────────────────────────────────── */
.login-wrap {
  flex: 1;
  display: flex;
  min-height: 0;
}
.login-side {
  width: 480px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.login-form { width: 100%; max-width: 360px; }
.login-logo-wrap { margin-bottom: 36px; }
.login-logo-mark {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.login-logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.login-heading { font-size: 22px; font-weight: 800; color: var(--text-1); letter-spacing: -.4px; line-height: 1.2; }
.login-sub { font-size: 14px; color: var(--text-3); margin-top: 6px; }
.login-form-group { margin-bottom: 14px; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .12s;
}
.social-btn:hover { background: var(--bg); }
.social-icon { width: 16px; height: 16px; }
.login-sep { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.login-sep-line { flex: 1; height: 1px; background: var(--border); }
.login-sep-text { font-size: 12px; color: var(--text-3); }
.login-forgot { font-size: 12px; color: var(--accent); font-weight: 500; cursor: pointer; }
.login-agree { font-size: 11.5px; color: var(--text-3); text-align: center; margin-top: 16px; line-height: 1.6; }
.login-agree a { color: var(--accent); cursor: pointer; }
.login-switch { text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-3); }
.login-switch a { color: var(--accent); font-weight: 600; cursor: pointer; }
.login-cover {
  flex: 1;
  background: linear-gradient(160deg, #0E0E0B 0%, #153C23 55%, #0E0E0B 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.cover-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(221,162,33,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221,162,33,.08) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cover-content { position: relative; z-index: 1; text-align: center; max-width: 400px; }
.cover-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(221,162,33,.18);
  border: 1px solid rgba(221,162,33,.4);
  color: #DDA221;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: .4px;
}
.cover-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #DDA221; }
.cover-title { font-size: 32px; font-weight: 900; color: #FAFAFA; line-height: 1.15; letter-spacing: -.6px; margin-bottom: 16px; }
.cover-title span { color: #DDA221; }
.cover-desc { font-size: 15px; color: rgba(250,250,250,.55); line-height: 1.7; margin-bottom: 36px; }
.cover-stats { display: flex; gap: 32px; justify-content: center; }
.cover-stat-value { font-size: 24px; font-weight: 800; color: #FAFAFA; }
.cover-stat-label { font-size: 12px; color: rgba(250,250,250,.5); margin-top: 2px; }
.cover-testimonial {
  margin-top: 48px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: left;
  backdrop-filter: blur(8px);
}
.cover-quote { font-size: 14px; color: rgba(250,250,250,.8); line-height: 1.7; font-style: italic; }
.cover-author { margin-top: 14px; display: flex; align-items: center; gap: 10px; }
.cover-author-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cover-author-name { font-size: 13px; font-weight: 600; color: rgba(250,250,250,.9); }
.cover-author-role { font-size: 11px; color: rgba(250,250,250,.45); }

/* acordeão de módulos */
.mod-header {
  display:flex; align-items:center; gap:10px;
  padding:13px 18px; cursor:pointer;
  background:var(--bg); border-bottom:1px solid var(--border);
  user-select:none;
}
.mod-header:hover { background:#ECEAE3; }
.mod-header.open { background:var(--surface); }
.mod-chevron { margin-left:auto; color:var(--text-3); transition:transform .2s; flex-shrink:0; }
.mod-header.open .mod-chevron { transform:rotate(180deg); }
.mod-lessons { display:none; }
.mod-header.open + .mod-lessons { display:block; }

/* linha de aula */
.lesson-row {
  display:flex; align-items:center; gap:12px;
  padding:10px 18px 10px 42px;
  border-bottom:1px solid var(--border);
  cursor:pointer; transition:background .1s;
}
.lesson-row:hover { background:var(--bg); }
.lesson-row.active-lesson {
  background:rgba(221,162,33,.06);
  border-left:3px solid var(--accent);
  padding-left:39px;
}
.lesson-row.done .lesson-title { color:var(--text-3); }

/* ícone de status da aula */
.ls-icon {
  width:20px; height:20px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.ls-done   { background:var(--green-bg); border:1.5px solid var(--green); }
.ls-active { background:var(--accent); }
.ls-pending{ background:transparent; border:1.5px solid var(--border-2); }
.ls-locked { background:transparent; border:1.5px dashed var(--border); }

/* pílulas de tipo de conteúdo */
.ctype {
  display:inline-flex; align-items:center; gap:3px;
  font-size:10px; font-weight:600; padding:2px 6px;
  border-radius:4px; white-space:nowrap; flex-shrink:0;
}
.ctype-video  { background:#EFF6FF; color:#1D4ED8; }
.ctype-pdf    { background:#FEF2F2; color:#B91C1C; }
.ctype-audio  { background:#F0FDF4; color:#15803D; }
.ctype-flash  { background:#FFF7ED; color:#C2410C; }
.ctype-resumo { background:#F5F3FF; color:#6D28D9; }
.ctype-live   { background:rgba(221,162,33,.12); color:var(--accent); }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── LAYOUT ── */
.app { display: flex; height: 100vh; overflow: hidden; }
.app .main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
