/* ============================================================
   VARIÁVEIS E RESET
   ============================================================ */
:root {
  --preto:        #0F0F0F;
  --preto-header: #1A1A1A;
  --rose:         #C4956A;
  --rose-fundo:   #F5F0EE;
  --rose-accent:  #E8C4B0;
  --rose-borda:   #EAD9CC;
  --rose-hover:   #B8835A;
  --branco:       #FFFFFF;
  --texto:        #2C2C2C;
  --texto-muted:  #7A7A7A;
  --verde:        #4CAF7D;
  --sidebar-w:    220px;
  --sidebar-w-tablet: 60px;
  --transition:   0.2s ease;
  --radius:       10px;
  --radius-sm:    6px;
}

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

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--rose-fundo);
  color: var(--texto);
  min-height: 100dvh;
  display: flex;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

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

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100dvh;
  background: var(--preto);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition), width var(--transition);
  overflow: hidden;
}

.sidebar__logo {
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar__logo-img {
  width: 140px;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition), width var(--transition);
}
.sidebar__logo-img:hover { opacity: 0.9; }

.sidebar__nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  font-weight: 400;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  min-height: 44px;
}

.nav-link:hover {
  background: rgba(212, 165, 160, 0.1);
  color: var(--rose);
}

.nav-link--ativo {
  background: rgba(212, 165, 160, 0.15);
  color: var(--rose);
  font-weight: 500;
}

.nav-link__icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-link__label {
  transition: opacity var(--transition);
}

.sidebar__footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  overflow: hidden;
}

/* ============================================================
   ÁREA PRINCIPAL
   ============================================================ */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  transition: margin-left var(--transition);
}

.topbar {
  background: var(--preto-header);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar__menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--rose);
  font-size: 1.3rem;
  padding: 4px 8px;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.topbar__nome {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  color: var(--rose);
  font-weight: 400;
}

.topbar__perfil {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--preto);
}

#conteudo {
  flex: 1;
  padding: 32px 28px 48px;
  max-width: 1100px;
  width: 100%;
}

/* ============================================================
   COMPONENTES DE PÁGINA
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--preto);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 0.88rem;
  color: var(--texto-muted);
  margin-top: 4px;
}

.badge-mes {
  background: var(--preto);
  color: var(--rose);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  margin-top: 4px;
}

/* ============================================================
   CARDS DO DASHBOARD
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.card {
  background: var(--branco);
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color var(--transition);
}

.card:hover {
  border-color: var(--rose-accent);
}

.card--accent {
  background: var(--preto);
  border-color: var(--preto);
}

.card--accent .card__label,
.card--accent .card__sub {
  color: rgba(255,255,255,0.45);
}

.card--accent .card__value {
  color: var(--rose);
}

.card--positive .card__value {
  color: var(--verde);
}

.card__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card__label {
  font-size: 0.75rem;
  color: var(--texto-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.card__value {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--preto);
  line-height: 1.2;
}

.card__value--muted {
  color: #C0392B;
}

.card__sub {
  font-size: 0.75rem;
  color: var(--texto-muted);
}

/* ============================================================
   SEÇÕES E TABELA
   ============================================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--preto);
}

.link-ver-mais {
  font-size: 0.82rem;
  color: var(--rose);
  font-weight: 500;
  transition: opacity var(--transition);
}

.link-ver-mais:hover {
  opacity: 0.75;
}

.table-wrapper {
  background: var(--branco);
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.table thead {
  background: var(--rose-fundo);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--texto-muted);
  border-bottom: 1px solid var(--rose-borda);
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid #F5EDEB;
  vertical-align: middle;
}

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

.table tbody tr:hover td {
  background: #FDFAF9;
}

.text-right {
  text-align: right !important;
}

.badge-hora {
  background: var(--preto);
  color: var(--rose);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.tag-servico {
  background: var(--rose-fundo);
  color: var(--texto);
  font-size: 0.78rem;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--rose-borda);
}

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  transition: opacity var(--transition), transform var(--transition);
  min-height: 44px;
}

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

.btn--primary {
  background: var(--preto);
  color: var(--rose);
}

.btn--primary:hover:not(:disabled) {
  opacity: 0.85;
}

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

/* ============================================================
   PLACEHOLDER (páginas em construção)
   ============================================================ */
.placeholder-card {
  background: var(--branco);
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  max-width: 560px;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.placeholder-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--preto);
  margin-bottom: 10px;
}

.placeholder-desc {
  font-size: 0.88rem;
  color: var(--texto-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 400px;
  margin-inline: auto;
}

.placeholder-features {
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 28px;
}

.feature-item {
  font-size: 0.85rem;
  color: var(--texto);
}

.feature-item--sub {
  padding-left: 16px;
  color: var(--texto-muted);
}

.badge-soon {
  display: inline-block;
  background: var(--rose-fundo);
  color: var(--rose);
  border: 1px solid var(--rose-accent);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* ============================================================
   OVERLAY SIDEBAR
   ============================================================ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity var(--transition);
}

.overlay--visivel {
  display: block;
  opacity: 1;
}

/* ============================================================
   BOTTOM NAV — oculto por padrão (só mobile ≤600px)
   ============================================================ */
.bottom-nav {
  display: none;
}

/* ============================================================
   DRAWER "MAIS" — oculto por padrão
   ============================================================ */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer-overlay--visivel {
  display: block;
  opacity: 1;
}

.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1A1A1A;
  border-radius: 16px 16px 0 0;
  z-index: 160;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  display: none;
}
.drawer--aberto {
  display: block;
  transform: translateY(0);
}

.drawer__handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 14px auto 20px;
}

.drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  gap: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  font-weight: 500;
  min-height: 52px;
  transition: background var(--transition), color var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.drawer-link:hover,
.drawer-link--ativo {
  background: rgba(212,165,160,0.12);
  color: var(--rose);
}

.drawer-link__icon {
  font-size: 1.3rem;
  width: 28px;
  text-align: center;
}

.drawer__footer {
  padding: 16px 32px 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin-top: 12px;
}

.btn-logout--drawer {
  width: 100%;
  text-align: center;
  padding: 12px;
  min-height: 44px;
}

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrapper {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #0F0F0F;
}

.login-card {
  background: #1A1A1A;
  border: 1px solid rgba(212, 165, 160, 0.2);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo__img {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  border-radius: var(--radius);
}

.login-logo__sub {
  font-size: 0.72rem;
  color: var(--rose);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 500;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field__label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.field__input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212, 165, 160, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition);
  min-height: 44px;
}

.field__input::placeholder {
  color: rgba(255,255,255,0.2);
}

.field__input:focus {
  border-color: var(--rose);
}

.login-erro {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid rgba(192, 57, 43, 0.4);
  color: #e88;
  font-size: 0.82rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.btn--login {
  width: 100%;
  justify-content: center;
  background: var(--rose);
  color: var(--preto);
  font-weight: 600;
  padding: 12px;
  margin-top: 8px;
  font-size: 0.92rem;
  transition: opacity var(--transition);
  min-height: 48px;
}

.btn--login:hover:not(:disabled) {
  opacity: 0.88;
}

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

/* ============================================================
   LOGOUT BUTTON (sidebar)
   ============================================================ */
.btn-logout {
  background: none;
  border: 1px solid rgba(212, 165, 160, 0.2);
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: inherit;
  transition: color var(--transition), border-color var(--transition);
  width: 100%;
  text-align: center;
  min-height: 36px;
}

.btn-logout:hover {
  color: var(--rose);
  border-color: rgba(212, 165, 160, 0.5);
}

.sidebar__copy {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.18);
  text-align: center;
  white-space: nowrap;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.card--skeleton {
  height: 90px;
  background: linear-gradient(90deg, #e9e1df 25%, #f2eae8 50%, #e9e1df 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border: none;
}

.skeleton-table {
  height: 220px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #e9e1df 25%, #f2eae8 50%, #e9e1df 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* ============================================================
   ESTADO VAZIO + ERRO
   ============================================================ */
.estado-vazio {
  background: var(--branco);
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--texto-muted);
  font-size: 0.88rem;
}

.erro-banner {
  background: rgba(192, 57, 43, 0.08);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: #c0392b;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

/* ============================================================
   BADGE STATUS (agendamentos)
   ============================================================ */
.badge-status {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: capitalize;
}

.badge-status--confirmado {
  background: rgba(76, 175, 125, 0.12);
  color: #2e7d5e;
}

.badge-status--concluido {
  background: rgba(212, 165, 160, 0.15);
  color: #8c5e5a;
}

.badge-status--cancelado {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.modal-overlay--visivel { opacity: 1; }

.modal {
  background: var(--branco);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}
.modal-overlay--visivel .modal { transform: translateY(0); }

.modal--lg { max-width: 680px; }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--rose-borda);
  position: sticky;
  top: 0;
  background: var(--branco);
  z-index: 1;
}

.modal__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--preto);
}

.modal__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal__footer {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--rose-borda);
  position: sticky;
  bottom: 0;
  background: var(--branco);
}

/* ============================================================
   FORMULÁRIOS (tema claro — páginas internas)
   ============================================================ */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--texto-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input {
  width: 100%;
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--texto);
  background: var(--branco);
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
}
.input:focus { border-color: var(--rose); }
.input::placeholder { color: var(--texto-muted); }
select.input { cursor: pointer; }
textarea.input { resize: vertical; min-height: 72px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ============================================================
   BOTÕES EXTRAS
   ============================================================ */
.btn--ghost {
  background: transparent;
  border: 1px solid var(--rose-borda);
  color: var(--texto-muted);
}
.btn--ghost:hover:not(:disabled) { border-color: var(--rose); color: var(--texto); }

.btn--danger {
  background: #c0392b;
  color: #fff;
}
.btn--danger:hover:not(:disabled) { opacity: 0.88; }

.btn--sm {
  padding: 5px 12px;
  font-size: 0.78rem;
  min-height: 36px;
}

.btn--icon {
  background: none;
  border: none;
  padding: 4px 6px;
  font-size: 1rem;
  opacity: 0.55;
  transition: opacity 0.15s;
  line-height: 1;
  min-height: auto;
}
.btn--icon:hover { opacity: 1; }

.btn--outline {
  background: transparent;
  border: 1px solid var(--rose);
  color: var(--rose);
}
.btn--outline:hover:not(:disabled) { background: var(--rose-fundo); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.toast--visivel { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--sucesso { background: #2e7d5e; color: #fff; }
.toast--erro    { background: #c0392b; color: #fff; }

/* ============================================================
   BUSCA E FILTROS
   ============================================================ */
.busca-wrapper {
  position: relative;
  margin-bottom: 16px;
}
.busca-input {
  width: 100%;
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius-sm);
  padding: 9px 13px 9px 38px;
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--branco);
  color: var(--texto);
  outline: none;
  transition: border-color 0.2s;
  min-height: 44px;
}
.busca-input:focus { border-color: var(--rose); }
.busca-input::placeholder { color: var(--texto-muted); }
.busca-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

.filtro-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.filtro-select {
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--branco);
  color: var(--texto);
  outline: none;
  cursor: pointer;
  min-height: 44px;
}
.filtro-select:focus { border-color: var(--rose); }

/* ============================================================
   TOTAL DESTAQUE
   ============================================================ */
.total-destaque {
  background: var(--preto);
  color: var(--rose);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.total-destaque__label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.total-destaque__valor {
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.total-destaque__grupo { display: flex; flex-direction: column; }

/* ============================================================
   BADGES EXTRAS
   ============================================================ */
.badge-status--pendente {
  background: rgba(230,180,50,0.12);
  color: #9a6f00;
}

.badge-cat {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}
.badge-cat--material  { background: rgba(76,175,125,0.12); color: #2e7d5e; }
.badge-cat--fixo      { background: rgba(52,152,219,0.12); color: #2471a3; }
.badge-cat--marketing { background: rgba(212,165,160,0.2);  color: #8c5e5a; }
.badge-cat--outro     { background: rgba(122,122,122,0.1);  color: #5a5a5a; }

.badge-pgto {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
}
.badge-pgto--pix      { background: rgba(76,175,125,0.12); color: #2e7d5e; }
.badge-pgto--cartao   { background: rgba(52,152,219,0.12); color: #2471a3; }
.badge-pgto--dinheiro { background: rgba(212,165,160,0.2);  color: #8c5e5a; }

.badge-baixo {
  background: rgba(192,57,43,0.1);
  color: #c0392b;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
}

/* ============================================================
   AGENDA — VISUALIZAÇÃO SEMANAL
   ============================================================ */
.agenda-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.agenda-nav__label {
  font-weight: 600;
  font-size: 0.95rem;
  flex: 1;
  text-align: center;
}

.agenda-semana {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.agenda-dia {
  background: var(--branco);
  border: 1px solid var(--rose-borda);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 120px;
}
.agenda-dia--hoje { border-color: var(--rose); }

.agenda-dia__header {
  background: var(--rose-fundo);
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid var(--rose-borda);
}
.agenda-dia--hoje .agenda-dia__header { background: var(--rose); }
.agenda-dia__dow {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--texto-muted);
}
.agenda-dia--hoje .agenda-dia__dow { color: rgba(255,255,255,0.7); }
.agenda-dia__num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--preto);
  line-height: 1.2;
}
.agenda-dia--hoje .agenda-dia__num { color: var(--preto); }

.agenda-dia__lista {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agenda-item {
  background: var(--rose-fundo);
  border-left: 3px solid var(--rose);
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1.4;
}
.agenda-item:hover { background: var(--rose-accent); }
.agenda-item--cancelado { opacity: 0.45; border-left-color: #c0392b; }
.agenda-item--concluido { border-left-color: var(--verde); background: rgba(76,175,125,0.06); }
.agenda-item__hora   { font-weight: 700; color: var(--preto); }
.agenda-item__nome   { color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-item__servico{ color: var(--texto-muted); font-size: 0.66rem; }

/* ============================================================
   COMPRAS — ITENS DINÂMICOS
   ============================================================ */
.itens-lista { display: flex; flex-direction: column; gap: 8px; }

.item-linha {
  display: grid;
  grid-template-columns: 1fr 70px 80px 90px 32px;
  gap: 8px;
  align-items: center;
}

.total-compra {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 0 0;
  border-top: 1px solid var(--rose-borda);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--preto);
  margin-top: 4px;
}

.modal-steps {
  display: flex;
  border-bottom: 1px solid var(--rose-borda);
  margin: -24px -24px 20px;
}
.modal-step {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--texto-muted);
  border-bottom: 2px solid transparent;
}
.modal-step--ativo { color: var(--rose); border-bottom-color: var(--rose); }

/* ============================================================
   DETALHES COMPRA
   ============================================================ */
.detalhe-compra {
  background: var(--rose-fundo);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.85rem;
}
.detalhe-compra dt {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--texto-muted);
  margin-top: 8px;
}
.detalhe-compra dd { margin: 2px 0 0; color: var(--texto); }

/* ============================================================
   UPLOAD AREA (IA Compras)
   ============================================================ */
.upload-area {
  border: 2px dashed var(--rose-borda);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: var(--rose-fundo);
}
.upload-area:hover,
.upload-area--drag { border-color: var(--rose); background: #EDE5E2; }

.upload-area__icon { font-size: 2.4rem; margin-bottom: 10px; }
.upload-area__texto { font-size: 0.9rem; color: var(--texto); font-weight: 500; }
.upload-area__sub   { font-size: 0.78rem; color: var(--texto-muted); margin-top: 4px; }

.upload-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--rose-borda);
}
.upload-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: var(--rose-fundo);
}
.upload-preview__remover {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ia-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(196,149,106,0.1);
  border: 1px solid var(--rose-accent);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--rose-hover);
  font-weight: 500;
}
.ia-spinner__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rose);
  animation: pulseDot 1.2s infinite ease-in-out;
  flex-shrink: 0;
}
@keyframes pulseDot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1.2); }
}

.ia-aviso {
  background: rgba(76,175,125,0.08);
  border: 1px solid rgba(76,175,125,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #2e7d5e;
}

/* ============================================================
   RESPONSIVO — TABLET (601px – 768px) → sidebar ícones 60px
   ============================================================ */
@media (min-width: 601px) and (max-width: 768px) {
  .sidebar {
    width: var(--sidebar-w-tablet);
  }

  .sidebar__logo {
    padding: 14px 8px;
  }

  .sidebar__logo-img {
    width: 36px;
    border-radius: 50%;
  }

  .sidebar__nav {
    padding: 12px 8px;
    align-items: center;
  }

  .nav-link {
    justify-content: center;
    padding: 10px;
    gap: 0;
  }

  .nav-link__label {
    display: none;
  }

  .nav-link__icon {
    width: auto;
    font-size: 1.2rem;
  }

  .sidebar__footer {
    padding: 10px 8px;
  }

  .sidebar__copy,
  .btn-logout {
    display: none;
  }

  .main {
    margin-left: var(--sidebar-w-tablet);
  }

  .topbar__menu-btn {
    display: none;
  }

  #conteudo {
    padding: 24px 18px 40px;
  }

  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-title {
    font-size: 1.4rem;
  }
}

/* ============================================================
   RESPONSIVO — MOBILE (≤ 600px) → sem sidebar, bottom nav
   ============================================================ */
@media (max-width: 600px) {
  /* Sidebar completamente oculta no mobile */
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w);
  }

  /* Abre via overlay (não usada por padrão, mas mantida para futuro) */
  .sidebar--aberta {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  /* Topbar mobile: logo pequena + título, sem hambúrguer */
  .topbar {
    padding: 0 16px;
    height: 52px;
  }

  .topbar__menu-btn {
    display: none !important;
  }

  .topbar__nome {
    font-size: 0.85rem;
  }

  /* Conteúdo: padding lateral 16px, espaço para bottom nav */
  #conteudo {
    padding: 20px 16px 84px;
  }

  /* Dashboard: 2x2 */
  .cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
  }

  .card__value {
    font-size: 1.1rem;
  }

  .card__icon {
    font-size: 1.3rem;
  }

  /* Títulos */
  .page-title {
    font-size: 1.3rem;
  }

  .page-subtitle {
    font-size: 0.82rem;
  }

  .page-header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
  }

  .page-header .btn {
    align-self: flex-start;
    width: 100%;
    justify-content: center;
  }

  /* Tabelas: fonte menor, padding menor */
  .table th,
  .table td {
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  /* Formulários: 1 coluna */
  .form-row,
  .form-row--3 {
    grid-template-columns: 1fr;
  }

  /* Modal ocupa tela inteira no mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    max-height: 95dvh;
  }

  /* Agenda: lista vertical */
  .agenda-semana {
    grid-template-columns: 1fr;
  }

  /* Itens de compra: 2 colunas no mobile */
  .item-linha {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .item-linha .item-nome {
    grid-column: 1 / -1;
  }

  /* Outros ajustes */
  .placeholder-card {
    padding: 32px 20px;
  }

  .filtro-bar {
    gap: 6px;
  }

  .total-destaque {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  /* Bottom nav */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--preto);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 80;
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #666;
    font-size: 0.62rem;
    font-weight: 500;
    padding: 8px 4px;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    min-height: 62px;
  }

  .bottom-nav__item.nav-link--ativo {
    color: var(--rose);
  }

  .bottom-nav__icon {
    font-size: 1.3rem;
  }

  /* Toast sobe acima do bottom nav */
  .toast {
    bottom: 76px;
  }
}

/* ============================================================
   RESPONSIVO — DESKTOP GRANDE (> 768px)
   ============================================================ */
@media (min-width: 769px) {
  /* Garante que no desktop o hambúrguer nunca aparece */
  .topbar__menu-btn {
    display: none !important;
  }
}
