:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --text: #1a1a1a;
  --muted: #6e6e6e;
  --accent: #D4AF37; 
  --accent-dark: #b5952f;
  --success: #10b981;
  --danger: #ef4444;
  --border: rgba(0,0,0,0.06);
  --hero-bg: url('gblanc-site.jpg');
}

* { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1200px, calc(100% - 3rem)); margin: 0 auto; }

/* Tipografia Premium */
h1, h2, h3, .hero-title, .brand-logo { font-family: 'Playfair Display', serif; }
.eyebrow { color: var(--accent-dark); font-weight: 600; text-transform: uppercase; letter-spacing: 0.25em; margin-bottom: 0.8rem; font-size: 0.8rem; font-family: 'Inter', sans-serif; }
h1 { font-size: clamp(2.8rem, 6vw, 4.8rem); letter-spacing: -0.01em; margin-bottom: 1.2rem; line-height: 1.1; color: #000; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.01em; color: #000; }
h3 { font-size: 1.6rem; color: #000; font-weight: 600; }

/* Estruturas de Cartão (Painel e Cliente) */
.panel-card, .list-card, .calendar-card, .stats-card, .client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.03);
  border-radius: 12px;
}
.panel-card, .list-card, .calendar-card { padding: 2rem; margin-bottom: 2rem; }

/* Formulários */
label { display: grid; gap: 0.5rem; font-weight: 500; font-size: 0.9rem; color: #444; }
input, select, textarea {
  width: 100%; max-width: 100%; padding: 0.9rem 1.2rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif;
  font-size: 1rem; transition: all 0.3s ease; box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(212,175,55,0.1); }
input[type="file"] { padding: 0.6rem; background: var(--surface-2); cursor: pointer; }
input[type="file"]::file-selector-button {
  background: #000; color: #fff; border: none; padding: 0.4rem 0.8rem;
  border-radius: 0.4rem; margin-right: 1rem; cursor: pointer; font-weight: 600;
}

/* Botões */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9rem 1.8rem; border: 0; border-radius: 50px; font-weight: 600;
  cursor: pointer; transition: all 0.3s ease; font-size: 0.95rem; font-family: 'Inter', sans-serif;
}
.button.large { padding: 1.2rem 2.5rem; font-size: 1.1rem; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.button.primary { background: #000; color: #fff; }
.button.primary:hover { background: var(--accent); color: #fff; }
.button.secondary { background: transparent; color: var(--text); border: 1px solid #ccc; }
.button.secondary:hover { border-color: #000; background: var(--surface-2); }

.feedback-message { min-height: 1.5rem; color: var(--accent); font-weight: 600; margin-top: 1rem; text-align: center; }
.feedback-message.error { color: var(--danger); }

/* Cabeçalho Cliente */
.client-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 50; padding: 1rem 0; transition: all 0.4s ease; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.05); }
.client-header.scrolled { padding: 0.5rem 0; background: rgba(255,255,255,0.98); box-shadow: 0 4px 30px rgba(0,0,0,0.06); }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.brand-logo img { height: 75px; width: auto; object-fit: contain; transition: height 0.3s ease; }
.client-header.scrolled .brand-logo img { height: 55px; }
.desktop-nav { display: flex; gap: 2.5rem; align-items: center; }
.mobile-menu-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }
.mobile-nav { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--surface); padding: 1.5rem; border-bottom: 1px solid var(--border); flex-direction: column; gap: 1rem; }
.mobile-nav.active { display: flex; }

/* Hero Section */
.hero-section { position: relative; min-height: 100vh; display: flex; align-items: center; padding-top: 100px; background-image: var(--hero-bg); background-size: cover; background-position: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.85) 45%, rgba(255,255,255,0) 100%); z-index: 1; }
.hero-content-client { position: relative; z-index: 2; max-width: 650px; color: #000; padding-right: 2rem; }
.hero-subtitle { font-size: 1.15rem; color: #444; margin-bottom: 2.5rem; font-weight: 400; max-width: 500px; line-height: 1.8; }

/* Painel de Administração - Estrutura Principal */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 280px; background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.sidebar-header { padding: 2rem 1.5rem; border-bottom: 1px solid var(--border); text-align: center; }
.sidebar-header img { max-height: 60px; margin: 0 auto; }
.sidebar-nav { flex: 1; padding: 2rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid var(--border); }

.nav-button { width: 100%; text-align: left; padding: 0.9rem 1.2rem; border-radius: 8px; background: transparent; border: none; color: var(--muted); font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.nav-button:hover { background: var(--surface-2); color: var(--text); }
.nav-button.active { 
  background: linear-gradient(90deg, rgba(212,175,55,0.1) 0%, transparent 100%); 
  color: var(--text); font-weight: 600; 
  border-left: 3px solid var(--accent); 
  border-radius: 0 8px 8px 0;
}
.nav-group-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; background: transparent; border: none; color: #aaa; cursor: pointer; font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 1px; }
.nav-subgroup { display: flex; flex-direction: column; gap: 0.2rem; padding-left: 0.5rem; margin-bottom: 1rem; }
.nav-subgroup.collapsed { display: none; }

.main-content { flex: 1; padding: 3rem; max-width: 1200px; margin: 0 auto; }
.center-box { max-width: 800px; margin: 0 auto; }
.mobile-header { display: none; }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; flex-wrap: wrap; }
.section-header h2 { margin: 0; }

/* Separadores (Tabs) */
.tab-panel { display: none; } 
.tab-panel.active { display: block; animation: fadeInTab 0.3s ease; }
@keyframes fadeInTab { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Estatísticas */
.stats-grid { display: grid; gap: 1.5rem; margin-bottom: 3rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stats-card { text-align: left; padding: 1.8rem; position: relative; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.stats-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.06); }
.stats-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }
.stats-card h3 { font-size: 2.5rem; color: #000; font-family: 'Inter', sans-serif; margin-top: 0.5rem; font-weight: 700; letter-spacing: -1px; }
.stats-card div { color: var(--muted); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; }

/* Estruturas de Listas e Tabelas Restauradas */
.list-stack { display: grid; gap: 1rem; padding: 0; list-style: none; }
.list-stack li { 
  background: var(--surface); border: 1px solid var(--border); padding: 1.5rem; 
  border-radius: 12px; display: flex; flex-direction: column; gap: 0.5rem; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: 0.2s;
}
.list-stack li:hover { border-color: var(--accent); box-shadow: 0 8px 25px rgba(0,0,0,0.05); }
.list-stack li strong { color: #000; font-size: 1.1rem; }
.list-stack li img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; margin-bottom: 0.5rem; }

.list-actions { display: flex; gap: 0.8rem; margin-top: 1rem; flex-wrap: wrap; }
.list-actions button { padding: 0.6rem 1.2rem; border-radius: 6px; border: 0; cursor: pointer; font-size: 0.85rem; font-weight: 600; font-family: 'Inter', sans-serif; transition: background 0.2s; }
.list-actions .edit, .list-actions button:first-child { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.list-actions .edit:hover, .list-actions button:first-child:hover { background: #e5e5e5; }
.list-actions .delete, .list-actions button:last-child { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.list-actions .delete:hover, .list-actions button:last-child:hover { background: rgba(239, 68, 68, 0.2); }

.status-badge { font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; display: inline-block; width: fit-content; }
.status-badge.ativo { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.status-badge.inativo { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Checkboxes e Inputs Rápidos */
.checkbox-group { display: grid; gap: 0.5rem; }
.checkbox-group label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; cursor: pointer; }
small { font-size: 0.85rem; color: var(--muted); }

/* Modais e Wizzards */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 1rem; }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background: #fff; padding: 2.5rem; border-radius: 16px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; transform: translateY(20px); transition: transform 0.3s ease; box-shadow: 0 25px 50px rgba(0,0,0,0.15); }
.modal-overlay.active .modal-content { transform: translateY(0); }
.wizard-modal-content { max-width: 600px; }
.close-modal { background: var(--surface-2); border: none; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: grid; place-items: center; }

/* Passos do Wizard */
.progress-steps { display: flex; gap: 0.5rem; margin-bottom: 2rem; justify-content: center; }
.progress-step { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); font-weight: 700; background: var(--surface-2); }
.progress-step.active { background: #000; color: #fff; border-color: #000; }
.step-panel { display: none; }
.step-panel.active { display: block; }
.wizard-actions { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 2rem; }

/* Grid de Seleção (Wizard) */
.option-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; max-height: 50vh; overflow-y: auto; padding-right: 0.5rem; }
.option-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; transition: 0.2s; }
.option-card:hover { border-color: var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.option-card img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.option-card.selected { border-color: var(--accent); background: rgba(212, 175, 55, 0.05); }

/* Calendário & Slots */
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; margin-bottom: 0.5rem; color: var(--muted); font-size: 0.85rem; text-align: center; font-weight: 600; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
.calendar-day { border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); padding: 1rem 0; font-weight: 500; cursor: pointer; text-align: center; transition: 0.2s; }
.calendar-day:hover:not(.disabled) { border-color: var(--accent); color: var(--accent-dark); }
.calendar-day.disabled { opacity: 0.3; cursor: not-allowed; background: var(--surface-2); }
.calendar-day.selected { background: #000; color: #fff; border-color: #000; }

.time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.8rem; max-height: 40vh; overflow-y: auto; }
.time-slot { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 0.8rem; border-radius: 8px; cursor: pointer; text-align: center; font-weight: 500; transition: 0.2s; }
.time-slot:hover { border-color: var(--accent); }
.time-slot.active { background: #000; color: #fff; border-color: #000; }

.final-summary { display: grid; gap: 0.8rem; padding: 1.5rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.final-summary p { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(0,0,0,0.05); padding-bottom: 0.5rem; }

/* Login Pages */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: var(--bg); }
.login-card { width: 100%; max-width: 420px; background: #fff; padding: 3rem 2.5rem; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 15px 40px rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 1.5rem; }
.login-card form { display: flex; flex-direction: column; gap: 1.2rem; width: 100%; }

.client-footer { background: #111; color: #fff; padding: 4rem 0 2rem; }

@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-menu-toggle { display: block; }
  .hero-title { font-size: 2.5rem; }
  .hero-overlay { background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 100%); }
  .hero-content-client { padding-right: 0; text-align: center; }
  .hero-actions { justify-content: center; display: flex; }
  .wizard-modal-content { padding: 1.5rem; }
  
  .admin-layout { flex-direction: column; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%); transition: transform 0.3s ease; box-shadow: 4px 0 20px rgba(0,0,0,0.1); z-index: 100; }
  .sidebar.open { transform: translateX(0); }
  .mobile-header { display: flex; align-items: center; gap: 1rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
  .main-content { padding: 1.5rem; width: 100%; box-sizing: border-box; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media print {
  /* Esconde toda a interface normal do sistema */
  body > *:not(#print-fechamento) { display: none !important; }
  .modal-overlay { display: none !important; }
  
  /* Exibe a secção de relatório configurada para ocupar a página */
  #print-fechamento { display: block !important; position: absolute; left: 0; top: 0; width: 100%; background: #fff; color: #000; padding: 2rem; }
  #print-fechamento h2 { font-family: 'Playfair Display', serif; text-align: center; margin-bottom: 0.5rem; }
  #print-fechamento h3 { font-family: 'Playfair Display', serif; margin-top: 1.5rem; border-bottom: 2px solid #000; padding-bottom: 0.5rem; }
  #print-fechamento .print-item { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding: 0.5rem 0; font-size: 0.9rem; }
  #print-fechamento .print-total { display: flex; justify-content: space-between; font-weight: bold; font-size: 1.2rem; margin-top: 1rem; padding-top: 0.5rem; border-top: 2px solid #000; }
}
/* =========================================
   CORREÇÃO 1: Botões de Seleção (Segmented) 
   ========================================= */
.segmented { 
  display: flex; 
  background: var(--surface-2); 
  border-radius: 8px; 
  padding: 0.3rem; 
  border: 1px solid var(--border); 
  width: 100%; 
  margin-bottom: 1.5rem; 
}
.segmented-option { 
  flex: 1; 
  text-align: center; 
  padding: 0.7rem 1rem; 
  border: none; 
  background: transparent; 
  color: var(--muted); 
  font-weight: 600; 
  font-size: 0.95rem; 
  border-radius: 6px; 
  cursor: pointer; 
  transition: all 0.2s ease; 
}
.segmented-option.active { 
  background: #ffffff; 
  color: #000000; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.08); 
}

/* =========================================
   CORREÇÃO 2: Checkboxes dos Profissionais
   ========================================= */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
}
/* Substitui o display: grid global para as labels de checkbox */
.checkbox-group label { 
  display: flex !important; 
  flex-direction: row;
  align-items: center; 
  justify-content: flex-start;
  text-align: left;
  gap: 0.8rem; 
  font-weight: 500;
  cursor: pointer;
}
.checkbox-group input[type="checkbox"] { 
  width: 20px; 
  height: 20px;
  margin: 0; 
  accent-color: var(--accent);
}

/* =========================================
   CORREÇÃO 3: Espaçamento do PDV
   ========================================= */
.pdv-layout {
  display: grid;
  gap: 3rem; /* Mais espaço entre as secções */
}
.caixa-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.caixa-status {
  font-size: 1.2rem;
  font-weight: 700;
}
.caixa-status.fechado { color: var(--danger); }
.caixa-status.aberto { color: var(--success); }

/* Área de Relatórios e Gráficos */
.chart-container {
  width: 100%;
  height: 300px;
  margin: 2rem 0;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.export-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}