/* =====================================================================
   TattooControl — Design system
   Paleta "Luxo & Elegância": #EBEBEB · #4D4D4D · #700700 · #67011E · #000000
   ===================================================================== */

/* ---------- Tokens: tema claro ---------- */
:root {
  --bg: #EBEBEB;
  --bg-glow: radial-gradient(1200px 600px at 85% -10%, rgba(112, 7, 0, .07), transparent 60%),
             radial-gradient(900px 500px at -10% 110%, rgba(103, 1, 30, .05), transparent 60%);
  --surface: #FFFFFF;
  --surface-2: #F3F3F3;
  --surface-3: #E7E7E7;
  --text: #0B0B0B;
  --text-2: #4D4D4D;
  --text-3: #8A8A8A;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .14);

  --accent: #700700;
  --accent-2: #67011E;
  --accent-grad: linear-gradient(135deg, #8a0a02 0%, #700700 45%, #67011E 100%);
  --accent-ink: #700700;
  --accent-soft: rgba(112, 7, 0, .08);
  --accent-ring: rgba(112, 7, 0, .18);
  --on-accent: #FFFFFF;

  --green: #1B8A4A;
  --green-soft: rgba(27, 138, 74, .10);
  --orange: #A86200;
  --orange-soft: rgba(168, 98, 0, .12);
  --danger: #B3140A;

  --glass: rgba(255, 255, 255, .66);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-line: rgba(255, 255, 255, .75);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .14), 0 1px 0 rgba(255, 255, 255, .6) inset;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .06);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .22);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dock-h: 96px;

  color-scheme: light;
}

/* ---------- Tokens: tema escuro ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-glow: radial-gradient(1200px 600px at 85% -10%, rgba(112, 7, 0, .22), transparent 60%),
               radial-gradient(900px 500px at -10% 110%, rgba(103, 1, 30, .18), transparent 60%);
    --surface: #121212;
    --surface-2: #1C1C1C;
    --surface-3: #262626;
    --text: #EBEBEB;
    --text-2: #A6A6A6;
    --text-3: #6E6E6E;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .14);
    --accent-ink: #E3665C;
    --accent-soft: rgba(200, 30, 20, .16);
    --accent-ring: rgba(227, 102, 92, .28);
    --green: #45C97E;
    --green-soft: rgba(69, 201, 126, .13);
    --orange: #F0A43A;
    --orange-soft: rgba(240, 164, 58, .14);
    --danger: #FF6B5E;
    --glass: rgba(24, 24, 24, .62);
    --glass-strong: rgba(28, 28, 28, .9);
    --glass-line: rgba(255, 255, 255, .10);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .06) inset;
    --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
    --shadow-md: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 80px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-glow: radial-gradient(1200px 600px at 85% -10%, rgba(112, 7, 0, .22), transparent 60%),
             radial-gradient(900px 500px at -10% 110%, rgba(103, 1, 30, .18), transparent 60%);
  --surface: #121212;
  --surface-2: #1C1C1C;
  --surface-3: #262626;
  --text: #EBEBEB;
  --text-2: #A6A6A6;
  --text-3: #6E6E6E;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --accent-ink: #E3665C;
  --accent-soft: rgba(200, 30, 20, .16);
  --accent-ring: rgba(227, 102, 92, .28);
  --green: #45C97E;
  --green-soft: rgba(69, 201, 126, .13);
  --orange: #F0A43A;
  --orange-soft: rgba(240, 164, 58, .14);
  --danger: #FF6B5E;
  --glass: rgba(24, 24, 24, .62);
  --glass-strong: rgba(28, 28, 28, .9);
  --glass-line: rgba(255, 255, 255, .10);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .06) inset;
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow-md: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 32px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -.005em;
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
.icon { flex-shrink: 0; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
::selection { background: var(--accent-ring); }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 8px; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.green { color: var(--green); }
.accent { color: var(--accent-ink); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Topo ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1240px; margin: 0 auto; padding: 18px 28px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: -.02em; }
.brand-mark svg { border-radius: 9px; box-shadow: 0 4px 12px rgba(112, 7, 0, .3); }
.brand-name { font-weight: 500; }
.brand-name b { font-weight: 700; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 5px 5px 5px 14px;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  transition: background .2s;
}
.user-chip:hover { background: var(--glass-strong); }
.user-chip-text { display: flex; flex-direction: column; text-align: right; line-height: 1.15; }
.user-chip-text strong { font-size: 13px; font-weight: 600; }
.user-chip-text small { font-size: 11.5px; color: var(--text-2); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-grad); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 0;
  flex-shrink: 0;
}
.avatar-lg { width: 72px; height: 72px; font-size: 26px; }
.avatar-md { width: 42px; height: 42px; font-size: 15px; }
.avatar.c1 { background: linear-gradient(135deg, #8a0a02, #700700); }
.avatar.c2 { background: linear-gradient(135deg, #8e0a31, #67011E); }
.avatar.c3 { background: linear-gradient(135deg, #6b6b6b, #3d3d3d); }
.avatar.c4 { background: linear-gradient(135deg, #2a2a2a, #000); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.avatar.c5 { background: linear-gradient(135deg, #a2352b, #67011E); }

/* ---------- Conteúdo ---------- */
.main {
  max-width: 1240px; margin: 0 auto;
  padding: 28px 28px calc(var(--dock-h) + 48px);
  animation: page-in .45s var(--ease) both;
}
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; font-weight: 700; letter-spacing: -.03em; }
.page-head .eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-bottom: 4px; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { font-size: 19px; font-weight: 650; }
.section-title a { font-size: 14px; color: var(--accent-ink); font-weight: 500; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row-flex { display: flex; align-items: center; gap: 10px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.card-head h2, .card-head h3 { font-size: 17px; font-weight: 650; }
.card-head a { font-size: 14px; color: var(--accent-ink); font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; overflow: hidden; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.stat-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.stat-ico.is-green { background: var(--green-soft); color: var(--green); }
.stat-ico.is-gray { background: var(--surface-2); color: var(--text-2); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.03em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; font-weight: 600; color: var(--text-2); margin-right: 5px; }
.stat-foot { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.stat-hero { background: var(--accent-grad); color: #fff; border: 0; box-shadow: 0 12px 32px rgba(112, 7, 0, .28); }
.stat-hero .stat-label, .stat-hero .stat-foot, .stat-hero .stat-value small { color: rgba(255, 255, 255, .78); }
.stat-hero .stat-ico { background: rgba(255, 255, 255, .16); color: #fff; }
.stat-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent);
}
.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.trend.up { color: var(--green); }
.trend.down { color: var(--danger); }
.stat-hero .trend { color: #fff; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent-grad); color: var(--on-accent); box-shadow: 0 6px 18px rgba(112, 7, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(112, 7, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-tinted { background: var(--accent-soft); color: var(--accent-ink); }
.btn-tinted:hover { background: var(--accent-ring); }
.btn-green { background: var(--green-soft); color: var(--green); }
.btn-ghost { background: transparent; color: var(--accent-ink); padding: 0 10px; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: rgba(179, 20, 10, .08); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Campos ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); padding-left: 4px; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid transparent; color: var(--text);
  font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 88px; padding: 11px 14px; resize: vertical; line-height: 1.45; }
.select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2.5' 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;
}
.input:hover, .select:hover, .textarea:hover { background-color: var(--surface-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-ring); background-color: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
input[type="date"].input, input[type="time"].input { min-width: 0; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
:root[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) input[type="date"]::-webkit-calendar-picker-indicator,
  :root:not([data-theme="light"]) input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); }
}
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; pointer-events: none; }
.input-prefix > .input { padding-left: 40px; }
.input-money { font-variant-numeric: tabular-nums; font-weight: 600; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-section { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 8px 0 -4px 4px; }

.check {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface-2); cursor: pointer; font-size: 14.5px;
}
/* Switch estilo iOS */
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); transition: background .25s; }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .25s var(--ease);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }

/* Busca */
.search {
  position: relative; flex: 1; min-width: 200px; max-width: 420px;
}
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 40px; height: 40px; border-radius: 12px; background: var(--surface); border-color: var(--line); }

/* ---------- Segmented control ---------- */
.segmented {
  display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); gap: 2px;
}
.segmented a, .segmented button, .segmented label {
  position: relative; border: 0; background: transparent; padding: 6px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; transition: background .2s, color .2s;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented .is-active, .segmented label:has(input:checked) {
  background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px var(--line);
  font-weight: 600;
}
.segmented.is-block { display: flex; }
.segmented.is-block > * { flex: 1; justify-content: center; }
.segmented .seg-in:has(input:checked) { color: var(--green); }
.segmented .seg-out:has(input:checked) { color: var(--danger); }

/* ---------- Listas (estilo iOS) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item {
  display: flex; align-items: center; gap: 14px; padding: 13px 20px; position: relative;
  transition: background .15s;
}
.list-item + .list-item::before {
  content: ""; position: absolute; top: 0; right: 0; left: 76px; height: 1px; background: var(--line);
}
.list-plain .list-item + .list-item::before { left: 20px; }
a.list-item:hover, button.list-item:hover, .list-item.is-clickable:hover { background: var(--surface-2); }
button.list-item { width: 100%; border: 0; background: transparent; text-align: left; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-end { text-align: right; flex-shrink: 0; }
.list-chev { color: var(--text-3); }
.list-ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface-2); color: var(--text-2);
}
.list-ico.in { background: var(--green-soft); color: var(--green); }
.list-ico.out { background: var(--surface-2); color: var(--text-2); }
.list-group-head {
  padding: 16px 20px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em;
  display: flex; justify-content: space-between; border-top: 1px solid var(--line);
}
.list-group-head:first-child { border-top: 0; }
.amount { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.in { color: var(--green); }
.amount.out { color: var(--text); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.no-dot::before { display: none; }
.s-agendado { background: var(--surface-2); color: var(--text-2); }
.s-confirmado { background: var(--accent-soft); color: var(--accent-ink); }
.s-concluido { background: var(--green-soft); color: var(--green); }
.s-cancelado { background: var(--surface-2); color: var(--text-3); text-decoration: line-through; }
.s-faltou { background: var(--orange-soft); color: var(--orange); }

/* ---------- Vazio ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--text-2); }
.empty-ico {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 4px; font-weight: 600; }
.empty p { font-size: 14px; margin-bottom: 14px; }

/* =====================================================================
   DOCK (estilo macOS)
   ===================================================================== */
.dock-wrap {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60; pointer-events: none;
}
.dock {
  pointer-events: auto;
  display: flex; align-items: flex-end; gap: 8px;
  height: 74px; padding: 0 10px 12px;
  border-radius: 26px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
}
.dock-form { display: contents; }
.dock-item {
  --s: 52px;
  position: relative; display: flex; flex-direction: column; align-items: center;
  width: var(--s); border: 0; background: none; padding: 0; margin: 0;
  transition: width .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.dock-icon {
  width: var(--s); height: var(--s); border-radius: 23%;
  display: grid; place-items: center; color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .15);
  transition: width .18s var(--ease), height .18s var(--ease), transform .3s var(--ease);
}
.dock-icon::after { /* brilho de vidro */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 45%);
}
.dock-icon .icon { width: 46%; height: 46%; }
.dock-item:active .dock-icon { transform: scale(.92); }
.dock-item.is-bouncing .dock-icon { animation: dock-bounce .6s var(--ease); }
@keyframes dock-bounce { 0%,100% { transform: translateY(0); } 35% { transform: translateY(-16px); } 65% { transform: translateY(-4px); } }

/* indicador de app aberto */
.dock-item.is-active::after {
  content: ""; position: absolute; bottom: -8px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--text); opacity: .75;
}
/* tooltip */
.dock-item::before {
  content: attr(data-label);
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translate(-50%, 4px);
  padding: 5px 11px; border-radius: 8px; white-space: nowrap;
  font-size: 12.5px; font-weight: 500; color: var(--text);
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.dock-item:hover::before, .dock-item:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
.dock-label { display: none; }
.dock-sep { width: 1px; height: 44px; align-self: flex-end; margin: 0 4px 4px; background: var(--line-strong); }

/* Ícones "de app" */
.tile-red { background: linear-gradient(160deg, #a3160a 0%, #700700 55%, #4a0500 100%); }
.tile-wine { background: linear-gradient(160deg, #9a0f3a 0%, #67011E 55%, #3e0012 100%); }
.tile-graphite { background: linear-gradient(160deg, #7a7a7a 0%, #4D4D4D 55%, #262626 100%); }
.tile-glass { background: var(--surface); color: var(--text); box-shadow: 0 4px 10px rgba(0, 0, 0, .12), inset 0 0 0 1px var(--line); }
.tile-glass::after { display: none; }
.tile-avatar { background: linear-gradient(160deg, #1d1d1d, #000); color: #EBEBEB; font-weight: 600; font-size: calc(var(--s) * .34); letter-spacing: 0; }
.tile-calendar { background: #FFFFFF; color: #111; }
.tile-calendar::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, .04)); }
.cal-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; line-height: 1; }
.cal-tile-wd { font-size: calc(var(--s) * .19); font-weight: 700; color: #700700; letter-spacing: .02em; margin-top: 4%; }
.cal-tile-day { font-size: calc(var(--s) * .5); font-weight: 400; letter-spacing: -.04em; color: #111; margin-top: 2%; }

.theme-ico { display: grid; place-items: center; width: 100%; height: 100%; }
.dock-icon .theme-ico .icon { width: 46%; height: 46%; }
.theme-ico-moon { display: none; }
:root[data-theme="dark"] .theme-ico-sun { display: none; }
:root[data-theme="dark"] .theme-ico-moon { display: grid; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-ico-sun { display: none; }
  :root:not([data-theme="light"]) .theme-ico-moon { display: grid; }
}

/* =====================================================================
   Modais (sheets)
   ===================================================================== */
dialog.sheet {
  border: 0; padding: 0; margin: auto;
  width: min(580px, calc(100vw - 24px)); max-height: min(88dvh, 860px);
  border-radius: var(--radius-lg); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: none; flex-direction: column;
}
dialog.sheet[open] { display: flex; animation: sheet-in .32s var(--ease); }
dialog.sheet.is-closing { animation: sheet-out .2s ease-in forwards; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .25s ease; }
dialog.sheet.is-closing::backdrop { animation: fade-out .2s ease forwards; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 14px 14px; border-bottom: 1px solid var(--line); flex-shrink: 0;
  background: var(--surface);
}
.sheet-head h3 { font-size: 16px; font-weight: 650; text-align: center; }
.sheet-head .btn-ghost { font-weight: 500; }
.sheet-head .sheet-save { justify-self: end; font-weight: 650; }
.sheet-head > :first-child { justify-self: start; }
.sheet-body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 10px; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot:empty { display: none; }

.sheet-alert { width: min(340px, calc(100vw - 32px)) !important; text-align: center; }
.alert-body { padding: 26px 22px 18px; }
.alert-ico { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: rgba(179, 20, 10, .1); color: var(--danger); }
.alert-body h3 { font-size: 17px; margin-bottom: 6px; }
.alert-body p { font-size: 14px; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 18px 18px; }

/* Combobox de cliente */
.combo { position: relative; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5;
  background: var(--glass-strong); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: 6px; max-height: 260px; overflow-y: auto; display: none;
}
.combo.is-open .combo-list { display: block; }
.combo-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left;
  padding: 8px 10px; border-radius: 10px; font-size: 14.5px;
}
.combo-opt:hover, .combo-opt.is-focus { background: var(--accent-soft); }
.combo-opt small { display: block; color: var(--text-2); font-size: 12.5px; }
.combo-opt .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.combo-new { color: var(--accent-ink); font-weight: 600; }
.combo-selected {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 8px; border-radius: 12px; background: var(--surface-2);
}
.combo-selected .avatar { width: 30px; height: 30px; font-size: 11.5px; }
.combo-selected strong { flex: 1; font-weight: 600; font-size: 15px; }
.new-client-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border-radius: 14px; border: 1px dashed var(--line-strong); }
.new-client-box .tiny { grid-column: 1 / -1; color: var(--accent-ink); font-weight: 600; }

/* =====================================================================
   Toasts
   ===================================================================== */
.toasts {
  position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 24px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--line); box-shadow: var(--shadow-md);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  font-size: 14px; font-weight: 500; pointer-events: auto;
  animation: toast-in .45s var(--ease) both;
}
.toast.is-hiding { animation: toast-out .3s ease-in forwards; }
.toast-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.toast-success .toast-ico { background: var(--green-soft); color: var(--green); }
.toast-error .toast-ico { background: rgba(179, 20, 10, .12); color: var(--danger); }
.toast-warning .toast-ico { background: var(--orange-soft); color: var(--orange); }
.toast-info .toast-ico { background: var(--accent-soft); color: var(--accent-ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(.96); } }

/* =====================================================================
   Login
   ===================================================================== */
.auth {
  min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-art {
  position: relative; overflow: hidden; color: #EBEBEB; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(800px 500px at 20% 10%, rgba(138, 10, 2, .9), transparent 60%),
    radial-gradient(700px 600px at 90% 90%, rgba(103, 1, 30, .95), transparent 60%),
    #000;
}
.auth-art::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 14px);
}
.auth-art .brand { color: #EBEBEB; position: relative; }
.auth-quote { position: relative; max-width: 460px; }
.auth-quote h2 { font-size: 46px; font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.auth-quote h2 em { font-style: normal; color: rgba(235, 235, 235, .55); }
.auth-quote p { margin-top: 16px; color: rgba(235, 235, 235, .72); font-size: 16px; max-width: 380px; }
.auth-feats { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.auth-feats span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(10px);
}
.auth-form-wrap { display: grid; place-items: center; padding: 32px 24px; }
.auth-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.auth-form .lead { color: var(--text-2); margin-top: -8px; margin-bottom: 8px; }
.auth-form .input { height: 50px; border-radius: 14px; background: var(--surface); border-color: var(--line); }
.auth-form .input:focus { background: var(--surface); }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 48px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-3); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.pass-toggle:hover { color: var(--text); background: var(--surface-2); }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-2); }
.auth-row label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--text-3); margin-top: 12px; }
.auth-theme { position: fixed; top: 16px; right: 16px; }

/* =====================================================================
   Início
   ===================================================================== */
.hello h1 { font-size: 38px; }
.hello h1 span { color: var(--accent-ink); }

.timeline { list-style: none; margin: 0; padding: 4px 0 8px; }
.tl-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 20px; position: relative; transition: background .15s; }
.tl-item:hover { background: var(--surface-2); }
.tl-time { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 15px; }
.tl-time small { display: block; font-weight: 500; font-size: 12px; color: var(--text-3); }
.tl-body { border-left: 3px solid var(--accent); padding-left: 12px; min-width: 0; }
.tl-body.st-concluido { border-color: var(--green); }
.tl-body.st-agendado { border-color: var(--text-3); }
.tl-body.st-faltou { border-color: var(--orange); }
.tl-now { position: relative; height: 0; margin: 0 20px; border-top: 2px solid var(--accent-ink); }
.tl-now::before { content: ""; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-ink); }

.chart { width: 100%; height: auto; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .bar-in { fill: var(--green); }
.chart .bar-out { fill: var(--text-3); opacity: .55; }
.chart .grid-line { stroke: var(--line); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; }

.bday { display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.bday-date { width: 44px; text-align: center; line-height: 1; }
.bday-date b { display: block; font-size: 20px; font-weight: 700; }
.bday-date small { font-size: 11px; text-transform: uppercase; color: var(--accent-ink); font-weight: 700; }

/* =====================================================================
   Agenda
   ===================================================================== */
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; align-items: start; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; }
.cal-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.03em; text-transform: capitalize; }
.cal-head h2 span { color: var(--text-3); font-weight: 500; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays { padding: 0 8px; }
.cal-weekdays span { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 6px 8px; text-align: right; }
.cal-grid { padding: 0 8px 8px; }
.cal-day {
  position: relative; min-height: 108px; padding: 6px; border: 0; border-top: 1px solid var(--line);
  background: none; text-align: left; display: flex; flex-direction: column; gap: 3px; border-radius: 0;
  transition: background .15s; min-width: 0;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.is-selected { background: var(--accent-soft); border-radius: 12px; border-top-color: transparent; }
.cal-day.is-selected + .cal-day, .cal-day:nth-child(7n+1) { }
.cal-num {
  align-self: flex-end; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.cal-day.is-out .cal-num { color: var(--text-3); }
.cal-day.is-weekend:not(.is-out) .cal-num { color: var(--text-2); }
.cal-day.is-today .cal-num { background: var(--accent-grad); color: #fff; font-weight: 700; }
.cal-ev {
  display: flex; align-items: center; gap: 5px; font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 500; min-width: 0;
}
.cal-ev b { font-weight: 650; font-variant-numeric: tabular-nums; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.st-concluido { background: var(--green-soft); color: var(--green); }
.cal-ev.st-agendado { background: var(--surface-3); color: var(--text-2); }
.cal-ev.st-cancelado { background: transparent; color: var(--text-3); text-decoration: line-through; }
.cal-ev.st-faltou { background: var(--orange-soft); color: var(--orange); }
.cal-more { font-size: 11px; color: var(--text-3); font-weight: 600; padding-left: 6px; }
.cal-dots { display: none; }

.day-panel { position: sticky; top: 20px; }
.day-head { padding: 20px 20px 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.day-head h3 { font-size: 22px; font-weight: 700; letter-spacing: -.03em; text-transform: capitalize; }
.day-head p { color: var(--text-2); font-size: 14px; }
.day-list { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.appt {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 14px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid transparent; cursor: pointer; text-align: left; width: 100%;
  transition: transform .15s var(--ease), border-color .2s, background .2s;
  animation: page-in .35s var(--ease) both;
}
.appt:hover { border-color: var(--line-strong); background: var(--surface-3); }
.appt:active { transform: scale(.99); }
.appt-time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.2; }
.appt-time small { display: block; font-weight: 500; color: var(--text-3); font-size: 12px; }
.appt-main { border-left: 3px solid var(--accent); padding-left: 12px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.appt-main.st-concluido { border-color: var(--green); }
.appt-main.st-agendado { border-color: var(--text-3); }
.appt-main.st-cancelado { border-color: var(--line-strong); opacity: .6; }
.appt-main.st-faltou { border-color: var(--orange); }
.appt-title { font-weight: 650; font-size: 15px; }
.appt-client { font-size: 13.5px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.appt-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.appt-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.day-summary { display: flex; justify-content: space-between; padding: 12px 20px 16px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); }

.info-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px;
  background: var(--green-soft); color: var(--green); font-size: 14px; font-weight: 500;
}
.info-strip.is-neutral { background: var(--surface-2); color: var(--text-2); }

/* =====================================================================
   Clientes
   ===================================================================== */
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.client-row { display: grid; grid-template-columns: 42px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr) 110px 18px; gap: 14px; align-items: center; }
.client-row .col { font-size: 13.5px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-row .col b { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }

.profile { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-card { text-align: center; padding: 28px 22px 22px; }
.profile-card .avatar { margin: 0 auto 14px; }
.profile-card h2 { font-size: 24px; font-weight: 700; }
.profile-card .since { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.quick { display: flex; justify-content: center; gap: 10px; margin: 18px 0 6px; }
.quick a, .quick button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 72px; padding: 10px 0 8px; border-radius: 14px;
  background: var(--surface-2); border: 0; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); transition: background .2s;
}
.quick a:hover, .quick button:hover { background: var(--accent-soft); }
.quick .is-disabled { opacity: .4; pointer-events: none; }
.kv { list-style: none; margin: 16px 0 0; padding: 0; text-align: left; border-radius: 14px; background: var(--surface-2); }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; font-size: 14px; }
.kv li + li { border-top: 1px solid var(--line); }
.kv span { color: var(--text-2); }
.kv strong { font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.mini-stats div { background: var(--surface-2); border-radius: 14px; padding: 12px 8px; }
.mini-stats b { display: block; font-size: 15.5px; white-space: nowrap; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 11.5px; color: var(--text-2); }
.notes-box { text-align: left; margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: 14px; white-space: pre-line; }
.notes-box b { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); margin-bottom: 4px; }

/* =====================================================================
   Financeiro
   ===================================================================== */
.month-nav { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.month-nav strong { padding: 0 10px; font-size: 14.5px; font-weight: 600; text-transform: capitalize; min-width: 130px; text-align: center; }
.month-nav .btn-icon { width: 32px; height: 32px; color: var(--text-2); }
.month-nav .btn-icon:hover { background: var(--surface-2); }
.bars { display: flex; flex-direction: column; gap: 12px; padding: 4px 20px 20px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13.5px; }
.bar-row span { color: var(--text-2); }
.bar-row strong { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--accent-grad); transform-origin: left; animation: grow .8s var(--ease) both; }
.bar-fill.in { background: var(--green); }
@keyframes grow { from { transform: scaleX(0); } }
.fin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }

/* =====================================================================
   Minha conta
   ===================================================================== */
.settings { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.settings .card { padding: 22px; }
.settings h2 { font-size: 18px; margin-bottom: 4px; }
.settings .card > p { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: 18px; }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.theme-opt { border: 2px solid transparent; border-radius: 16px; padding: 8px; background: var(--surface-2); text-align: center; font-size: 13.5px; font-weight: 500; transition: border-color .2s; }
.theme-opt.is-active { border-color: var(--accent-ink); }
.theme-prev { height: 70px; border-radius: 10px; margin-bottom: 8px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.theme-prev.light { background: #EBEBEB; }
.theme-prev.dark { background: #000; }
.theme-prev.auto { background: linear-gradient(90deg, #EBEBEB 50%, #000 50%); }
.theme-prev::after { content: ""; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 60%; height: 14px; border-radius: 6px; background: linear-gradient(90deg, #700700, #67011E); }

.err-page { min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.err-page h1 { font-size: 80px; font-weight: 800; letter-spacing: -.05em; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-page p { color: var(--text-2); margin: 8px 0 20px; }

/* =====================================================================
   Responsivo
   ===================================================================== */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agenda-layout, .fin-layout { grid-template-columns: minmax(0, 1fr); }
  .day-panel { position: static; }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .client-row { grid-template-columns: 42px minmax(0, 1fr) minmax(0, .8fr) 100px 18px; }
  .client-row .col-hide-md { display: none; }
}

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { min-height: 280px; padding: 28px 24px; }
  .auth-quote h2 { font-size: 32px; }
  .auth-feats { display: none; }
  .profile { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  :root { --dock-h: 78px; }
  body { font-size: 15px; }
  .topbar { padding: 12px 16px 0; }
  .user-chip-text { display: none; }
  .user-chip { padding: 3px; }
  .main { padding: 18px 16px calc(var(--dock-h) + 40px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 18px; align-items: flex-start; }
  .page-head h1 { font-size: 30px; }
  .hello h1 { font-size: 30px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .tl-item { grid-template-columns: 52px minmax(0, 1fr); padding: 12px 16px; }
  .tl-item .badge { display: none; }
  .stats { gap: 10px; margin-bottom: 14px; }
  .stat { padding: 14px; }
  .stat-value { font-size: 22px; margin-top: 8px; }
  .stat-label { font-size: 12px; }
  .stat-ico { width: 24px; height: 24px; }
  .grid, .stack { gap: 14px; }
  .card { border-radius: 18px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .span-m-all { grid-column: 1 / -1; }

  /* Dock vira "tab bar" flutuante */
  .dock-wrap { left: 10px; right: 10px; transform: none; bottom: calc(10px + env(safe-area-inset-bottom)); }
  .dock { height: auto; padding: 8px 6px 7px; justify-content: space-around; gap: 0; border-radius: 24px; }
  .dock-desktop, .dock-sep { display: none !important; }
  .dock-item { --s: 30px; width: auto; flex: 1; gap: 3px; }
  .dock-item::before { display: none; }
  .dock-item.is-active::after { display: none; }
  .dock-icon { border-radius: 9px; box-shadow: none; }
  .dock-icon .icon { width: 62%; height: 62%; }
  .dock-item:not(.is-active) .dock-icon:not(.tile-calendar) { background: transparent; color: var(--text-2); }
  .dock-item:not(.is-active) .dock-icon::after { display: none; }
  .dock-item:not(.is-active) .tile-calendar { background: var(--surface-2); }
  .dock-item:not(.is-active) .tile-avatar { background: var(--surface-3); color: var(--text-2); }
  .dock-label { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
  .dock-item.is-active .dock-label { color: var(--accent-ink); }

  /* Modais viram bottom sheet */
  dialog.sheet {
    width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0;
    max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom);
  }
  dialog.sheet[open] { animation: sheet-up .38s var(--ease); }
  dialog.sheet.is-closing { animation: sheet-down .22s ease-in forwards; }
  dialog.sheet-alert { margin: auto; border-radius: 20px; }
  dialog.sheet-alert[open] { animation: sheet-in .3s var(--ease); }
  .sheet-head::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--line-strong); }
  .sheet-head { position: relative; padding-top: 18px; }
  .sheet-body { padding: 16px; }

  /* Agenda compacta */
  .cal-head { padding: 14px 14px 10px; }
  .cal-head h2 { font-size: 22px; }
  .cal-weekdays { padding: 0 4px; }
  .cal-weekdays span { text-align: center; padding: 4px 0; font-size: 10.5px; }
  .cal-grid { padding: 0 4px 8px; }
  .cal-day { min-height: 50px; align-items: center; padding: 4px 0 6px; border-top: 0; gap: 2px; }
  .cal-day.is-selected { border-radius: 12px; }
  .cal-num { align-self: center; font-size: 15px; width: 32px; height: 32px; padding: 0; }
  .cal-ev, .cal-more { display: none; }
  .cal-dots { display: flex; gap: 3px; height: 5px; }
  .cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-ink); }
  .cal-dots i.st-concluido { background: var(--green); }
  .cal-dots i.st-agendado { background: var(--text-3); }
  .cal-dots i.st-faltou { background: var(--orange); }
  .cal-dots i.st-cancelado { background: var(--line-strong); }
  .cal-day.is-selected .cal-num:not(.x) { font-weight: 700; }

  .client-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .client-row .col, .client-row .list-chev { display: none; }
  .client-row .col-keep { display: block; text-align: right; }
  .toolbar .search { max-width: none; min-width: 100%; }
  .month-nav { width: 100%; justify-content: space-between; }
  .theme-pick { gap: 8px; }
  .auth-art { min-height: 220px; }
  .auth-quote p { display: none; }
}


/* =====================================================================
   Área admin
   ===================================================================== */
.tile-onyx { background: linear-gradient(160deg, #3a3a3a 0%, #121212 55%, #000 100%); }
.tile-onyx .icon { color: #EBEBEB; }
.stat-ico.is-orange { background: var(--orange-soft); color: var(--orange); }
.alert-ico.is-green { background: var(--green-soft); color: var(--green); }
.seg-count { font-size: 11.5px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.segmented .is-active .seg-count { color: var(--accent-ink); }
.admin-head, .admin-row {
  display: grid; gap: 14px; align-items: center;
  grid-template-columns: 42px minmax(0, 1.7fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, 1fr) 18px;
}
.admin-head { padding: 14px 20px 8px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); border-bottom: 1px solid var(--line); }
.admin-row .col { font-size: 13.5px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row .col small { font-size: 12px; margin-left: 2px; }
.admin-until { display: block; margin-top: 3px; font-size: 11.5px; }
.u-admin { background: var(--accent-soft); color: var(--accent-ink); }
.u-ativo { background: var(--green-soft); color: var(--green); }
.u-vencendo { background: var(--orange-soft); color: var(--orange); }
.u-vencido { background: rgba(179, 20, 10, .1); color: var(--danger); }
.u-bloqueado { background: var(--surface-2); color: var(--text-3); }
.admin-actions { justify-content: flex-start; gap: 8px; }
.admin-actions form { display: contents; }
.admin-actions [data-reopen] { margin-left: auto; }
.mono-pass { font-family: var(--mono); font-size: 15px; letter-spacing: .02em; color: var(--accent-ink); }
.creds .kv { margin-top: 14px; }
.creds .kv strong { font-weight: 600; }
.expire-banner {
  max-width: 1184px; margin: 14px auto 0; padding: 10px 16px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500;
  background: var(--orange-soft); color: var(--orange);
}
@media (max-width: 1080px) {
  .admin-head { display: none; }
  .admin-row { grid-template-columns: 42px minmax(0, 1fr) auto 18px; }
  .admin-row .col:not(.col-keep) { display: none; }
  .admin-row .col-keep { text-align: right; }
}
@media (max-width: 720px) {
  .admin-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .admin-row .list-chev { display: none; }
  .admin-until { display: none; }
  .seg-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg-scroll::-webkit-scrollbar { display: none; }
  .expire-banner { margin: 12px 16px 0; }
  .admin-actions [data-reopen] { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
