/* ============ Temas ============ */
:root, [data-theme="dourado"] {
  --bg: #1d1c19; --surface: #262521; --surface-2: #302e29; --line: #3a3832;
  --text: #f3ece2; --muted: #a59d90; --accent: #c99a00; --accent-text: #dcb02e; --accent-ink: #1d1c19;
  --ok: #7fb68b; --danger: #e0806f; --warn: #e3b341; --shadow: 0 1px 2px rgb(0 0 0 / .25);
  color-scheme: dark;
}
[data-theme="piloto"] {
  --bg: #090909; --surface: #131313; --surface-2: #1c1c1c; --line: #282828;
  --text: #f5f5f5; --muted: #a3a3a3; --accent: #36d415; --accent-text: #4be12c; --accent-ink: #050505;
  --ok: #4be12c; --danger: #ff6b5a; --warn: #f2c94c; --shadow: 0 1px 2px rgb(0 0 0 / .4);
  color-scheme: dark;
}
[data-theme="preto"] {
  --bg: #0c0c0c; --surface: #161616; --surface-2: #1f1f1f; --line: #2a2a2a;
  --text: #f2f2f0; --muted: #9a9a96; --accent: #f3ece2; --accent-text: #f3ece2; --accent-ink: #111;
  --ok: #86b894; --danger: #e5826f; --warn: #e3b341; --shadow: 0 1px 2px rgb(0 0 0 / .3);
  color-scheme: dark;
}
[data-theme="branco"] {
  --bg: #f6f6f4; --surface: #ffffff; --surface-2: #f0f0ec; --line: #e3e3de;
  --text: #161616; --muted: #6b6b66; --accent: #161616; --accent-text: #161616; --accent-ink: #fff;
  --ok: #2f7a47; --danger: #b3382c; --warn: #9a6a00; --shadow: 0 1px 2px rgb(0 0 0 / .05);
  color-scheme: light;
}
[data-theme="areia"] {
  --bg: #f1e9dd; --surface: #fbf7f1; --surface-2: #ece2d3; --line: #e0d3bf;
  --text: #2a2925; --muted: #776d60; --accent: #8a6a3f; --accent-text: #7a5c33; --accent-ink: #fff;
  --ok: #3d7a4f; --danger: #a83c2e; --warn: #8f6400; --shadow: 0 1px 2px rgb(60 40 10 / .06);
  color-scheme: light;
}
[data-theme="verde"] {
  --bg: #f1f4ef; --surface: #ffffff; --surface-2: #e7ede3; --line: #d8e1d2;
  --text: #16201a; --muted: #5d6a60; --accent: #2f5d43; --accent-text: #2f5d43; --accent-ink: #fff;
  --ok: #2f7a47; --danger: #b3382c; --warn: #8f6400; --shadow: 0 1px 2px rgb(0 0 0 / .05);
  color-scheme: light;
}
[data-theme="vermelho"] {
  --bg: #f7f2f0; --surface: #ffffff; --surface-2: #f1e7e3; --line: #e8d9d3;
  --text: #1f1715; --muted: #6e615d; --accent: #a3322a; --accent-text: #a3322a; --accent-ink: #fff;
  --ok: #2f7a47; --danger: #a3322a; --warn: #8f6400; --shadow: 0 1px 2px rgb(0 0 0 / .05);
  color-scheme: light;
}
[data-theme="azul"] {
  --bg: #f1f3f6; --surface: #ffffff; --surface-2: #e6ebf1; --line: #d8dfe8;
  --text: #141a22; --muted: #5b6673; --accent: #1f4e8c; --accent-text: #1f4e8c; --accent-ink: #fff;
  --ok: #2f7a47; --danger: #b3382c; --warn: #8f6400; --shadow: 0 1px 2px rgb(0 0 0 / .05);
  color-scheme: light;
}
[data-theme="amarelo"] {
  --bg: #f7f5ec; --surface: #ffffff; --surface-2: #f0ecda; --line: #e5dfc5;
  --text: #1d1b14; --muted: #6a6554; --accent: #e0b000; --accent-text: #806300; --accent-ink: #1d1b14;
  --ok: #2f7a47; --danger: #b3382c; --warn: #806300; --shadow: 0 1px 2px rgb(0 0 0 / .05);
  color-scheme: light;
}

/* ============ Base ============ */
:root { --font-head: Literata, Georgia, serif; --head-weight: 600; --head-case: none; --head-spacing: -.01em; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-spacing); text-transform: var(--head-case); margin: 0; line-height: 1.2; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.warn { color: var(--warn); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.neg { color: var(--danger) !important; }
.pos { color: var(--ok); }
.link { color: var(--accent-text); text-decoration: none; font-size: 14px; font-weight: 500; }
.link:hover { text-decoration: underline; }
.empty { color: var(--muted); margin: 8px 0; font-size: 14px; }
.eyebrow { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ Layout ============ */
.app { min-height: 100dvh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--font-head); letter-spacing: .12em; text-transform: uppercase; font-size: 15px; }
.topbar-title { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 10px; }
.topbar-title a { display: grid; place-items: center; width: 24px; height: 24px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.error { background: var(--danger); }
.dot.busy { background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.dot.off { background: var(--line); border: 1px solid var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.sync-line { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 500; }
.logo-p { width: 18px; height: 32px; color: var(--accent); }
.main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
.view { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500; }
.tabbar a.active { color: var(--accent-text); }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; font-weight: 600; padding: 0 7px; line-height: 18px; margin-left: auto; }
.badge.dotb { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; padding: 0; }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 240px 1fr; }
  .topbar, .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; padding: 24px 14px;
    border-right: 1px solid var(--line); background: var(--surface);
  }
  .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; text-decoration: none; }
  .sidebar .brand .logo-p { width: 24px; height: 44px; }
  .sidebar .brand strong { display: block; font-family: var(--font-head); letter-spacing: .16em; text-transform: uppercase; font-size: 18px; }
  .sidebar .brand small { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
  .sidebar nav a.active { background: var(--surface-2); color: var(--text); }
  .sidebar nav a.active .ic { color: var(--accent-text); }
  .sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
  .sidebar-foot:hover { background: var(--surface-2); }
  .main { padding: 36px 40px 60px; }
  h1 { font-size: 32px; }
}

/* ============ Componentes ============ */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; }
.actions, .btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card > h2 { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sub { margin: 18px 0 8px; font-family: Inter, sans-serif; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.grid2, .grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn .ic { width: 18px; height: 18px; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.danger { color: var(--danger); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1180px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi strong { font-family: var(--font-head); font-size: clamp(18px, 4.6vw, 26px); font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: var(--muted); font-size: 12px; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: none; text-align: left; text-decoration: none; cursor: pointer; border-radius: 0; min-width: 0;
}
.rows > .row:last-child { border-bottom: 0; }
button.row:hover, a.row:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-main strong { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.row-time { display: flex; flex-direction: column; min-width: 48px; }
.row-time strong { font-size: 15px; }
.row-time small { color: var(--muted); font-size: 12px; }
.row .chev { color: var(--muted); width: 16px; height: 16px; }
.as-btn { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.amount { font-weight: 600; white-space: nowrap; }
.session-row.status-feita .row-main strong { color: var(--muted); }
.session-row.status-confirmada .row-time strong { color: var(--ok); }

.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.chip.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.chip.accent { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 16%, transparent); }

.note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; flex-wrap: wrap; }
.note > span { flex: 1; min-width: 200px; }
.note.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); }
.note.warn .ic { color: var(--warn); }

.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); color: var(--accent-text); font-weight: 600; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; font-family: var(--font-head); }
.client-head { display: flex; align-items: center; gap: 14px; }
.client-head p.muted { margin: 4px 0 0; }
.warn-dot .ic { width: 14px; height: 14px; vertical-align: -2px; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }

/* ============ Formulários ============ */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 500; color: var(--muted); }
.field small { font-weight: 400; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 16px; outline: none; transition: border-color .15s;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { padding: 0 6px; font-size: 13px; font-weight: 600; }
legend small { color: var(--muted); font-weight: 400; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.form-actions .danger { margin-right: auto; }
.form-actions.sticky { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .form-actions.sticky { bottom: 16px; } }
.inline-add { display: flex; gap: 8px; }
.inline-add select { flex: 1; }
.quick-client { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.quick-client > .btn { justify-self: end; }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 6px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.seg.filter { align-self: flex-start; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; text-align: center; font-family: Inter, sans-serif; font-weight: 500; }

/* ============ Agenda ============ */
.week-nav, .month-nav { display: flex; align-items: center; gap: 6px; padding: 8px 10px; flex-wrap: wrap; }
.week-nav strong, .month-nav strong { font-family: var(--font-head); font-size: 16px; padding: 0 6px; }
.month-nav .spacer { flex: 1; }
.week-jump { width: auto !important; min-height: 34px !important; padding: 4px 8px !important; font-size: 14px !important; margin-left: auto; }
.week { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .week { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; } }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 96px; min-width: 0; }
.day header { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.day header span { text-transform: capitalize; color: var(--muted); font-size: 13px; }
.day header strong { font-family: var(--font-head); font-size: 20px; }
.day header .icon-btn { margin-left: auto; }
.day.today { border-color: var(--accent); }
.day.today header strong { color: var(--accent-text); }
.day.past { opacity: .72; }
.day.blocked { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 8px, var(--surface-2) 8px, var(--surface-2) 16px); }
.day .row { padding: 8px 2px; gap: 8px; }
.day .row .chip { display: none; }
@media (min-width: 1200px) { .day .row { flex-wrap: wrap; } .day .row-time { flex-direction: row; gap: 4px; min-width: 0; } }
.day-empty { color: var(--muted); font-size: 13px; margin: 4px 0; }
.block-item { display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 8px; margin-bottom: 6px; border-radius: 8px; border: 0; background: var(--surface-2); color: var(--muted); font-size: 12px; cursor: pointer; text-align: left; }
.block-item .ic { width: 14px; height: 14px; }

/* ============ Detalhes no modal ============ */
.detail { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.detail-when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; color: var(--muted); }
.lead { margin: 0; font-size: 16px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-stats > div { background: var(--surface-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; min-width: 0; }
.mini-stats span { color: var(--muted); font-size: 12px; }
.mini-stats strong { font-size: clamp(13px, 3.6vw, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .btn-grid { grid-template-columns: 1fr 1fr; } }

.mat-group { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.mat-group summary { padding: 10px 0; cursor: pointer; font-weight: 500; font-size: 14px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding-bottom: 12px; }
.mat { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mat span { flex: 1; display: flex; flex-direction: column; }
.mat small { color: var(--muted); font-size: 11px; }
.mat input { width: 64px !important; min-height: 38px !important; text-align: center; }

/* ============ Orçamentos ============ */
.kanban { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.col { background: var(--surface-2); border-radius: 16px; padding: 12px; min-width: 0; }
.col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; }
.col h2 { font-size: 16px; }
.col-body { display: flex; flex-direction: column; gap: 8px; }
.qcard { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; box-shadow: var(--shadow); }
.qcard:hover { border-color: var(--accent); }
.qdesc { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qmeta { color: var(--muted); font-size: 12px; }
.qfoot { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-top: 4px; }
.bar { display: block; height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar.over > span { background: var(--danger); }
.closed-list summary { list-style: none; cursor: pointer; }
.closed-list summary::-webkit-details-marker { display: none; }
.closed-list summary h2 { display: inline-flex; align-items: center; gap: 8px; }
.closed-list[open] summary { margin-bottom: 10px; }

/* ============ Financeiro ============ */
.buckets { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.bucket { background: var(--surface-2); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bucket-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.bucket strong { font-family: var(--font-head); font-size: 20px; }
.bucket small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.bucket .bar { background: var(--line); }
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.table tfoot td { font-weight: 600; border-bottom: 0; }
.table .r { text-align: right; white-space: nowrap; }

/* ============ Estoque ============ */
.stock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
@media (min-width: 900px) { .stock-grid { gap: 16px; } }
.stock-cat { padding: 12px; }
@media (min-width: 700px) { .stock-cat { padding: 16px 18px; } }
.stock-cat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.stock-cat-head h2 { font-size: 15px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 700px) { .stock-cat-head h2 { font-size: 17px; } }
.cat-tools { display: flex; flex-wrap: wrap; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 2px; }
.icon-btn.xs { width: 28px; height: 28px; border-radius: 7px; }
.icon-btn.xs .ic { width: 15px; height: 15px; }
.icon-btn:disabled { opacity: .3; cursor: default; }
.stock-cat .row { padding: 8px 0; gap: 6px; }
.stock-cat .row-main strong { font-size: 14px; white-space: normal; }
.stock-cat .row-main small { font-size: 11px; }
.stock-row.edit { background: none; }
.add-item { margin-top: 8px; width: 100%; color: var(--muted); border-style: dashed; }
.stock-actions { width: 100%; }
@media (max-width: 559px) { .stock-actions .btn { flex: 1 1 calc(50% - 8px); } }
.own-note { width: 100%; text-align: left; border: 0; cursor: pointer; color: var(--text); }
.ask-text { white-space: pre-line; margin: 0 0 16px; font-size: 15px; }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.modal .form-actions .btn.ghost:first-child:not(.danger) { margin-right: 0; }
.stock-row { cursor: default; }
.stock-row .ic.warn { width: 13px; height: 13px; vertical-align: -2px; }
.stepper { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 10px; padding: 2px; }
.stepper .qty { min-width: 28px; text-align: center; font-weight: 600; font-size: 14px; }
/* com estoque (1 ou mais): verde · zerado: vermelho · abaixo do mínimo: aviso amarelo "repor" */
.stock-row.has .row-main strong, .stock-row.has .qty { color: var(--ok); }
.stock-row.zero .row-main strong, .stock-row.zero .qty { color: var(--danger); }
.tag-zero { color: var(--danger); font-weight: 600; }
.tag-low { color: var(--warn); font-weight: 600; }
.stepper { flex: none; }

/* ============ Mensagens ============ */
.msg-list { display: flex; flex-direction: column; }
.msg { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.msg:last-child { border-bottom: 0; }
.msg header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg details summary { cursor: pointer; color: var(--accent-text); font-size: 13px; }
.msg-text { white-space: pre-wrap; font: 14px/1.5 Inter, sans-serif; background: var(--surface-2); border-radius: 12px 12px 12px 4px; padding: 12px 14px; margin: 8px 0 0; max-width: 520px; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============ Clientes ============ */
.search { padding: 8px; }
.search input { border: 0 !important; background: transparent !important; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.photos figure { margin: 0; }
.photos button { padding: 0; border: 0; background: none; cursor: pointer; display: block; width: 100%; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.photos figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.photo-full { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; }

.anamnese .card { display: flex; flex-direction: column; gap: 12px; }
.questions { display: flex; flex-direction: column; }
.q { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.q p { margin: 0; font-size: 15px; }
.q-detail { display: none; }
.q:has(input[value=sim]:checked) .q-detail { display: block; }
@media (min-width: 700px) { .q { grid-template-columns: 1fr auto; } .q-detail { grid-column: 1 / -1; } }
.consent { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; }
.sign-wrap { display: flex; flex-direction: column; gap: 6px; }
.sign-label { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.sign { width: 100%; height: 200px; background: #fff; border-radius: 12px; border: 1px solid var(--line); touch-action: none; cursor: crosshair; }
.sign-foot { display: flex; justify-content: space-between; align-items: center; }
.paper { max-width: 820px; }
.doc-title { font-size: 20px; margin-bottom: 16px; }
.doc-table tr.yes td { color: var(--danger); }
.signature-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 16px; }
.signature-box img { max-width: 320px; width: 100%; background: #fff; border-bottom: 1px solid #999; }
.signature-box span { font-size: 13px; color: var(--muted); }
.hash { font-size: 11px; color: var(--muted); word-break: break-all; }

/* ============ Ajustes ============ */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.theme-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 14px; font-weight: 500; }
.theme-opt.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.theme-opt .sw { width: 100%; height: 42px; border-radius: 8px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 6px; border: 1px solid rgb(127 127 127 / .25); }
.theme-opt .sw span { width: 18px; height: 18px; border-radius: 50%; }
.font-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.font-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: left; }
.font-opt.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.font-sample { font-size: 24px; line-height: 1.2; margin-bottom: 4px; letter-spacing: -.01em; }
.font-name { font-size: 13px; font-weight: 600; }
.font-opt small { color: var(--muted); font-size: 12px; }
.font-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 12px; }
.font-row .check { align-items: center; }
.split-edit { display: flex; flex-direction: column; gap: 8px; }
.split-row { display: grid; grid-template-columns: 1fr 100px auto; gap: 8px; align-items: center; }
.pct-input { position: relative; }
.pct-input input { padding-right: 28px !important; text-align: right; }
.pct-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.split-total { margin: 0; font-weight: 600; text-align: right; }
.tpl { border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; }
.tpl summary { padding: 12px 0; cursor: pointer; font-weight: 500; }
.tpl textarea { margin-bottom: 8px; }
.tpl .btn { margin-bottom: 12px; }
.menu-list { padding: 4px 14px; }
.menu-list a { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 500; }
.menu-list a:last-child { border-bottom: 0; }
.menu-list .chev { margin-left: auto; color: var(--muted); width: 16px; }

/* ============ Agenda da equipe ============ */
.agenda-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 10px; }
.agenda-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; flex: 1; }
.agenda-nav strong { font-family: var(--font-head); font-size: 16px; padding: 0 4px; min-width: 120px; text-align: center; }
@media (max-width: 599px) {
  .agenda-bar { flex-direction: column; align-items: stretch; }
  .agenda-bar .seg { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; text-align: center; }
  .agenda-nav { flex-wrap: wrap; }
  .agenda-nav strong { flex: 1; min-width: 0; font-size: 15px; }
  .agenda-nav .week-jump { width: 100% !important; margin: 4px 0 0; }
}
.pro-filter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pro-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.pro-chip.on { color: var(--text); border-color: var(--pro); background: color-mix(in srgb, var(--pro) 14%, var(--surface)); }
.pro-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--pro, var(--accent)); margin-right: 4px; vertical-align: 0; flex: none; }
.pro-line { margin: 0; display: flex; align-items: center; gap: 2px; font-weight: 500; }

.dayboard { padding: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; max-height: calc(100dvh - 250px); position: relative; }
@media (max-width: 899px) { .dayboard { max-height: calc(100dvh - 150px); } }
.db-head, .db-body { display: grid; grid-template-columns: 52px repeat(var(--cols), minmax(0, 1fr)); }
.db-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.db-corner { position: sticky; left: 0; background: var(--surface); z-index: 4; }
.db-pro { display: flex; align-items: center; gap: 8px; padding: 10px; border-left: 1px solid var(--line); border-top: 3px solid var(--pro); min-width: 0; }
.db-pro span { display: flex; flex-direction: column; min-width: 0; }
.db-pro strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-pro small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; background: var(--pro); color: #111; }
.db-body { position: relative; }
.db-times { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.db-times span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); }
.db-times span:first-child { transform: none; top: 2px !important; }
.day-col { position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--slot, 44px) - 1px), color-mix(in srgb, var(--line) 70%, transparent) calc(var(--slot, 44px) - 1px), color-mix(in srgb, var(--line) 70%, transparent) var(--slot, 44px)); }
.day-col:hover { background-color: color-mix(in srgb, var(--pro) 4%, transparent); }
.db-sess { position: absolute; left: 3px; right: 3px; display: flex; flex-direction: column; gap: 1px; padding: 4px 7px; border: 0; border-left: 4px solid var(--pro); border-radius: 8px; background: color-mix(in srgb, var(--pro) 22%, var(--surface)); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; z-index: 1; box-shadow: var(--shadow); }
.db-sess:hover { background: color-mix(in srgb, var(--pro) 32%, var(--surface)); }
.db-sess strong { font-size: 13px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-sess small { font-size: 11px; color: var(--muted); line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.db-time { font-size: 11px; font-weight: 600; color: var(--muted); }
.db-sess.status-feita { opacity: .6; }
.db-sess.status-faltou { opacity: .5; text-decoration: line-through; }
.db-sess.status-confirmada { border-left-style: double; }
.db-block { position: absolute; left: 3px; right: 3px; display: flex; align-items: flex-start; gap: 4px; padding: 5px 7px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 11px; text-align: left; cursor: pointer; background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); }
.db-block .ic { width: 12px; height: 12px; flex: none; }
.now-line { position: absolute; left: 52px; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.session-row { border-left: 3px solid var(--pro, transparent); padding-left: 8px !important; }
.day-link { display: flex; align-items: center; gap: 8px; color: inherit; }

/* formulário de agendamento */
.kind-seg { align-self: flex-start; }
.sf-items .lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: grid; grid-template-columns: 1fr 96px 32px; gap: 6px; align-items: center; }
.line.prod { grid-template-columns: 1fr 56px 90px 32px; }
.line select, .line input { min-height: 40px !important; font-size: 14px !important; padding: 8px !important; }
.sf-total { margin-left: auto; align-self: center; font-size: 15px; }
.sf-total strong { font-size: 17px; }
.items-list .total-row strong { font-size: 16px; }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick span { display: block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.color-pick input:checked + span { border-color: var(--surface); box-shadow: 0 0 0 2px var(--text); }

/* cliente: escolher nos contatos */
.client-pick { flex-wrap: wrap; }
.client-pick select { flex: 1 1 100%; }
@media (min-width: 560px) { .client-pick select { flex: 1 1 auto; } }
.contact-search { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; }
.contact-results { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
.contact-hit { padding: 8px 4px; }
.order-row { gap: 6px; }
.order-n { width: 22px; text-align: center; color: var(--muted); font-weight: 600; }
.order-chip { color: var(--muted); }
.order-chip .ic { width: 13px; height: 13px; margin: 0 -3px; }
.pro-row { gap: 6px; padding: 8px 0; }
.pro-order { display: flex; flex-direction: column; gap: 2px; }
.pro-edit { display: flex; flex-direction: row; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; }
.pro-edit .row-main strong { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.leads-pick { display: flex; flex-wrap: wrap; gap: 6px 16px; }
/* nome do app */
.sidebar .brand small { text-transform: none; }
.topbar .brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.topbar .brand-txt small { font-family: Inter, sans-serif; font-size: 10px; letter-spacing: .08em; text-transform: none; color: var(--muted); font-weight: 500; }
.app-title { display: flex; flex-direction: column; align-items: center; letter-spacing: .14em; }
.app-title small { font-family: Inter, sans-serif; font-size: 14px; letter-spacing: .1em; color: var(--muted); font-weight: 500; text-transform: none; margin-top: 4px; }

/* etapa 2: acesso e papéis */
.login-links { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.login-links .link { font-size: 14px; }
.login > .skip { color: var(--muted); }
.access-line { display: block; margin-top: 2px; }
.warn-txt { color: var(--warn); }
.amount-col { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.amount-col small { font-size: 12px; }
a.kpi.as-link { text-decoration: none; color: inherit; }
a.kpi.as-link:hover { border-color: var(--accent); }
.svc-row[disabled] { cursor: default; opacity: 1; }

/* serviços */
.svc-pros { margin: 0 0 4px; }
.svc-row .svc-price { white-space: nowrap; font-size: 14px; }
.svc-row.inactive { opacity: .5; }

/* ============ Fluxo de caixa ============ */
.dropzone { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1.5px dashed var(--line); border-radius: 16px; cursor: pointer; color: var(--muted); transition: .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.dropzone .ic { width: 26px; height: 26px; color: var(--accent-text); }
.dropzone span { display: flex; flex-direction: column; }
.dropzone strong { color: var(--text); }
.dropzone small { font-size: 13px; }
.catbars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 20px; }
.catbar { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 10px; border: 1px solid transparent; background: none; text-align: left; cursor: pointer; }
.catbar:hover { background: var(--surface-2); }
.catbar.active { border-color: var(--accent); background: var(--surface-2); }
.catbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.catbar small { color: var(--muted); font-size: 12px; }
.import-list { max-height: 44vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.import-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.import-row:last-child { border-bottom: 0; }
.import-row select { width: 46% !important; min-height: 38px !important; font-size: 14px !important; padding: 6px 8px !important; }

/* ============ Divulgação ============ */
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.howto > div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.howto p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.banner-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.banner-pick img, .banner-empty { width: 120px; height: 120px; border-radius: 12px; object-fit: cover; }
.banner-empty { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 13px; }
.wa-preview { display: flex; flex-direction: column; gap: 0; max-width: 380px; margin-bottom: 12px; }
.wa-preview img { width: 100%; border-radius: 12px 12px 0 0; display: block; }
.wa-preview img + .msg-text { border-radius: 0 0 12px 4px; margin: 0; }
.send-row { gap: 6px 8px; flex-wrap: wrap; }
.send-row .row-main { min-width: 140px; }
.send-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.btn.nowa-btn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.contact-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#contacts-drop { padding: 14px 18px; }

/* ============ Tela de entrada ============ */
body.locked .sidebar, body.locked .topbar, body.locked .tabbar { display: none !important; }
body.locked .app { display: block; }
body.locked .main { padding: 0; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.login { width: min(420px, 100%); padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.login-brand img { border-radius: 22px; }
.login-brand p { margin: 0; }
.login .btn.lg { width: 100%; }
.login-hint { margin: 0; text-align: center; }
.login > .link { align-self: center; color: var(--muted); }

/* ============ Modal e toast ============ */
.modal {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / .35);
}
.modal.wide { width: min(820px, calc(100vw - 24px)); }
.modal::backdrop { background: rgb(0 0 0 / .5); backdrop-filter: blur(2px); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.modal-head h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 16px 18px 20px; }
@media (max-width: 559px) {
  .modal, .modal.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92dvh; padding-bottom: env(safe-area-inset-bottom); }
}
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; z-index: 100; transition: .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ============ Impressão / PDF ============ */
#print-area { display: none; }
@media print {
  @page { margin: 16mm; }
  body.printing .app, body.printing .modal, body.printing .toast { display: none !important; }
  body.printing { background: #fff; color: #111; }
  body.printing #print-area { display: block; }
  .print-doc { font: 12pt/1.5 Inter, Arial, sans-serif; color: #111; --muted: #555; --line: #ccc; --danger: #a3322a; }
  .print-head { border-bottom: 1px solid #ccc; padding-bottom: 12px; margin-bottom: 20px; }
  .print-brand { display: flex; align-items: center; gap: 12px; }
  .print-brand .logo-p { width: 22px; height: 40px; color: #b58a00; }
  .print-brand strong { display: block; font: 600 16pt var(--font-head); letter-spacing: .14em; text-transform: uppercase; }
  .print-brand span { font-size: 9pt; color: #555; }
  .print-doc h3 { margin: 18px 0 6px; }
  .print-doc .table th, .print-doc .table td { border-color: #ddd; color: #111; }
  .print-doc .muted, .print-doc .consent { color: #444; }
  .receipt-value { font: 600 22pt var(--font-head); margin: 0 0 12px; }
  .receipt-text { font-size: 12pt; line-height: 1.8; }
  .signature-line { margin-top: 64px; border-top: 1px solid #111; width: 280px; padding-top: 6px; font-size: 10pt; }
  .print-doc .dl { grid-template-columns: 120px 1fr; }
  .print-doc tr.yes td { color: #a3322a; }
}

/* nota fiscal */
.nf-cpf { display: flex; gap: 8px; align-items: flex-end; }
.nf-cpf .field { flex: 1; margin: 0; }
.nf-row .row-main small { display: block; }


/* estoque: acabou algo? */
.out-row { gap: 8px; }
.out-btns { display: flex; gap: 6px; flex-shrink: 0; }
.shop-list .sub { margin: 12px 0 4px; }

.stock-row .btn.sm { padding: 4px 8px; flex-shrink: 0; }
.stock-row .btn.sm .ic { width: 14px; height: 14px; }


/* divisão: valores do mês */
.split-month { margin-top: 14px; border-top: 1px solid var(--line, rgba(127,127,127,.2)); padding-top: 10px; }
.split-month .month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.total-row strong { font-weight: 700; }
.stock-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }


/* agenda do dia no celular: todas as colunas cabem na tela, sem rolar para o lado */
@media (max-width: 899px) {
  .db-head, .db-body { grid-template-columns: 38px repeat(var(--cols), minmax(0, 1fr)); }
  .db-pro { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px 5px; text-align: center; }
  .db-pro .avatar.sm { width: 22px; height: 22px; font-size: 9px; }
  .db-pro span { align-items: center; width: 100%; }
  .db-pro strong { font-size: 11px; max-width: 100%; }
  .db-pro small { display: none; }
  .db-times span { right: 3px; font-size: 10px; }
  .db-sess { left: 1px; right: 1px; padding: 2px 3px; border-left-width: 3px; border-radius: 5px; }
  .db-sess strong { font-size: 11px; white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
  .db-sess small { font-size: 10px; line-height: 1.15; }
  .db-time { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .db-block { left: 1px; right: 1px; padding: 2px 3px; font-size: 9px; border-radius: 5px; overflow: hidden; }
  .db-block .ic { width: 10px; height: 10px; }
}