/*
 * styles.css - Folha de estilo premium para o Glow Manager
 * Tema: Dark Beauty Salon, cores roxo/rosa neon, acentos dourados (VIP) e estilo glassmorphism.
 */

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

:root {
  --bg-main: #FAF8F5; /* Softest warm ivory/off-white */
  --bg-card: rgba(255, 255, 255, 0.85); /* Milky translucent white */
  --bg-sidebar: #F2EADF; /* Exactly matches the warm cream background of the logo */
  --bg-input: #FFFFFF; /* Clean white input boxes */
  
  --border-color: rgba(197, 168, 128, 0.18); /* Soft gold-tinted borders */
  --border-glow: rgba(197, 168, 128, 0.4);
  
  --text-primary: #3A322B; /* Dark chocolate/bronze for high-contrast legibility */
  --text-secondary: #706357; /* Medium warm taupe */
  --text-muted: #A09489; /* Muted warm sand */
  
  --accent-pink: #C5A880; /* Elegant Champagne Gold */
  --accent-pink-glow: rgba(197, 168, 128, 0.35);
  --accent-purple: #B28F60; /* Soft Amber / Rich Satin Gold */
  --accent-purple-glow: rgba(178, 143, 96, 0.35);
  --accent-cyan: #7CA19F; /* Elegant Eucalyptus / Sage Green-Teal */
  --accent-gold: #D4AF37; /* Metallic Gold for VIP tags */
  --accent-green: #629E7F; /* Botanical Sage Green for successful statuses */
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-neon: 0 8px 32px 0 rgba(140, 123, 108, 0.08);
  --shadow-pink: 0 0 15px rgba(197, 168, 128, 0.3);
  --shadow-purple: 0 0 15px rgba(178, 143, 96, 0.25);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-image: 
    radial-gradient(at 10% 20%, rgba(197, 168, 128, 0.08) 0px, transparent 50%),
    radial-gradient(at 90% 80%, rgba(178, 143, 96, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-pink);
}

/* --- Layout Estrutural --- */

.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  z-index: 10;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }

.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
  min-width: 0;
}

/* Sidebar Logo */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.5rem;
}

.logo-brand {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.logo-brand:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), var(--shadow-pink);
  border-color: rgba(255, 74, 139, 0.3);
}

/* Sidebar Navigation */
.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 500;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.nav-item a i {
  width: 20px;
  height: 20px;
  transition: var(--transition-smooth);
}

.nav-item a:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-item.active a {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(197, 168, 128, 0.18) 0%, rgba(197, 168, 128, 0.03) 100%);
  border-left: 3px solid var(--accent-pink);
  box-shadow: inset 5px 0 15px rgba(197, 168, 128, 0.08);
}

.nav-item.active a i {
  color: var(--accent-pink);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Cabeçalho e Seções --- */

header {
  padding: 2rem 3rem 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(250, 248, 245, 0.75);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.page-title h1 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.view-section {
  display: none;
  padding: 2rem 3rem;
  animation: fadeIn 0.4s ease-out forwards;
  min-width: 0;
  max-width: 100%;
}

.view-section.active {
  display: block;
}

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

/* --- Botões Premium --- */

.btn {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  color: #fff;
  box-shadow: var(--shadow-purple);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pink), 0 5px 15px rgba(0, 0, 0, 0.4);
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: rgba(140, 123, 108, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(140, 123, 108, 0.18);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
  background-color: #e74c3c;
  color: #fff;
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  filter: brightness(1.05);
}

.btn-icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}

/* --- Cards e Grid --- */

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 2rem;
}

.card-stat {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-neon);
  transition: var(--transition-smooth);
}

.card-stat:hover {
  transform: translateY(-3px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-purple);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.pink {
  background: rgba(255, 74, 139, 0.15);
  color: var(--accent-pink);
}

.stat-icon.purple {
  background: rgba(179, 69, 241, 0.15);
  color: var(--accent-purple);
}

.stat-icon.cyan {
  background: rgba(0, 229, 255, 0.15);
  color: var(--accent-cyan);
}

.stat-icon.gold {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-gold);
}

.stat-info .stat-value {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-info .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- Dashboard Dashboard Layout --- */

.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.dashboard-panel {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-neon);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-header h2 i {
  color: var(--accent-pink);
}

/* Listas e Tabelas */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-glow);
}

.contact-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-title);
}

.user-avatar.vip {
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.contact-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vip-badge {
  background: rgba(243, 156, 18, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(243, 156, 18, 0.3);
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 700;
}

.contact-details p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.contact-status {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.badge-overdue {
  background-color: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.badge-warning {
  background-color: rgba(243, 156, 18, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(243, 156, 18, 0.3);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.contact-actions {
  margin-top: 4px;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state i {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* --- Tabelas de Registros --- */

.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 14px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 14px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

tr {
  transition: var(--transition-smooth);
}

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.015);
}

/* --- Formulários Premium --- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 1.5rem;
  width: 100%;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="text"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--font-body);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-smooth);
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px var(--border-glow);
  background-color: var(--bg-input);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-top: 10px;
}

.checkbox-group input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-pink);
  cursor: pointer;
}

/* Área de Upload de Foto */
.photo-upload-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}

.photo-uploader {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  background-color: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.photo-uploader:hover {
  border-color: var(--accent-pink);
  background-color: rgba(197, 168, 128, 0.04);
}

.photo-uploader i {
  color: var(--text-secondary);
  width: 24px;
  height: 24px;
}

.photo-uploader input[type="file"] {
  display: none;
}

.photo-uploader p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.photo-preview {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  display: none;
  border: 1px solid var(--border-color);
}

/* --- Perfil Detalhado da Cliente (Mockup Fiel) --- */

.profile-card {
  max-width: 600px;
  margin: 0 auto;
  background: #000; /* Igual à imagem do mockup */
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  font-family: monospace; /* Fonte tipo terminal/console como no mockup */
  color: #fff;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  line-height: 1.5;
  font-size: 14px;
}

.profile-section-divider {
  border-top: 1px dashed rgba(255, 255, 255, 0.4);
  margin: 16px -24px;
  padding: 0 24px;
  height: 0;
}

.profile-line {
  margin: 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 16px;
  font-weight: bold;
}

.profile-history-item {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}

.profile-badge-vip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-gold);
  font-weight: bold;
}

.profile-whatsapp-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background-color: transparent;
  border: 1px solid #fff;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.profile-whatsapp-btn:hover {
  background-color: #fff;
  color: #000;
}

.profile-photos-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.profile-photo-box {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px;
  text-align: center;
  font-size: 12px;
  background-color: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.profile-photo-box img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}

.profile-notes-list {
  list-style: none;
  padding-left: 0;
}

.profile-notes-list li {
  margin: 4px 0;
  display: flex;
  gap: 6px;
}

/* Modificador do Perfil Detalhado em visual moderno */
.profile-card-modern {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: var(--shadow-neon);
}

.profile-modern-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.profile-modern-user {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-modern-user .user-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-title);
  position: relative;
}

.profile-modern-user .user-avatar-large.vip {
  border: 3px solid var(--accent-gold);
  box-shadow: 0 0 20px rgba(243, 156, 18, 0.4);
}

.profile-modern-user h2 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-modern-user p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.profile-modern-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.profile-modern-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
}

.profile-modern-panel h3 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.profile-modern-panel h3 i {
  color: var(--accent-pink);
}

.profile-modern-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.profile-modern-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.profile-modern-history-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-modern-history-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.profile-modern-history-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-pink);
}

/* Modal Estilizado */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(5, 3, 7, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.modal-container {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.modal-container form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

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

.modal-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--accent-pink);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: rgba(0,0,0,0.03); border-radius: 10px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--accent-pink); border-radius: 10px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

/* Toast de Notificação */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-sidebar);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--accent-pink);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(140, 123, 108, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  transform: translateX(120%);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast.active {
  transform: translateX(0);
}

.toast.success {
  border-left-color: var(--accent-green);
}

.toast.error {
  border-left-color: #e74c3c;
}

.toast i {
  font-size: 1.2rem;
}

.toast.success i {
  color: var(--accent-green);
}

.toast.error i {
  color: #e74c3c;
}

/* --- Responsividade --- */
@media (max-width: 992px) {
  body {
    flex-direction: column;
    overflow-y: auto;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  .nav-menu {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .nav-item a {
    white-space: nowrap;
    padding: 8px 12px;
  }
  
  .main-content {
    overflow-y: visible;
  }
  
  header {
    padding: 1.5rem;
  }
  
  .view-section {
    padding: 1.5rem;
  }
  
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .profile-modern-grid {
    grid-template-columns: 1fr;
  }
  
  .photo-upload-container {
    grid-template-columns: 1fr;
  }
}

/* --- AGENDA CSS --- */
.agenda-view-tabs {
  display: inline-flex;
  background: white;
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.agenda-tab {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.agenda-tab.active {
  background: var(--accent-pink);
  color: white;
  box-shadow: 0 2px 8px rgba(197, 168, 128, 0.4);
}

.agenda-view-container {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.04);
  min-width: 0;
  max-width: 100%;
}

/* Day View Styles */
.agenda-day-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  align-items: flex-start;
}

.agenda-time-col {
  width: 60px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-top: 15px;
}

.agenda-card {
  flex: 1;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 15px;
  border-left: 5px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  transition: transform 0.2s;
  cursor: pointer;
}

.agenda-card:hover {
  transform: translateY(-2px);
}

.agenda-card.empty-slot {
  background: transparent;
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  justify-content: center;
  border-left: 1px dashed var(--border-color);
}

.agenda-card.empty-slot:hover {
  background: rgba(0,0,0,0.02);
}

.agenda-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.agenda-card-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.status-badge.agendado { background: #fff3cd; color: #856404; }
.status-badge.confirmado { background: #d4edda; color: #155724; }
.status-badge.cancelado { background: #f8d7da; color: #721c24; }
.status-badge.finalizado { background: #e2e3e5; color: #383d41; }

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status-dot.status-agendado { background: #ffc107; }
.status-dot.status-confirmado { background: #28a745; }
.status-dot.status-cancelado { background: #dc3545; }
.status-dot.status-finalizado { background: #343a40; }

/* Week View Styles */
.agenda-week-grid {
  display: grid;
  grid-template-columns: 50px repeat(6, 1fr);
  gap: 10px;
  min-width: 800px;
}
.agenda-week-header {
  text-align: center;
  font-weight: 600;
  padding: 10px;
  color: var(--text-secondary);
}
.agenda-week-header.today {
  background: var(--bg-main);
  border-radius: 10px;
  color: var(--accent-pink);
}
.agenda-week-time {
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-muted);
  transform: translateY(-50%);
  align-self: start;
}
.agenda-week-cell {
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  min-height: 80px;
  padding: 5px;
  position: relative;
}
.agenda-week-card {
  background: white;
  border-radius: 6px;
  padding: 8px;
  font-size: 0.8rem;
  margin-bottom: 5px;
  border-left: 3px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
}

/* Month View Styles */
.agenda-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  min-width: 800px;
}
.agenda-month-header {
  text-align: center;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 10px 0;
}
.agenda-month-day {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  min-height: 100px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.2s;
}
.agenda-month-day.today {
  border-color: var(--accent-pink);
  background: rgba(197, 168, 128, 0.05);
}
.agenda-month-day:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transform: translateY(-2px);
  cursor: pointer;
}
.agenda-month-date {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.agenda-month-count {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
/* =========================================================================
   AGENDA GRID VIEW
========================================================================= */

.agenda-grid-wrapper {
  display: flex;
  flex-direction: column;
  min-width: min-content;
  height: 100%;
}

.agenda-grid-header-row {
  display: flex;
  background-color: #faf9f7;
  border-bottom: 1px solid rgba(197, 168, 128, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.agenda-time-col-header {
  width: 80px;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-right: 1px solid rgba(197, 168, 128, 0.2);
  padding: 10px;
}

.agenda-prof-col-header {
  flex: 1;
  min-width: 200px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-right: 1px solid rgba(197, 168, 128, 0.2);
}

.agenda-prof-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.agenda-prof-info {
  display: flex;
  flex-direction: column;
}

.agenda-prof-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.agenda-prof-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.agenda-grid-body {
  display: flex;
  flex: 1;
  position: relative;
}

.agenda-time-column {
  width: 80px;
  min-width: 80px;
  border-right: 1px solid rgba(197, 168, 128, 0.2);
  background-color: #ffffff;
  position: relative;
}

.agenda-time-slot-label {
  height: 60px; /* 1 hour = 60px */
  border-bottom: 1px solid rgba(197, 168, 128, 0.1);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  box-sizing: border-box;
}

.agenda-prof-column {
  flex: 1;
  min-width: 200px;
  border-right: 1px solid rgba(197, 168, 128, 0.2);
  position: relative;
  background-image: linear-gradient(rgba(197, 168, 128, 0.1) 1px, transparent 1px);
  background-size: 100% 60px; /* 1 hour grid lines */
}

/* Appointment Cards */
.agenda-grid-card {
  position: absolute;
  left: 5px;
  right: 5px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.1s, box-shadow 0.1s;
  z-index: 5;
  border-left-width: 4px;
  border-left-style: solid;
}

.agenda-grid-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 6;
}

.agenda-grid-card.status-agendado {
  background-color: rgba(243, 156, 18, 0.05);
  border-left-color: #f39c12;
  border-top: 1px solid rgba(243, 156, 18, 0.1);
  border-right: 1px solid rgba(243, 156, 18, 0.1);
  border-bottom: 1px solid rgba(243, 156, 18, 0.1);
}

.agenda-grid-card.status-confirmado {
  background-color: rgba(46, 204, 113, 0.05);
  border-left-color: #2ecc71;
  border-top: 1px solid rgba(46, 204, 113, 0.1);
  border-right: 1px solid rgba(46, 204, 113, 0.1);
  border-bottom: 1px solid rgba(46, 204, 113, 0.1);
}

.agenda-grid-card.status-cancelado {
  background-color: rgba(231, 76, 60, 0.05);
  border-left-color: #e74c3c;
  border-top: 1px solid rgba(231, 76, 60, 0.1);
  border-right: 1px solid rgba(231, 76, 60, 0.1);
  border-bottom: 1px solid rgba(231, 76, 60, 0.1);
  z-index: 4; /* Stay behind active appointments */
}

.agenda-grid-card.status-finalizado {
  background-color: rgba(149, 165, 166, 0.05);
  border-left-color: #95a5a6;
  border-top: 1px solid rgba(149, 165, 166, 0.1);
  border-right: 1px solid rgba(149, 165, 166, 0.1);
  border-bottom: 1px solid rgba(149, 165, 166, 0.1);
}

.agenda-card-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8rem;
  line-height: 1.2;
}

.agenda-card-subtitle {
  color: var(--text-secondary);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  line-height: 1.2;
}

.agenda-card-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.agenda-card-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
}
.table-wrapper, .table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

td .btn-icon-only {
  flex-shrink: 0;
}

/* --- Estoque: Baixo Estoque --- */
.low-stock {
  background-color: rgba(231, 76, 60, 0.05) !important;
}
.low-stock td {
  color: #c0392b !important;
}
.low-stock-badge {
  background-color: #e74c3c;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  margin-left: 8px;
}   
 / *   - - -   i O S   S m o o t h   S c r o l l i n g   ( P e n t e   F i n o   F a s e   3 )   - - -   * /  
 . s i d e b a r ,   . m a i n - c o n t e n t ,   . m o d a l - b o d y ,   . p r o f i l e - m o d e r n - h i s t o r y - l i s t ,   . n a v - m e n u ,   b o d y   {   - w e b k i t - o v e r f l o w - s c r o l l i n g :   t o u c h ;   }  
 . p r o c e d u r e - i t e m   s e l e c t   {   f l e x :   1 ;   m i n - w i d t h :   0 ;   t e x t - o v e r f l o w :   e l l i p s i s ;   }  
 . p r o c e d u r e - i t e m   s e l e c t   {   f l e x :   1 ;   m i n - w i d t h :   0 ;   m a x - w i d t h :   1 0 0 % ;   }  
 