/* âââââââââââââââââââââââââââââââââââââââââââââ
   Personal Pro â Design System
   Dark theme: Indigo/Violet palette
   Typography: Inter (Google Fonts)
âââââââââââââââââââââââââââââââââââââââââââââ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ââ CSS Variables ââ */
:root {
  /* Cores principais */
  --clr-bg:         #0d0d1a;
  --clr-bg-2:       #12122a;
  --clr-bg-3:       #1a1a35;
  --clr-surface:    rgba(255,255,255,0.04);
  --clr-surface-2:  rgba(255,255,255,0.07);
  --clr-border:     rgba(255,255,255,0.08);

  --clr-primary:    #7c3aed;
  --clr-primary-h:  #9333ea;
  --clr-primary-l:  #4c1d95;
  --clr-accent:     #06b6d4;
  --clr-accent-h:   #0ea5e9;
  --clr-success:    #10b981;
  --clr-warning:    #f59e0b;
  --clr-danger:     #ef4444;
  --clr-muted:      #6b7280;

  /* Texto */
  --txt-primary:    #f1f5f9;
  --txt-secondary:  #94a3b8;
  --txt-muted:      #64748b;

  /* Gradientes */
  --grad-primary:   linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  --grad-accent:    linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --grad-success:   linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-danger:    linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --grad-warning:   linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-card:      linear-gradient(135deg, rgba(124,58,237,0.15) 0%, rgba(79,70,229,0.08) 100%);
  --grad-hero:      linear-gradient(135deg, #0d0d1a 0%, #1a0a2e 50%, #0d1a2e 100%);

  /* Glassmorphism */
  --glass-bg:       rgba(255,255,255,0.05);
  --glass-border:   rgba(255,255,255,0.1);
  --glass-blur:     blur(20px);

  /* Sombras */
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg:      0 10px 40px rgba(0,0,0,0.6);
  --shadow-primary: 0 4px 20px rgba(124,58,237,0.4);
  --shadow-accent:  0 4px 20px rgba(6,182,212,0.3);

  /* Raios */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;

  /* TransiÃ§Ãµes */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --nav-h:     64px;
  --bottom-nav-h: 72px;
  --sidebar-w: 260px;
}

/* ââ Reset & Base ââ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--clr-bg);
  color: var(--txt-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ââ Scrollbar ââ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(124,58,237,0.7); }

/* ââ Typography ââ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--txt-secondary); }

a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-primary-h); }

/* ââ Layout ââ */
#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.view {
  display: none;
  flex: 1;
  animation: fadeIn 0.3s ease;
}
.view.active { display: flex; flex-direction: column; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ââ Top Bar ââ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 20px));
  background: rgba(13,13,26,0.85);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 20px) 1.5rem 0 1.5rem;
  gap: 1rem;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
}
.topbar-brand .logo-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-primary);
}
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ââ Bottom Nav (Mobile) ââ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--bottom-nav-h);
  background: rgba(18,18,42,0.95);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  color: var(--txt-muted);
  border: none; background: none;
  font-family: inherit;
  min-width: 48px; min-height: 48px;
}
.bottom-nav .nav-item .nav-icon { font-size: 1.3rem; transition: transform var(--transition); }
.bottom-nav .nav-item .nav-label { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.02em; }
.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
  color: var(--clr-primary);
  background: rgba(124,58,237,0.1);
}
.bottom-nav .nav-item.active .nav-icon { transform: scale(1.2); }

/* ââ Main Content ââ */
.content {
  flex: 1;
  padding: 1.5rem;
  padding-bottom: calc(var(--bottom-nav-h) + 1.5rem);
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

/* ââ Cards ââ */
.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  transition: all var(--transition);
}
.card:hover { border-color: rgba(124,58,237,0.3); box-shadow: var(--shadow-md); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; gap: 0.75rem;
}
.card-title { font-size: 0.85rem; font-weight: 600; color: var(--txt-secondary); text-transform: uppercase; letter-spacing: 0.08em; }

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.kpi-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition);
}
.kpi-card:hover::before { opacity: 1; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.kpi-value {
  font-size: 1.4rem; font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.kpi-label { font-size: 0.7rem; color: var(--txt-muted); font-weight: 500; margin-top: 0.25rem; }

/* ââ Buttons ââ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 44px;
  text-decoration: none;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { box-shadow: 0 6px 25px rgba(124,58,237,0.55); filter: brightness(1.1); }

.btn-secondary {
  background: var(--clr-surface-2);
  color: var(--txt-primary);
  border: 1px solid var(--clr-border);
}
.btn-secondary:hover { background: var(--clr-surface-2); border-color: var(--clr-primary); }

.btn-accent {
  background: var(--grad-accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-success {
  background: var(--grad-success);
  color: #fff;
}
.btn-danger {
  background: var(--grad-danger);
  color: #fff;
}
.btn-warning {
  background: var(--grad-warning);
  color: #000;
}
.btn-ghost {
  background: transparent;
  color: var(--txt-secondary);
  border: 1px solid var(--clr-border);
}
.btn-ghost:hover { color: var(--txt-primary); border-color: var(--clr-primary); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; min-height: 36px; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); min-height: auto; width: 36px; height: 36px; }

/* ââ Forms ââ */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--txt-secondary); }
.form-control {
  background: var(--clr-bg-3);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--txt-primary);
  font-family: inherit; font-size: 0.95rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: all var(--transition);
  width: 100%;
  min-height: 44px;
}
.form-control:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
  background: var(--clr-bg-2);
}
.form-control::placeholder { color: var(--txt-muted); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }

select.form-control option { 
  background: var(--clr-bg-2); 
  color: #ffffff;
}
textarea.form-control { resize: vertical; min-height: 100px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ââ Badges / Pills ââ */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-primary  { background: rgba(124,58,237,0.2); color: #a78bfa; }
.badge-success  { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-warning  { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-danger   { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-accent   { background: rgba(6,182,212,0.15); color: #22d3ee; }
.badge-muted    { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* ââ Avatar ââ */
.avatar {
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--clr-bg-3);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--txt-secondary);
  flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-md { width: 44px; height: 44px; font-size: 1rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }

/* ââ List Items ââ */
.list-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.list-item:hover { background: var(--clr-surface-2); border-color: var(--clr-border); }
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-sub   { font-size: 0.8rem; color: var(--txt-secondary); }

/* ââ Section header ââ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem; gap: 0.75rem;
}
.section-title { font-size: 1rem; font-weight: 700; }

/* ââ Empty state ââ */
.empty-state {
  text-align: center; padding: 3rem 1rem;
  color: var(--txt-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p { font-size: 0.9rem; }

/* ââ Modal ââ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition-slow);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-sheet {
  background: var(--clr-bg-2);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  padding: 1.5rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  width: 100%; max-width: 600px;
  max-height: 90dvh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
.modal-title {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 1.25rem;
}

/* ââ Auth Screen ââ */
#view-login {
  background: var(--grad-hero);
  min-height: 100dvh;
  padding: 1.5rem;
}
#view-login.active {
  display: flex; align-items: center; justify-content: center;
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center; margin-bottom: 2rem;
}
.auth-logo .logo-big {
  width: 72px; height: 72px;
  background: var(--grad-primary);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-primary);
  animation: pulse-glow 2.5s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 20px rgba(124,58,237,0.4); }
  50%       { box-shadow: 0 4px 40px rgba(124,58,237,0.8); }
}
.auth-logo h1 { font-size: 1.6rem; }
.auth-logo p  { font-size: 0.85rem; color: var(--txt-muted); margin-top: 0.25rem; }
.auth-switch  { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--txt-muted); }
.auth-switch a { color: var(--clr-primary); font-weight: 600; cursor: pointer; }

/* MFA tela */
.mfa-display {
  font-size: 2.5rem; font-weight: 800; letter-spacing: 0.4em;
  text-align: center; color: var(--clr-accent);
  margin: 1rem 0;
  background: var(--clr-bg-3);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-family: monospace;
}
.mfa-inputs {
  display: flex; gap: 0.5rem; justify-content: center;
  margin: 1.25rem 0;
}
.mfa-digit {
  width: 48px; height: 60px;
  text-align: center; font-size: 1.6rem; font-weight: 800;
  background: var(--clr-bg-3); border: 2px solid var(--clr-border);
  border-radius: var(--radius-sm); color: var(--txt-primary);
  font-family: monospace; outline: none;
  transition: all var(--transition);
}
.mfa-digit:focus { border-color: var(--clr-primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.2); }

/* ââ Dashboard ââ */
.hero-greeting {
  margin-bottom: 1.5rem;
}
.hero-greeting .greeting-time {
  font-size: 0.8rem; color: var(--txt-muted); font-weight: 500; margin-bottom: 0.25rem;
}
.hero-greeting h2 {
  font-size: 1.5rem;
}
.hero-greeting .prof-name {
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* Aulas hoje */
.aula-card {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: all var(--transition);
  cursor: pointer;
}
.aula-card:hover { border-color: rgba(124,58,237,0.4); background: var(--clr-surface-2); }
.aula-time {
  font-size: 0.8rem; font-weight: 700; color: var(--clr-primary);
  min-width: 45px; text-align: center;
  background: rgba(124,58,237,0.1);
  border-radius: var(--radius-sm); padding: 0.3rem;
}
.aula-info { flex: 1; min-width: 0; }
.aula-nome { font-weight: 600; font-size: 0.9rem; }
.aula-local { font-size: 0.75rem; color: var(--txt-muted); }

/* ââ Agenda / CalendÃ¡rio ââ */
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.calendar-nav h3 { font-size: 1rem; }
.week-strip {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; margin-bottom: 1.25rem;
}
.week-day {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.5rem 0.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  border: 1px solid transparent;
}
.week-day:hover { background: var(--clr-surface-2); }
.week-day.today { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.3); }
.week-day.selected { background: var(--grad-primary); box-shadow: var(--shadow-primary); }
.week-day .wd-name { font-size: 0.6rem; font-weight: 600; color: var(--txt-muted); text-transform: uppercase; }
.week-day .wd-num  { font-size: 0.95rem; font-weight: 700; }
.week-day .wd-dot  { width: 4px; height: 4px; border-radius: 50%; background: var(--clr-primary); margin-top: 2px; }

/* Agenda list */
.agenda-aula {
  display: flex; align-items: stretch; gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.agenda-aula .time-col {
  display: flex; flex-direction: column; align-items: center; min-width: 40px;
  padding-top: 0.2rem;
}
.agenda-aula .time-col .t-hour { font-size: 0.75rem; font-weight: 700; color: var(--clr-primary); }
.agenda-aula .time-col .t-line { flex: 1; width: 1px; background: var(--clr-border); margin: 4px 0; }
.agenda-aula .aula-block {
  flex: 1;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--clr-primary);
  padding: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}
.agenda-aula .aula-block:hover { border-color: var(--clr-primary); background: var(--clr-surface-2); transform: translateX(2px); }
.agenda-aula .aula-block.status-realizada { border-left-color: var(--clr-success); opacity: 0.7; }
.agenda-aula .aula-block.status-cancelada { border-left-color: var(--clr-danger); opacity: 0.5; }
.agenda-aula .aula-block.status-remarcada { border-left-color: var(--clr-warning); }

/* ââ Alunos ââ */
.search-bar {
  display: flex; gap: 0.75rem; margin-bottom: 1.25rem;
}
.search-bar .form-control { flex: 1; }

.aluno-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
}
.aluno-item:hover { border-color: rgba(124,58,237,0.4); background: var(--clr-surface-2); transform: translateX(3px); }
.aluno-item .aluno-info { flex: 1; min-width: 0; }
.aluno-item .aluno-nome { font-weight: 700; font-size: 0.95rem; }
.aluno-item .aluno-meta { font-size: 0.8rem; color: var(--txt-muted); }
.aluno-item .aluno-valor { font-weight: 700; color: var(--clr-success); font-size: 0.9rem; white-space: nowrap; }

/* ââ Financeiro ââ */
.fin-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: all var(--transition);
  cursor: pointer;
}
.fin-item:hover { border-color: rgba(124,58,237,0.3); }
.fin-item .fin-info { flex: 1; min-width: 0; }
.fin-item .fin-desc { font-weight: 600; font-size: 0.9rem; }
.fin-item .fin-data { font-size: 0.75rem; color: var(--txt-muted); }
.fin-item .fin-valor { font-weight: 800; font-size: 1rem; }
.fin-item.pago     .fin-valor { color: var(--clr-success); }
.fin-item.pendente .fin-valor { color: var(--clr-warning); }
.fin-item.atrasado .fin-valor { color: var(--clr-danger); }

/* ââ Loader ââ */
.loader {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 200px; gap: 1rem;
  color: var(--txt-muted);
}

/* ââ Toast / Snackbar ââ */
#toast-container {
  position: fixed; top: 1rem; right: 1rem; left: 1rem;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--clr-bg-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  display: flex; align-items: center; gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
  pointer-events: all;
  font-size: 0.9rem;
}
.toast.success { border-left: 3px solid var(--clr-success); }
.toast.error   { border-left: 3px solid var(--clr-danger); }
.toast.info    { border-left: 3px solid var(--clr-accent); }
@keyframes slideDown {
  from { transform: translateY(-20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ââ Profile ââ */
.profile-hero {
  text-align: center; padding: 2rem 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(124,58,237,0.15) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}
.profile-hero .prof-avatar-wrap {
  position: relative; display: inline-block; margin-bottom: 1rem;
}
.profile-hero .prof-avatar {
  width: 80px; height: 80px; font-size: 2rem;
  border: 3px solid var(--clr-primary);
  box-shadow: var(--shadow-primary);
}
.profile-hero h2 { font-size: 1.3rem; }
.profile-hero p  { font-size: 0.85rem; }

/* ââ Aluno Detail ââ */
.aluno-hero {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
}
.aluno-detail-tabs {
  display: flex; gap: 0.5rem;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.aluno-detail-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 0.6rem 1rem;
  border: none; background: none;
  color: var(--txt-muted); font-family: inherit;
  font-size: 0.85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
}
.tab-btn.active { color: var(--clr-primary); border-bottom-color: var(--clr-primary); }

/* ââ Grade Semanal ââ */
.grade-grid {
  display: grid; gap: 0.5rem;
}
.grade-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.grade-dia {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(124,58,237,0.15);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; color: var(--clr-primary);
  text-transform: uppercase;
  flex-shrink: 0;
}
.grade-dia .grade-dia-num { font-size: 1rem; line-height: 1; }

/* ââ Checkin Action Sheet ââ */
.checkin-actions {
  display: grid; gap: 0.75rem; padding: 1rem 0;
}
.checkin-action-btn {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition);
  font-family: inherit; color: var(--txt-primary);
  width: 100%; text-align: left;
}
.checkin-action-btn:hover { border-color: var(--clr-primary); background: var(--clr-surface-2); }
.checkin-action-btn .action-icon { font-size: 1.5rem; }
.checkin-action-btn .action-text h4 { font-size: 0.95rem; font-weight: 700; }
.checkin-action-btn .action-text p  { font-size: 0.8rem; color: var(--txt-muted); }

/* ââ Divider ââ */
.divider { height: 1px; background: var(--clr-border); margin: 1.25rem 0; }

/* ââ Utilities ââ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.mt-sm { margin-top: 0.5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-sm { margin-bottom: 0.5rem; }
.mb-md { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--txt-muted); font-size: 0.85rem; }
.text-sm { font-size: 0.85rem; }
.font-bold { font-weight: 700; }
.sidebar { display: none; }
.w-full { width: 100%; }

/* â”€â”€ Responsive â”€â”€ */
@media (min-width: 640px) {
  .content { padding: 2rem; padding-bottom: calc(var(--bottom-nav-h) + 2rem); }
  .kpi-grid { gap: 1rem; grid-template-columns: repeat(4, 1fr); }
  .form-row { gap: 1.25rem; }
}

@media (min-width: 768px) {
  .bottom-nav { display: none; }
  .content { padding-bottom: 2rem; }
  /* Sidebar para desktop */
  #app.authenticated { flex-direction: row; }
  .sidebar {
    width: var(--sidebar-w);
    min-height: 100dvh;
    background: var(--clr-bg-2);
    border-right: 1px solid var(--clr-border);
    padding: 1.5rem 1rem;
    display: flex; flex-direction: column; gap: 0.25rem;
    position: sticky; top: 0; height: 100dvh;
    overflow-y: auto;
  }
  .sidebar .nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer; transition: all var(--transition);
    color: var(--txt-muted);
    border: none; background: none;
    font-family: inherit; font-size: 0.9rem; font-weight: 500;
    width: 100%; text-align: left;
  }
  .sidebar .nav-item .nav-icon { font-size: 1.1rem; }
  .sidebar .nav-item:hover,
  .sidebar .nav-item.active {
    color: var(--txt-primary); background: rgba(124,58,237,0.12);
  }
  .sidebar .nav-item.active { color: var(--clr-primary); border: 1px solid rgba(124,58,237,0.2); }
  .sidebar-brand {
    display: flex; align-items: center; gap: 0.75rem;
    font-weight: 800; font-size: 1.1rem; padding: 0.5rem;
    margin-bottom: 1rem; border-bottom: 1px solid var(--clr-border); padding-bottom: 1.25rem;
  }
  .sidebar-brand .logo-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    background: var(--grad-primary); display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; box-shadow: var(--shadow-primary);
  }
  .main-area { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
  .topbar { display: none; }
}
/* --- Calendário Mensal Grade --- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  margin-bottom: 1rem;
}
.calendar-grid .cal-header {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--txt-muted);
  padding-bottom: 0.5rem;
}
.calendar-grid .cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--clr-bg-2);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  position: relative;
}
.calendar-grid .cal-day:not(.disabled):hover {
  border-color: var(--clr-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}
.calendar-grid .cal-day.disabled {
  opacity: 0.3;
  cursor: default;
}
.calendar-grid .cal-day:not(.disabled):active {
  transform: scale(0.95);
}
.calendar-grid .cal-day.selected {
  border-color: var(--clr-primary);
  background: rgba(124, 58, 237, 0.2);
}
.calendar-grid .cal-day.selected .day-badge {
  background: #fff;
  color: var(--clr-primary);
}
.calendar-grid .cal-day .day-num {
  font-weight: 600;
  font-size: 0.95rem;
}
.calendar-grid .cal-day .day-badge {
  background: var(--clr-primary);
  color: #fff;
  border-radius: 10px;
  font-size: 0.65rem;
  padding: 1px 5px;
  margin-top: 2px;
  font-weight: bold;
}

/* --- Grade Semanal Timeline --- */
.weekly-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.weekly-day {
  background: var(--clr-bg-2);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--clr-border);
}
.weekly-day-header {
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.weekly-class-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.weekly-class-item:last-child {
  margin-bottom: 0;
}
.weekly-class-time {
  font-weight: 600;
  color: var(--txt-primary);
  background: rgba(255,255,255,0.05);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  min-width: 60px;
  text-align: center;
}
.weekly-class-info {
  flex: 1;
}
.weekly-class-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.weekly-class-meta {
  font-size: 0.8rem;
  color: var(--txt-muted);
  margin-top: 2px;
}

