/* Camada global de acabamento visual Saber+ */
/* =========================================================
   SABER+ — POLIMENTO VISUAL GLOBAL
   Camada de acabamento: microinterações, profundidade e motion.
   ========================================================= */
:root {
  --saber-glow: 0 12px 34px rgba(91, 61, 245, .16);
  --saber-glow-strong: 0 18px 42px rgba(91, 61, 245, .24);
  --saber-ease: cubic-bezier(.2,.75,.25,1);
}

/* Marca oficial */
.brand { gap: 11px; }
.brand-mark {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px;
  display: inline-block !important;
  overflow: hidden;
  border-radius: 50% !important;
  background: #1b0750 url("/favicon.svg") center / cover no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .35), 0 5px 18px rgba(91, 61, 245, .28) !important;
  transition: transform .35s var(--saber-ease), box-shadow .35s var(--saber-ease);
}
.brand-mark span { display: none !important; }
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.07);
  box-shadow: 0 0 0 2px rgba(168, 85, 247, .25), 0 8px 24px rgba(91, 61, 245, .38) !important;
}
.brand-plus { color: #a855f7 !important; }

/* Cabeçalho mais leve e com acabamento de vidro */
.site-header {
  backdrop-filter: blur(18px) saturate(155%);
  -webkit-backdrop-filter: blur(18px) saturate(155%);
  box-shadow: 0 8px 30px rgba(35, 22, 90, .055);
  transition: background .25s ease, box-shadow .25s ease;
}
.main-nav a { transition: color .22s ease, transform .22s ease; }
.main-nav a:hover { transform: translateY(-2px); }

/* Botões com resposta mais gostosa */
.button, .sp-btn, .search-button, .menu-toggle, .theme-toggle {
  transition: transform .22s var(--saber-ease), box-shadow .22s ease,
              background-color .22s ease, border-color .22s ease, color .22s ease;
}
.button:active, .sp-btn:active, .search-button:active { transform: scale(.97); }
.button-dark, .sp-btn:not(.secondary), .search-button {
  box-shadow: 0 7px 18px rgba(91, 61, 245, .2);
}
.button-dark:hover, .sp-btn:not(.secondary):hover, .search-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 25px rgba(91, 61, 245, .27);
}

/* Superfícies e cartões */
.teacher-card, .info-card, .subject-tile, .page-step, .step,
.auth-card, .dashboard-panel, .dashboard-stat, .booking-item,
.review-item, .notification-item, .admin-user-card, .availability-item,
.dashboard-side, .account-settings, .meeting-panel {
  border-radius: 22px;
  box-shadow: 0 8px 26px rgba(38, 24, 100, .055);
  transition: transform .28s var(--saber-ease), box-shadow .28s ease,
              border-color .28s ease, background-color .28s ease;
}
.teacher-card:hover, .info-card:hover, .subject-tile:hover,
.dashboard-panel:hover, .dashboard-stat:hover, .booking-item:hover,
.review-item:hover, .notification-item:hover, .admin-user-card:hover,
.availability-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--saber-glow);
  border-color: rgba(139, 92, 246, .42);
}
.teacher-avatar, .subject-symbol, .step-icon, .info-icon {
  transition: transform .3s var(--saber-ease), box-shadow .3s ease;
}
.teacher-card:hover .teacher-avatar,
.subject-tile:hover .subject-symbol,
.info-card:hover .info-icon { transform: scale(1.07) rotate(-4deg); }

/* Campos mais claros e consistentes */
input, select, textarea {
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .13), 0 5px 16px rgba(91, 61, 245, .07);
}
.search-form { box-shadow: 0 16px 42px rgba(38, 24, 100, .09); }

/* Hero com movimento ambiente discreto */
.hero { isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 440px; height: 440px;
  right: -140px; top: -190px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(255,255,255,.035), 0 0 0 78px rgba(255,255,255,.025);
  animation: saber-orbit 22s linear infinite;
  pointer-events: none;
}
.hero-copy { animation: saber-rise .75s var(--saber-ease) both; }
.hero-art { animation: saber-rise .9s .12s var(--saber-ease) both; }
.hero .button-large { position: relative; overflow: hidden; }
.hero .button-large::after {
  content: "";
  position: absolute; inset: 0 auto 0 -80%;
  width: 48%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
  transition: left .65s ease;
}
.hero .button-large:hover::after { left: 140%; }

/* Entrada suave no carregamento e listas */
@keyframes saber-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes saber-orbit { to { transform: rotate(360deg); } }
@keyframes saber-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
  50% { box-shadow: 0 0 0 7px rgba(139, 92, 246, .08); }
}
.teacher-card, .subject-tile, .info-card, .dashboard-stat {
  animation: saber-rise .55s var(--saber-ease) both;
}
.teacher-card:nth-child(2), .subject-tile:nth-child(2), .info-card:nth-child(2), .dashboard-stat:nth-child(2) { animation-delay: .06s; }
.teacher-card:nth-child(3), .subject-tile:nth-child(3), .info-card:nth-child(3), .dashboard-stat:nth-child(3) { animation-delay: .12s; }
.teacher-card:nth-child(4), .subject-tile:nth-child(4), .info-card:nth-child(4), .dashboard-stat:nth-child(4) { animation-delay: .18s; }

/* Navegação lateral e estados ativos */
.dashboard-sidebar nav a, .sp-nav a {
  transition: transform .2s var(--saber-ease), color .2s ease, background .2s ease;
}
.dashboard-sidebar nav a:hover, .sp-nav a:hover { transform: translateX(4px); }
.dashboard-sidebar nav a[aria-current="page"],
.dashboard-sidebar nav a.active { box-shadow: 0 7px 18px rgba(15, 10, 55, .12); }

/* Badges, alertas, modais e tabelas */
.approval-pill, .booking-status, .status-pill, .badge, .tag {
  letter-spacing: .01em;
}
.dialog-panel, .profile-dialog, .app-dialog {
  box-shadow: 0 25px 80px rgba(12, 8, 40, .22);
  animation: saber-rise .24s var(--saber-ease) both;
}
table { border-collapse: separate; border-spacing: 0; }
thead th { background: var(--surface-muted, #f6f4ff); }
tbody tr { transition: background-color .18s ease; }
tbody tr:hover { background: rgba(139, 92, 246, .045); }

/* Rodapé */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  right: -110px; top: -190px;
  border: 1px solid rgba(190, 170, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(190,170,255,.035), 0 0 0 58px rgba(190,170,255,.025);
  pointer-events: none;
}

/* Modo escuro: superfícies e brilhos ajustados */
body.site-dark .site-header {
  background: rgba(15, 21, 39, .86);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
}
body.site-dark .teacher-card, body.site-dark .info-card,
body.site-dark .subject-tile, body.site-dark .page-step,
body.site-dark .step, body.site-dark .auth-card,
body.site-dark .dashboard-panel, body.site-dark .dashboard-stat,
body.site-dark .booking-item, body.site-dark .review-item,
body.site-dark .notification-item, body.site-dark .admin-user-card,
body.site-dark .availability-item {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
}
body.site-dark .teacher-card:hover, body.site-dark .info-card:hover,
body.site-dark .subject-tile:hover, body.site-dark .dashboard-panel:hover,
body.site-dark .dashboard-stat:hover {
  box-shadow: 0 16px 38px rgba(0, 0, 0, .28), 0 0 0 1px rgba(168, 139, 250, .18);
}
body.site-dark .brand-mark {
  box-shadow: 0 0 0 1px rgba(168, 85, 247, .42), 0 0 22px rgba(139, 92, 246, .32) !important;
}
body.site-dark .search-form { box-shadow: 0 16px 42px rgba(0, 0, 0, .2); }

/* Acessibilidade: respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@media (max-width: 820px) {
  .site-header { padding-inline: 18px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 39px !important; height: 39px !important; flex-basis: 39px; }
  .hero::before { width: 300px; height: 300px; right: -180px; }
}
