/* ==========================================================================
   STUDIO DO CORPO - DESIGN SYSTEM & STYLES
   Paleta oficial baseada na marca: Verde Floresta, Azul Oceano, Ciano e Índigo
   ========================================================================== */

:root {
  /* Cores da Identidade Visual Oficial */
  --brand-forest: #1b4d37;
  --brand-forest-dark: #123526;
  --brand-forest-light: #286b4d;
  --brand-ocean: #0284c7;
  --brand-ocean-dark: #0369a1;
  --brand-ocean-light: #38bdf8;
  --brand-indigo: #484b8e;
  --brand-leaf: #2e7d5a;
  
  /* Tons Neutros & Fundos */
  --bg-main: #f8faf9;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f3;
  --bg-dark: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #f8fafc;
  
  /* Bordas e Sombras */
  --border-color: #e2e8f0;
  --border-focus: #0284c7;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(27, 77, 55, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(2, 132, 199, 0.25);
  
  /* Status Colors */
  --status-present: #10b981;
  --status-absent: #ef4444;
  --status-makeup: #f59e0b;
  --status-scheduled: #0284c7;
  
  /* Dimensões */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
  --container-max: 1200px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-main);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Tipografia */
h1, h2, h3, h4, .brand-font {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.85rem;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-tag.green {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2.35rem;
  margin-bottom: 1rem;
  color: #0f172a;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-forest) 0%, var(--brand-leaf) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(27, 77, 55, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-forest-dark) 0%, var(--brand-forest) 100%);
  box-shadow: 0 6px 20px rgba(27, 77, 55, 0.35);
  transform: translateY(-2px);
}

.btn-ocean {
  background: linear-gradient(135deg, var(--brand-ocean) 0%, var(--brand-ocean-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.btn-ocean:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-surface);
  border-color: var(--brand-forest);
  color: var(--brand-forest);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
  background: #1eb956;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Header Institucional */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all var(--transition-normal);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.nav-brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-brand-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.nav-brand-subtitle {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #64748b;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  background: #f1f5f9;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.88rem;
  color: #475569;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-team-portal {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-team-portal:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #0f172a;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-toggle:hover {
  background: #e2e8f0;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 4.5rem 0 5rem;
  background: radial-gradient(circle at 10% 20%, rgba(27, 77, 55, 0.05) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(27, 77, 55, 0.06) 0%, transparent 45%),
              var(--bg-main);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 1.35rem;
}

.hero-title span.highlight-brand {
  color: #0f172a;
  text-decoration: underline;
  text-decoration-color: #1b4d37;
  text-underline-offset: 6px;
}

.hero-description {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.2rem;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-stat-item {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-visual {
  position: relative;
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 6px solid #ffffff;
}

.hero-image-card img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-image-card:hover img {
  transform: scale(1.03);
}

.hero-floating-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  animation: floatAnim 4s ease-in-out infinite;
}

.hero-floating-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Espaços e Especialidades */
.spaces-section {
  padding: 6rem 0;
  background: #ffffff;
}

.spaces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
}

.space-card {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.space-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.space-image-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.space-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.space-card:hover .space-image-wrapper img {
  transform: scale(1.05);
}

.space-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  backdrop-filter: blur(8px);
}

.space-badge.pilates,
.space-badge.consultorio {
  background: rgba(15, 23, 42, 0.85);
}

.space-card-body {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.space-card-body h3 {
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.space-card-body p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.space-features {
  list-style: none;
  margin-bottom: 2rem;
  margin-top: auto;
}

.space-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* Diferenciais */
.benefits-section {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg-main) 0%, #edf4f0 100%);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 2.2rem 1.8rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.benefit-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #f1f5f9 !important;
  color: #334155 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 1.3rem;
}

.benefit-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: #0f172a;
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Contato e Localização */
.contact-section {
  padding: 6rem 0;
  background: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

.contact-info-card {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-detail-list {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.contact-detail-text h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.contact-detail-text p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.contact-detail-text a {
  font-size: 0.92rem;
  color: #0f172a;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #cbd5e1;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.contact-detail-text a:hover {
  color: var(--brand-forest);
  text-decoration-color: var(--brand-forest);
}

.map-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  position: relative;
  min-height: 420px;
  background: #e2e8f0;
}

.map-card iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

/* Footer */
.site-footer {
  background: var(--brand-forest-dark);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand h4 {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #94a3b8;
  max-width: 360px;
}

.footer-links h5 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #64748b;
}

/* Botão Flutuante de WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  z-index: 999;
  transition: all var(--transition-normal);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   SISTEMA DE GESTÃO (APP) — DESIGN SYSTEM GEOMÉTRICO E ALINHADO
   ========================================================================== */
.app-body {
  background-color: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container de Enquadramento Global da Aplicação */
.app-shell-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  flex: 1;
}

/* Banner de Topo Padronizado para Telas Internas */
.app-page-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

/* Barra Superior Fixa */
.app-header-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  min-height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.app-brand-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.app-brand-area img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.app-brand-text {
  display: flex;
  flex-direction: column;
}

.app-brand-title {
  font-weight: 800;
  font-size: 1.12rem;
  color: #1b4d37;
  line-height: 1.1;
  white-space: nowrap;
}

.app-brand-subtitle {
  font-size: 0.7rem;
  color: #0284c7;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.app-header-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}

.app-user-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: #f1f5f9;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
  max-width: 260px;
}

.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-forest);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.app-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-role {
  font-size: 0.7rem;
  color: var(--brand-ocean-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sub-Header com Segmented Control (Abas) */
.app-nav-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  position: relative;
  z-index: 90;
}

.app-nav-wrapper .app-shell-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.app-nav-wrapper .app-shell-container::-webkit-scrollbar {
  display: none;
}

.nav-segmented-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
}

.tab-btn.active {
  background: #ffffff;
  color: var(--brand-forest-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.tab-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.tab-link-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
}

.tab-link-btn.active {
  background: #ffffff;
  color: var(--brand-forest-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.nav-perm-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nav-perm-badge.financeiro {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.nav-perm-badge.configuracoes {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

/* Toolbar e Cabeçalhos de Seção */
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Grid de Turmas de Pilates */
.pilates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.card-turma {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.card-turma:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 20px -3px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.card-turma-top {
  padding: 1.1rem 1.4rem;
  background: #fafcfb;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.turma-time {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-forest-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.turma-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.turma-badge.full {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}

.card-turma-body {
  padding: 1.25rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.card-turma-sub {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Slots Padronizados de Alunos (Altura Fixa e Alinhamento Perfeito) */
.student-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.student-slot {
  height: 48px;
  border-radius: 10px;
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease;
}

.student-slot.filled {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.student-slot.filled:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.student-slot.empty {
  border: 1.5px dashed #cbd5e1;
  background: transparent;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.student-slot.empty:hover {
  border-color: var(--brand-forest);
  color: var(--brand-forest);
  background: rgba(27, 77, 55, 0.04);
}

.student-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.student-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-group {
  display: inline-flex;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 8px;
  gap: 2px;
}

.badge-btn {
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
  background: transparent;
  color: #64748b;
  transition: all 0.15s ease;
}

.badge-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #1e293b;
}

.badge-btn.present.active {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3);
}

.badge-btn.absent.active {
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.3);
}

.badge-btn.makeup.active {
  background: #f59e0b;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.3);
}

.btn-remove-slot {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.btn-remove-slot:hover {
  color: #ef4444;
}

.card-turma-footer {
  padding: 0.85rem 1.4rem;
  background: #fafcfb;
  border-top: 1px solid #edf2f7;
}

/* Consultórios Dual-Column */
.consultorios-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.consultorio-panel {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.consultorio-panel-header {
  padding: 1.25rem 1.5rem;
  background: #fafcfb;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.consultorio-panel-header.c1 {
  border-top: 4px solid var(--brand-forest);
}

.consultorio-panel-header.c2 {
  border-top: 4px solid var(--brand-ocean);
}

.agenda-items {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agenda-card {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.agenda-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.agenda-time-pill {
  background: #e2e8f0;
  color: var(--brand-forest-dark);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  min-width: 68px;
  text-align: center;
  flex-shrink: 0;
}

.agenda-desc {
  flex: 1;
}

.agenda-desc h5 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.2rem;
}

.agenda-desc p {
  font-size: 0.82rem;
  color: #64748b;
}

.chip-status {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  flex-shrink: 0;
}

.chip-status.agendado {
  background: rgba(2, 132, 199, 0.1);
  color: var(--brand-ocean-dark);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.chip-status.atendimento {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.chip-status.concluido {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Tabela de Alunos e Listagens Gerais */
.table-container {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  width: 100%;
}

.table-toolbar {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fafcfb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-input-wrapper {
  position: relative;
  min-width: 320px;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.6rem;
  border-radius: var(--radius-full);
  border: 1px solid #cbd5e1;
  font-size: 0.9rem;
  background: #ffffff;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--brand-ocean);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th {
  background: #f8fafc;
  padding: 0.95rem 1.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.data-table td {
  padding: 1.1rem 1.4rem;
  font-size: 0.92rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #fafcfb;
}

/* Itens da Tabela de Alunos */
.student-phone-link {
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
}
.student-phone-link:hover {
  text-decoration: underline;
}
.student-actions-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.student-actions-wrap .btn .btn-icon {
  font-size: 0.82rem;
}

/* ==========================================================================
   PAGINAÇÃO DA TABELA (ALUNOS / LISTAS)
   ========================================================================== */
.table-pagination {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  background: #fafcfb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 500;
}

.pagination-info strong {
  color: #1e293b;
  font-weight: 700;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.page-btn.active {
  background: #1b4d37;
  border-color: #1b4d37;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(27, 77, 55, 0.25);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #94a3b8;
}

.page-btn.ellipsis {
  border: none;
  background: transparent;
  cursor: default;
  color: #94a3b8;
  font-weight: 700;
  min-width: 24px;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #64748b;
}

.page-size-selector select {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
}

.page-size-selector select:focus {
  outline: none;
  border-color: #1b4d37;
  box-shadow: 0 0 0 3px rgba(27, 77, 55, 0.1);
}

@media (max-width: 640px) {
  .table-pagination {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }
  .pagination-nav {
    justify-content: center;
    width: 100%;
  }
  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
    padding: 0 0.4rem;
  }
}

/* Indicadores / Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: #ffffff;
  padding: 1.6rem;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.green {
  background: rgba(27, 77, 55, 0.1);
  color: var(--brand-forest);
}

.stat-icon.blue {
  background: rgba(2, 132, 199, 0.1);
  color: var(--brand-ocean);
}

.stat-icon.indigo {
  background: rgba(72, 75, 142, 0.1);
  color: var(--brand-indigo);
}

.stat-info h3 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.stat-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Modais de Cadastro e Manutenção — Padrão Geométrico e Esquadro */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: min(90vh, 90dvh);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.3);
  overflow: hidden;
  border: 1px solid #e2e8f0;
  position: relative;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

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

/* Suporte a formulários como filhos diretos do modal */
.modal-box > form,
.modal-box form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Faixa de acento no topo do modal */
.modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-forest) 0%, var(--brand-ocean) 100%);
  z-index: 20;
}

.modal-box.modal-pilates::before {
  background: linear-gradient(90deg, var(--brand-forest) 0%, var(--brand-leaf) 100%);
}

.modal-box.modal-consultorio::before {
  background: linear-gradient(90deg, var(--brand-ocean) 0%, var(--brand-ocean-dark) 100%);
}

.modal-head {
  padding: 1.35rem 1.75rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafcfb;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.modal-head-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.modal-icon-badge.green {
  background: rgba(27, 77, 55, 0.1);
  color: var(--brand-forest);
}

.modal-icon-badge.blue {
  background: rgba(2, 132, 199, 0.1);
  color: var(--brand-ocean);
}

.modal-icon-badge.purple {
  background: rgba(72, 75, 142, 0.1);
  color: var(--brand-indigo);
}

.modal-head h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}

.modal-head p {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 1.1rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
  transform: rotate(90deg);
}

.modal-main {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  background: #ffffff;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.modal-main::-webkit-scrollbar {
  width: 6px;
}
.modal-main::-webkit-scrollbar-track {
  background: transparent;
}
.modal-main::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Grid de Formulários em 2 Colunas Perfeitas */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.form-group label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-group label span.req {
  color: #dc2626;
}

.form-control {
  height: 44px;
  width: 100%;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  padding: 0 1rem;
  font-size: 0.92rem;
  color: #1e293b;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

textarea.form-control {
  height: auto;
  min-height: 85px;
  padding: 0.75rem 1rem;
  resize: vertical;
  line-height: 1.5;
}

select.form-control {
  cursor: pointer;
}

.form-control:focus {
  border-color: var(--brand-ocean);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  background: #ffffff;
}

.form-hint {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

.modal-foot {
  padding: 1rem 1.75rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Responsividade Geral */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .contact-grid, .consultorios-container {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.15rem;
  }
  .hero-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hero-image-card img {
    height: 320px;
  }

  /* Header e Shell do App no Mobile */
  .app-header-bar {
    min-height: 60px;
    height: 60px;
  }
  .app-shell-container {
    padding: 0 1rem;
    gap: 0.5rem;
  }
  .app-brand-area img {
    height: 36px;
  }
  .app-brand-title {
    font-size: 0.98rem;
  }
  .app-brand-subtitle {
    display: none;
  }
  #currentDateDisplay, .app-header-date {
    display: none;
  }
  .app-user-badge {
    padding: 0.25rem 0.65rem;
    max-width: 170px;
  }
  .app-user-role {
    display: none;
  }
  .app-user-name {
    max-width: 105px;
  }
  .btn-text-hide-mobile {
    display: none;
  }
  .btn-header-site, .btn-header-logout {
    padding: 0.45rem 0.65rem;
    min-width: 38px;
    height: 38px;
    justify-content: center;
  }

  /* Abas com Rolagem Suave */
  .app-nav-wrapper {
    padding: 0.4rem 0;
  }
  .app-nav-wrapper .app-shell-container {
    padding: 0 1rem;
  }
  .tab-link-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Conteúdo Geral */
  .app-container {
    padding: 1.25rem 1rem 3rem;
  }
  .pilates-grid {
    grid-template-columns: 1fr !important;
  }

  /* Alternância de Filtros no Histórico (Mobile & Telas Pequenas) */
  .attendance-filter-mobile-btn {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.15rem;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .attendance-filter-mobile-btn:hover,
  .attendance-filter-mobile-btn:active {
    background: #f8fafc;
  }

  .attendance-filter-card.is-open .attendance-filter-mobile-btn {
    border-bottom: 1px solid #f1f5f9;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: #f8fafc;
  }

  .filter-mobile-btn-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    min-width: 0;
  }

  .filter-mobile-icon {
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .filter-mobile-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
  }

  .filter-active-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-full, 9999px);
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .filter-mobile-btn-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
  }

  .filter-mobile-action-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0284c7;
    white-space: nowrap;
  }

  .filter-mobile-chevron {
    font-size: 0.95rem;
    color: #64748b;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
  }

  .attendance-filter-card.is-open .filter-mobile-chevron {
    transform: rotate(180deg);
  }

  /* Fechado por padrão no Mobile */
  .attendance-filter-collapsible {
    display: none !important;
  }

  /* Exibido com animação suave quando expandido */
  .attendance-filter-card.is-open .attendance-filter-collapsible {
    display: block !important;
    animation: filterSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes filterSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 540px) {
  .navbar {
    height: 62px;
    gap: 0.5rem;
  }
  .nav-brand {
    gap: 0.6rem;
  }
  .nav-brand-logo {
    height: 36px;
  }
  .nav-brand-subtitle {
    display: none;
  }
  .nav-brand-title {
    font-size: 0.96rem;
    white-space: nowrap;
  }
  .mobile-toggle {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
    flex-shrink: 0;
  }
  .btn-team-text {
    display: none;
  }
  .btn-team-portal {
    padding: 0.45rem 0.6rem;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-description {
    font-size: 0.95rem;
  }
  .hero-floating-card {
    position: static;
    margin-top: 1rem;
    animation: none;
  }

  /* Header Compacto - Mostra Apenas Avatar e Botão Sair */
  .app-shell-container {
    padding: 0 0.75rem;
  }
  .app-brand-area img {
    height: 32px;
  }
  .app-brand-title {
    font-size: 0.92rem;
  }
  .app-user-name {
    display: none;
  }
  .app-user-badge {
    padding: 0;
    background: transparent;
    border: none;
    max-width: none;
  }
  .app-avatar {
    width: 34px;
    height: 34px;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px #0284c7;
  }
  .btn-header-site {
    display: none;
  }
  .btn-header-logout {
    padding: 0;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Abas do App em Telas Estreitas */
  .app-nav-wrapper .app-shell-container {
    padding: 0 0.75rem;
  }
  .tab-link-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }
  .tab-link-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Container Geral */
  .app-container {
    padding: 1rem 0.75rem 2.5rem;
  }

  /* Banners de Tela */
  .app-page-banner {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .app-page-banner h2 {
    font-size: 1.25rem !important;
  }
  .app-page-banner .btn {
    width: 100%;
    justify-content: center;
  }

  /* Tabelas Responsivas com Rolagem Touch Suave */
  .table-container {
    border-radius: 12px;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  .table-toolbar {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .search-input-wrapper {
    min-width: 0 !important;
    width: 100% !important;
  }
  .data-table {
    min-width: 680px !important;
  }
  .data-table th, .data-table td {
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
  }

  /* Estatísticas do Topo Modernizadas no Mobile (Enquadramento Perfeito 2x2) */
  .attendance-stats-card {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    padding: 0.85rem !important;
    border-radius: 14px !important;
    margin-bottom: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .stats-hero-block {
    padding: 0.85rem 0.95rem !important;
    gap: 0.55rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .stats-hero-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.95rem !important;
  }

  .stats-hero-label {
    font-size: 0.85rem !important;
  }
  .stats-hero-sublabel {
    display: none !important;
  }

  .stats-hero-val {
    font-size: 1.55rem !important;
  }

  .stats-meter-track {
    height: 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 4 métricas organizadas em grid 2x2 harmonioso e contido no celular */
  .stats-tiles-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.55rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .stat-tile {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.65rem 0.75rem !important;
    border-radius: 10px !important;
    gap: 0.35rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .stat-tile-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.35rem !important;
  }

  .stat-tile-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.82rem !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
  }

  .stat-tile-num {
    font-size: 1.22rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
  }

  .stat-tile-label {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  /* Financeiro KPIs no Celular */
  .financial-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
  }
  .fin-kpi-card {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
  }
  .fin-kpi-val {
    font-size: 1.22rem;
  }
  .fin-kpi-label {
    font-size: 0.72rem;
  }
  .fin-kpi-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  /* Turmas de Pilates */
  .pilates-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .card-turma-top {
    padding: 0.85rem 1rem;
  }
  .card-turma-body {
    padding: 1rem;
  }
  .card-turma-footer {
    padding: 0.75rem 1rem;
  }
  .student-slot {
    padding: 0 0.65rem;
  }
  .student-title {
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.4rem;
  }
  .badge-btn {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }

  /* Controles Mobile do Pilates: Oculta barras de botões e exibe Comboboxes elegantes */
  .pilates-weekdays-bar {
    display: none !important;
  }
  .pilates-shift-bar {
    display: none !important;
  }
  .pilates-mobile-controls-card {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }
  @media (max-width: 520px) {
    .pilates-mobile-controls-card {
      grid-template-columns: 1fr !important;
      gap: 0.65rem;
    }
  }
  .pilates-mobile-control-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
  }
  .pilates-mobile-control-field label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
  }
  .pilates-mobile-select {
    width: 100% !important;
    box-sizing: border-box;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    min-height: 42px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .pilates-mobile-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  }

  /* Filtros e Responsividade do Histórico */
  .attendance-filter-card {
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }
  .attendance-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 1rem;
  }
  .filter-field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
  }
  .filter-field label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 700;
  }
  .filter-select {
    width: 100% !important;
    box-sizing: border-box;
    padding: 0.6rem 0.85rem;
    font-size: 0.88rem;
    min-height: 42px;
  }
  .filter-field.search-flex {
    min-width: 0;
    width: 100%;
  }
  .filter-field.search-flex input {
    width: 100% !important;
    box-sizing: border-box;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.88rem !important;
    min-height: 42px;
  }
  .attendance-sub-toolbar {
    padding: 0.85rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .attendance-sub-toolbar > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }
  #btnClearAttFilters {
    width: 100%;
    text-align: center;
    padding: 0.55rem 1rem;
    font-size: 0.84rem;
  }

  /* Spotlight Card no Mobile */
  .student-spotlight-card {
    flex-direction: column;
    align-items: stretch;
    padding: 1.15rem 1rem;
    gap: 1rem;
  }
  .spotlight-info-left {
    gap: 0.85rem;
  }
  .spotlight-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }
  .spotlight-stats {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .spotlight-progress-wrap {
    min-width: 0;
    width: 100%;
  }
  .spotlight-stat-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }
  .spotlight-stat-pills .stat-chip {
    justify-content: center;
    font-size: 0.74rem;
    padding: 0.35rem 0.4rem;
    text-align: center;
  }
  .spotlight-stats > div:last-child {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .spotlight-stats > div:last-child .btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
  }

  /* Lista Mobile do Histórico: Apenas Aluno, Data, Horário/Turma e Status */
  #tab-historico .table-container {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible !important;
    padding: 0;
  }

  #tab-historico .data-table {
    min-width: 0 !important;
    width: 100% !important;
    display: block;
    background: transparent;
    border: none;
  }

  #tab-historico .data-table thead {
    display: none !important;
  }

  #tab-historico .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: 100%;
  }

  /* Item da lista mobile (Card compacto em 2 linhas limpas) */
  #tab-historico .data-table tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "student student status"
      "date    class   action";
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    gap: 0.35rem 0.55rem;
    transition: box-shadow 0.15s ease;
  }

  #tab-historico .data-table tr:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  }

  #tab-historico .data-table td {
    display: flex !important;
    align-items: center;
    border: none !important;
    padding: 0 !important;
    background: transparent;
    min-width: 0;
  }

  /* Oculta pseudo-labels "ALUNO:", "DATA:" para exibição limpa de lista nativa */
  #tab-historico .data-table td::before {
    display: none !important;
  }

  /* 1. Nome do Aluno */
  #tab-historico .col-att-student {
    grid-area: student;
    font-size: 0.93rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-historico .att-student-name {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 2. Status */
  #tab-historico .col-att-status {
    grid-area: status;
    justify-self: end;
  }
  #tab-historico .col-att-status .status-pill {
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    white-space: nowrap;
  }

  /* 3. Data do Histórico */
  #tab-historico .col-att-date {
    grid-area: date;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
  }

  /* 4. Horário / Turma */
  #tab-historico .col-att-class {
    grid-area: class;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-historico .col-att-class .turma-badge {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Ação de Excluir do Master (Discreta no canto inferior direito) */
  #tab-historico .col-master-action {
    grid-area: action;
    justify-self: end;
  }
  #tab-historico .att-btn-delete {
    padding: 0.18rem 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ef4444;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
  }

  /* Ocultar do mobile as informações secundárias (exibindo apenas Aluno, Data, Turma e Status) */
  #tab-historico .col-att-recorder,
  #tab-historico .col-att-notes {
    display: none !important;
  }

  /* Estado Vazio */
  #tab-historico .data-table td.att-empty-state {
    grid-column: 1 / -1 !important;
    display: block !important;
    text-align: center;
    padding: 2.5rem 1rem !important;
    background: #ffffff;
    border-radius: 12px;
    color: #94a3b8;
  }

  #tab-historico .table-pagination {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 0.5rem;
  }

  /* Banner do Usuário Master */
  .master-header-banner {
    padding: 1.25rem 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .master-header-banner .btn {
    width: 100%;
    justify-content: center;
  }

  /* ==========================================================================
     TELA DE ALUNOS - RESPONSIVIDADE MOBILE & CARDS EXPANSÍVEIS
     ========================================================================== */
  #tab-alunos .table-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  #tab-alunos .table-toolbar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 0.85rem 1rem !important;
    margin-bottom: 0.75rem !important;
  }
  #tab-alunos .table-toolbar > div:last-child {
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  #tab-alunos .data-table {
    min-width: 0 !important;
    width: 100% !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
  }

  #tab-alunos .data-table thead {
    display: none !important;
  }

  #tab-alunos .data-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  /* Card do Aluno no Mobile: Apenas Nome, Telefone e Botões com Ícones */
  #tab-alunos .student-table-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "name  acts"
      "phone acts" !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.75rem 0.95rem !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    gap: 0.25rem 0.75rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  }

  #tab-alunos .student-table-row:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05) !important;
  }

  /* Células visíveis no mobile (Nome, Telefone e Ações) */
  #tab-alunos .student-table-row td.col-student-name,
  #tab-alunos .student-table-row td.col-student-phone,
  #tab-alunos .student-table-row td.col-student-actions {
    display: flex !important;
    align-items: center !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    min-width: 0 !important;
  }

  /* 1. Nome do Aluno */
  #tab-alunos .col-student-name {
    grid-area: name !important;
    min-width: 0 !important;
  }
  #tab-alunos .student-name-text {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    display: block !important;
  }

  /* 2. Telefone */
  #tab-alunos .col-student-phone {
    grid-area: phone !important;
    min-width: 0 !important;
  }
  #tab-alunos .student-phone-link {
    color: #0284c7 !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #tab-alunos .student-phone-link:hover {
    text-decoration: underline !important;
  }

  /* 3. Ações (Apenas ícones no mobile) */
  #tab-alunos .col-student-actions {
    grid-area: acts !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-shrink: 0 !important;
  }
  #tab-alunos .student-actions-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
  }
  #tab-alunos .student-actions-wrap .btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 1.05rem !important;
    line-height: 1 !important;
    margin: 0 !important;
  }
  #tab-alunos .student-actions-wrap .btn-text {
    display: none !important;
  }

  /* Ocultar do Mobile: Modalidade, Status, Observações e Excluir */
  #tab-alunos .student-table-row td.col-student-modality,
  #tab-alunos .student-table-row td.col-student-status,
  #tab-alunos .student-table-row td.col-student-notes,
  #tab-alunos .student-table-row td.col-student-actions .btn-delete-student,
  #tab-alunos td.col-student-modality,
  #tab-alunos td.col-student-status,
  #tab-alunos td.col-student-notes,
  #tab-alunos .col-student-modality,
  #tab-alunos .col-student-status,
  #tab-alunos .col-student-notes,
  #tab-alunos .btn-delete-student {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }

  /* Estado vazio no mobile */
  #tab-alunos .data-table tr td[colspan] {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 2.5rem 1rem !important;
    box-sizing: border-box !important;
  }

  /* Paginação de Alunos no Mobile */
  #tab-alunos .table-pagination {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-top: 0.65rem !important;
    padding: 0.75rem 1rem !important;
    flex-direction: column !important;
    gap: 0.6rem !important;
    align-items: center !important;
  }

  /* Modais de Cadastro e Gestão — Enquadramento Perfeito */
  .modal-overlay {
    padding: 0.5rem;
    align-items: center;
  }
  .modal-box {
    max-width: 100%;
    max-height: min(92vh, 92dvh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    margin: 0;
  }
  .modal-box > form,
  .modal-box form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .modal-head {
    padding: 1rem 1.25rem;
    flex-shrink: 0;
  }
  .modal-main {
    padding: 1.15rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }
  .modal-foot {
    padding: 0.85rem 1.25rem;
    flex-shrink: 0;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  .modal-foot .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }
}
/* ==========================================================================
   TELA DE LOGIN (LOGIN.HTML)
   ========================================================================== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(27, 77, 55, 0.12) 0%, transparent 40%),
              #f8faf9;
  padding: 1.5rem;
}

.login-wrapper {
  width: 100%;
  max-width: 460px;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  box-shadow: 0 20px 25px -5px rgba(27, 77, 55, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-forest) 0%, var(--brand-ocean) 100%);
}

.login-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.login-brand img {
  height: 60px;
  width: auto;
  margin: 0 auto 0.8rem;
}

.login-brand h2 {
  font-size: 1.35rem;
  color: var(--brand-forest-dark);
  font-weight: 800;
  line-height: 1.2;
}

.login-brand p {
  font-size: 0.82rem;
  color: var(--brand-ocean-dark);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.login-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
  margin-bottom: 0.5rem;
}

.login-alert.error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.quick-login-box {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.quick-login-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-align: center;
}

.quick-login-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-pill {
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.quick-pill:hover {
  background: #ffffff;
  border-color: var(--brand-ocean);
  color: var(--brand-ocean-dark);
  box-shadow: var(--shadow-sm);
  transform: translateX(2px);
}

.quick-pill span.role-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(2, 132, 199, 0.1);
  color: var(--brand-ocean-dark);
  font-weight: 700;
}

/* Estilos de Primeiro Acesso e Redefinição de Senha */
.first-access-banner {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.first-access-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.first-access-text h3 {
  font-size: 0.96rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 0.25rem;
}
.first-access-text p {
  font-size: 0.82rem;
  color: #15803d;
  line-height: 1.4;
  margin: 0;
}
.password-requirements-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}
.password-requirements-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.pwd-req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pwd-req-item {
  font-size: 0.78rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: color var(--transition-fast);
}
.pwd-req-item.valid {
  color: #15803d;
  font-weight: 600;
}
.pwd-req-item.invalid {
  color: #94a3b8;
}
.pwd-req-item .check-icon {
  font-size: 0.85rem;
  display: inline-block;
  width: 14px;
}

/* Indicador de Status da Senha na Tabela de Colaboradores */
.pwd-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}
.pwd-status-badge.pending {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.pwd-status-badge.active {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   MÓDULO: TURNOS DO PILATES (06:00 ÀS 20:00) & INSTRUTORES
   ========================================================================== */
.pilates-shift-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.shift-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shift-filter-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 0.4rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
}

.shift-filter-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.shift-filter-btn.active {
  background: #1b4d37;
  border-color: #1b4d37;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(27, 77, 55, 0.25);
}

.shift-badge {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-weight: 800;
}

.shift-filter-btn.active .shift-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.shift-filter-btn.shift-filter-btn-available {
  border-color: #a7f3d0;
  color: #065f46;
  background: #ecfdf5;
}

.shift-filter-btn.shift-filter-btn-available:hover {
  background: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
}

.shift-filter-btn.shift-filter-btn-available.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}

.shift-filter-btn.shift-filter-btn-available .shift-badge {
  background: #d1fae5;
  color: #065f46;
}

.shift-filter-btn.shift-filter-btn-available.active .shift-badge {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.team-instructors-badge {
  font-size: 0.82rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8fafc;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.team-instructors-badge strong {
  color: #1b4d37;
}

/* ==========================================================================
   MÓDULO: HISTÓRICO - ESTATÍSTICAS INTEGRADAS DO TOPO
   ========================================================================== */
.attendance-stats-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.stats-hero-block {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 1px solid #a7f3d0;
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}

.stats-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stats-hero-label-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stats-hero-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stats-hero-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.stats-hero-sublabel {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.stats-hero-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stats-hero-badge.badge-green {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.stats-hero-badge.badge-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.stats-hero-badge.badge-red {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.stats-hero-val-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stats-hero-val {
  font-size: 2rem;
  font-weight: 800;
  color: #059669;
  line-height: 1;
}

.stats-meter-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stats-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* Grade com as 4 métricas secundárias */
.stats-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

.stat-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.55rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.stat-tile.total {
  background: #f0f9ff;
  border-color: #bae6fd;
}
.stat-tile.present {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.stat-tile.absent {
  background: #fef2f2;
  border-color: #fecaca;
}
.stat-tile.makeup {
  background: #fffbeb;
  border-color: #fde68a;
}

.stat-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-tile-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}

.stat-tile.total .stat-tile-icon {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
}
.stat-tile.present .stat-tile-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #059669;
}
.stat-tile.absent .stat-tile-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}
.stat-tile.makeup .stat-tile-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #d97706;
}

.stat-tile-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.stat-tile-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Spotlight Card do Aluno Selecionado */
.student-spotlight-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #1b4d37;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.spotlight-info-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.spotlight-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1b4d37 0%, #2e7d5a 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(27, 77, 55, 0.25);
}

.spotlight-details h3 {
  font-size: 1.35rem;
  color: #1e293b;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.spotlight-details p {
  color: #64748b;
  font-size: 0.86rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.spotlight-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.spotlight-progress-wrap {
  min-width: 180px;
}

.spotlight-progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.35rem;
}

.spotlight-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.spotlight-stat-pills {
  display: flex;
  gap: 0.5rem;
}

.stat-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.stat-chip.p {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.stat-chip.f {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.stat-chip.r {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* Card de Filtros e Toolbars do Histórico */
.attendance-filter-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

/* No Desktop (> 768px): Botão mobile oculto, filtros sempre visíveis */
@media (min-width: 769px) {
  .attendance-filter-mobile-btn {
    display: none !important;
  }

  .attendance-filter-collapsible {
    display: block !important;
  }
}

.attendance-filter-toolbar {
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  border-bottom: 1px solid #f1f5f9;
}

.attendance-sub-toolbar {
  padding: 0.85rem 1.5rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.att-btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ef4444;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.att-btn-delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.att-btn-del-icon {
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #475569;
}

.filter-field.search-flex {
  flex: 1;
  min-width: 220px;
}

.filter-select {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.85rem;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Status Pills na Tabela */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status-pill.present {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-pill.absent {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.status-pill.makeup {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.status-pill.justified {
  background: #fff7ed;
  color: #ea580c;
  border: 1px solid #fed7aa;
}

.status-pill.absent_makeup {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Impressão Limpa para Relatório */
@media print {
  .app-header-bar,
  .app-nav-wrapper,
  .pilates-shift-bar,
  .attendance-filter-toolbar,
  .modal-overlay,
  #btnPrintAttReport,
  #btnOpenManualAttModal,
  #btnClearAttFilters,
  .btn-remove-slot {
    display: none !important;
  }

  body {
    background: #ffffff !important;
  }

  .app-container {
    padding: 0 !important;
  }

  .tab-view {
    display: block !important;
  }

  #tab-pilates, #tab-consultorios, #tab-alunos, #tab-resumo {
    display: none !important;
  }

  #tab-historico {
    display: block !important;
  }

  .table-container {
    border: none !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   MÓDULO: FINANCEIRO & CONTABILIDADE (ISOLADO E RESTRITO)
   ========================================================================== */
.financial-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.fin-kpi-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  position: relative;
  overflow: hidden;
}

.fin-kpi-card.highlight {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.fin-kpi-card.warning {
  border-color: #fde68a;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.fin-kpi-card.primary {
  border-color: #bae6fd;
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.fin-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  flex-shrink: 0;
}

.fin-kpi-icon.revenue {
  background: #ecfdf5;
  color: #059669;
}

.fin-kpi-icon.paid {
  background: #e0f2fe;
  color: #0284c7;
}

.fin-kpi-icon.pending {
  background: #fffbeb;
  color: #d97706;
}

.fin-kpi-icon.average {
  background: #f1f5f9;
  color: #475569;
}

.fin-kpi-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fin-kpi-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 0.2rem;
}

/* Status de Pagamento */
.payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.payment-badge.paid {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.payment-badge.pending {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.payment-badge.overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-whatsapp-remind {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-whatsapp-remind:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.btn-pay-action {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pay-action:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

/* ==========================================================================
   MÓDULO: CONFIGURAÇÕES DO USUÁRIO MASTER & GESTÃO DE COLABORADORES
   ========================================================================== */
.master-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 1.75rem 2rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: 0 4px 15px rgba(15, 23, 42, 0.15);
}

.badge-financial-access {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-financial-access.allowed {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.badge-financial-access.blocked {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.perm-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.perm-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.perm-pill.fin {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.perm-pill.master {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

/* Matriz de Permissões no Modal */
.permission-matrix-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.perm-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eef2f6;
}

.perm-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.perm-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #1b4d37;
}

.perm-desc-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.perm-desc-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 0.1rem;
}

/* Toast Animation */
@keyframes toastSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==========================================================================
   ENQUADRAMENTO RESPONSIVO DE MODAIS (CELULARES, TABLETS E NOTEBOOKS)
   ========================================================================== */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0.5rem;
    align-items: center;
  }

  .modal-box {
    max-width: 100% !important;
    max-height: min(94vh, 94dvh);
    border-radius: 16px;
    margin: 0;
  }

  .modal-head {
    padding: 1rem 1.15rem;
  }

  .modal-head h3 {
    font-size: 1.05rem;
  }

  .modal-head p {
    font-size: 0.74rem;
  }

  .modal-icon-badge {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .modal-main {
    padding: 1.1rem;
    gap: 0.95rem;
  }

  /* Transforma formulário de 2 colunas em 1 coluna única no celular */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .modal-foot {
    padding: 0.85rem 1.15rem;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .modal-foot .btn {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1rem;
  }

  .permission-matrix-box {
    padding: 0.85rem;
    margin-top: 0.6rem;
  }

  .perm-row {
    gap: 0.6rem;
    padding: 0.6rem 0;
  }

  .perm-desc-title {
    font-size: 0.82rem;
  }

  .perm-desc-subtitle {
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   MÓDULO SALÃO DE PILATES: DIAS DA SEMANA, GRADE HORÁRIA E CHAMADA OFICIAL
   ========================================================================== */

/* Seletor Mobile do Pilates (Comboboxes) - Oculto no desktop */
.pilates-mobile-controls-card {
  display: none;
}

.pilates-weekdays-bar {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.pilates-weekdays-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--brand-ocean-dark);
  font-size: 0.88rem;
  white-space: nowrap;
}

.pilates-weekdays-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  flex: 1;
}

.weekday-pill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  font-weight: 700;
  font-size: 0.84rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  outline: none;
}

.weekday-pill-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.weekday-pill-btn.active {
  background: linear-gradient(135deg, var(--brand-ocean-dark) 0%, var(--brand-ocean) 100%);
  color: #ffffff;
  border-color: var(--brand-ocean-dark);
  box-shadow: 0 4px 14px rgba(27, 77, 55, 0.28);
}

.weekday-pill-btn .day-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
}

.weekday-pill-btn.active .day-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.pilates-shift-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.shift-filter-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.shift-filter-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  outline: none;
}

.shift-filter-btn:hover {
  border-color: #94a3b8;
  color: #0f172a;
}

.shift-filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
}

.shift-badge {
  background: rgba(0, 0, 0, 0.07);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
}

.shift-filter-btn.active .shift-badge {
  background: rgba(255, 255, 255, 0.2);
}

.pilates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.card-turma {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-turma:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.card-turma-top {
  padding: 0.9rem 1.2rem;
  background: linear-gradient(180deg, #fcfdfd 0%, #f8faf9 100%);
  border-bottom: 1px solid #edf2f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.turma-time {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.turma-badge {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
}

.turma-badge.available {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.turma-badge.full {
  background: #fee2e2;
  color: #b91c1c;
}

.turma-badge.over {
  background: #ffedd5;
  color: #c2410c;
}

.card-turma-body {
  padding: 1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.card-turma-sub {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed #e2e8f0;
}

.student-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.student-slot {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.student-slot.filled {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.student-slot.empty {
  background: #fafcfb;
  border: 1.5px dashed #cbd5e1;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  justify-content: center;
  padding: 0.7rem;
  transition: all 0.2s;
}

.student-slot.empty:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #059669;
}

.student-title-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.student-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-note-badge {
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  margin-top: 0.15rem;
  width: fit-content;
}

.student-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.badge-group {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: #ffffff;
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.badge-btn {
  width: 25px;
  height: 25px;
  border-radius: 6px;
  border: none;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  background: #f1f5f9;
  color: #64748b;
}

.badge-btn:hover {
  transform: scale(1.1);
}

.badge-btn.present:hover, .badge-btn.present.active {
  background: #10b981 !important;
  color: #ffffff !important;
}

.badge-btn.absent:hover, .badge-btn.absent.active {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.badge-btn.justified:hover, .badge-btn.justified.active {
  background: #f59e0b !important;
  color: #ffffff !important;
}

.badge-btn.makeup:hover, .badge-btn.makeup.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

.badge-btn.absent_makeup:hover, .badge-btn.absent_makeup.active {
  background: #475569 !important;
  color: #ffffff !important;
}

.btn-remove-slot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.btn-remove-slot:hover {
  background: #fee2e2;
  color: #dc2626;
}

.card-turma-footer {
  padding: 0.75rem 1.2rem;
  background: #f8fafc;
  border-top: 1px solid #edf2f0;
}

/* Indicador de Status da Nuvem MySQL (HostGator) */
.cloud-sync-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.cloud-sync-badge .sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  flex-shrink: 0;
}
.cloud-sync-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}
@media (max-width: 768px) {
  .cloud-sync-badge {
    font-size: 0.7rem;
    padding: 0.22rem 0.55rem;
    gap: 0.3rem;
  }
  .cloud-sync-badge .sync-dot {
    width: 7px;
    height: 7px;
  }
}

@media (max-width: 480px) {
  .app-header-actions {
    gap: 0.35rem;
  }
  .cloud-sync-badge {
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
  }
  .app-user-badge {
    padding: 0.2rem 0.4rem;
    max-width: 120px;
  }
}