/* =========================================================
   Nail Lelê Martins — tema preto & dourado
   Portado do protótipo (prototipo.html) — mesmas variáveis,
   mesmas classes, mesmo visual. Não redesenhar.
========================================================= */
:root{
  --bg-top:#0c0c0d; --bg-bottom:#1b1611;
  --surface:#171310; --surface-2:#221c14;
  --border:#3c3322; --border-soft:#2a2419;
  --gold:#D4AF37; --gold-light:#E8CE7C; --gold-dark:#A9832A;
  --text:#F3ECDD; --muted:#A79A83;
  --danger:#E2677A; --danger-bg:rgba(226,103,122,.16);
  --whatsapp:#25D366;
  --on-gold:#171310;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background:linear-gradient(180deg, var(--bg-top), var(--bg-bottom) 65%);
  color:var(--text);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
.font-display{ font-family:'Playfair Display', Georgia, serif; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
input,textarea,select{ font-family:inherit; color:var(--text); }
input::placeholder, textarea::placeholder{ color:var(--muted); opacity:1; }
a{ text-decoration:none; }
::-webkit-scrollbar{ display:none; }
*{ scrollbar-width:none; -ms-overflow-style:none; }

.app-shell{ max-width:460px; margin:0 auto; min-height:100vh; position:relative; }

/* Topbar */
.topbar{ position:sticky; top:0; z-index:30; background:rgba(12,11,10,.9); backdrop-filter:blur(6px); border-bottom:1px solid var(--border); padding:18px 20px 14px; }
.topbar-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.brand-title{ font-size:20px; margin:0; line-height:1; color:var(--text); }
.brand-sub{ font-size:11px; color:var(--gold-light); text-transform:uppercase; letter-spacing:.08em; margin:5px 0 0; }
.brand-badge{ width:38px;height:38px;border-radius:50%; object-fit:cover; border:2px solid var(--gold); flex-shrink:0; }
.brand-badge-fallback{ width:38px;height:38px;border-radius:50%; border:2px solid var(--gold); flex-shrink:0; background:linear-gradient(135deg,var(--gold-dark),var(--gold-light)); display:flex; align-items:center; justify-content:center; color:var(--on-gold); font-family:'Playfair Display',serif; font-weight:700; font-size:15px; }
.role-toggle{ display:flex; background:var(--surface-2); border:1px solid var(--border); border-radius:999px; padding:4px; }
.role-toggle button{ flex:1; padding:10px 8px; border-radius:999px; font-size:13px; font-weight:500; color:var(--muted); transition:.15s; text-align:center; }
.role-toggle button.active{ background:var(--gold); color:var(--on-gold); box-shadow:0 1px 6px rgba(212,175,55,.3); }

.content{ padding:18px 20px 110px; }

h1.page-title{ font-size:24px; margin:0 0 4px; font-weight:600; color:var(--text); }
p.page-sub{ font-size:14px; color:var(--muted); margin:0 0 20px; }
p.section-label{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--gold-light); margin:0 0 10px; font-weight:600; }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; border-radius:999px; font-size:14px; font-weight:500; padding:12px 18px; transition:.15s; }
.btn-block{ width:100%; }
.btn-primary{ background:var(--gold); color:var(--on-gold); }
.btn-primary:hover{ background:var(--gold-light); }
.btn-disabled{ background:var(--surface-2); color:var(--muted); cursor:not-allowed; }
.btn-outline{ background:transparent; border:1px solid var(--border); color:var(--text); }
.btn-whatsapp{ background:var(--whatsapp); color:#fff; }
.btn-dashed{ background:transparent; border:1px dashed var(--gold); color:var(--gold-light); }
.btn-sm{ padding:8px 14px; font-size:13px; }

.card{ background:var(--surface); border:1px solid var(--border); border-radius:20px; }
.card-pad{ padding:16px; }

/* Service card */
.service-card{ background:var(--surface); border:1px solid var(--border); border-radius:20px; overflow:hidden; box-shadow:0 2px 10px rgba(0,0,0,.35); margin-bottom:16px; }
.service-photo{ height:112px; display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.service-photo-img{ width:100%; height:100%; object-fit:cover; display:block; filter:saturate(1.05); }
.service-photo-icon{ width:56px;height:56px;border-radius:50%; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; color:var(--gold-light); }
.service-category-tag{ position:absolute; top:12px; left:12px; font-size:10px; text-transform:uppercase; letter-spacing:.05em; background:rgba(10,9,8,.6); color:var(--gold-light); padding:5px 10px; border-radius:999px; }
.service-body{ padding:16px; }
.service-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.service-name{ font-size:17px; margin:0; font-weight:600; color:var(--text); }
.service-price{ font-weight:600; color:var(--gold-light); white-space:nowrap; }
.service-desc{ font-size:13px; color:var(--muted); margin:6px 0 0; line-height:1.45; }
.service-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:14px; }
.service-duration{ display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); }

.tone-1{ background:linear-gradient(135deg,#3a2e12,#57431c); }
.tone-2{ background:linear-gradient(135deg,#2c2410,#453818); }
.tone-3{ background:linear-gradient(135deg,#332711,#4f3f1a); }
.tone-4{ background:linear-gradient(135deg,#24200f,#3a3016); }
.tone-5{ background:linear-gradient(135deg,#2a2410,#423618); }
.tone-6{ background:linear-gradient(135deg,#362a12,#54421c); }

.tabbar{ position:fixed; left:0; right:0; bottom:0; z-index:30; display:flex; justify-content:center; padding:0 20px 18px; pointer-events:none; }
.tabbar-inner{ max-width:420px; width:100%; background:rgba(17,14,11,.96); backdrop-filter:blur(6px); border:1px solid var(--border); border-radius:18px; box-shadow:0 10px 28px rgba(0,0,0,.5); display:flex; pointer-events:auto; }
.tabbar button{ flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; padding:12px 0; border-radius:18px; color:var(--muted); font-size:11px; font-weight:500; }
.tabbar button.active{ color:var(--gold-light); }

.booking-header{ display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.icon-btn{ width:36px;height:36px;border-radius:50%; background:var(--surface-2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text); flex-shrink:0; }
.step-dots{ display:flex; gap:6px; margin-top:5px; }
.step-dot{ height:6px; border-radius:999px; width:12px; background:var(--border); transition:.2s; }
.step-dot.active{ width:26px; background:var(--gold); }

.chip-row{ display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; }
.chip{ flex-shrink:0; padding:10px 15px; border-radius:999px; font-size:12px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); white-space:nowrap; }
.chip.active{ background:var(--gold); border-color:var(--gold); color:var(--on-gold); }

.addon-item{ width:100%; display:flex; align-items:center; justify-content:space-between; padding:13px; border-radius:14px; border:1px solid var(--border); background:var(--surface); text-align:left; margin-bottom:8px; }
.addon-item.active{ border-color:var(--gold); background:rgba(212,175,55,.08); }
.addon-left{ display:flex; align-items:center; gap:10px; }
.addon-check{ width:20px;height:20px;border-radius:50%; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; flex-shrink:0; color:var(--on-gold); }
.addon-check.active{ background:var(--gold); border-color:var(--gold); }
.addon-price{ font-size:12px; color:var(--muted); white-space:nowrap; }

.day-pill{ flex-shrink:0; display:flex; flex-direction:column; align-items:center; padding:9px 13px; border-radius:14px; border:1px solid var(--border); background:var(--surface-2); font-size:12px; color:var(--text); }
.day-pill.active{ background:var(--gold); border-color:var(--gold); color:var(--on-gold); }
.day-pill .num{ font-weight:600; font-size:14px; margin-top:2px; }

.slot-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:24px; }
.slot-btn{ padding:10px 0; border-radius:10px; font-size:12px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); }
.slot-btn.active{ background:var(--gold); border-color:var(--gold); color:var(--on-gold); }
.slot-btn.disabled{ background:var(--surface); color:var(--border); text-decoration:line-through; cursor:not-allowed; }

.summary-row{ display:flex; align-items:center; justify-content:space-between; font-size:14px; padding:3px 0; color:var(--text); }
.summary-row.muted span{ color:var(--muted); }
.summary-total{ border-top:1px solid var(--border); margin-top:10px; padding-top:14px; display:flex; align-items:center; justify-content:space-between; }
.summary-total .amount{ font-size:19px; color:var(--gold-light); }

.success-box{ text-align:center; padding:28px 0 8px; }
.success-icon{ width:64px;height:64px;border-radius:50%; background:rgba(212,175,55,.15); display:flex; align-items:center; justify-content:center; color:var(--gold-light); margin:0 auto 18px; }

.appt-card{ background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:14px; margin-bottom:12px; }
.appt-top{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:6px; gap:8px; }
.appt-service{ font-weight:500; margin:0; color:var(--text); }
.appt-date{ font-size:12px; color:var(--muted); margin:3px 0 0; }
.appt-price{ font-size:14px; color:var(--gold-light); font-weight:500; margin:0; }
.appt-actions{ display:flex; gap:8px; margin-top:10px; }
.appt-actions button{ flex:1; font-size:12px; padding:9px 0; border-radius:999px; border:1px solid var(--border); font-weight:500; text-align:center; color:var(--text); }

.status-badge{ font-size:10px; padding:5px 10px; border-radius:999px; font-weight:600; white-space:nowrap; }
.status-confirmed{ background:rgba(212,175,55,.18); color:var(--gold-light); }
.status-completed{ background:var(--surface-2); color:var(--muted); }
.status-cancelled, .status-no_show{ background:var(--danger-bg); color:var(--danger); }

.empty-note{ font-size:13px; color:var(--muted); background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:18px; text-align:center; }

.loyalty-grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:18px; }
.stamp{ aspect-ratio:1/1; border-radius:50%; display:flex; align-items:center;justify-content:center; border:2px dashed var(--border); color:var(--border); }
.stamp.filled{ background:linear-gradient(135deg,var(--gold-dark),var(--gold-light)); border:2px solid var(--gold); color:var(--on-gold); }

.admin-tabs{ display:flex; background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:4px; margin-bottom:20px; overflow-x:auto; }
.admin-tabs button{ flex:1; display:flex; align-items:center; justify-content:center; gap:6px; padding:10px 8px; border-radius:999px; font-size:12px; font-weight:500; color:var(--muted); white-space:nowrap; }
.admin-tabs button.active{ background:var(--gold); color:var(--on-gold); }

.stat-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:20px; }
.stat-card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:13px; display:flex; flex-direction:column; align-items:flex-start; gap:5px; }
.stat-value{ font-size:18px; color:var(--text); }
.stat-value.small{ font-size:13px; }
.stat-label{ font-size:10px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.stat-icon{ color:var(--gold-light); }

.today-item{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:13px; margin-bottom:8px; }
.today-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; gap:8px; }
.today-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.today-actions button, .today-actions a{ flex:1; font-size:11px; padding:8px 0; border-radius:999px; border:1px solid var(--border); font-weight:500; color:var(--text); text-align:center; min-width:86px; }

.form-field{ margin-bottom:12px; }
.form-field label{ font-size:11px; color:var(--muted); display:flex; align-items:center; gap:4px; margin-bottom:5px; }
.form-field input, .form-field textarea{ width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 12px; font-size:13px; background:var(--surface-2); }
.form-field input:focus, .form-field textarea:focus{ outline:none; border-color:var(--gold); }
.form-row{ display:flex; gap:10px; }
.form-row > div{ flex:1; }

.reason-row{ display:flex; gap:8px; margin-top:2px; }
.reason-btn{ flex:1; display:flex; align-items:center; justify-content:center; gap:5px; font-size:12px; padding:10px 0; border-radius:10px; border:1px solid var(--border); color:var(--text); background:var(--surface-2); }
.reason-btn.active{ background:var(--gold); border-color:var(--gold); color:var(--on-gold); }

.block-item{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:13px; display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; gap:8px; }

.search-wrap{ position:relative; margin-bottom:16px; }
.search-wrap svg{ position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); }
.search-wrap input{ width:100%; padding:12px 14px 12px 38px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2); font-size:13px; }
.search-wrap input:focus{ outline:none; border-color:var(--gold); }

.client-item{ width:100%; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:12px; display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; text-align:left; }
.client-left{ display:flex; align-items:center; gap:10px; }
.avatar{ width:40px;height:40px;border-radius:50%; background:linear-gradient(135deg,var(--gold-dark),var(--gold-light)); display:flex; align-items:center; justify-content:center; color:var(--on-gold); font-family:'Playfair Display',serif; flex-shrink:0; }
.avatar.lg{ width:48px;height:48px; font-size:18px; }
.client-name{ font-size:13px; font-weight:500; margin:0; color:var(--text); }
.client-phone{ font-size:11px; color:var(--muted); margin:2px 0 0; }

.back-link{ display:flex; align-items:center; gap:6px; font-size:13px; color:var(--muted); margin-bottom:18px; }
.detail-header{ display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.tag-row{ display:flex; flex-wrap:wrap; gap:6px; }
.tag{ font-size:11px; padding:6px 11px; border-radius:999px; }
.tag-shape{ background:rgba(212,175,55,.15); color:var(--gold-light); }
.tag-color{ background:var(--surface-2); color:var(--text); }

.history-item{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:12px; display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; gap:8px; }

.svc-admin-item{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px; margin-bottom:12px; }
.svc-admin-item.inactive{ opacity:.6; }
.svc-admin-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:8px; }
.svc-admin-top p{ color:var(--text); }
.pill-toggle{ font-size:10px; padding:5px 10px; border-radius:999px; font-weight:600; white-space:nowrap; }
.pill-active{ background:rgba(212,175,55,.18); color:var(--gold-light); }
.pill-inactive{ background:var(--surface-2); color:var(--muted); }

.toast{ position:fixed; bottom:100px; left:50%; transform:translateX(-50%); background:#0a0908; border:1px solid var(--gold); color:var(--gold-light); font-size:13px; padding:11px 20px; border-radius:999px; box-shadow:0 8px 24px rgba(0,0,0,.5); z-index:50; max-width:88%; text-align:center; }

/* =========================================================
   Adições da versão de produção (mesma identidade visual):
   login da admin, editor de horário de funcionamento,
   upload de foto do serviço, estados de carregamento/erro.
========================================================= */
.admin-login{ padding-top:6px; }
.error-text{ font-size:12px; color:var(--danger); margin:0 0 12px; display:block; }

.logout-row{ display:flex; justify-content:flex-end; margin:-6px 0 16px; }
.logout-link{ font-size:12px; color:var(--muted); display:flex; align-items:center; gap:5px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); }
.logout-link:hover{ color:var(--danger); border-color:var(--danger); }

.hours-row{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:12px 13px; margin-bottom:8px; }
.hours-row-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.hours-day-name{ font-size:13px; font-weight:500; color:var(--text); }
.hours-fields{ display:flex; gap:10px; }
.hours-fields input{ flex:1; border:1px solid var(--border); border-radius:10px; padding:8px 10px; font-size:12px; background:var(--surface-2); }

.switch{ position:relative; display:inline-flex; align-items:center; gap:7px; font-size:11px; color:var(--muted); }
.switch input{ appearance:none; -webkit-appearance:none; width:34px; height:19px; border-radius:999px; background:var(--surface-2); border:1px solid var(--border); position:relative; cursor:pointer; transition:.15s; flex-shrink:0; }
.switch input::before{ content:''; position:absolute; top:1px; left:1px; width:15px; height:15px; border-radius:50%; background:var(--muted); transition:.15s; }
.switch input:checked{ background:rgba(212,175,55,.35); border-color:var(--gold); }
.switch input:checked::before{ background:var(--gold); transform:translateX(15px); }

.photo-upload-row{ display:flex; align-items:center; gap:10px; margin-top:10px; }
.photo-upload-row input[type=file]{ font-size:11px; color:var(--muted); max-width:100%; }
.svc-thumb{ width:44px;height:44px;border-radius:10px; object-fit:cover; flex-shrink:0; border:1px solid var(--border); }
.svc-thumb-fallback{ width:44px;height:44px;border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color:var(--gold-light); }

.loading-note{ font-size:13px; color:var(--muted); text-align:center; padding:24px 0; }
.field-hint{ font-size:11px; color:var(--muted); margin:-6px 0 12px; }
