/* ============================================================
   style.css — Design System: Chamada Discipulado
   Paleta: Azul (#1e3a5f escuro, #3b82f6 claro), Branco, Cinza
   ============================================================ */

/* ─── Reset e Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #1e3a5f;
  --primary-light: #2563eb;
  --accent:        #3b82f6;
  --accent-hover:  #2563eb;
  --success:       #16a34a;
  --success-bg:    #dcfce7;
  --danger:        #dc2626;
  --danger-bg:     #fee2e2;
  --warning:       #d97706;
  --warning-bg:    #fef3c7;
  --bg:            #f1f5f9;
  --surface:       #ffffff;
  --border:        #e2e8f0;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --sidebar-w:     240px;
  --nav-h:         64px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.12);
}

html { font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

/* ─── Layout Geral ─────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar (Desktop) ────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
}

.sidebar-brand h1 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1.3;
  color: #fff;
}

.sidebar-brand p {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.4);
  padding: 12px 8px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 2px;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
}

.nav-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  text-align: center;
}

/* ─── Main Content ─────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.page-header .subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.page-body {
  padding: 28px 32px;
  flex: 1;
}

/* ─── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
}

.card-body { padding: 22px; }

/* ─── Stat Cards (Dashboard) ───────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--accent);
}

.stat-card.green::before { background: var(--success); }
.stat-card.red::before   { background: var(--danger); }
.stat-card.orange::before { background: var(--warning); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: #eff6ff;
  flex-shrink: 0;
}

.stat-card.green .stat-icon { background: var(--success-bg); }
.stat-card.red .stat-icon   { background: var(--danger-bg); }
.stat-card.orange .stat-icon { background: var(--warning-bg); }

.stat-info { flex: 1; }
.stat-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Quick Actions Grid ───────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.quick-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.quick-btn:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--accent);
}

.quick-btn .qb-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  transition: background .2s;
}

.quick-btn:hover .qb-icon { background: var(--accent); color: #fff; }
.quick-btn span { font-weight: 600; font-size: .9rem; }

/* ─── Botões ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: 10px; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── Formulários ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .85rem; font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s;
  outline: none;
  font-family: inherit;
}

.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: #94a3b8; }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; display: none; }
.form-control.error { border-color: var(--danger); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ─── Tabelas ──────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; font-size: .875rem; }
th {
  background: var(--bg);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
td { border-bottom: 1px solid var(--border); color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* ─── Badges / Status ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75rem; font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-blue    { background: #dbeafe; color: #1d4ed8; }
.badge-gray    { background: #f1f5f9; color: var(--text-muted); }

/* ─── Modais ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(.97);
  transition: transform .2s;
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary); }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: none; border: none;
  cursor: pointer; color: var(--text-muted);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ─── Alertas / Toast ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px;
}

.toast {
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  border-left: 4px solid var(--accent);
  animation: slideIn .25s ease;
  font-size: .9rem;
}

.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }

.toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast .toast-msg  { flex: 1; color: var(--text); font-weight: 500; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ─── Autocomplete ─────────────────────────────────────────── */
.autocomplete-wrapper { position: relative; }

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.autocomplete-list.open { display: block; }

.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  transition: background .1s;
  border-bottom: 1px solid var(--border);
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.focused { background: #eff6ff; }

.autocomplete-item .ac-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}

.autocomplete-item .ac-name { font-weight: 600; font-size: .9rem; }
.autocomplete-item .ac-tel  { font-size: .78rem; color: var(--text-muted); }

.autocomplete-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
}

/* ─── Aluno Selecionado (card chamada) ─────────────────────── */
.aluno-card {
  background: #eff6ff;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.aluno-card.ja-presente {
  background: var(--success-bg);
  border-color: var(--success);
}

.aluno-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}

.aluno-card.ja-presente .aluno-avatar { background: var(--success); }

.aluno-info { flex: 1; }
.aluno-info .aluno-nome { font-weight: 700; font-size: 1.05rem; }
.aluno-info .aluno-tel  { font-size: .83rem; color: var(--text-muted); }

/* ─── Lista de Presentes ───────────────────────────────────── */
.presentes-list { display: flex; flex-direction: column; gap: 6px; }

.presente-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--success-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--success);
  font-size: .875rem;
}

.presente-item .hora { margin-left: auto; color: var(--text-muted); font-size: .78rem; }
.presente-counter { font-size: .85rem; color: var(--text-muted); margin-bottom: 10px; }

/* ─── Filtros / Toolbar ────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.toolbar .search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .95rem;
}

.search-box input { padding-left: 36px; }

/* ─── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .95rem; }

/* ─── Progress Bar ─────────────────────────────────────────── */
.progress { background: var(--bg); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .4s;
}
.progress-bar.green  { background: var(--success); }
.progress-bar.orange { background: var(--warning); }
.progress-bar.red    { background: var(--danger); }

/* ─── Formulário Inscrição (página pública) ────────────────── */
.inscricao-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.inscricao-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  width: 100%; max-width: 460px;
  overflow: hidden;
}

.inscricao-header {
  background: var(--primary);
  padding: 32px 32px 24px;
  text-align: center;
  color: #fff;
}

.inscricao-header .logo-icon {
  width: 64px; height: 64px;
  background: var(--accent);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 14px;
}

.inscricao-header h1 { font-size: 1.4rem; font-weight: 800; }
.inscricao-header p  { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: 6px; }
.inscricao-body      { padding: 32px; }

/* ─── Responsividade ───────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding-bottom: 72px; }
  .page-header { padding: 16px 20px; }
  .page-body   { padding: 16px 20px; }
  .stats-grid  { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card   { padding: 16px; }
  .stat-value  { font-size: 1.5rem; }
  .form-row    { grid-template-columns: 1fr; }
  .quick-grid  { grid-template-columns: 1fr 1fr; }
  .toolbar     { flex-direction: column; align-items: stretch; }
  .toolbar .search-box { min-width: unset; }
}

/* ─── Bottom Navigation (Mobile) ──────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}

.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: .68rem; font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border-radius: 10px;
  transition: color .15s;
  min-width: 52px;
  text-align: center;
}

.bnav-item .bnav-icon { font-size: 1.25rem; }
.bnav-item.active     { color: var(--accent); }

@media (max-width: 768px) {
  .bottom-nav { display: block; }
}

/* ─── Utilitários ──────────────────────────────────────────── */
.d-flex  { display: flex; }
.gap-2   { gap: 8px; }
.gap-3   { gap: 12px; }
.mt-1    { margin-top: 4px; }
.mt-2    { margin-top: 8px; }
.mt-3    { margin-top: 16px; }
.mb-3    { margin-bottom: 16px; }
.mb-4    { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.fw-bold     { font-weight: 700; }
.hidden      { display: none !important; }

/* ─── Aula Selecionada Banner ──────────────────────────────── */
.aula-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  border-radius: var(--radius);
  padding: 18px 22px;
  color: #fff;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 24px;
}
.aula-banner .ab-icon { font-size: 1.6rem; }
.aula-banner .ab-title { font-weight: 700; font-size: 1rem; }
.aula-banner .ab-data  { font-size: .82rem; opacity: .8; margin-top: 2px; }
.aula-banner .ab-count { margin-left: auto; text-align: right; }
.aula-banner .ab-num   { font-size: 1.6rem; font-weight: 800; }
.aula-banner .ab-sub   { font-size: .75rem; opacity: .7; }

/* ─── Relatório ────────────────────────────────────────────── */
.rel-row-high  td:last-child { color: var(--success); font-weight: 700; }
.rel-row-med   td:last-child { color: var(--warning); font-weight: 700; }
.rel-row-low   td:last-child { color: var(--danger);  font-weight: 700; }

/* ─── Animação de sucesso na chamada ───────────────────────── */
@keyframes popIn {
  0%   { transform: scale(.8); opacity: 0; }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
.pop-in { animation: popIn .3s ease forwards; }

/* ─── Curso Card ───────────────────────────────────────────── */
.curso-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s;
}
.curso-card:hover { box-shadow: var(--shadow-md); }

.curso-card-header {
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 14px;
}
.curso-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.curso-info h3    { font-size: 1rem; font-weight: 700; color: var(--primary); }
.curso-info .desc { font-size: .82rem; color: var(--text-muted); margin-top: 3px; line-height: 1.4; }
.curso-card-stats {
  display: flex; gap: 16px;
  padding: 12px 22px;
  background: var(--bg);
  font-size: .82rem;
}
.curso-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.curso-stat .cs-val { font-weight: 700; font-size: 1.1rem; color: var(--primary); }
.curso-stat .cs-lbl { color: var(--text-muted); }
.curso-card-actions {
  padding: 12px 22px;
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ─── Form Builder ─────────────────────────────────────────── */
.fb-field-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
  transition: border-color .15s;
}
.fb-field-card:hover { border-color: var(--accent); }
.fb-field-card.system { border-left: 4px solid var(--accent); }

.fb-field-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.fb-field-info { flex: 1; }
.fb-field-info .fb-label    { font-weight: 600; font-size: .9rem; }
.fb-field-info .fb-sublabel { font-size: .75rem; color: var(--text-muted); }

.fb-field-actions { display: flex; gap: 4px; flex-shrink: 0; }
.fb-btn {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: none; border: 1px solid var(--border);
  cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; color: var(--text-muted);
}
.fb-btn:hover { background: var(--bg); color: var(--text); }
.fb-btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.fb-add-section {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.fb-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.fb-type-btn {
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  font-size: .8rem; font-weight: 600;
  transition: all .15s;
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fb-type-btn:hover,
.fb-type-btn.selected { border-color: var(--accent); background: #eff6ff; color: var(--accent); }
.fb-type-btn .ft-icon { font-size: 1.2rem; }

/* ─── Financeiro ───────────────────────────────────────────── */
.fin-resumo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.fin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
}
.fin-card.green  { border-color: var(--success); }
.fin-card.red    { border-color: var(--danger); }
.fin-card.orange { border-color: var(--warning); }
.fin-card .fc-val { font-size: 1.6rem; font-weight: 800; color: var(--text); }
.fin-card .fc-lbl { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

.pag-badge-pago     { background: var(--success-bg); color: var(--success); }
.pag-badge-pendente { background: var(--warning-bg); color: var(--warning); }
.pag-badge-vencido  { background: var(--danger-bg);  color: var(--danger); }

/* ─── Painel do Aluno ──────────────────────────────────────── */
.painel-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
  padding: 24px;
}
.painel-login-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  width: 100%; max-width: 420px;
  margin: 0 auto;
  overflow: hidden;
}
.painel-header-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow);
}
.painel-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700;
  flex-shrink: 0;
}
.painel-curso-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.painel-curso-header {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: #fff;
  padding: 18px 22px;
}
.painel-curso-body { padding: 20px 22px; }
.painel-freq-bar { margin-bottom: 16px; }
.painel-freq-label {
  display: flex; justify-content: space-between;
  font-size: .82rem; margin-bottom: 6px;
}
.aula-presente { background: var(--success-bg); border-left: 3px solid var(--success); }
.aula-faltante { background: var(--danger-bg);  border-left: 3px solid var(--danger); }
.aula-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 6px;
  font-size: .85rem; margin-bottom: 4px;
}

/* ─── Inscrição Pública (curso) ────────────────────────────── */
.curso-inscricao-header {
  background: var(--primary);
  padding: 28px 32px;
  color: #fff; text-align: center;
}
.curso-inscricao-header .ci-logo {
  width: 60px; height: 60px;
  background: var(--accent);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 12px;
}
.curso-inscricao-header h1 { font-size: 1.25rem; font-weight: 800; }
.curso-inscricao-header .ci-desc {
  font-size: .82rem; color: rgba(255,255,255,.7);
  margin-top: 6px; line-height: 1.5;
}
.curso-inscricao-header .ci-valor {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .85rem; font-weight: 600;
  margin-top: 10px;
}

/* ─── Link do Curso ────────────────────────────────────────── */
.link-box {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.link-box input {
  flex: 1; border: none; background: transparent;
  font-size: .82rem; color: var(--text-muted);
  outline: none; font-family: monospace;
}
.link-box .btn-copy {
  background: var(--accent); color: #fff;
  border: none; border-radius: 6px;
  padding: 6px 12px; cursor: pointer;
  font-size: .78rem; font-weight: 600;
  white-space: nowrap; transition: background .15s;
}
.link-box .btn-copy:hover { background: var(--accent-hover); }

/* ─── Modal Large ───────────────────────────────────────────── */
.modal-lg { max-width: 680px; }

/* ─── Painel Aluno — detalhes de aula ───────────────────────── */
.aula-status-icon { font-size: .9rem; flex-shrink: 0; }
.aula-titulo      { flex: 1; font-size: .88rem; font-weight: 600; }
.aula-data        { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

/* ─── Responsividade adicional ─────────────────────────────── */
@media (max-width: 768px) {
  .fin-resumo { grid-template-columns: 1fr 1fr; }
  .curso-card-stats { flex-wrap: wrap; gap: 12px; }
  .fb-type-grid { grid-template-columns: repeat(3, 1fr); }
  .modal-lg { max-width: 100%; }
}
