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

:root {
  --navy: #13213C; --navy-2: #1C2C4D; --gold: #B8924A; --gold-soft: #EFE6D3; --gold-text: #7A5A1E;
  --off: #F7F4EE; --line: #E1DACB; --line-2: #ECE6DA; --ink: #1B2233; --ink-2: #3A4354; --muted: #5B6474;
  --ok-bg: #E3EFE8; --ok: #1E6B4E; --warn-bg: #F6EBD6; --err-bg: #F3E3DE; --err: #8A3B2A;
  --radius: 16px; --shadow: 0 1px 2px rgba(19,33,60,.06), 0 6px 20px rgba(19,33,60,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--off); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.serif { font-family: 'Playfair Display', serif; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* botões e campos */
.btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--navy); }
.btn:hover { background: #FBF9F5; }
.btn-primary { background: var(--navy); color: var(--off); border: none; }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: var(--navy); border: none; }
.btn-ghost { background: transparent; border: 1.5px dashed #CFC6B4; }
.btn-danger { color: var(--err); }
.btn-lg { min-height: 56px; font-size: 16px; border-radius: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); padding: 0 14px; background: #FBF9F5; font-weight: 400; font-size: 15px; width: 100%; }
textarea.input { padding: 10px 14px; min-height: 80px; }
.input:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--navy); color: var(--off); border-color: var(--navy); }
.chip.gold.on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--gold-text); }
.badge-err { background: var(--err-bg); color: var(--err); }
.card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: var(--off); padding: 12px 18px;
  border-radius: 12px; z-index: 99; box-shadow: var(--shadow); max-width: 90vw; }
.toast.err { background: var(--err); }

/* layout recepção (desktop) */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 0 0 220px; background: var(--navy); color: var(--off); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.brand { padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.brand b { font-family: 'Playfair Display', serif; font-size: 22px; }
.brand span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #D9BE86; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { min-height: 44px; border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: #C9CFDA; font-size: 14px; }
.nav a.on { background: rgba(247,244,238,.12); color: var(--off); font-weight: 600; }
.side .me { margin-top: auto; font-size: 13px; color: #C9CFDA; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.side .me button { background: none; border: 1px solid rgba(247,244,238,.25); color: var(--off); border-radius: 10px; min-height: 36px; cursor: pointer; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.panel { flex: 1 1 340px; max-width: 400px; background: #fff; border-left: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar h1 { font-family: 'Playfair Display', serif; font-size: 28px; color: var(--navy); }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { min-height: 32px; padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.seg { display: inline-flex; background: #EAE4D7; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { width: 34px; height: 30px; border: none; border-radius: 8px; background: transparent; font-weight: 700; cursor: pointer; }
.seg button.on { background: var(--navy); color: var(--off); }

.day { display: flex; flex-direction: column; }
.row { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid #EFEAE0; min-height: 56px; align-items: flex-start; }
.row:first-child { border-top: none; }
.row .h { width: 60px; flex-shrink: 0; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.row .h b { font-size: 15px; color: var(--navy); }
.row .slots { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.appt { min-width: 250px; flex: 0 1 300px; border-radius: 12px; padding: 8px 8px 8px 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: var(--off); border: 1px solid #E7E1D5; }
.appt.done { background: #F4F7F5; border-color: #D5E6DC; }
.appt .who { display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: pointer; }
.appt .who b { font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.add { min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1.5px dashed #CFC6B4; background: transparent; font-weight: 600; font-size: 13px; color: var(--navy); cursor: pointer; }
.add.on { border: 2px solid var(--navy); background: var(--gold-soft); }
.full { min-height: 52px; padding: 0 16px; border-radius: 12px; background: var(--err-bg); color: var(--err); font-size: 13px; font-weight: 600; display: flex; align-items: center; }

.svc-btn { min-height: 46px; border-radius: 12px; padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; width: 100%; font-size: 14px; }
.svc-btn.on { border: 2px solid var(--navy); background: var(--off); }
.list-scroll { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.suggest { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.suggest button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: none; background: none; cursor: pointer; border-top: 1px solid var(--line-2); }
.suggest button:first-child { border-top: none; }
.suggest button:hover { background: var(--off); }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.scrollbox { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sum { background: var(--off); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sum .line { display: flex; justify-content: space-between; font-size: 14px; }
.modal-bg { position: fixed; inset: 0; background: rgba(19,33,60,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.photo-prev { width: 100%; aspect-ratio: 4/5; max-width: 220px; border-radius: 14px; object-fit: cover; background: var(--navy-2); }

/* celular (equipe e cliente) */
.phone { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--off); }
.phead { background: var(--navy); color: var(--off); padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.phead .kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #D9BE86; }
.phead h1 { font-family: 'Playfair Display', serif; font-size: 26px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 14px 20px 6px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.dbtn { min-width: 50px; height: 60px; border-radius: 14px; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; flex-shrink: 0; }
.dbtn small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.dbtn b { font-size: 18px; }
.dbtn.on { background: var(--navy); color: var(--off); border: none; }
.plist { padding: 8px 20px 110px; display: flex; flex-direction: column; gap: 10px; }
.pcard { background: #fff; border-radius: 18px; padding: 14px 16px; display: flex; gap: 14px; box-shadow: var(--shadow); }
.pcard .t { min-width: 52px; font-size: 17px; font-weight: 700; color: var(--navy); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #E7E1D5; display: grid; grid-template-columns: repeat(3, 1fr); height: 72px; max-width: 520px; margin: 0 auto; }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--muted); background: none; border: none; cursor: pointer; }
.tabbar .on { color: var(--navy); font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.photo { background: var(--navy-2); color: #D9BE86; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden; position: relative; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.hours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hbtn { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; }
.hbtn.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.hbtn[disabled] { background: #EFEAE0; color: #6B7280; text-decoration: line-through; cursor: not-allowed; }
.sticky-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #E7E1D5; padding: 12px 20px 20px; display: flex; gap: 12px; align-items: center; }

@media (max-width: 760px) {
  .side { flex-basis: 100%; padding: 14px 16px; gap: 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .side .me { margin-top: 0; flex-direction: row; align-items: center; }
  .main { padding: 18px 14px; }
  .panel { max-width: none; border-left: none; border-top: 1px solid var(--line); }
  .appt { min-width: 0; flex-basis: 100%; }
}
