:root {
  /* ── Paleta Warm Linen / Violeta ── */
  --primary:      #A78BFA;   /* violeta médio */
  --primary-dark: #7C3AED;   /* violeta escuro — botões, destaques */
  --primary-mid:  #8B5CF6;   /* tom intermediário */
  --primary-light:#C4B5FD;   /* violeta claro */
  --primary-pale: #EDE9FA;   /* violeta ultra-suave */

  --warm:         #B45309;   /* âmbar quente */
  --warm-dark:    #92400E;
  --warm-pale:    #FEF3C7;

  /* aliases — mantêm todos os templates funcionando */
  --pink:       var(--primary);
  --pink-dark:  var(--primary-dark);
  --pink-light: var(--primary-light);
  --pink-pale:  var(--primary-pale);
  --nude:       var(--warm);
  --nude-dark:  var(--warm-dark);

  /* ── Neutros (warm stone) ── */
  --dark:      #1C1917;
  --gray-900:  #1C1917;
  --gray-700:  #44403C;
  --gray-500:  #78716C;
  --gray-400:  #A8A29E;
  --gray-300:  #D6D3D1;
  --gray-100:  #F5F3EF;
  --white:     #FAFAF8;

  /* ── Semânticos ── */
  --green:    #059669;
  --green-bg: #D1FAE5;
  --amber:    #B45309;
  --amber-bg: #FEF3C7;
  --red:      #BE123C;
  --red-bg:   #FFE4E6;
  --blue:     #2563EB;
  --blue-bg:  #DBEAFE;

  /* ── Layout ── */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(28,25,23,.06), 0 1px 2px rgba(28,25,23,.04);
  --shadow-md: 0 6px 24px rgba(28,25,23,.10), 0 2px 6px rgba(28,25,23,.05);
  --sidebar-w:    240px;
  --topbar-h:      56px;
  --bottomnav-h:   64px;
  --transition:    .2s ease;

  /* ── Tipografia ── */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', -apple-system, sans-serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: #FAF9F7;
  color: var(--gray-900);
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--white);
  border-right: 1px solid rgba(28,25,23,.08);
  display: flex; flex-direction: column;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(28,25,23,.07);
}

.brand-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  color: var(--gray-900); display: block;
  letter-spacing: .01em;
}
.brand-sub { font-size: 10px; color: var(--gray-500); letter-spacing: .08em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--gray-700); font-size: 13.5px; font-weight: 400;
  text-decoration: none; transition: all var(--transition);
}
.nav-item i { font-size: 18px; color: var(--gray-500); }
.nav-item:hover { background: var(--primary-pale); color: var(--primary-dark); }
.nav-item:hover i { color: var(--primary-dark); }
.nav-item.active { background: var(--primary-pale); color: var(--primary-dark); font-weight: 600; }
.nav-item.active i { color: var(--primary-dark); }

.sidebar-footer {
  padding: 12px; border-top: 1px solid rgba(28,25,23,.07);
  display: flex; align-items: center; gap: 8px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  flex: 1; text-decoration: none; padding: 8px; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.sidebar-user:hover { background: var(--gray-100); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: var(--gray-900); display: block; }
.user-role { font-size: 11px; color: var(--gray-500); }
.logout-btn {
  color: var(--gray-500); font-size: 18px; padding: 8px;
  border-radius: var(--radius-sm); text-decoration: none;
  transition: color var(--transition), background var(--transition);
}
.logout-btn:hover { color: var(--red); background: var(--red-bg); }

/* ── TOPBAR MOBILE ── */
.topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 100%);
  align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 99;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; color: white; font-size: 15px; font-weight: 500; font-family: var(--font-display); }
.brand-icon-sm {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
}
.topbar-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 600; text-decoration: none;
}

/* ── MAIN ── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 24px;
}
.content-inner { max-width: 960px; margin: 0 auto; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  height: 64px;
  background: var(--white);
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(28,25,23,.14), 0 2px 8px rgba(28,25,23,.08);
  z-index: 99;
  padding: 0 8px;
}
.bottom-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  color: var(--gray-400); text-decoration: none;
  font-size: 10px; font-weight: 600;
  transition: color var(--transition);
  border-radius: 20px;
  padding: 8px 4px;
  letter-spacing: .03em;
}
.bottom-item i { font-size: 22px; }
.bottom-item.active { color: var(--primary-dark); }
.bottom-item.active i { color: var(--primary-dark); }

/* ── ALERTS ── */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px;
  animation: slideIn .2s ease;
}
.alert i:first-child { font-size: 18px; flex-shrink: 0; }
.alert-close { margin-left: auto; background: none; border: none; cursor: pointer; color: inherit; opacity: .6; font-size: 16px; }
.alert-sucesso { background: var(--green-bg); color: #0F6E56; border: 1px solid #9FE1CB; }
.alert-erro { background: var(--red-bg); color: #8a2c2c; border: 1px solid #f0b8b8; }
.alert-info { background: var(--primary-pale); color: var(--primary-dark); border: 1px solid var(--primary-light); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ── CARDS ── */
.card {
  background: white; border-radius: 20px;
  border: 1px solid rgba(28,25,23,.07);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(28,25,23,.07);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 12px; font-weight: 700; color: var(--gray-500); letter-spacing: .08em; text-transform: uppercase; }
.card-body { padding: 20px; }

/* ── METRIC CARDS ── */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 24px; }
.metric-card {
  background: white; border-radius: 18px;
  border: 1px solid rgba(28,25,23,.07);
  padding: 20px 18px; box-shadow: var(--shadow-sm);
}
.metric-label { font-size: 11px; color: var(--gray-500); margin-bottom: 8px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.metric-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--gray-900); line-height: 1; }
.metric-sub { font-size: 12px; color: var(--gray-500); margin-top: 6px; }
.metric-pink  { border-top: 3px solid var(--primary-dark); }
.metric-pink .metric-label { color: var(--primary-dark); }
.metric-green { border-top: 3px solid var(--green); }
.metric-amber { border-top: 3px solid var(--warm); }
.metric-red   { border-top: 3px solid var(--red); }

/* ── PAGE HEADER ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--gray-900); letter-spacing: .01em; }
.page-subtitle { font-size: 13px; color: var(--gray-500); margin-top: 3px; font-weight: 500; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px; border-radius: 50px;
  font-size: 13.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; border: none;
  transition: all var(--transition);
  font-family: var(--font-body);
  letter-spacing: .02em;
}
.btn i { font-size: 16px; }
.btn-primary {
  background: linear-gradient(135deg, #6D28D9, #7C3AED);
  color: white;
  box-shadow: 0 4px 14px rgba(124,58,237,.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #5B21B6, #6D28D9);
  box-shadow: 0 6px 20px rgba(124,58,237,.38);
  transform: translateY(-1px);
}
.btn-outline { background: transparent; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-pale); }
.btn-ghost { background: transparent; color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid #f0b8b8; }
.btn-danger:hover { background: var(--red); color: white; }
.btn-warm {
  background: linear-gradient(135deg, var(--warm-dark), var(--warm));
  color: white;
  box-shadow: 0 4px 14px rgba(201,149,107,.25);
}
.btn-warm:hover { box-shadow: 0 6px 20px rgba(201,149,107,.35); transform: translateY(-1px); }
.btn-sm { padding: 6px 16px; font-size: 12.5px; }
.btn-icon { padding: 8px; border-radius: 50%; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 20px; white-space: nowrap; letter-spacing: .04em;
}
.badge-pink  { background: #4A82CC; color: #fff; }
.badge-green { background: #1D9E75; color: #fff; }
.badge-amber { background: #D4891A; color: #fff; }
.badge-red   { background: #C94040; color: #fff; }
.badge-gray  { background: #6E6A8A; color: #fff; }
.badge-blue  { background: #4A82CC; color: #fff; }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; letter-spacing: .04em; text-transform: uppercase; }
.form-control {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--gray-300); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--gray-900); background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-body);
}
.form-control:focus { outline: none; border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(124,58,237,.13); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; font-weight: 700; color: var(--gray-500); padding: 10px 14px; border-bottom: 1px solid var(--gray-300); background: var(--gray-100); letter-spacing: .06em; text-transform: uppercase; }
td { padding: 12px 14px; border-bottom: 1px solid rgba(28,25,23,.06); color: var(--gray-900); }
tr:hover td { background: var(--primary-pale); }
tr:last-child td { border-bottom: none; }

/* ── AVATARS ── */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-nude  { background: linear-gradient(135deg, var(--warm-dark), var(--warm)); color: white; }
.avatar-blue  { background: var(--blue-bg); color: #2563A8; }
.avatar-green { background: var(--green-bg); color: #0F6E56; }

/* ── SESSÃO ITEM ── */
.sessao-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: #F7F5F2; border: 1px solid rgba(28,25,23,.06);
  transition: all var(--transition);
  text-decoration: none; color: inherit;
}
.sessao-item:hover {
  background: var(--primary-pale);
  transform: translateX(2px);
  box-shadow: 0 3px 12px rgba(28,25,23,.09);
}
.sessao-time { font-size: 13px; font-weight: 700; color: var(--gray-700); min-width: 46px; font-family: var(--font-body); letter-spacing: .01em; }
.sessao-info { flex: 1; min-width: 0; }
.sessao-nome { font-size: 14px; font-weight: 600; color: var(--gray-900); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sessao-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── STATUS DOT ── */
.status-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 2px white, 0 0 0 3.5px currentColor;
}
.status-dot-agendada  { background: #4A82CC; color: #4A82CC; }
.status-dot-confirmada{ background: #1D9E75; color: #1D9E75; }
.status-dot-realizada { background: #8B87A8; color: #8B87A8; }
.status-dot-cancelada { background: #C94040; color: #C94040; }
.status-dot-faltou    { background: #D4891A; color: #D4891A; }

/* ── HERO CARD ── */
.hero-card {
  background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 45%, #7C3AED 100%);
  border-radius: 24px;
  padding: 32px 28px 28px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  min-height: 130px;
}
.hero-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.hero-card::after {
  content: '';
  position: absolute; bottom: -40px; left: 40%;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(0,0,0,.08);
  pointer-events: none;
}
.hero-quote-mark {
  font-family: var(--font-display);
  font-size: 72px; line-height: .75;
  color: rgba(255,255,255,.18);
  display: block;
  margin-bottom: -4px;
}
.hero-text {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  line-height: 1.45;
  color: #fff;
  max-width: 220px;
  position: relative; z-index: 1;
  letter-spacing: .01em;
}
.hero-botanical {
  position: absolute;
  right: 16px; bottom: 0;
  opacity: .18;
  z-index: 0;
  pointer-events: none;
}

/* ── QUICK GRID ── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.quick-item {
  background: white;
  border-radius: 16px;
  padding: 16px 14px;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--gray-900);
  font-size: 14px; font-weight: 600;
  border: 1px solid rgba(28,25,23,.07);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.quick-item:hover {
  background: var(--primary-pale);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28,25,23,.12);
}
.quick-item-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: var(--primary-dark);
  flex-shrink: 0;
}
.quick-item-label { font-size: 13.5px; font-weight: 600; color: var(--gray-900); }

/* ── SEARCH ── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-300); background: white;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within { border-color: var(--primary-dark); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.search-bar i { color: var(--gray-500); font-size: 16px; }
.search-bar input { border: none; outline: none; font-size: 14px; flex: 1; background: transparent; font-family: var(--font-body); }

/* ── TABS ── */
.tabs { display: flex; border-bottom: 2px solid var(--gray-300); margin-bottom: 20px; gap: 0; }
.tab-item {
  padding: 10px 18px; font-size: 13.5px; color: var(--gray-500);
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  cursor: pointer; text-decoration: none; transition: all var(--transition);
  white-space: nowrap; font-weight: 500;
}
.tab-item.active { color: var(--primary-dark); border-bottom-color: var(--primary-dark); font-weight: 700; }
.tab-item:hover { color: var(--primary-dark); }

/* ── ATA CARD ── */
.ata-card {
  background: var(--primary-pale); border-radius: var(--radius-md);
  border: 1px solid rgba(124,58,237,.10);
  padding: 16px; margin-bottom: 12px;
}
.ata-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ata-numero { font-size: 13px; font-weight: 700; color: var(--gray-900); }
.ata-data { font-size: 12px; color: var(--gray-500); }
.ata-texto { font-size: 14px; color: var(--gray-700); line-height: 1.6; }

/* ── HUMOR ICONS ── */
.humor-otimo  { color: var(--green); }
.humor-bom    { color: var(--blue); }
.humor-neutro { color: var(--gray-500); }
.humor-ruim   { color: var(--warm); }
.humor-critico{ color: var(--red); }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; gap: 4px; margin-top: 20px; justify-content: center; }
.page-btn {
  min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1px solid var(--gray-300);
  color: var(--gray-700); font-size: 14px; text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover { background: var(--primary-pale); border-color: var(--primary); color: var(--primary-dark); }
.page-btn.active { background: var(--primary-dark); border-color: var(--primary-dark); color: white; }
.page-btn.disabled { opacity: .4; pointer-events: none; }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--gray-500); }
.empty-state i { font-size: 48px; color: var(--primary-light); margin-bottom: 12px; }
.empty-state p { font-size: 15px; margin-bottom: 8px; color: var(--gray-700); }
.empty-state small { font-size: 13px; }

/* ── DIVIDER ── */
.divider { height: 1px; background: rgba(28,25,23,.08); margin: 20px 0; }

/* ── TIMELINE AGENDA ── */
.agenda-row { display: flex; gap: 12px; margin-bottom: 8px; align-items: flex-start; }
.agenda-hour { font-size: 12px; color: var(--gray-500); min-width: 42px; padding-top: 3px; }
.agenda-slot {
  flex: 1; border-left: 2px solid var(--primary-light);
  background: var(--primary-pale); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px; text-decoration: none; color: inherit;
  transition: background var(--transition);
}
.agenda-slot:hover { background: var(--primary-light); }
.agenda-empty { flex: 1; border-top: 1px solid var(--gray-300); margin-top: 7px; opacity: .4; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .topbar { display: flex; }
  .bottom-nav { display: flex; }
  .main-content { margin-left: 0; padding: 16px; padding-top: calc(var(--topbar-h) + 16px); padding-bottom: calc(var(--bottomnav-h) + 36px); }
  .form-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 420px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
