/* ============================================================
   AgendaDia — Sistema de Temas (Dark Default / Light opcional)
   Roboto + Roboto Slab | CSS Variables
   ============================================================ */

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

/* ── TOKENS: TEMA ESCURO (padrão) ────────────────────────── */
:root,
[data-theme="dark"] {
  --bg-base:         #0A0A0F;
  --bg-surface:      #12121A;
  --bg-elevated:     #1A1A26;
  --bg-overlay:      #22223A;

  --border:          #2A2A3E;
  --border-focus:    #C8A96E;

  --accent:          #C8A96E;
  --accent-light:    #E8C98E;
  --accent-dim:      rgba(200, 169, 110, 0.12);
  --accent-hover:    rgba(200, 169, 110, 0.25);

  --text-primary:    #F0EDE8;
  --text-secondary:  #B0A9B8;
  --text-muted:      #8A8799;
  --text-dim:        #5A5768;
  --text-on-accent:  #0A0A0F;

  --green:           #4CAF7D;
  --green-dim:       rgba(76, 175, 125, 0.12);
  --red:             #E85D6A;
  --red-dim:         rgba(232, 93, 106, 0.12);
  --blue:            #5B8AF0;
  --blue-dim:        rgba(91, 138, 240, 0.12);
  --yellow:          #F0C04A;
  --yellow-dim:      rgba(240, 192, 74, 0.12);

  --shadow-sm:       0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md:       0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg:       0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-accent:   0 8px 24px rgba(200, 169, 110, 0.3);

  --sidebar-width:   240px;
  --topbar-height:   64px;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       16px;
  --radius-xl:       24px;

  /* Scrollbar */
  color-scheme: dark;
}

/* ── TOKENS: TEMA CLARO ──────────────────────────────────── */
[data-theme="light"] {
  --bg-base:         #F4F3F7;
  --bg-surface:      #FFFFFF;
  --bg-elevated:     #F0EEF5;
  --bg-overlay:      #E8E6F0;

  --border:          #DDD9E8;
  --border-focus:    #B8923E;

  --accent:          #A87840;
  --accent-light:    #C89A5A;
  --accent-dim:      rgba(168, 120, 64, 0.10);
  --accent-hover:    rgba(168, 120, 64, 0.18);

  --text-primary:    #1A1826;
  --text-secondary:  #4A4560;
  --text-muted:      #6A6580;
  --text-dim:        #9A97AA;
  --text-on-accent:  #FFFFFF;

  --green:           #2E9460;
  --green-dim:       rgba(46, 148, 96, 0.10);
  --red:             #C94052;
  --red-dim:         rgba(201, 64, 82, 0.10);
  --blue:            #3A68D0;
  --blue-dim:        rgba(58, 104, 208, 0.10);
  --yellow:          #C08820;
  --yellow-dim:      rgba(192, 136, 32, 0.10);

  --shadow-sm:       0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md:       0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg:       0 8px 32px rgba(0, 0, 0, 0.14);
  --shadow-accent:   0 8px 24px rgba(168, 120, 64, 0.22);

  color-scheme: light;
}

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

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

body {
  font-family: 'Roboto', system-ui, sans-serif;
  font-weight: 400;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── TIPOGRAFIA ──────────────────────────────────────────── */
h1, h2, h3 { font-family: 'Roboto Slab', Georgia, serif; font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(26px, 4vw, 36px); }
h2 { font-size: clamp(20px, 3vw, 28px); }
h3 { font-size: clamp(16px, 2.5vw, 20px); }
h4 { font-size: 16px; font-weight: 600; }
h5 { font-size: 14px; font-weight: 600; }
p  { color: var(--text-secondary); }
a  { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 480px; margin: 0 auto; padding: 0 20px; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hide-tablet { display: none !important; }
}

/* Flex helpers */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { gap: 8px; }
.flex-gap-md { gap: 16px; }
.flex-gap-lg { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.mt-1 { margin-top: 8px; }   .mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; }  .mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; }  .mb-3 { margin-bottom: 24px; }
.mt-4 { margin-top: 32px; }  .mb-4 { margin-bottom: 32px; }
.p-1  { padding: 8px; }      .p-2  { padding: 16px; }
.p-3  { padding: 24px; }     .p-4  { padding: 32px; }

/* ── COMPONENTES ─────────────────────────────────────────── */

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--accent-hover); }
.card-hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body  { padding: 24px; }
.card-sm    { border-radius: var(--radius-md); }
.card-flat  { box-shadow: none; }

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--text-on-accent);
}
.btn-primary:hover { box-shadow: var(--shadow-accent); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(232, 93, 106, 0.25);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(76, 175, 125, 0.25);
}
.btn-success:hover { background: var(--green); color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn-icon { padding: 9px; border-radius: var(--radius-sm); }

/* Inputs */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.3s;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-surface);
}
.form-control::placeholder { color: var(--text-dim); }
.form-control.error { border-color: var(--red); }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

.form-hint  { font-size: 12px; color: var(--text-dim); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--red); margin-top: 5px; }

/* Input com ícone */
.input-group { position: relative; }
.input-group .form-control { padding-left: 42px; }
.input-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.input-group .input-addon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

/* Badges / Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge-gold    { background: var(--accent-dim);  color: var(--accent);  border: 1px solid rgba(200,169,110,0.2); }
.badge-green   { background: var(--green-dim);   color: var(--green);   border: 1px solid rgba(76,175,125,0.2); }
.badge-red     { background: var(--red-dim);     color: var(--red);     border: 1px solid rgba(232,93,106,0.2); }
.badge-blue    { background: var(--blue-dim);    color: var(--blue);    border: 1px solid rgba(91,138,240,0.2); }
.badge-yellow  { background: var(--yellow-dim);  color: var(--yellow);  border: 1px solid rgba(240,192,74,0.2); }
.badge-muted   { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }

/* Alerts */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-left: 4px solid;
}
.alert-success { background: var(--green-dim);  border-color: var(--green); color: var(--green); }
.alert-error   { background: var(--red-dim);    border-color: var(--red);   color: var(--red);   }
.alert-warning { background: var(--yellow-dim); border-color: var(--yellow);color: var(--yellow);}
.alert-info    { background: var(--blue-dim);   border-color: var(--blue);  color: var(--blue);  }

/* Divisor */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 13px;
  margin: 20px 0;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Avatar */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.avatar-xs { width: 28px; height: 28px; font-size: 11px; }
.avatar-sm { width: 36px; height: 36px; font-size: 13px; }
.avatar-md { width: 48px; height: 48px; font-size: 16px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-xl { width: 88px; height: 88px; font-size: 30px; }

/* Stars */
.stars { display: inline-flex; gap: 2px; align-items: center; }
.star-filled { color: var(--accent); }
.star-empty  { color: var(--border); }

/* Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-overlay);
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-overlay) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── NAVEGAÇÃO PRINCIPAL ─────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--topbar-height);
  background: rgba(10,10,15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="light"] .topnav {
  background: rgba(244,243,247,0.92);
}
.topnav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.topnav-brand {
  font-family: 'Roboto Slab', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.topnav-menu { display: flex; align-items: center; gap: 4px; }
.topnav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.topnav-link:hover { color: var(--text-primary); background: var(--bg-elevated); }
.topnav-link.active { color: var(--accent); background: var(--accent-dim); }
.topnav-actions { display: flex; align-items: center; gap: 10px; }

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
@media (max-width: 768px) {
  body {
    padding-bottom: 70px;
  }
}
.bottom-nav-inner { display: flex; justify-content: space-around; }
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 14px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item svg { transition: transform 0.2s; }
.bottom-nav-item.active svg { transform: scale(1.1); }

@media (max-width: 768px) {
  .bottom-nav { display: block; }
  .topnav-menu { display: none; }
  .page-content { padding-bottom: 80px; }
}

/* ── SIDEBAR (PAINEL DO PRESTADOR) ───────────────────────── */
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-base);
}
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.3s ease, transform 0.3s ease, background 0.3s;
  overflow: hidden;
  z-index: 100;
}
.sidebar.collapsed { width: 64px; }
.sidebar-logo {
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-height);
}
.sidebar-logo-text {
  font-family: 'Roboto Slab', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-logo-text { opacity: 0; width: 0; }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 8px 10px 4px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s;
}
.sidebar.collapsed .sidebar-section-label { opacity: 0; }
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  position: relative;
}
.sidebar-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.sidebar-item.active { background: var(--accent-dim); color: var(--accent); }
.sidebar-item .item-label { overflow: hidden; transition: opacity 0.2s, width 0.3s; }
.sidebar.collapsed .item-label { opacity: 0; width: 0; }
.sidebar-item .item-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.sidebar.collapsed .item-badge { display: none; }
.sidebar-footer { padding: 12px 10px; border-top: 1px solid var(--border); }

/* Dashboard main */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.3s;
}
.dashboard-topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  flex-shrink: 0;
  transition: background 0.3s;
}
.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

@media (max-width: 1024px) {
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); z-index: 300; }
  .sidebar.open { transform: translateX(0); }
  .dashboard-main { width: 100%; }
}

/* ── MÉTRICAS / CARDS ────────────────────────────────────── */
.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all 0.2s;
}
.metric-card:hover { border-color: var(--accent-hover); }
.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.metric-value {
  font-family: 'Roboto Slab', serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin: 12px 0 6px;
}
.metric-label { font-size: 12px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.metric-trend { font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.trend-up   { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--text-muted); }

/* ── TABELAS ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-elevated);
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--bg-elevated); }
.table tbody tr:last-child td { border-bottom: none; }
.table .td-primary { font-weight: 600; color: var(--text-primary); }
.table .td-accent  { font-weight: 700; color: var(--accent); }

/* ── CALENDÁRIO / SLOTS ──────────────────────────────────── */
.date-slider { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.date-btn {
  min-width: 58px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.date-btn:hover { border-color: var(--accent); }
.date-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}
.date-btn .date-dow  { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; }
.date-btn .date-day  { font-size: 20px; font-weight: 700; font-family: 'Roboto Slab', serif; }
.date-btn .date-mon  { font-size: 10px; }
.date-btn.active .date-dow,
.date-btn.active .date-day,
.date-btn.active .date-mon { color: var(--text-on-accent); }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.slot-btn {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.slot-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.slot-btn.active { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }
.slot-btn:disabled { opacity: 0.35; cursor: not-allowed; background: var(--bg-elevated); }

/* ── PROGRESS BAR ────────────────────────────────────────── */
.progress { height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 0.4s ease;
}
.progress-accent { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.progress-green  { background: linear-gradient(90deg, var(--green), #6DCFA0); }
.progress-blue   { background: linear-gradient(90deg, var(--blue), #8AABF5); }

/* ── TOGGLE TEMA ─────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
[data-theme="light"] .icon-moon  { display: none; }
[data-theme="dark"]  .icon-sun   { display: none; }
[data-theme="light"] .icon-sun   { display: block; }
[data-theme="dark"]  .icon-moon  { display: block; }

/* ── ESTRELAS (avaliações) ───────────────────────────────── */
.stars-interactive { display: flex; gap: 4px; }
.stars-interactive .star {
  font-size: 22px;
  cursor: pointer;
  color: var(--border);
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.stars-interactive .star:hover,
.stars-interactive .star.active { color: var(--accent); transform: scale(1.2); }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}
.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body    { padding: 20px 24px; }
.modal-footer  { padding: 0 24px 24px; display: flex; gap: 10px; justify-content: flex-end; }

/* ── PÁGINA AUTH ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--bg-base);
}
.auth-right {
  width: 480px;
  background: linear-gradient(160deg, #0F0E1A 0%, #1A1226 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
[data-theme="light"] .auth-right {
  background: linear-gradient(160deg, var(--accent) 0%, #C89A5A 100%);
}
.auth-right-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(var(--accent) 1px, transparent 1px);
  background-size: 32px 32px;
}
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
@media (max-width: 768px) {
  .auth-right { display: none; }
  .auth-card { box-shadow: none; border: none; background: transparent; padding: 20px; }
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  padding: 72px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91,138,240,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(200,169,110,0.2);
  border-radius: 20px;
  padding: 6px 16px;
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.hero h1 { margin-bottom: 18px; }
.hero p  { font-size: 17px; max-width: 540px; margin: 0 auto 36px; color: var(--text-muted); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}
.hero-stat-value { font-family: 'Roboto Slab', serif; font-size: 26px; font-weight: 700; color: var(--accent); }
.hero-stat-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; letter-spacing: 0.04em; }

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim), var(--shadow-md); }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  padding: 6px 12px;
}
.search-input::placeholder { color: var(--text-dim); }
.search-divider { width: 1px; background: var(--border); margin: 4px 0; }
.search-location {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── CATEGORY PILLS ──────────────────────────────────────── */
.category-pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; }
.category-pill {
  padding: 7px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.category-pill:hover { border-color: var(--accent); color: var(--accent); }
.category-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
  font-weight: 600;
}

/* ── ESTABLISHMENT CARD ──────────────────────────────────── */
.est-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.est-card:hover { border-color: var(--accent-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.est-card-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  position: relative;
  background: var(--bg-elevated);
}
.est-card-body { padding: 18px; }
.est-card-name { font-size: 16px; font-weight: 700; margin-bottom: 2px; color: var(--text-primary); }
.est-card-cat  { font-size: 12px; color: var(--text-muted); }
.est-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}
.est-card-price { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ── BOOKING STEPS ───────────────────────────────────────── */
.booking-steps {
  display: flex;
  gap: 0;
  margin-bottom: 32px;
}
.booking-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  border-bottom: 2px solid var(--border);
  transition: all 0.2s;
}
.booking-step.active { color: var(--accent); border-bottom-color: var(--accent); }
.booking-step.done   { color: var(--green);  border-bottom-color: var(--green); }
.step-number {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.booking-step.done .step-number { background: var(--green); border-color: var(--green); color: #fff; }
.booking-step.active .step-number { background: var(--accent); border-color: var(--accent); color: var(--text-on-accent); }

/* ── ANIMAÇÕES ───────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn   { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes float     { 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-8px); } }
@keyframes spin      { to { transform: rotate(360deg); } }

.anim-fade-up   { animation: fadeUp 0.5s ease both; }
.anim-fade-in   { animation: fadeIn 0.4s ease both; }
.anim-float     { animation: float 3s ease-in-out infinite; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── UTILIDADES ──────────────────────────────────────────── */
.text-accent   { color: var(--accent) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-dim      { color: var(--text-dim) !important; }
.text-green    { color: var(--green) !important; }
.text-red      { color: var(--red) !important; }
.text-sm       { font-size: 13px !important; }
.text-xs       { font-size: 12px !important; }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.font-bold     { font-weight: 700; }
.font-medium   { font-weight: 500; }
.font-slab     { font-family: 'Roboto Slab', serif; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded-full  { border-radius: 50%; }
.hidden        { display: none !important; }
.w-full        { width: 100%; }
.overflow-hidden { overflow: hidden; }
.relative      { position: relative; }
.sr-only       { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Separador de seção */
.section { padding: 48px 0; }
.section-title {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(20px, 3vw, 28px);
  margin-bottom: 6px;
  color: var(--text-primary);
}
.section-subtitle { font-size: 15px; color: var(--text-muted); margin-bottom: 28px; }

/* Notificação toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.3s ease;
  max-width: 340px;
  border-left: 4px solid var(--accent);
}
.toast-success { border-left-color: var(--green); }
.toast-error   { border-left-color: var(--red); }
