/* =====================================================
ESTILO GERAL / LAYOUT - L'ANGE BEAUTY
===================================================== */

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

:root {
  --primary-gold: #d4af37;
  --primary-pink: #e8b4cb;
  --primary-beige: #f5f5dc;
  --dark-brown: #3e2723;
  --light-rose: #ffe4e1;
  --accent-gold: #ffd700;
  --text-dark: #2c1810;
  --text-light: #6b4226;
  --sidebar-bg: linear-gradient(135deg, #3e2723 0%, #5d4037 100%);
  --card-shadow: 0 8px 32px rgba(212, 175, 55, 0.15);
}

body{
  font-family: 'Poppins', sans-serif;
  margin:0;
  background: linear-gradient(135deg, var(--light-rose) 0%, var(--primary-beige) 50%, #fff9f0 100%);
  color: var(--text-dark);
}

.layout{
  display:flex;
  min-height:100vh;
  position: relative;
  z-index: 2;
}

/* NOVA IMPLEMENTAÇÃO V1.2 - ESTILOS PARA FILTROS DINÂMICOS */
.filter-section {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-section h3 {
  margin: 0 0 15px 0;
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 600;
}

.filter-group {
  margin-bottom: 15px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 500;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.filter-actions {
  margin-top: 15px;
  text-align: right;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Estilo para filtros ativos */
.filter-select.has-filter,
.filter-input.has-filter {
  border-color: var(--primary-gold);
  background-color: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Estilo para busca geral */
#filtroGeral {
  background: linear-gradient(135deg, #fff 0%, rgba(212, 175, 55, 0.05) 100%);
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

#filtroGeral:focus {
  border-color: var(--primary-gold);
  background: linear-gradient(135deg, #fff 0%, rgba(212, 175, 55, 0.1) 100%);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Melhorias para selects com busca */
.filter-select {
  position: relative;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.filter-select:focus {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23d4af37' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

/* Indicadores visuais para filtros */
.filter-group label::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  margin-left: 8px;
  transition: background-color 0.3s ease;
}

.has-filter ~ label::after {
  background: var(--primary-gold);
  box-shadow: 0 0 4px rgba(212, 175, 55, 0.4);
}

/* NOVA IMPLEMENTAÇÃO V1.2 - INDICADORES DE CARREGAMENTO */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-gold);
  animation: spin 1s ease-in-out infinite;
}

.loading-spinner-small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.loading-spinner-large {
  width: 32px;
  height: 32px;
  border-width: 4px;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.loading-overlay-content {
  text-align: center;
  color: var(--text-dark);
}

.loading-overlay-text {
  margin-top: 15px;
  font-size: 16px;
  font-weight: 500;
}

.loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.loading-text {
  color: var(--text-light);
  font-size: 14px;
  font-style: italic;
}

.loading-table {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

.loading-table .loading-spinner {
  margin-bottom: 15px;
}

.loading-table-text {
  font-size: 16px;
  color: var(--text-light);
}

/* Loading para botões */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

.btn.btn-secondary.loading::after {
  border-color: rgba(212, 175, 55, 0.3);
  border-top-color: var(--primary-gold);
}

/* Loading para selects */
.loading-select {
  position: relative;
}

.loading-select::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 35px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-gold);
  animation: spin 1s ease-in-out infinite;
}

/* Loading para cards */
.loading-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.loading-card .loading-spinner {
  margin-bottom: 15px;
}

.loading-card-text {
  color: var(--text-light);
  font-size: 14px;
}

.sidebar{
  width:260px;
  background: var(--sidebar-bg);
  color: var(--primary-beige);
  padding:30px 20px;
  box-shadow: 4px 0 24px rgba(0,0,0,0.1);
  position: relative;
  z-index: 3;
}

.sidebar h2{
  margin:0 0 30px 0;
  font-family: 'Playfair Display', serif;
  font-size:24px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:12px;
  color: var(--primary-gold);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Estilo para autocomplete estilo Google */
.autocomplete-container {
  position: relative;
  width: 100%;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background-color: rgba(212, 175, 55, 0.1);
}

.autocomplete-item.selected {
  background-color: rgba(212, 175, 55, 0.2);
}

.autocomplete-item .highlight {
  font-weight: 600;
  color: var(--primary-gold);
}

.autocomplete-item .type {
  font-size: 12px;
  color: var(--text-light);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: auto;
}

.autocomplete-no-results {
  padding: 12px;
  color: var(--text-light);
  font-size: 14px;
  text-align: center;
  font-style: italic;
}

/* Loading no autocomplete */
.autocomplete-loading {
  padding: 12px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
}

.autocomplete-loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-gold);
  animation: spin 1s ease-in-out infinite;
  margin-left: 8px;
  vertical-align: middle;
}

/* =====================================================
FILTROS - L'ANGE BEAUTY
===================================================== */

.filter-section {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(245, 245, 220, 0.8));
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.2);
  backdrop-filter: blur(10px);
}

.filter-section h3 {
  margin: 0 0 15px 0;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: var(--dark-brown);
  font-weight: 600;
}

.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-light);
  font-weight: 500;
  backdrop-filter: blur(5px);
}

.filter-chip:hover {
  border-color: var(--primary-gold);
  color: var(--dark-brown);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-gold));
  color: var(--dark-brown);
  border-color: var(--primary-gold);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.sidebar nav a{
  display:block;
  color: var(--primary-beige);
  text-decoration:none;
  padding:10px 0;
  transition:all 0.3s ease;
  font-weight:400;
}

.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 18px;
  border-radius:12px;
  margin-bottom:10px;
  transition:all 0.3s ease;
  border: 1px solid transparent;
}

.nav-item:hover{
  background: rgba(212, 175, 55, 0.2);
  color: var(--primary-gold);
  transform: translateX(8px);
  border-color: var(--primary-gold);
}

.nav-item.active{
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-gold));
  color: var(--dark-brown);
  font-weight:600;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.nav-icon{
  font-size:20px;
  width:28px;
  text-align:center;
}

.nav-text{
  flex:1;
}

.content{
  flex:1;
  padding:30px 40px;
  background: white;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--dark-brown);
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.header-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold), var(--accent-gold));
  color: var(--dark-brown);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
  background: rgba(212, 175, 55, 0.1);
  color: var(--text-dark);
  border: 1px solid var(--primary-gold);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: translateY(-1px);
}

/* =====================================================
CALENDÁRIO
===================================================== */

#calendar{
  max-width:1100px;
  margin:20px auto;
  background:#fff;
  border-radius:8px;
  padding:10px;
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
}

.toolbar-extra{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:15px;
  padding:10px;
  background:#f8fafc;
  border-radius:6px;
  border:1px solid #e2e8f0;
}

.instrucoes-drag{
  font-size:14px;
  color:#64748b;
  font-style:italic;
}

.calendar-container {
  background: white;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  padding: 30px;
  margin-bottom: 30px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

#calendar{
  border-radius: 12px;
  overflow: hidden;
}

.toolbar-extra{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  padding:16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(232, 180, 203, 0.05));
  border-radius:12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.toolbar-info {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
}

.info-badge {
  background: var(--primary-gold);
  color: var(--dark-brown);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}

/* =====================================================
MODAL
===================================================== */

.modal{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.6);
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.modal-content{
  background:white;
  padding:20px;
  border-radius:8px;
  width:380px;
  box-shadow:0 10px 30px rgba(0,0,0,0.3);
  z-index:10000;
  overflow-x: hidden;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(62, 39, 35, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 30px;
  width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  z-index: 10000;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--dark-brown);
  margin: 0;
  font-weight: 600;
}

.btn-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  opacity: 0.7;
}

.btn-close:hover {
  opacity: 1;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-dark);
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

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

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #f44336, #ef5350);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

/* ESTILOS PADRONIZADOS PARA BOTÃO DE LOGOUT
===================================================== */

.modal-content label{
  display:block;
  margin-top:10px;
}

.modal-content select,
.modal-content textarea,
.modal-content input[type="datetime-local"],
.modal-content input[type="text"],
.modal-content input[type="tel"],
.modal-content input[type="email"],
.modal-content input[type="password"]{
  width:100%;
  margin-top:5px;
  padding:6px;
  box-sizing: border-box;
}

/* =====================================================
BOTÕES
===================================================== */

.botoes{
  margin-top:15px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
}

.botoes button{
  padding:8px 12px;
  cursor:pointer;
}

/* =====================================================
EVENTOS ESPECIAIS (BLOQUEIOS)
===================================================== */

.fc-event.bloqueio{
  background-color:var(--text-light) !important; /* cor de fundo para bloqueios */
  border-color:var(--dark-brown) !important;
  color:var(--primary-beige) !important;
  opacity: 0.85 !important;
}

/* =====================================================
DRAG AND DROP - INDICADORES VISUAIS
===================================================== */

.fc-event:not(.bloqueio){
  cursor:move !important;
}

.fc-event:not(.bloqueio):hover{
  opacity:0.8;
  transform:scale(1.02);
  transition:all 0.2s ease;
}

.fc-event.fc-event-dragging{
  opacity:0.7;
  z-index:1000;
}

.fc-event.fc-event-resizing{
  opacity:0.8;
}

/* Indicador de resize */
.fc-event .fc-event-resizer{
  background-color:var(--primary-gold);
  border:1px solid var(--dark-brown);
}

.fc-event .fc-event-resizer:hover{
  background-color:var(--dark-brown);
}

/* =====================================================
HISTÓRICO DO CLIENTE
===================================================== */

#historicoCliente{
  margin-top:20px;
  padding:15px;
  background:var(--primary-beige);
  border-radius:6px;
  border:1px solid #e2e8f0;
}

#selectClienteHistorico{
  width:100%;
  padding:8px;
  margin-bottom:15px;
  border:1px solid #d1d5db;
  border-radius:4px;
  background:white;
}

#conteudoHistorico table{
  margin-top:10px;
  background:white;
  border-radius:4px;
  overflow:hidden;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
}

#conteudoHistorico th{
  background:var(--dark-brown);
  color:var(--primary-beige);
  padding:10px;
  text-align:left;
  font-weight:bold;
}

#conteudoHistorico td{
  padding:10px;
  border-bottom:1px solid #e5e7eb;
}

#conteudoHistorico tr:last-child td{
  border-bottom:none;
}

#conteudoHistorico tr:hover{
  background:var(--primary-beige);
}

/* Status colors */
.status-agendado{
  color:#3b82f6;
  font-weight:bold;
}

.status-confirmado{
  color:#10b981;
  font-weight:bold;
}

.status-em_andamento{
  color:#f59e0b;
  font-weight:bold;
}

.status-concluido{
  color:#6b7280;
  font-weight:bold;
}

.status-cancelado{
  color:#ef4444;
  font-weight:bold;
}

.status-nao_compareceu{
  color:#f97316;
  font-weight:bold;
}

/* =====================================================
MODAL ESPECÍFICO PARA PROFISSIONAIS - EVITAR CONFLITOS
===================================================== */

#modalProfissional .modal-content {
  background: white !important;
  border-radius: 20px !important;
  padding: 30px !important;
  width: 420px !important;
  max-width: 90vw !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
  z-index: 10000 !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* =====================================================
MODAL GERAL - MANTER PARA OUTRAS PÁGINAS
===================================================== */

.modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 20px;
  border-bottom:1px solid #e5e7eb;
  margin-bottom:20px;
}

.modal-header h3{
  margin:0;
  color:#1f2937;
  font-size:18px;
}

.btn-close{
  background:none;
  border:none;
  font-size:24px;
  cursor:pointer;
  color:#6b7280;
  padding:0;
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  transition:all 0.2s ease;
}

.btn-close:hover{
  background:#f3f4f6;
  color:#374151;
}

.modal-body{
  max-height:60vh;
  overflow-y:auto;
}

.form-section{
  margin-bottom:20px;
}

.form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:15px;
  margin-bottom:15px;
}

.form-group{
  display:flex;
  flex-direction:column;
}

.form-group label{
  margin-bottom:5px;
  font-weight:500;
  color:#374151;
}

.form-control{
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:6px;
  font-size:14px;
  transition:border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus{
  outline:none;
  border-color:#3b82f6;
  box-shadow:0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding-top:20px;
  border-top:1px solid #e5e7eb;
}

.btn{
  padding:10px 20px;
  border:none;
  border-radius:6px;
  font-size:14px;
  font-weight:500;
  cursor:pointer;
  transition:all 0.2s ease;
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.btn-primary{
  background:#3b82f6;
  color:white;
}

.btn-primary:hover{
  background:#2563eb;
  transform:translateY(-1px);
}

.btn-secondary{
  background:#6b7280;
  color:white;
}

.btn-secondary:hover{
  background:#4b5563;
  transform:translateY(-1px);
}

.btn-danger{
  background:#ef4444;
  color:white;
}

.btn-danger:hover{
  background:#dc2626;
  transform:translateY(-1px);
}

/* =====================================================
ALERTAS CUSTOMIZADAS
===================================================== */

.alert-container{
  position:fixed;
  top:20px;
  right:20px;
  z-index:10000;
  max-width:400px;
}

.alert{
  padding:15px 20px;
  border-radius:8px;
  margin-bottom:10px;
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
  animation:slideIn 0.3s ease;
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:500;
}

.alert-success{
  background:#10b981;
  color:white;
  border-left:4px solid #059669;
}

.alert-error{
  background:#ef4444;
  color:white;
  border-left:4px solid #dc2626;
}

.alert-warning{
  background:#f59e0b;
  color:white;
  border-left:4px solid #d97706;
}

.alert-info{
  background:#3b82f6;
  color:white;
  border-left:4px solid #2563eb;
}

/* Alertas com ícones */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.alert-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

@keyframes slideIn{
  from{
    transform:translateX(100%);
    opacity:0;
  }
  to{
    transform:translateX(0);
    opacity:1;
  }
}

/* =====================================================
RESPONSIVIDADE
===================================================== */

@media (max-width:768px){
  .layout{
    flex-direction:column;
  }
  
  .sidebar{
    width:100%;
    height:auto;
    padding:15px;
  }
  
  .content{
    padding:15px;
  }
  
  .form-row{
    grid-template-columns:1fr;
    gap:10px;
  }
  
  .toolbar-extra{
    flex-direction:column;
    gap:10px;
    align-items:flex-start;
  }
  
  .modal-content{
    width:95%;
    max-width:500px;
    margin:10px;
  }
  
  .alert-container{
    left:10px;
    right:10px;
    max-width:none;
  }
}

/* =====================================================
LOADING STATES
===================================================== */

.form-control:disabled{
  background:#f9fafb;
  color:#6b7280;
  cursor:not-allowed;
}

.btn:disabled{
  opacity:0.6;
  cursor:not-allowed;
  transform:none;
}

/* =====================================================
TOOLTIP
===================================================== */

.tooltip{
  position:relative;
}

.tooltip::after{
  content:attr(data-tooltip);
  position:absolute;
  bottom:100%;
  left:50%;
  transform:translateX(-50%);
  background:#1f2937;
  color:white;
  padding:5px 10px;
  border-radius:4px;
  font-size:12px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  transition:opacity 0.2s ease;
  z-index:1000;
}

.tooltip:hover::after{
  opacity:1;
}

/* =====================================================
DASHBOARD COMPONENTS
===================================================== */

.page-header{
  text-align:center;
  margin-bottom:30px;
  padding:20px;
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color:white;
  border-radius:12px;
  box-shadow:0 4px 15px rgba(102, 126, 234, 0.3);
}

.header-subtitle{
  font-size:16px;
  opacity:0.9;
  margin-top:8px;
}

.dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:20px;
  margin-bottom:40px;
}

.dashboard-card{
  background:white;
  border-radius:12px;
  padding:24px;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
  cursor:pointer;
  transition:all 0.3s ease;
  border:2px solid transparent;
  position:relative;
  overflow:hidden;
}

.dashboard-card::before{
  content:'';
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background:linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition:width 0.3s ease;
  width:0;
}

.dashboard-card:hover{
  transform:translateY(-5px);
  box-shadow:0 8px 25px rgba(0,0,0,0.15);
  border-color:#3b82f6;
}

.dashboard-card:hover::before{
  width:100%;
}

.card-icon{
  font-size:48px;
  margin-bottom:16px;
  display:block;
  text-align:center;
}

.card-content h3{
  margin:0 0 8px 0;
  color:#1f2937;
  font-size:20px;
}

.card-content p{
  margin:0;
  color:#6b7280;
  line-height:1.5;
}

.card-arrow{
  position:absolute;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  font-size:24px;
  color:#cbd5e1;
  transition:all 0.3s ease;
}

.dashboard-card:hover .card-arrow{
  color:#3b82f6;
  transform:translateY(-50%) translateX(5px);
}

.stats-section{
  background:#f8fafc;
  border-radius:12px;
  padding:24px;
  margin-bottom:30px;
}

.stats-section h2{
  margin:0 0 20px 0;
  color:#1f2937;
  font-size:18px;
}

.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(200px, 1fr));
  gap:16px;
}

.stat-card{
  background:white;
  border-radius:8px;
  padding:20px;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
  display:flex;
  align-items:center;
  gap:16px;
  transition:all 0.2s ease;
}

.stat-card:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon{
  font-size:32px;
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f3f4f6;
  border-radius:50%;
}

.stat-content{
  flex:1;
}

.stat-value{
  font-size:24px;
  font-weight:bold;
  color:#1f2937;
  line-height:1;
}

.stat-label{
  font-size:14px;
  color:#6b7280;
  margin-top:4px;
}

.next-appointment{
  margin-bottom:30px;
}

.next-appointment h2{
  margin:0 0 20px 0;
  color:#1f2937;
  font-size:18px;
}

.next-appointment .stats-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.appointment-card{
  background:white;
  border-radius:8px;
  padding:20px;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
  display:flex;
  align-items:center;
  transition:all 0.2s ease;
  border-left:4px solid #3b82f6;
}

.appointment-card:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.appointment-loading{
  display:flex;
  align-items:center;
  gap:12px;
  color:#6b7280;
  font-size:14px;
  width:100%;
  justify-content:center;
}

.loading-spinner{
  font-size:20px;
  animation:spin 1s linear infinite;
}

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

.appointment-content{
  display:flex;
  align-items:center;
  gap:20px;
  width:100%;
}

.appointment-time-block{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:80px;
}

.appointment-time{
  background:#3b82f6;
  color:white;
  padding:8px 12px;
  border-radius:6px;
  font-weight:600;
  font-size:16px;
  text-align:center;
  line-height:1;
}

.appointment-date{
  font-size:12px;
  color:#6b7280;
  margin-top:4px;
  text-align:center;
}

.appointment-details{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.appointment-client{
  font-size:16px;
  font-weight:600;
  color:#1f2937;
}

.appointment-service{
  font-size:14px;
  color:#6b7280;
}

.appointment-professional{
  font-size:13px;
  color:#3b82f6;
  font-weight:500;
}

.appointment-empty{
  text-align:center;
  color:#6b7280;
  font-size:14px;
  padding:20px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.appointment-empty .empty-icon{
  font-size:32px;
  opacity:0.5;
}

.appointments-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, 300px);
  gap:16px;
  width:100%;
  justify-content:start;
}

.appointments-grid .appointment-card{
  border-left:4px solid #3b82f6;
}

.appointments-grid .appointment-card:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.appointment-item{
  background:white;
  border-radius:8px;
  padding:20px;
  box-shadow:0 1px 3px rgba(0,0,0,0.1);
  display:flex;
  align-items:center;
  transition:all 0.2s ease;
  border-left:4px solid #3b82f6;
}

.appointment-item:hover{
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.calendar-container{
  background:white;
  border-radius:12px;
  padding:20px;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
  margin-bottom:20px;
}

.header-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-bottom:20px;
}

.toolbar-info{
  display:flex;
  align-items:center;
  gap:8px;
}

.info-badge{
  background:#fef3c7;
  color:#92400e;
  padding:4px 8px;
  border-radius:12px;
  font-size:12px;
  font-weight:bold;
}

.info-text{
  font-size:14px;
  color:#6b7280;
  font-style:italic;
}

/* =====================================================
TABELAS MODERNAS
===================================================== */

.table-container{
  background:white;
  border-radius:12px;
  padding:24px;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
  margin-bottom:30px;
}

.table-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
}

.table-header h2{
  margin:0;
  color:#1f2937;
  font-size:18px;
}

.table-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.table-wrapper{
  overflow-x:auto;
  border-radius:8px;
  border:1px solid #e5e7eb;
}

.modern-table{
  width:100%;
  border-collapse:collapse;
  background:white;
}

.modern-table thead{
  background:#f8fafc;
  border-bottom:2px solid #e5e7eb;
}

.modern-table th{
  padding:12px 16px;
  text-align:left;
  font-weight:600;
  color:#374151;
  font-size:14px;
  white-space:nowrap;
}

.modern-table td{
  padding:12px 16px;
  border-bottom:1px solid #f3f4f6;
  font-size:14px;
}

.modern-table tbody tr:hover{
  background:#f8fafc;
}

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

.table-actions{
  display:flex;
  gap:4px;
}

.btn-sm{
  padding:6px 8px;
  font-size:12px;
  min-width:auto;
}

.text-center{
  text-align:center;
}

.text-muted{
  color:#6b7280;
  font-size:12px;
}

/* =====================================================
BADGES
===================================================== */

.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:12px;
  font-size:12px;
  font-weight:500;
  white-space:nowrap;
}

.badge-primary{
  background:#dbeafe;
  color:#1e40af;
}

.badge-success{
  background:#d1fae5;
  color:#065f46;
}

.badge-warning{
  background:#fef3c7;
  color:#92400e;
}

.badge-danger{
  background:#fee2e2;
  color:#991b1b;
}

.status-badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:12px;
  font-size:12px;
  font-weight:500;
}

/* =====================================================
EMPTY STATES
===================================================== */

.empty-state{
  text-align:center;
  padding:40px 20px;
  color:#6b7280;
}

.empty-icon{
  font-size:48px;
  margin-bottom:16px;
  opacity:0.5;
}

.empty-text{
  font-size:16px;
  margin-bottom:20px;
}

/* =====================================================
HISTÓRICO SECTION
===================================================== */

.history-section{
  background:white;
  border-radius:12px;
  padding:24px;
  box-shadow:0 2px 10px rgba(0,0,0,0.1);
  margin-top:30px;
}

.history-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
  padding-bottom:16px;
  border-bottom:1px solid #e5e7eb;
}

.history-header h2{
  margin:0;
  color:#1f2937;
  font-size:18px;
}

.client-info{
  margin-bottom:24px;
}

.client-card{
  background:#f8fafc;
  border-radius:8px;
  padding:16px;
  border-left:4px solid #3b82f6;
}

.client-card h3{
  margin:0 0 12px 0;
  color:#1f2937;
  font-size:16px;
}

.client-card p{
  margin:4px 0;
  color:#6b7280;
  font-size:14px;
}

.client-card strong{
  color:#374151;
}

.history-table{
  background:white;
  border-radius:8px;
  overflow:hidden;
  border:1px solid #e5e7eb;
}

/* =====================================================
CLIENT NAME STYLING
===================================================== */

.client-name{
  max-width:200px;
}

.client-name strong{
  display:block;
  color:#1f2937;
  font-weight:600;
}

/* =====================================================
FORM VALIDATION
===================================================== */

.form-control:invalid{
  border-color:#ef4444;
}

.form-control:valid{
  border-color:#10b981;
}

/* =====================================================
LOADING STATES
===================================================== */

.loading-overlay{
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:rgba(255,255,255,0.8);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.loading-spinner{
  width:40px;
  height:40px;
  border:4px solid #f3f4f6;
  border-top:4px solid #3b82f6;
  border-radius:50%;
  animation:spin 1s linear infinite;
}

@keyframes spin{
  0%{ transform:rotate(0deg); }
  100%{ transform:rotate(360deg); }
}

/* =====================================================
COLOR PICKER
===================================================== */

.color-picker-wrapper{
  display:flex;
  gap:10px;
  align-items:center;
}

.color-picker{
  width:60px;
  height:40px;
  border:2px solid #e5e7eb;
  border-radius:8px;
  cursor:pointer;
  transition:border-color 0.2s ease;
}

.color-picker:hover{
  border-color:#3b82f6;
}

.color-hex{
  width:120px;
  font-family:monospace;
  text-transform:uppercase;
}

.color-display{
  display:flex;
  align-items:center;
  gap:8px;
}

.color-badge{
  width:20px;
  height:20px;
  border-radius:4px;
  border:1px solid #e5e7eb;
}

.color-code{
  font-family:monospace;
  font-size:12px;
  background:#f3f4f6;
  padding:2px 4px;
  border-radius:4px;
}

/* =====================================================
PROFESSIONAL NAME STYLING
===================================================== */

.professional-name{
  max-width:200px;
}

.professional-name strong{
  display:block;
  color:#1f2937;
  font-weight:600;
}

/* =====================================================
SERVICE NAME STYLING
===================================================== */

.service-name{
  max-width:200px;
}

.service-name strong{
  display:block;
  color:#1f2937;
  font-weight:600;
}

/* =====================================================
FORM HELP TEXT
===================================================== */

.form-help{
  display:block;
  margin-top:4px;
  font-size:12px;
  color:#6b7280;
  font-style:italic;
}

/* =====================================================
RESPONSIVE TABLES
===================================================== */

@media (max-width:768px){
  .table-container{
    padding:16px;
  }
  
  .table-header{
    flex-direction:column;
    gap:16px;
    align-items:stretch;
  }
  
  .table-actions{
    justify-content:center;
  }
  
  .modern-table{
    font-size:12px;
  }
  
  .modern-table th,
  .modern-table td{
    padding:8px 12px;
  }
  
  .table-actions{
    flex-direction:column;
    gap:2px;
  }
  
  .client-name,
  .service-name,
  .professional-name{
    max-width:150px;
  }
  
  .history-section{
    padding:16px;
  }
  
  .history-header{
    flex-direction:column;
    gap:12px;
    align-items:stretch;
  }

  .color-picker-wrapper{
    flex-wrap:wrap;
  }

  .color-hex{
    width:100%;
  }
}

/* =====================================================
SELETOR DE CORES PARA SERVIÇOS
===================================================== */

.color-picker-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.color-input {
  width: 80px;
  height: 40px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.color-input:hover {
  border-color: #4285f4;
  transform: scale(1.05);
}

.color-preview {
  flex: 1;
  padding: 8px 12px;
  border-radius: 6px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.preview-text {
  color: #5f6368;
}

/* Animação de cor */
.color-preview {
  animation: colorChange 0.3s ease;
}

@keyframes colorChange {
  0% { opacity: 0.7; }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* =====================================================
ESTILOS DA FICHA DE ANAMNESE
===================================================== */

/* Modal de Anamnese */
.modal-anamnese {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Seções da Anamnese */
.anamnese-section {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.anamnese-section h4 {
  margin-bottom: 20px;
  color: var(--primary-gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.anamnese-section h4 i {
  font-size: 18px;
}

/* Formulário de Anamnese */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-dark);
}

.form-control {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Checkboxes estilizados */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
  color: var(--text-dark);
  font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-gold);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-label span {
  line-height: 18px;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-3px);
}

/* Campos restritos para profissionais */
.form-control[data-restricted="true"] {
  background-color: #f8f9fa;
  border-color: #e9ecef;
  cursor: not-allowed;
}

.form-control[data-restricted="true"]:focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.form-control[data-restricted="true"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-control[data-restricted="true"]:not(:disabled) {
  background-color: #ffffff;
  border-color: #ddd;
  cursor: text;
}

.form-control[data-restricted="true"]:not(:disabled):focus {
  border-color: var(--primary-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Responsividade */
@media (max-width: 768px) {
  .modal-anamnese {
    width: 98%;
    max-height: 95vh;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .anamnese-section {
    padding: 15px;
  }
}

/* Animações */
.anamnese-section {
  animation: slideIn 0.3s ease;
}

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

/* Botão de responsável aparecendo */
#rowResponsavel {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* =====================================================
ESTILOS PADRONIZADOS PARA BOTÃO DE LOGOUT
===================================================== */

.logout-btn {
  position: fixed !important;
  bottom: 20px !important;
  left: 20px !important;
  right: auto !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #dc3545 !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  font-family: 'Poppins', sans-serif !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
  width: auto !important;
  min-width: 150px !important;
  max-width: 200px !important;
  height: auto !important;
  min-height: 43px !important;
  max-height: 43px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.logout-btn:hover {
  background: #b91c1c;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.logout-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.logout-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

/* Responsividade para o botão de logout */
@media (max-width: 768px) {
  .logout-btn {
    bottom: 15px;
    left: 15px;
    padding: 10px 16px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .logout-btn {
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

/* =====================================================
ESTILOS PARA SIDEBAR COLLAPSIBLE - GOOGLE CALENDAR STYLE
===================================================== */

.sidebar.collapsed {
  width: 0;
  padding: 0;
  overflow: hidden;
}

.sidebar.collapsed * {
  display: none;
}

/* EXCEÇÃO: Botão de logout deve sempre ser gerenciado pelo JavaScript, não pelo CSS */
.sidebar.collapsed .logout-btn {
  display: none !important;
}

/* Botão de toggle da sidebar */
.menu-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--primary-gold);
  color: white;
  border: none;
  border-radius: 6px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.menu-toggle:hover {
  background: #b8941f;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.menu-toggle:active {
  transform: scale(0.95);
}

/* Quando a sidebar está fechada, botão fica no conteúdo */
.sidebar.collapsed + .content .menu-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--primary-gold);
}

.sidebar.collapsed + .content .menu-toggle:hover {
  background: #b8941f;
}

/* Animação suave da sidebar */
.sidebar {
  transition: width 0.3s ease, padding 0.3s ease;
}

/* Ajuste do conteúdo quando sidebar está fechada */
.sidebar.collapsed + .content {
  margin-left: 0;
  width: 100%;
}

/* Responsividade para o botão */
@media (max-width: 768px) {
  .menu-toggle {
    width: 35px;
    height: 35px;
    font-size: 16px;
    top: 15px;
    right: 15px;
  }
  
  .sidebar.collapsed + .content .menu-toggle {
    top: 15px;
    left: 15px;
  }
}