/* ==========================================================================
   Esmaltou · base visual compartilhada (painel, ateliê público e site)
   ========================================================================== */

:root {
  /* Identidade Esmaltou */
  --wine: #9C1048;
  --brand: #C2185B;
  --pink: #E91E63;
  --brand-ink: #fff;
  --brand-soft: #FCE4EC;
  --brand-line: #F8C9DA;
  --grad: linear-gradient(135deg, #991044 0%, #D52E69 100%);
  --grad-head: linear-gradient(180deg, #FFFFFF 0%, #FBE5ED 100%);

  --paper: #FFF3F7;
  --surface: #FFFFFF;
  --surface-2: #FFF8FA;
  --ink: #1D1720;
  --ink-2: #4A3F47;
  --muted: #756871;
  --line: #F5DFE7;
  --line-2: #EBCBD7;

  --ok: #198754;
  --ok-soft: #E7F5EE;
  --warn: #D97706;
  --warn-soft: #FEF3E2;
  --danger: #C62828;
  --danger-soft: #FDECEC;

  --serif: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 20px;
  --r-btn: 14px;
  --shadow: 0 1px 2px rgba(156, 16, 72, .04), 0 10px 26px -14px rgba(156, 16, 72, .18);
  --shadow-lg: 0 24px 60px -20px rgba(80, 10, 40, .35);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; }
p { margin: 0; }
.ic { flex-shrink: 0; display: block; }

@view-transition { navigation: auto; }

/* ---------------------------------------------------------------- type */
.serif { font-family: var(--serif); font-optical-sizing: auto; }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------------------------------------------------------------- layout utils */
.stack > * + * { margin-top: var(--gap, 12px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row.top { align-items: flex-start; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14.5px; letter-spacing: .005em;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; border-color: #000; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-brand:hover { filter: brightness(.94); border-color: var(--brand); }
.btn-soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.04); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { --h: 54px; font-size: 16px; padding: 0 24px; }
.btn-icon { width: var(--h); padding: 0; }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--brand); font-weight: 600; }
.link-muted { color: var(--muted); font-weight: 600; font-size: 13px; }

/* ---------------------------------------------------------------- cards & lists */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px;
}
.card-flush { padding: 0; overflow: hidden; }
.card + .card, .card + .section, .section + .card, .section + .section { margin-top: 14px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { font-family: var(--serif); font-size: 19px; font-weight: 450; letter-spacing: -.01em; }

.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 10px; gap: 12px; }
.section-title { font-family: var(--serif); font-size: 20px; font-weight: 450; letter-spacing: -.01em; }

.list { list-style: none; margin: 0; padding: 0; }
.list > * + * { border-top: 1px solid var(--line); }
.item {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; min-height: 60px;
  transition: background .12s;
}
a.item:hover, button.item:hover { background: var(--surface-2); }
button.item { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; }
.ic-box {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.item-title { font-weight: 600; }
.item-sub { color: var(--muted); font-size: 13px; }
.item .chev { color: var(--line-2); }

.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  font-family: var(--serif); font-size: 15px; font-weight: 500;
}
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

.time-col { width: 54px; flex-shrink: 0; }
.time-col .t { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.time-col .d { color: var(--muted); font-size: 12px; }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge-pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge-confirmed { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.badge-done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-canceled, .badge-no_show, .badge-failed { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-sent, .badge-simulated { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge-queued { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---------------------------------------------------------------- forms */
.field { display: block; }
.field + .field, .field + .grid-2, .grid-2 + .field, .grid-2 + .grid-2 { margin-top: 14px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.hint { display: block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; /* 16px evita zoom no iPhone */
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A7D75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 4px rgba(34,27,24,.06);
}
.input-group { position: relative; }
.input-group .prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none;
}
.input-group .input { padding-left: 44px; }
input[type="date"].input, input[type="time"].input { min-width: 0; }
input[type="color"] { -webkit-appearance: none; border: 0; padding: 0; background: none; }

/* Toggle (switch) */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  flex-shrink: 0; width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(34,27,24,.1); }

/* Segmented / chips */
.seg { display: flex; gap: 4px; padding: 4px; background: #EFE8E1; border-radius: 999px; }
.seg > * { flex: 1; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label, .seg a {
  display: flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .15s;
}
.seg input:checked + label, .seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span, a.chip, button.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.chip input:checked + span, a.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Choice cards (radio grandes) */
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box {
  display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); transition: border-color .15s, box-shadow .15s, background .15s;
}
.choice .box .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); flex-shrink: 0; display: grid; place-items: center; transition: all .15s;
}
.choice input:checked + .box { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.choice input:checked + .box .dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px #fff; }
.choice + .choice { margin-top: 10px; }

/* ---------------------------------------------------------------- alerts / empty */
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2);
}
.notice .ic { margin-top: 1px; color: var(--muted); }
.notice-warn { background: var(--warn-soft); border-color: transparent; color: #6E4A10; }
.notice-warn .ic { color: var(--warn); }
.notice-ok { background: var(--ok-soft); border-color: transparent; color: #1E5139; }
.notice-ok .ic { color: var(--ok); }
.notice-error { background: var(--danger-soft); border-color: transparent; color: #7A2A1F; }
.notice-error .ic { color: var(--danger); }

.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .ic { margin: 0 auto 12px; color: var(--line-2); }
.empty h3 { font-family: var(--serif); color: var(--ink); font-size: 19px; margin-bottom: 6px; font-weight: 450; }
.empty p { max-width: 300px; margin: 0 auto; font-size: 14px; }
.empty .btn { margin-top: 16px; }

/* ---------------------------------------------------------------- sheets (dialog) */
dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  background: var(--surface); color: var(--ink); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
dialog.sheet:not([open]) { display: none; }
dialog.sheet::backdrop { background: rgba(26, 20, 17, .42); backdrop-filter: blur(2px); }
dialog.sheet[open] { animation: sheetIn .28s cubic-bezier(.2,.8,.2,1); }
dialog.sheet[open]::backdrop { animation: fadeIn .2s ease; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 6px; }
.sheet-head::before {
  content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--line-2);
}
.sheet-title { font-family: var(--serif); font-size: 22px; font-weight: 450; letter-spacing: -.01em; }
.sheet-body { padding: 12px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 12px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 720px) {
  dialog.sheet { margin: auto; border-radius: 26px; max-height: 86vh; }
  .sheet-head::before { display: none; }
  .sheet-foot { padding-bottom: 16px; }
}

/* ---------------------------------------------------------------- toast */
#toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toastIn .3s cubic-bezier(.2,.8,.2,1); pointer-events: auto;
}
.toast.error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Painel da manicure
   ========================================================================== */

.panel { padding-bottom: calc(84px + var(--safe-b)); }
.shell { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: calc(14px + var(--safe-t)) 0 14px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.topbar h1 { font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: -.025em; line-height: 1.1; }
.topbar .back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; margin-bottom: 2px; margin-left: -4px; }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
}
.icon-btn .dot-count {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--paper);
}
.content { padding: 4px 0 32px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0 5px; border-radius: 14px;
  font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .01em;
}
.tabbar a.on { color: var(--ink); }
.tabbar a.on .ic { color: var(--brand); }
.tabbar a.on::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); margin-top: 1px; }

.sidenav { display: none; }

@media (min-width: 1000px) {
  .panel { padding-bottom: 0; }
  .tabbar { display: none; }
  .sidenav {
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: 260px; padding: 28px 18px;
    border-right: 1px solid var(--line); background: var(--surface-2);
  }
  .shell { margin-left: 260px; margin-right: 0; max-width: none; padding: 0 48px; }
  .shell > * { max-width: 820px; margin-left: auto; margin-right: auto; }
  .topbar { padding-top: 34px; }
  .side-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; }
  .side-brand .logo { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
  .side-brand .name { font-family: var(--serif); font-size: 18px; line-height: 1.15; }
  .sidenav nav a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; color: var(--ink-2); font-size: 14.5px;
  }
  .sidenav nav a:hover { background: rgba(0,0,0,.035); }
  .sidenav nav a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 0 0 1px var(--line); }
  .sidenav nav a.on .ic { color: var(--brand); }
  .side-foot { margin-top: auto; }
  .hide-desktop { display: none !important; }
  #toast { bottom: 32px; }
}
@media (max-width: 999px) { .hide-mobile { display: none !important; } }

/* ---------------------------------------------------------------- home */
.hello { margin: 2px 2px 18px; color: var(--muted); font-size: 14px; }

.next-card {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; color: #fff;
  background: var(--ink);
}
.next-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 85%, transparent), transparent 70%); opacity: .9;
}
.next-card > * { position: relative; z-index: 1; }
.next-card .eyebrow { color: rgba(255,255,255,.6); }
.next-card .when { font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: -.02em; line-height: 1; margin: 10px 0 6px; }
.next-card .who { font-weight: 600; font-size: 16px; }
.next-card .what { color: rgba(255,255,255,.7); font-size: 14px; }
.next-card .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); color: #fff; }
.next-card .btn:hover { background: rgba(255,255,255,.2); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat .v { font-family: var(--serif); font-size: 22px; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .v small { font-family: var(--sans); font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }

.share-card {
  border-radius: var(--r-lg); padding: 18px; background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.share-card .url {
  display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 0 6px 0 14px; height: 48px; border-radius: 14px;
  background: #fff; border: 1px solid var(--brand-line); font-weight: 600; font-size: 14px;
}
.share-card .url span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.steps { counter-reset: s; }
.step { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.step + .step { border-top: 1px dashed var(--line-2); }
.step .n {
  counter-increment: s; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0;
}
.step .n::before { content: counter(s); }
.step.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done .n::before { content: "✓"; }
.step.done .t { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-2); }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 6px; }

/* ---------------------------------------------------------------- agenda */
.days {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 10px; margin: 0 -16px;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  scroll-snap-align: start; flex: 0 0 auto; width: 54px; padding: 10px 0 9px; border-radius: 16px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); position: relative;
}
.day .w { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.day .n { font-family: var(--serif); font-size: 21px; line-height: 1.2; margin-top: 2px; }
.day .c { display: flex; justify-content: center; gap: 3px; height: 5px; margin-top: 4px; }
.day .c i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .55; }
.day.today .w { color: var(--brand); }
.day.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.day.on .w { color: rgba(255,255,255,.65); }
.day.on .c i { background: #fff; }
.day.past { opacity: .6; }

.appt { display: flex; gap: 14px; padding: 14px 18px; align-items: center; }
.appt-bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--brand); flex-shrink: 0; }
.appt.is-pending .appt-bar { background: var(--warn); }
.appt.is-done .appt-bar { background: var(--ok); }
.appt.is-canceled, .appt.is-no_show { opacity: .55; }
.appt.is-canceled .appt-bar, .appt.is-no_show .appt-bar { background: var(--line-2); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot {
  display: grid; place-items: center; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14.5px; cursor: pointer; transition: all .12s;
}
.slot:hover { border-color: var(--ink-2); }
.slot.on, .slot input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
label.slot { position: relative; }
label.slot input { position: absolute; opacity: 0; pointer-events: none; }

.block-row { background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 8px, var(--surface) 8px, var(--surface) 16px); }

.fab {
  position: fixed; right: 18px; bottom: calc(86px + var(--safe-b)); z-index: 25;
  height: 54px; padding: 0 20px 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); border: 0; cursor: pointer;
}
@media (min-width: 1000px) { .fab { bottom: 32px; right: 40px; } }

/* ---------------------------------------------------------------- detail */
.detail-hero { display: flex; align-items: center; gap: 14px; }
.kv { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 12px 0; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv .ic { color: var(--muted); margin-top: 2px; }
.kv .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.actions .btn { width: 100%; }

/* ---------------------------------------------------------------- finance */
.money-hero { padding: 22px 20px; }
.money-hero .big { font-family: var(--serif); font-size: 40px; font-weight: 400; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.money-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); margin: 18px -20px -22px; }
.money-split > div { background: var(--surface); padding: 14px 20px; }
.up { color: var(--ok); }
.down { color: var(--danger); }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 130px; margin-top: 8px; }
.bars .b { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .pair { display: flex; gap: 3px; align-items: flex-end; height: 100px; width: 100%; justify-content: center; }
.bars .pair i { width: 40%; max-width: 18px; border-radius: 5px 5px 2px 2px; background: var(--ok); min-height: 2px; }
.bars .pair i.e { background: var(--line-2); }
.bars .lbl { font-size: 11px; color: var(--muted); font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); font-weight: 600; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.meter { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; border-radius: 8px; background: var(--brand); opacity: .75; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.month-nav .m { font-family: var(--serif); font-size: 19px; text-transform: capitalize; }
.amount-in { color: var(--ok); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-out { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- atelie manager */
.preview-card { display: flex; align-items: center; gap: 14px; }
.preview-card .logo { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; background: var(--brand-soft); border: 1px solid var(--line); display: grid; place-items: center; color: var(--brand); font-family: var(--serif); font-size: 22px; flex-shrink: 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--r); overflow: hidden; }
.post-grid .tile { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; border: 0; padding: 0; cursor: pointer; }
.post-grid .tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-grid .tile:hover img { transform: scale(1.03); }
.post-grid .tile .multi { position: absolute; top: 8px; right: 8px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.post-grid .add { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13px; background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: 0; }
.upload-drop {
  display: grid; place-items: center; gap: 8px; padding: 28px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r);
  text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2);
}
.upload-drop .ic { color: var(--ink-2); }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; width: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .15s; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--c); transform: scale(.92); }
.img-pick { display: flex; align-items: center; gap: 14px; }
.img-pick .pv { width: 64px; height: 64px; border-radius: 16px; background: var(--surface-2) center / cover; border: 1px solid var(--line); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); }
.img-pick .pv.wide { width: 112px; }

/* ---------------------------------------------------------------- settings */
.hours-day { padding: 14px 18px; }
.hours-day + .hours-day { border-top: 1px solid var(--line); }
.range { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.range .input { height: 44px; text-align: center; padding: 0 8px; }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tpl-vars button { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 12px; font-weight: 600; cursor: pointer; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.bubble {
  background: #E7F6DC; border-radius: 14px 14px 14px 4px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; color: #1d2a17;
  box-shadow: 0 1px 1px rgba(0,0,0,.06); max-width: 92%;
}
.wa-preview { background: #EFE7DD; border-radius: var(--r); padding: 14px; }
.code-box {
  display: flex; justify-content: center; gap: 8px; padding: 20px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 30px; font-weight: 700; letter-spacing: .14em; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r);
}
.howto { counter-reset: h; list-style: none; padding: 0; margin: 0; }
.howto li { counter-increment: h; display: flex; gap: 12px; padding: 9px 0; font-size: 14.5px; }
.howto li::before {
  content: counter(h); width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.status-dot.open { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.status-dot.connecting { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .4; } }

.settings-group + .settings-group { margin-top: 22px; }
.settings-group .eyebrow { margin: 0 4px 8px; display: block; }

/* ==========================================================================
   Esmaltou · ajustes de identidade (tipografia sem serifa, botões, cartões)
   ========================================================================== */
body { font-size: 14.5px; }
.display, .card-title, .section-title, .sheet-title, .topbar h1, .empty h3, .stat .v,
.money-hero .big, .next-card .when, .month-nav .m, .day .n, .serif { font-weight: 700; letter-spacing: -.02em; font-optical-sizing: auto; }
.card-title, .section-title { font-size: 18px; }
.topbar h1 { font-size: 24px; }
.sheet-title { font-size: 20px; }
.eyebrow { letter-spacing: .08em; }

.btn { border-radius: var(--r-btn); }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--wine); border-color: var(--wine); }
.btn-brand { background: var(--brand); border-color: var(--brand); }
.btn:hover { border-color: var(--brand-line); }
.btn-primary:hover, .btn-brand:hover { border-color: var(--wine); }
.input, .select, .textarea { border-radius: var(--r-btn); border-color: var(--line-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.link { color: var(--brand); }
.card { border-color: var(--line); box-shadow: var(--shadow); }
.stat { border-radius: var(--r); box-shadow: var(--shadow); }
.avatar { background: var(--brand-soft); color: var(--wine); font-family: var(--sans); font-weight: 700; }
.chip input:checked + span, a.chip.on { background: var(--brand); border-color: var(--brand); }
.seg { background: var(--brand-soft); }
.seg input:checked + label, .seg a.on { color: var(--wine); }
.day.on { background: var(--brand); border-color: var(--brand); }
.slot.on, .slot input:checked + span { background: var(--brand); border-color: var(--brand); }
.slot:hover { border-color: var(--brand); }
.switch input:checked + .track { background: var(--brand); }
.fab { background: var(--grad); border-radius: 18px; }
.toast { background: var(--ink); border-radius: 14px; }
.howto li::before { background: var(--brand); }
.progress i, .step.done .n { background: var(--brand); border-color: var(--brand); }
.next-card { background: var(--grad); }
.next-card::after { background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.time-col .t { color: var(--wine); }
.meter i { background: var(--brand); }
.bars .pair i { background: var(--brand); }
.bars .pair i.e { background: var(--line-2); }
.amount-in { color: var(--ok); }
.ic-box { background: var(--brand-soft); border-color: transparent; color: var(--brand); border-radius: 12px; }

/* Status como no mockup: confirmado verde, pendente laranja, concluído neutro */
.badge { height: 26px; padding: 0 12px; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.badge::before { display: none; }
.badge-confirmed { background: var(--ok-soft); color: var(--ok); }
.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-done { background: #F1ECEF; color: var(--muted); }
.appt-bar { display: none; }
.appt.is-pending .appt-bar, .appt.is-done .appt-bar { display: none; }

/* Cabeçalho e navegação */
.topbar { background: color-mix(in srgb, var(--paper) 90%, transparent); }
.icon-btn { background: var(--brand-soft); border-color: transparent; color: var(--wine); }
.icon-btn .dot-count { background: var(--brand); border-color: #fff; }
.top-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--wine); font-weight: 700; font-size: 14px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(156,16,72,.15); }
.top-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tabbar { background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 30px -18px rgba(156,16,72,.25); }
.tabbar a { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tabbar a.on { color: var(--brand); font-weight: 700; }
.tabbar a.on .ic { color: var(--brand); fill: var(--brand-soft); }
.tabbar a.on::after { display: none; }
@media (min-width: 1000px) {
  .sidenav { background: var(--grad-head); }
  .sidenav nav a.on { color: var(--brand); }
  .side-logo { height: 46px; width: auto; margin: 0 6px 24px; }
}

/* ---------------------------------------------------------------- tela inicial */
.home-head { position: relative; margin: 0 -16px; padding: calc(14px + var(--safe-t)) 16px 18px; background: var(--grad-head); overflow: hidden; border-radius: 0 0 28px 28px; }
.home-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-logo { height: 46px; width: auto; }
.home-hand { position: absolute; z-index: 1; right: -54px; top: 46px; width: 190px; pointer-events: none; filter: drop-shadow(0 12px 24px rgba(156,16,72,.18)); }
.home-hello { position: relative; z-index: 2; margin-top: 22px; max-width: 64%; }
.home-hello .date { color: var(--muted); font-size: 13.5px; }
.home-hello h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.12; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.home-hello h1 .heart { color: var(--pink); }
.home-hello p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
@media (min-width: 560px) { .home-hand { right: 0; width: 220px; top: 20px; } .home-hello { max-width: 70%; } }
@media (min-width: 1000px) { .home-head { margin: 20px 0 0; border-radius: 26px; padding: 22px 26px 24px; } .home-hand { right: 10px; } }

.kpis { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.kpi { background: #fff; border-radius: var(--r); padding: 14px 12px; box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 0; }
.kpi .kh { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.kpi .kh .ib { width: 30px; height: 30px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.kpi .kv2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.kpi .kv2.sm { font-size: 16px; }
.trend { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--ok-soft); color: var(--ok); }
.trend.neg { background: var(--danger-soft); color: var(--danger); }
.kpi-revenue { grid-column: span 2; background: var(--grad); color: #fff; border: 0; padding: 16px; position: relative; overflow: hidden; box-shadow: 0 16px 30px -16px rgba(153,16,68,.6); }
.kpi-revenue .kh { color: rgba(255,255,255,.88); }
.kpi-revenue .kh .ib { background: rgba(255,255,255,.18); color: #fff; width: 42px; height: 42px; border-radius: 13px; }
.kpi-revenue .kv2 { font-size: 26px; margin-top: 8px; }
.kpi-revenue .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.85); }
.kpi-revenue .trend { background: rgba(255,255,255,.18); color: #fff; }
.kpi-revenue .deco { position: absolute; right: 14px; top: 40px; display: flex; gap: 5px; align-items: flex-end; height: 44px; opacity: .35; }
.kpi-revenue .deco i { width: 5px; border-radius: 3px; background: #fff; }
@media (max-width: 380px) { .kpi-revenue .kv2 { font-size: 22px; } .kpi .kv2 { font-size: 18px; } }

.quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 16px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 11.5px; font-weight: 500; color: var(--ink-2); text-align: center; }
.quick a .ic { color: var(--brand); }
.quick a.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); font-weight: 700; }

.today-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px; }
.today-card .th { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px 12px; }
.today-card .th h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.today-card .th h2 .ic { color: var(--brand); }
.today-card .th a { color: var(--brand); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 2px; }
.today-list { display: flex; flex-direction: column; gap: 10px; }
.today-list .appt { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 12px 14px; }
.appt .avatar { width: 44px; height: 44px; font-size: 14px; }
.appt .time-col .t { font-size: 16px; font-weight: 800; }
.card-flush.list .appt { border-radius: 0; }

/* Ajustes finos da tela inicial em celulares */
.home-hello { max-width: 66%; }
.home-hello h1 { display: block; font-size: 24px; }
.home-hello h1 .heart { display: inline-block; vertical-align: -4px; margin-left: 2px; }
.home-hello h1 .heart .ic { display: inline-block; }
@media (max-width: 479px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-revenue { grid-column: 1 / -1; }
}
.quick { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.quick a { padding: 12px 2px 10px; font-size: 10.5px; gap: 6px; border-radius: 14px; }
@media (max-width: 359px) { .quick { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 480px) { .quick a { font-size: 12px; padding: 14px 4px 12px; } }
.appt { gap: 10px; padding: 12px 14px; }
.appt .avatar { width: 40px; height: 40px; font-size: 13px; }
.appt .time-col { width: 46px; }
.appt .badge { height: 24px; padding: 0 10px; font-size: 11.5px; }
@media (max-width: 420px) { .appt > .chev { display: none; } }

/* ==========================================================================
   Computador: conteúdo largo em duas colunas (principal + lateral)
   ========================================================================== */
.page-action { display: none !important; }
.cols > * + * { margin-top: 28px; }
.cols > * > :first-child { margin-top: 0; }

@media (min-width: 1000px) {
  .shell { padding: 0 40px; }
  .shell > * { max-width: 1180px; }
  .shell.narrow > * { max-width: 760px; }
  .topbar { padding-top: 30px; padding-bottom: 20px; align-items: center; }
  .topbar h1 { font-size: 28px; }
  .fab { display: none; }
  .page-action { display: inline-flex !important; margin-right: 6px; }
  .sidenav { width: 260px; }
  .side-cta { margin: 0 2px 20px; }
  .side-studio { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 6px; border-radius: 14px; background: rgba(255,255,255,.7); border: 1px solid var(--line); min-width: 0; }
  .side-studio .top-avatar { width: 38px; height: 38px; flex-shrink: 0; font-size: 13px; }
  .side-foot .btn-soft { background: transparent; }

  /* Início */
  .home-head { margin: 26px 0 0; padding: 28px 30px 30px; border-radius: 28px; }
  .home-top { position: absolute; top: 24px; right: 28px; }
  .home-top > a:first-child { display: none; }
  .home-hello { margin-top: 0; max-width: 60%; }
  .home-hello h1 { font-size: 30px; }
  .home-hand { right: 150px; top: -16px; width: 210px; }
  .quick { display: none; }
}
@media (min-width: 1280px) {
  .kpis { grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 24px; }
  .kpi-revenue { grid-column: span 2; }
}

@media (min-width: 1100px) {
  .cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
  .cols > * + * { margin-top: 0; }
  .cols.side-first > :first-child { grid-column: 2; grid-row: 1; }
  .cols.side-first > :last-child { grid-column: 1; grid-row: 1; }
  .cols .sticky { position: sticky; top: 96px; }

  /* Agenda: tira de dias vira um calendário na coluna lateral */
  .cal-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
  .cal-card .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 0; padding: 0; overflow: visible; }
  .cal-card .day { width: auto; padding: 8px 0 6px; border-radius: 12px; }
  .cal-card .day .n { font-size: 17px; }
  .cal-card .day .w { font-size: 10px; }

  /* Catálogo e listas */
  .post-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .settings-grid .settings-group + .settings-group { margin-top: 0; }
}

.side-summary .stat-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.side-summary .stat-row + .stat-row { border-top: 1px solid var(--line); }
.side-summary .stat-row strong { font-size: 20px; font-weight: 800; }
.list > * + button.item { border-top: 1px solid var(--line); }

/* ==========================================================================
   Layout profissional · menu lateral, barra superior, perfil
   ========================================================================== */
.top-search, .top-new, .banner-actions { display: none; }
.topbar-home { display: none; }

/* Cartão de perfil (Ajustes) */
.profile-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 22px; }
.pc-cover { height: 74px; background: linear-gradient(115deg, #991044 0%, #D52E69 60%, #F48FB1 100%); position: relative; }
.pc-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 120% at 85% 0%, rgba(255,255,255,.28), transparent 70%); }
.pc-body { padding: 0 18px 18px; }
.pc-avatar { width: 76px; height: 76px; margin-top: -38px; border-radius: 50%; border: 4px solid #fff; background: var(--brand-soft); color: var(--wine); display: grid; place-items: center; font-weight: 800; font-size: 24px; overflow: hidden; position: relative; box-shadow: 0 8px 20px -10px rgba(156,16,72,.4); }
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-info { margin-top: 10px; min-width: 0; }
.pc-info h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.pc-info p { color: var(--muted); font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

@media (min-width: 1000px) {
  body.panel { background: #FAF6F8; }

  /* Menu lateral */
  .sidenav { width: 256px; padding: 22px 14px 14px; background: #fff; border-right: 1px solid #F1E5EB; overflow-y: auto; }
  .sn-logo { display: block; padding: 2px 10px 18px; }
  .sn-logo img { height: 40px; width: auto; }
  .sn-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #A3969E; padding: 16px 12px 6px; }
  .sidenav .sn-nav a { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-weight: 600; font-size: 14px; box-shadow: none; background: none; position: relative; transition: background .12s, color .12s; }
  .sidenav .sn-nav a .ic { color: #9A8C95; }
  .sidenav .sn-nav a:hover { background: #FFF4F8; color: var(--ink); }
  .sidenav .sn-nav a.on { background: var(--brand-soft); color: var(--wine); box-shadow: none; }
  .sidenav .sn-nav a.on .ic { color: var(--brand); }
  .sidenav .sn-nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
  .sn-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
  .sn-count.warn { background: var(--warn-soft); color: var(--warn); }
  .sn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
  .sn-dot.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
  .sn-dot.off { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

  .sn-bottom { margin-top: auto; padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
  .sn-link { background: linear-gradient(160deg, #FFF7FA, #FDEAF1); border: 1px solid #F6DCE6; border-radius: 16px; padding: 12px; }
  .sn-link-head { display: flex; align-items: center; justify-content: space-between; color: var(--brand); }
  .sn-link-head .eyebrow { color: var(--brand); font-size: 10.5px; }
  .sn-link-url { font-size: 13px; font-weight: 700; color: var(--ink); margin: 4px 0 10px; }
  .sn-link-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .sn-link-actions .btn { --h: 34px; padding: 0 8px; font-size: 12.5px; border-radius: 10px; background: #fff; }

  .sn-profile { position: relative; }
  .sn-profile summary { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; cursor: pointer; list-style: none; border: 1px solid transparent; }
  .sn-profile summary::-webkit-details-marker { display: none; }
  .sn-profile summary:hover, .sn-profile[open] summary { background: #FFF4F8; border-color: #F6DCE6; }
  .sn-profile .top-avatar { width: 38px; height: 38px; font-size: 13px; flex-shrink: 0; box-shadow: none; border: 1px solid var(--line); }
  .sn-name { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
  .sn-sub { display: block; font-size: 12px; color: var(--muted); }
  .sn-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; animation: fadeIn .15s; }
  .sn-menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
  .sn-menu a, .sn-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); background: none; border: 0; cursor: pointer; text-align: left; }
  .sn-menu a .ic, .sn-menu button .ic { color: #9A8C95; }
  .sn-menu a:hover, .sn-menu button:hover { background: #FFF4F8; color: var(--ink); }
  .sn-menu form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
  .sn-menu button { color: var(--danger); }
  .sn-menu button .ic { color: var(--danger); }

  /* Barra superior */
  .shell { padding: 0 40px; }
  .shell > .topbar, .shell.narrow > .topbar {
    max-width: none; margin: 0 -40px 26px; padding: 14px max(40px, calc((100% - 1180px) / 2)); min-height: 76px;
    background: rgba(255,255,255,.88); border-bottom: 1px solid #F1E5EB; gap: 16px;
  }
  .shell.narrow > .topbar { padding-left: max(40px, calc((100% - 760px) / 2)); padding-right: max(40px, calc((100% - 760px) / 2)); }
  .topbar h1 { font-size: 22px; }
  .topbar .small { font-size: 12.5px; }
  .topbar-home { display: flex; }
  .top-search { display: flex; align-items: center; gap: 8px; width: 280px; height: 42px; padding: 0 12px; border-radius: 12px; background: #FAF6F8; border: 1px solid #F1E5EB; color: #A3969E; transition: border-color .15s, background .15s; }
  .top-search:focus-within { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
  .top-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
  .top-new { display: inline-flex; --h: 42px; }
  .topbar .top-avatar { display: none; }
  .topbar .icon-btn { background: #fff; border: 1px solid #F1E5EB; }
  .content { padding-top: 0; }

  /* Início */
  .home-head { margin: 0; padding: 0; background: none; border-radius: 0; overflow: visible; }
  .home-top { display: none; }
  .home-banner { position: relative; overflow: hidden; border-radius: 24px; padding: 30px 36px; min-height: 196px; background: linear-gradient(115deg, #FFFFFF 0%, #FFF0F5 48%, #F9D2E1 100%); border: 1px solid #F6DCE6; }
  .home-banner .home-hand { right: 40px; top: auto; bottom: -84px; width: 240px; }
  .home-hello { max-width: 62%; margin: 0; }
  .home-hello .date { display: none; }
  .home-hello h1 { font-size: 30px; }
  .home-hello p { font-size: 15px; }
  .banner-actions { display: flex; gap: 10px; margin-top: 18px; }
  .banner-actions .btn { --h: 42px; }
  .kpis { margin-top: 18px; }
  .kpi { padding: 18px; }
  .kpi .kh { font-size: 13px; }
  .kpi .kv2 { font-size: 26px; margin-top: 12px; }
  .kpi .kv2.sm { font-size: 22px; }
  .kpi-revenue .kv2 { font-size: 30px; }

  /* Perfil */
  .pc-cover { height: 110px; }
  .pc-body { display: flex; align-items: flex-end; gap: 18px; padding: 0 24px 22px; }
  .pc-avatar { width: 96px; height: 96px; margin-top: -48px; flex-shrink: 0; font-size: 30px; }
  .pc-info { flex: 1; }
  .pc-actions { display: flex; margin-top: 0; }
}
.kpi .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
@media (min-width: 1000px) { .kpi .hint { font-size: 12.5px; margin-top: 6px; } .kpi { display: flex; flex-direction: column; } }
@media (min-width: 1000px) { .cols > * > .hide-desktop:first-child + * { margin-top: 0; } }

/* Assinatura */
.billing-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 14px; background: var(--warn-soft); color: #7A4A0C; font-size: 14px; }
.billing-bar .ic { color: var(--warn); }
.billing-bar.late { background: var(--danger-soft); color: #7A1F1F; }
.billing-bar.late .ic { color: var(--danger); }
.billing-bar .nowrap { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.sub-hero { border-radius: 22px; padding: 24px 22px; background: linear-gradient(120deg, #fff 0%, #FFF0F5 55%, #FBDDE8 100%); border: 1px solid #F6DCE6; }
.sub-hero h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; }
.sub-hero p { color: var(--ink-2); margin-top: 6px; max-width: 560px; }
.sub-expired, .sub-blocked { background: linear-gradient(120deg, #fff 0%, #FFF1F1 60%, #FDDCDC 100%); border-color: #F6D2D2; }
.sub-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 18px; }
.sub-meta span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.sub-meta strong { font-size: 18px; font-weight: 800; }
.pix-box { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); }
.pix-key { font-weight: 800; font-size: 16px; margin: 2px 0; }
@media (min-width: 1000px) { .billing-bar { margin-bottom: 22px; } }

/* Administração */
.mb-2 { margin-bottom: 16px; }
.admin-tag { display: inline-flex; align-self: flex-start; margin: -8px 10px 4px; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.admin-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-kpis .kpi-revenue { grid-column: 1 / -1; }
@media (min-width: 1100px) { .admin-kpis { grid-template-columns: 1.5fr repeat(4, 1fr); gap: 14px; } .admin-kpis .kpi-revenue { grid-column: auto; } }
.admin-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .admin-mini { grid-template-columns: repeat(4, 1fr); } }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips .chip { flex-shrink: 0; height: 36px; font-size: 13px; }
.chip-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand-soft); color: var(--wine); font-size: 11px; font-weight: 800; margin-left: 4px; }
a.chip.on .chip-n { background: rgba(255,255,255,.2); color: #fff; }
.acc-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); }
.acc-row:first-child { border-top: 0; }
a.acc-row:hover { background: var(--surface-2); }
.acc-who { display: flex; align-items: center; gap: 12px; min-width: 0; grid-column: 1 / -1; }
.acc-who .top-avatar { width: 40px; height: 40px; font-size: 13px; flex-shrink: 0; box-shadow: none; border: 1px solid var(--line); }
.acc-due { font-weight: 600; font-size: 13.5px; }
.acc-due.down { color: var(--danger); }
.acc-head { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); }
@media (min-width: 1000px) {
  .acc-row { grid-template-columns: minmax(0, 2.4fr) 1.1fr 1.2fr .8fr .8fr 20px; gap: 16px; }
  .acc-who { grid-column: auto; }
}
.filter-chips a.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 8px 0 14px; }
.filter-chips a.chip .chip-n { height: 20px; min-width: 20px; padding: 0 6px; border: 0; border-radius: 10px; margin: 0; font-size: 11px; }
.pb-row { border-top: 1px solid var(--line); }
.pb-row:first-child { border-top: 0; }
.pb-row summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.pb-row summary::-webkit-details-marker { display: none; }
.pb-row summary:hover { background: var(--surface-2); }
.pb-body { padding: 0 16px 16px; }
.pb-json { margin: 10px 0 12px; padding: 12px; max-height: 320px; overflow: auto; border-radius: 12px; background: #1D1720; color: #F8E8EF; font-size: 12px; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }

/* Menu lateral flutuante (computador) */
@media (min-width: 1000px) {
  .sidenav {
    top: 14px; bottom: 14px; left: 14px; width: 256px; height: auto;
    border: 1px solid #F1E5EB; border-radius: 26px;
    box-shadow: 0 1px 2px rgba(156, 16, 72, .04), 0 18px 48px -24px rgba(156, 16, 72, .28);
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .sidenav::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .sidenav .sn-nav a.on::before { left: -14px; }
  .shell { margin-left: 284px; }
  .shell > .topbar, .shell.narrow > .topbar { margin-top: 14px; border: 1px solid #F1E5EB; border-radius: 20px; margin-left: 0; margin-right: 0; padding-left: 24px; padding-right: 24px; }
  .sn-menu { box-shadow: 0 24px 60px -20px rgba(80, 10, 40, .35); }
}
@media (min-width: 1000px) { .sidenav .sn-nav a.on::before { left: -8px; top: 11px; bottom: 11px; border-radius: 3px; } }

/* Logo: símbolo + nome em texto */
.brand-logo { display: inline-flex; align-items: center; line-height: 1; white-space: nowrap; vertical-align: middle; }
.brand-logo .bl-sym { height: 1.6em; width: auto; margin-right: -.06em; flex-shrink: 0; }
.brand-logo .bl-name {
  font-family: "Quicksand", "Plus Jakarta Sans", sans-serif; font-weight: 700; letter-spacing: -.025em;
  background: linear-gradient(180deg, #E8357A 0%, #C2185B 50%, #8E0E40 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding: .06em .02em .12em 0;
}
.sn-logo { padding: 4px 8px 16px; }

/* Cards de indicadores sem estourar em notebooks */
.kpi { min-width: 0; }
.kpi .kh { min-width: 0; line-height: 1.25; }
.kpi .kv2, .stat .v { white-space: nowrap; }
.stat { min-width: 0; }
.stat .v { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis .kpi-revenue { grid-column: span 2; }
  .admin-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-kpis .kpi-revenue { grid-column: span 2; }
  .topbar .small { white-space: nowrap; }
  .top-search { width: clamp(190px, 20vw, 300px); }
}
@media (min-width: 1500px) {
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .admin-kpis { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); }
  .admin-kpis .kpi-revenue { grid-column: auto; }
}
.geo-map { position: relative; height: 210px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.geo-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.inline-ic { display: inline-block; vertical-align: -2px; color: var(--ok); }
[hidden] { display: none !important; }
.geo-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.geo-actions .btn { flex: 1 1 220px; min-width: 0; white-space: normal; text-align: center; height: auto; min-height: 46px; padding-top: 10px; padding-bottom: 10px; line-height: 1.25; }

/* Ao puxar a página além do topo/fim, não mostrar fundo branco */
html { background: var(--paper); overscroll-behavior-y: none; }
body { overscroll-behavior-y: none; min-height: 100vh; min-height: 100dvh; }
html:has(body.pub), html:has(body.site), html:has(body.landing) { background: #FCE4EC; }
html:has(body.panel) { background: var(--paper); }
@media (min-width: 1000px) { html:has(body.panel) { background: #FAF6F8; } }

/* Mapa sem a faixa de créditos grande do OpenStreetMap (fica escondida embaixo) */
.geo-map iframe { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 78px); }
.geo-map::after { content: "© OpenStreetMap"; position: absolute; right: 8px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.75); color: var(--muted); font-size: 9.5px; font-weight: 600; pointer-events: none; }
.notif-list { border-top: 1px solid var(--line); }
.notif-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notif-row:last-child { border-bottom: 0; }
.notif-row .ic-box { width: 36px; height: 36px; flex-shrink: 0; }
.notif-row strong { font-size: 14.5px; }
.notif-sel { height: 36px; margin-top: 8px; max-width: 170px; font-size: 14px; padding-left: 10px; }
.ok-ic { color: var(--ok); }
