/* ============================================================
   ASYA CLINICAL INTELLIGENCE - CSS Global
   Design System: Navy + Mint | Premium Clinical Digital
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* === VARIÁVEIS DE DESIGN === */
:root {
  --navy: #1A2B3C;
  --navy-light: #243548;
  --navy-dark: #111f2d;
  --mint: #8ECFC4;
  --mint-light: #b2e3db;
  --mint-dark: #6abfb2;
  --white: #FFFFFF;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-sm: 0 1px 3px rgba(26, 43, 60, 0.08), 0 1px 2px rgba(26, 43, 60, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 43, 60, 0.12), 0 2px 4px rgba(26, 43, 60, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 43, 60, 0.16), 0 4px 8px rgba(26, 43, 60, 0.10);
  --shadow-float: 0 16px 48px rgba(26, 43, 60, 0.20);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.3; }
h4, h5, h6 { font-family: var(--font-body); font-weight: 600; }

a { color: var(--mint-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy); }

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 1.5rem; }
.container-md { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }

/* === NAVBAR === */
.navbar {
  background: var(--navy);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.navbar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.navbar-name {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.navbar-tagline {
  font-size: 0.7rem;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-top: -2px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.navbar-nav a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.navbar-nav a.active { color: var(--mint); }

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
}

.navbar-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.875rem;
  cursor: pointer;
}

.navbar-menu {
  display: none;
}

/* === SIDEBAR (mobile) === */
@media (max-width: 768px) {
  .navbar-nav { display: none; }
  .navbar-menu { display: flex; align-items: center; cursor: pointer; }
  .navbar-menu svg { color: white; width: 24px; height: 24px; }
}

/* === SIDEBAR MOBILE === */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}

.sidebar-mobile {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: var(--navy);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.sidebar-overlay.open { display: block; }
.sidebar-mobile.open { transform: translateX(0); }

.sidebar-mobile .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255,255,255,0.75);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.25rem;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-mobile .nav-link:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar-mobile .nav-link.active { background: rgba(142,207,196,0.15); color: var(--mint); }

/* === CARDS === */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-lg); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-200); }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); background: var(--gray-50); }

/* Cards flutuantes premium */
.card-float {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  transition: all 0.3s ease;
}

.card-float:hover { transform: translateY(-2px); box-shadow: 0 20px 60px rgba(26, 43, 60, 0.22); }

/* === METRIC CARDS === */
.metric-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mint), var(--mint-light));
}

.metric-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); }
.metric-value { font-size: 1.875rem; font-weight: 700; color: var(--navy); font-family: var(--font-title); }
.metric-unit { font-size: 0.875rem; color: var(--gray-400); font-family: var(--font-body); font-weight: 400; }
.metric-change { font-size: 0.8rem; font-weight: 600; }
.metric-change.positive { color: var(--success); }
.metric-change.negative { color: var(--danger); }

/* === BOTÕES === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

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

.btn-primary {
  background: var(--mint);
  color: var(--navy);
}
.btn-primary:hover:not(:disabled) {
  background: var(--mint-dark);
  box-shadow: 0 4px 16px rgba(142, 207, 196, 0.4);
  transform: translateY(-1px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover:not(:disabled) {
  background: var(--navy-light);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--gray-200);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--mint);
  color: var(--mint-dark);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn-icon { padding: 0.625rem; border-radius: var(--radius-md); }

/* === FORMULÁRIOS === */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(142, 207, 196, 0.2);
}

.form-control::placeholder { color: var(--gray-400); }

.form-hint { font-size: 0.75rem; color: var(--gray-400); margin-top: 0.375rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control { border-radius: var(--radius-md) 0 0 var(--radius-md); flex: 1; }
.input-group .input-addon {
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  border-left: none;
  padding: 0 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-600);
  display: flex;
  align-items: center;
}

.input-group-select { border-radius: 0 var(--radius-md) var(--radius-md) 0 !important; border-left: none !important; }

/* Range input */
.form-range { width: 100%; accent-color: var(--mint); cursor: pointer; }

/* Checkbox LGPD */
.checkbox-group { display: flex; align-items: flex-start; gap: 0.75rem; }
.checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--mint); margin-top: 2px; flex-shrink: 0; cursor: pointer; }
.checkbox-group label { font-size: 0.875rem; color: var(--gray-600); cursor: pointer; line-height: 1.5; }
.checkbox-group label a { color: var(--mint-dark); font-weight: 500; }

/* === ALERTAS === */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.alert-critico { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-aviso   { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }

.alert-icon { font-size: 1.125rem; flex-shrink: 0; margin-top: 1px; }

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.625rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-mint   { background: rgba(142,207,196,0.2); color: #3a8c82; }
.badge-navy   { background: rgba(26,43,60,0.1); color: var(--navy); }
.badge-gold   { background: rgba(245,158,11,0.15); color: #92400e; }
.badge-red    { background: rgba(239,68,68,0.1); color: #b91c1c; }
.badge-green  { background: rgba(34,197,94,0.1); color: #15803d; }

/* Badges de plano */
.plan-badge { font-family: var(--font-body); }
.plan-1 { background: rgba(142,207,196,0.15); color: #3a8c82; }
.plan-2 { background: rgba(59,130,246,0.1); color: #1d4ed8; }
.plan-3 { background: rgba(245,158,11,0.15); color: #b45309; }

/* === LOCK OVERLAY (plano insuficiente) === */
.locked-feature {
  position: relative;
}
.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248,250,252,0.9);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
}
.lock-overlay .lock-icon { font-size: 2rem; }
.lock-overlay p { font-size: 0.875rem; font-weight: 600; color: var(--gray-600); text-align: center; padding: 0 1rem; }

/* === IBE SCORE RING === */
.ibe-ring {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.ibe-ring svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.ibe-ring .ibe-value { text-align: center; }
.ibe-ring .ibe-number { font-size: 2rem; font-weight: 700; font-family: var(--font-title); color: var(--navy); display: block; }
.ibe-ring .ibe-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-400); font-weight: 600; }

/* === CALENDÁRIO === */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.375rem;
}

.cal-header {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  padding: 0.25rem 0;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.cal-day:hover { background: var(--gray-100); }
.cal-day.today { background: var(--navy); color: white; font-weight: 700; }
.cal-day.has-dose { background: var(--mint); color: var(--navy); font-weight: 700; }
.cal-day.has-dose::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  background: var(--navy);
  border-radius: 50%;
}
.cal-day.empty { cursor: default; }
.cal-day.other-month { opacity: 0.3; }

/* === GRÁFICOS === */
.chart-container { position: relative; width: 100%; }

/* === TABS === */
.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; }
.tab-btn {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-400);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--mint); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* === RANGE SLIDER CUSTOMIZADO === */
.score-range { width: 100%; }
.score-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--gray-400); margin-top: 0.25rem; }
.score-display {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0.5rem 0;
}

/* === FAB (Floating Action Button) - Agente IA === */
.fab-agent {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(142, 207, 196, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 150;
  transition: all 0.3s ease;
  border: none;
}

.fab-agent:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 32px rgba(142, 207, 196, 0.55);
}

.fab-agent svg { width: 24px; height: 24px; color: var(--navy); }

.fab-tooltip {
  position: fixed;
  bottom: 2.75rem;
  right: 5.5rem;
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 150;
}

.fab-agent:hover + .fab-tooltip,
.fab-tooltip.visible { opacity: 1; }

/* === MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 31, 45, 0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; gap: 0.75rem; justify-content: flex-end; }

/* === LOGIN PAGE === */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, rgba(26,43,60,0.95) 100%);
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(142,207,196,0.1) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(142,207,196,0.07) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

.auth-panel {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.auth-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-float);
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo .logo-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--mint), var(--mint-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(142,207,196,0.35);
}

.auth-logo .logo-text {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 700;
}

.auth-logo .logo-sub {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0.25rem;
}

/* === SIDEBAR DASHBOARD === */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 64px);
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  padding: 1.5rem 1rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-400);
  margin: 1.25rem 0 0.5rem 0.75rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 0.125rem;
}

.sidebar .nav-link:hover { background: var(--gray-50); color: var(--navy); }
.sidebar .nav-link.active { background: rgba(142,207,196,0.12); color: var(--mint-dark); font-weight: 600; }
.sidebar .nav-link .nav-icon { width: 18px; opacity: 0.7; flex-shrink: 0; }
.sidebar .nav-link.active .nav-icon { opacity: 1; }

.sidebar .plan-info {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-top: 1.5rem;
  color: white;
}

.main-content { padding: 2rem 1.5rem; }

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 1.5rem 1rem; }
}

/* === PÁGINA DE LOADING === */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* === TOAST === */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--navy);
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 380px;
  animation: toastIn 0.3s ease;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  pointer-events: auto;
}

.toast.success { background: #15803d; }
.toast.error   { background: #b91c1c; }
.toast.warning { background: #92400e; }

@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* === UTILITÁRIOS === */
.text-navy    { color: var(--navy); }
.text-mint    { color: var(--mint-dark); }
.text-muted   { color: var(--gray-400); }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-title   { font-family: var(--font-title); }
.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-gap { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.divider { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }
.hidden { display: none !important; }

/* === ADMIN === */
.admin-badge {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === TABLE === */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: white; }
th { background: var(--gray-50); padding: 0.875rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-400); border-bottom: 2px solid var(--gray-200); }
td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--gray-100); font-size: 0.875rem; }
tr:hover td { background: var(--gray-50); }
tr:last-child td { border-bottom: none; }

/* === PAGE HEADER === */
.page-header { margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; color: var(--navy); font-family: var(--font-title); font-weight: 700; }
.page-subtitle { color: var(--gray-400); font-size: 0.9375rem; margin-top: 0.25rem; }

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; color: var(--gray-600); margin-bottom: 0.5rem; }

/* === FAB WRAPPER + TOOLTIP === */
.fab-wrapper {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.fab-tooltip-text {
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  transform: translateY(4px);
}

.fab-wrapper:hover .fab-tooltip-text {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* === MOBILE TOPBAR (sem navbar) === */
.mobile-topbar {
  background: white;
  height: 52px;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .mobile-topbar { display: flex !important; }
  /* ocultar navbar no mobile pois usamos sidebar */
  .navbar { display: none !important; }
}

@media (min-width: 769px) {
  .mobile-topbar { display: none !important; }
  /* ocultar navbar no desktop — sidebar faz seu papel */
  .navbar { display: none !important; }
  /* ajuste app-layout sem navbar no topo */
  .app-layout { margin-top: 0 !important; }
}

/* === Correção layout sem navbar === */
@media (min-width: 769px) {
  .app-layout {
    min-height: 100vh;
  }
  .sidebar {
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, var(--navy) 0%, #1e3a5f 100%);
    border-right: none;
    padding: 0 1rem 1rem;
  }
  .sidebar .sidebar-section-title { color: rgba(255,255,255,0.4); }
  .sidebar .nav-link { color: rgba(255,255,255,0.7); }
  .sidebar .nav-link:hover { background: rgba(255,255,255,0.08); color: white; }
  .sidebar .nav-link.active { background: rgba(142,207,196,0.2); color: var(--mint); }
  .sidebar .nav-link .nav-icon { opacity: 0.6; }
  .sidebar .nav-link.active .nav-icon { opacity: 1; }
}
