/*!
 * Lupiey · Platform UI (áreas internas: aluno / mentor / admin)
 */
:root {
  --role-aluno: #2D5BFF;
  --role-mentor: #F5A524;
  --role-admin: #14151A;
  --ink: #171923;
  --muted: #64748B;
  --surface: #FFFFFF;
  --surface-muted: #F5F7FB;
  --border: #E7EAF3;
  --success: #198754;
  --danger: #DC3545;
  --radius: 14px;
}

/* ---------- Layout ---------- */
.app-shell { display: flex; min-height: 100vh; background: var(--surface-muted); font-family: var(--default-font, "Open Sans", sans-serif); }

.app-sidebar {
  width: 260px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.app-sidebar-brand { padding: 22px 22px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.app-role-pill {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--role-color); background: color-mix(in srgb, var(--role-color) 12%, white);
  padding: 4px 10px; border-radius: 999px;
}
.app-nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.app-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left; cursor: pointer;
}
.app-nav-link i { font-size: 17px; width: 20px; text-align: center; color: var(--muted); }
.app-nav-link:hover { background: var(--surface-muted); }
.app-nav-link.active { background: color-mix(in srgb, var(--role-aluno) 8%, white); color: var(--role-aluno); }
.app-nav-link.active i { color: inherit; }
.app-sidebar-footer { padding: 12px; border-top: 1px solid var(--border); }
.app-logout { color: var(--danger); }
.app-logout i { color: var(--danger); }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  height: 68px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 16px; position: sticky; top: 0; z-index: 30;
}
.app-page-title { font-family: var(--heading-font, "Raleway"); font-size: 19px; font-weight: 700; margin: 0; flex: 1; color: var(--ink); }
.app-topbar-right { display: flex; align-items: center; gap: 10px; }
.app-user-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.app-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--role-color) 15%, white); color: var(--role-color); font-weight: 700; font-size: 13px;
}
.app-burger { display: none; border: none; background: none; font-size: 22px; color: var(--ink); }
.app-content { padding: 28px 24px 60px; max-width: 1240px; width: 100%; margin: 0 auto; }

@media (max-width: 900px) {
  .app-sidebar { position: fixed; left: -280px; top: 0; height: 100vh; transition: left .25s ease; box-shadow: 0 0 0 rgba(0,0,0,0); }
  .app-sidebar.open { left: 0; box-shadow: 8px 0 30px rgba(20,21,26,.15); }
  .app-burger { display: block; }
}

/* ---------- Componentes ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; position: relative; overflow: hidden;
}
.stat-card .stat-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.stat-card .stat-value { font-family: var(--heading-font, "Raleway"); font-size: 28px; font-weight: 800; color: var(--ink); }
.stat-card .stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.stat-card i.stat-icon { position: absolute; right: 16px; top: 16px; font-size: 26px; opacity: .18; }

.card-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; }
.card-block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-block-header h2, .card-block-header h3 { font-family: var(--heading-font, "Raleway"); font-size: 17px; font-weight: 700; margin: 0; color: var(--ink); }

.table-clean { width: 100%; border-collapse: collapse; }
.table-clean th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table-clean td { padding: 13px 12px; border-bottom: 1px solid var(--border); font-size: 14.5px; color: var(--ink); vertical-align: middle; }
.table-clean tr:last-child td { border-bottom: none; }
.table-responsive-clean { overflow-x: auto; }

.badge-status { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-block; }
.badge-status.ok { background: #DCFCE7; color: #15803D; }
.badge-status.pending { background: #FEF3C7; color: #92400E; }
.badge-status.danger { background: #FEE2E2; color: #B91C1C; }
.badge-status.neutral { background: #F1F5F9; color: #475569; }

.progress-track { background: #EEF0F6; border-radius: 999px; height: 8px; overflow: hidden; width: 100%; }
.progress-fill { height: 100%; background: var(--role-aluno); border-radius: 999px; }

.avatar-sm { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: #EEF1FB; color: var(--role-aluno); }

.btn-lupiey { background: var(--role-aluno); border: none; color: #fff; font-weight: 600; border-radius: 10px; padding: 10px 20px; font-size: 14.5px; transition: .2s; }
.btn-lupiey:hover { filter: brightness(1.08); color: #fff; }
.btn-lupiey-outline { background: #fff; border: 1.5px solid var(--border); color: var(--ink); font-weight: 600; border-radius: 10px; padding: 9px 18px; font-size: 14.5px; }
.btn-lupiey-outline:hover { border-color: var(--role-aluno); color: var(--role-aluno); }
.btn-danger-soft { background: #FEE2E2; border: none; color: #B91C1C; font-weight: 600; border-radius: 10px; padding: 9px 16px; font-size: 13.5px; }

.form-clean label { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 6px; display: block; }
.form-clean .form-control, .form-clean .form-select {
  border-radius: 10px; border: 1.5px solid var(--border); padding: 10px 14px; font-size: 14.5px;
}
.form-clean .form-control:focus, .form-clean .form-select:focus { border-color: var(--role-aluno); box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-aluno) 15%, transparent); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-state i { font-size: 40px; opacity: .35; display: block; margin-bottom: 12px; }

.tag-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); margin: 0 6px 6px 0; }

/* Indicador intermitente vermelho/verde: aula agendada com este mentor */
.session-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #DC3545; margin-right: 6px; vertical-align: middle;
  animation: session-blink 1.4s infinite;
}
@keyframes session-blink {
  0%, 49% { background: #DC3545; }
  50%, 100% { background: #22C55E; }
}
.classroom-btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

.toast-lupiey {
  position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: #fff; padding: 14px 20px;
  border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 10px; max-width: 320px; opacity: 0; transform: translateY(10px); transition: .25s;
}
.toast-lupiey.show { opacity: 1; transform: translateY(0); }
.toast-lupiey.success i { color: #4ade80; }
.toast-lupiey.error i { color: #f87171; }

/* Auth pages (login/cadastro/recuperar) reaproveitam este bloco */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #171923 0%, #2D5BFF 140%); padding: 30px 16px; }
.auth-card { background: #fff; border-radius: 20px; max-width: 460px; width: 100%; padding: 40px 36px; box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.auth-role-switch { display: flex; gap: 8px; background: var(--surface-muted); padding: 5px; border-radius: 12px; margin-bottom: 22px; }
.auth-role-switch button { flex: 1; border: none; background: none; padding: 9px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.auth-role-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
