/* =====================================================================
   Barber SaaS 3.0 — design system (mobile first, sem dependências)
   As cores principais vêm do tema da barbearia (Tema::css) e podem ser
   trocadas em "Personalizar app".
   ===================================================================== */
:root {
  --bg: #0b0b0d;
  --bg-2: #111114;
  --card: #151518;
  --card-2: #1c1c20;
  --borda: #242428;
  --borda-2: #303036;
  --texto: #f3f0ea;
  --texto-2: #d6d1c7;
  --muted: #8f8a81;
  --ouro: #c9a45c;
  --ouro-2: #e2c48a;
  --ouro-esc: #8d7039;
  --ouro-fundo: rgba(201, 164, 92, .13);
  --ouro-borda: rgba(201, 164, 92, .42);
  --ouro-rgb: 201, 164, 92;
  --sobre-ouro: #14110b;
  --verde: #3ccf8e;
  --verde-fundo: rgba(60, 207, 142, .12);
  --vermelho: #f06464;
  --vermelho-fundo: rgba(240, 100, 100, .12);
  --azul: #6aa8ff;
  --azul-fundo: rgba(106, 168, 255, .12);
  --roxo: #a98bff;
  --roxo-fundo: rgba(169, 139, 255, .12);
  --cinza-fundo: rgba(143, 138, 129, .14);
  --raio: 14px;
  --raio-p: 10px;
  --sombra: 0 12px 34px rgba(0, 0, 0, .38);
  --sombra-p: 0 4px 14px rgba(0, 0, 0, .22);
  --vidro: rgba(12, 12, 14, .82);
  --fonte: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --fonte-titulo: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --color-scheme: dark;
  --nav-h: 66px;
  --topo-h: 60px;
  --lateral: 258px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: var(--color-scheme); scroll-behavior: smooth; }
body { background: var(--bg); color: var(--texto); font: 15px/1.55 var(--fonte); min-height: 100vh; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--ouro-2); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
h1 { font-family: var(--fonte-titulo); font-size: 1.6rem; line-height: 1.2; font-weight: 600; }
h2 { font-size: 1.08rem; line-height: 1.3; }
h3 { font-size: .95rem; margin: 1.2rem 0 .6rem; }
.titulo-serif { font-family: var(--fonte-titulo); font-weight: 600; letter-spacing: 0; }
code { background: var(--bg-2); border: 1px solid var(--borda); padding: .1rem .4rem; border-radius: 6px; font-size: .85em; }
::selection { background: rgba(var(--ouro-rgb), .35); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.xs { font-size: .76rem; }
.forte { font-weight: 700; }
.ouro { color: var(--ouro-2); }
.verde { color: var(--verde); }
.vermelho { color: var(--vermelho); }
.centro { text-align: center; }
.direita { text-align: right; }
.oculto, [hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.mt { margin-top: 1rem; } .mt-p { margin-top: .5rem; } .mt-g { margin-top: 1.6rem; } .mb { margin-bottom: 1rem; } .mb-p { margin-bottom: .5rem; }
.linha { display: flex; align-items: center; gap: .6rem; }
.linha-entre { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.quebra { flex-wrap: wrap; }
.cresce { flex: 1; min-width: 0; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sobrelinha { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--muted); }

.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic-p { width: 16px; height: 16px; }
.ic-g { width: 28px; height: 28px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .68rem 1.1rem; border-radius: var(--raio-p);
  border: 1px solid var(--borda-2); background: var(--card-2); color: var(--texto); font-weight: 600; cursor: pointer; font-size: .92rem;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; white-space: nowrap; min-height: 44px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: color-mix(in srgb, var(--borda-2) 60%, var(--texto) 25%); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario { background: linear-gradient(180deg, var(--ouro-2), var(--ouro)); border-color: var(--ouro); color: var(--sobre-ouro); box-shadow: 0 6px 18px rgba(var(--ouro-rgb), .22); }
.btn-primario:hover { filter: brightness(1.06); border-color: var(--ouro-2); }
.btn-verde { background: var(--verde); border-color: var(--verde); color: #04210f; }
.btn-verde:hover { filter: brightness(1.07); border-color: var(--verde); }
.btn-perigo { background: transparent; color: var(--vermelho); border-color: rgba(240, 100, 100, .38); }
.btn-perigo:hover { background: var(--vermelho-fundo); border-color: var(--vermelho); }
.btn-fantasma { background: transparent; border-color: transparent; color: var(--muted); }
.btn-fantasma:hover { background: var(--card-2); color: var(--texto); border-color: transparent; }
.btn-contorno { background: transparent; border-color: var(--ouro-borda); color: var(--ouro-2); }
.btn-contorno:hover { background: var(--ouro-fundo); border-color: var(--ouro); }
.btn-p { padding: .42rem .75rem; min-height: 36px; font-size: .84rem; }
.btn-icone { padding: 0; width: 40px; min-height: 40px; height: 40px; }
.btn-icone.btn-p { width: 34px; min-height: 34px; height: 34px; }
.btn-bloco { width: 100%; }
.btn-whats { background: #1faa59; border-color: #1faa59; color: #fff; }
.btn-whats:hover { filter: brightness(1.08); border-color: #22c063; }
.carregando { position: relative; color: transparent !important; pointer-events: none; }
.carregando > * { visibility: hidden; }
.carregando::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: gira .7s linear infinite; }
.btn-primario.carregando::after { border-color: rgba(0,0,0,.2); border-top-color: var(--sobre-ouro); }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- formulários ---------- */
.campo { margin-bottom: .95rem; }
.campo label, .rotulo { display: block; font-size: .8rem; font-weight: 600; color: var(--texto-2); margin-bottom: .38rem; letter-spacing: .01em; }
.campo .dica, .dica { font-size: .76rem; color: var(--muted); margin-top: .32rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=datetime-local],
input[type=search], input[type=url], input:not([type]), select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--borda-2); border-radius: var(--raio-p); padding: .68rem .85rem;
  min-height: 46px; outline: none; transition: border-color .15s, box-shadow .15s; font-size: 16px; color: var(--texto); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--ouro); box-shadow: 0 0 0 3px var(--ouro-fundo); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input[type=date], input[type=time], input[type=datetime-local] { color-scheme: var(--color-scheme); }
input[type=file] { width: 100%; padding: .55rem; border: 1px dashed var(--borda-2); border-radius: var(--raio-p); background: var(--bg-2); font-size: .85rem; color: var(--muted); }
input[type=color] { width: 52px; height: 46px; border: 1px solid var(--borda-2); border-radius: var(--raio-p); background: var(--bg-2); padding: 4px; cursor: pointer; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238f8a81' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.grade-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 .8rem; }
@media (max-width: 480px) { .grade-3.quebra-cel { grid-template-columns: 1fr 1fr; } }
.input-icone { position: relative; }
.input-icone .ic { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icone input { padding-left: 2.5rem; }
.check { display: flex; align-items: center; gap: .6rem; cursor: pointer; padding: .35rem 0; user-select: none; font-size: .92rem; }
.check input { width: 19px; height: 19px; accent-color: var(--ouro); flex-shrink: 0; }
.chave { position: relative; display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; user-select: none; font-size: .92rem; padding: .3rem 0; }
.chave input { position: absolute; opacity: 0; }
.chave span.trilho { width: 42px; height: 24px; background: var(--borda-2); border-radius: 20px; position: relative; transition: .2s; flex-shrink: 0; }
.chave span.trilho::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.chave input:checked + span.trilho { background: var(--ouro); }
.chave input:checked + span.trilho::after { transform: translateX(18px); }
.chave input:focus-visible + span.trilho { box-shadow: 0 0 0 3px var(--ouro-fundo); }
.grupo-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .1rem .8rem; }
.linha-chave { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--borda); }
.linha-chave:last-child { border-bottom: 0; }
.linha-chave .cresce b { display: block; font-size: .92rem; }
.linha-chave .cresce small { color: var(--muted); font-size: .78rem; }
.prefixo { display: flex; }
.prefixo span { display: flex; align-items: center; padding: 0 .7rem; background: var(--card-2); border: 1px solid var(--borda-2); border-right: 0; border-radius: var(--raio-p) 0 0 var(--raio-p); color: var(--muted); font-size: .85rem; white-space: nowrap; }
.prefixo input { border-radius: 0 var(--raio-p) var(--raio-p) 0; }

/* ---------- cartões ---------- */
.card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.15rem; }
.card + .card { margin-top: 1rem; }
.card-titulo { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .95rem; }
.card-titulo h2 { display: flex; align-items: center; gap: .5rem; }
.card-titulo h2 .ic { color: var(--ouro-2); }
.card-sub { font-size: .8rem; color: var(--muted); margin-top: -.6rem; margin-bottom: .9rem; }
.card-destaque { background: radial-gradient(120% 140% at 100% 0%, rgba(var(--ouro-rgb), .16), transparent 55%), var(--card); border-color: var(--ouro-borda); }
.card-link { display: block; color: var(--texto); transition: border-color .15s, transform .15s; }
.card-link:hover { border-color: var(--ouro-borda); transform: translateY(-1px); }
.vazio { text-align: center; padding: 2.4rem 1rem; color: var(--muted); }
.vazio .ic { display: block; width: 44px; height: 44px; margin: 0 auto .8rem; color: var(--ouro); opacity: .55; stroke-width: 1.4; }
.vazio b { display: block; color: var(--texto); font-size: 1rem; margin-bottom: .2rem; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1rem; }
.stat { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: .95rem 1rem; position: relative; overflow: hidden; }
.stat .rot { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: .4rem; }
.stat .rot .ic { width: 15px; height: 15px; color: var(--ouro); }
.stat .val { font-size: 1.45rem; font-weight: 750; margin-top: .25rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: .76rem; color: var(--muted); }
.stat.destaque { background: radial-gradient(130% 120% at 100% 0%, rgba(var(--ouro-rgb), .2), transparent 60%), var(--card); border-color: var(--ouro-borda); }
.stat.destaque .val { color: var(--ouro-2); }

/* ---------- selos ---------- */
.selo { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .55rem; border-radius: 20px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: var(--cinza-fundo); color: var(--muted); letter-spacing: .01em; }
.selo .ic { width: 12px; height: 12px; }
.selo-ouro { background: var(--ouro-fundo); color: var(--ouro-2); }
.selo-verde { background: var(--verde-fundo); color: var(--verde); }
.selo-vermelho { background: var(--vermelho-fundo); color: var(--vermelho); }
.selo-azul { background: var(--azul-fundo); color: var(--azul); }
.selo-roxo { background: var(--roxo-fundo); color: var(--roxo); }

/* ---------- alertas / toasts ---------- */
.alerta { padding: .8rem 1rem; border-radius: var(--raio-p); margin-bottom: 1rem; font-size: .88rem; border: 1px solid; display: flex; gap: .6rem; align-items: flex-start; }
.alerta .ic { margin-top: 1px; }
.alerta-erro { background: var(--vermelho-fundo); border-color: rgba(240,100,100,.32); color: color-mix(in srgb, var(--vermelho) 60%, var(--texto)); }
.alerta-ok { background: var(--verde-fundo); border-color: rgba(60,207,142,.32); color: color-mix(in srgb, var(--verde) 55%, var(--texto)); }
.alerta-aviso { background: var(--ouro-fundo); border-color: var(--ouro-borda); color: color-mix(in srgb, var(--ouro-2) 65%, var(--texto)); }
.alerta-info { background: var(--azul-fundo); border-color: rgba(106,168,255,.3); color: color-mix(in srgb, var(--azul) 55%, var(--texto)); }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 300; display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--card-2); border: 1px solid var(--borda-2); border-left: 4px solid var(--verde); padding: .8rem 1rem; border-radius: 12px; box-shadow: var(--sombra); font-size: .9rem; animation: sobe .25s ease; pointer-events: auto; color: var(--texto); }
.toast.erro { border-left-color: var(--vermelho); }
@keyframes sobe { from { transform: translateY(12px); opacity: 0; } }

/* ---------- tabelas (viram cartões no celular) ---------- */
.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: .6rem .7rem; border-bottom: 1px solid var(--borda); white-space: nowrap; }
.tabela td { padding: .75rem .7rem; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr { transition: background .12s; }
.tabela tbody tr:hover { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.tabela-rolagem { overflow-x: auto; margin: 0 -1.15rem; padding: 0 1.15rem; }
@media (max-width: 720px) {
  .tabela-cards thead { display: none; }
  .tabela-cards, .tabela-cards tbody, .tabela-cards tr, .tabela-cards td { display: block; width: 100%; }
  .tabela-cards tr { border: 1px solid var(--borda); border-radius: 12px; padding: .7rem .85rem; margin-bottom: .6rem; background: var(--bg-2); }
  .tabela-cards td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .tabela-cards td::before { content: attr(data-r); color: var(--muted); font-size: .8rem; text-align: left; font-weight: 600; }
  .tabela-cards td.td-titulo { font-weight: 700; font-size: 1rem; text-align: left; justify-content: flex-start; }
  .tabela-cards td.td-titulo::before { display: none; }
  .tabela-cards td.td-acoes { justify-content: flex-end; padding-top: .5rem; }
  .tabela-cards td.td-acoes::before { display: none; }
}

/* ---------- listas ---------- */
.lista { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: .8rem; padding: .78rem 0; border-bottom: 1px solid var(--borda); color: var(--texto); }
.item:last-child { border-bottom: 0; }
a.item:hover .forte { color: var(--ouro-2); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--ouro-fundo); color: var(--ouro-2); display: grid; place-items: center; font-weight: 700; font-size: .88rem; flex-shrink: 0; overflow: hidden; border: 1px solid var(--ouro-borda); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-g { width: 68px; height: 68px; font-size: 1.3rem; }
.avatar-q { border-radius: 12px; }

/* ---------- layout do painel ---------- */
.topo { position: sticky; top: 0; z-index: 50; height: var(--topo-h); display: flex; align-items: center; gap: .7rem; padding: 0 1rem;
  background: var(--vidro); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--borda); }
.topo .marca { display: flex; align-items: center; gap: .6rem; font-weight: 700; min-width: 0; color: var(--texto); }
.topo .marca img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; border: 1px solid var(--borda-2); }
.topo .marca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--fonte-titulo); font-size: 1.05rem; }
.topo .acoes { margin-left: auto; display: flex; gap: .4rem; align-items: center; }
.topo .saudacao { display: none; }
.conteudo { padding: 1.1rem 1rem calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 1220px; margin: 0 auto; }
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.cabecalho .sub { color: var(--muted); font-size: .88rem; margin-top: .15rem; }
.cabecalho .acoes { display: flex; gap: .5rem; flex-wrap: wrap; }

.lateral { display: none; }
.nav-baixo { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--vidro); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-top: 1px solid var(--borda);
  padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
.nav-baixo a, .nav-baixo button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .22rem; font-size: .66rem; font-weight: 600;
  color: var(--muted); background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; position: relative; }
.nav-baixo .ativo { color: var(--ouro-2); }
.nav-baixo .ativo::before { content: ""; position: absolute; top: 0; width: 26px; height: 2px; border-radius: 2px; background: var(--ouro); }
.nav-baixo .ic { width: 22px; height: 22px; }

.menu-mais-grupo { margin-bottom: 1rem; }
.menu-mais { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-top: .45rem; }
.menu-mais a { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .95rem .35rem; background: var(--bg-2); border: 1px solid var(--borda); border-radius: var(--raio); color: var(--texto); font-size: .76rem; font-weight: 600; text-align: center; line-height: 1.25; }
.menu-mais a .ic { color: var(--ouro-2); width: 23px; height: 23px; }
.menu-mais a.ativo { border-color: var(--ouro); background: var(--ouro-fundo); }

@media (min-width: 1000px) {
  .lateral { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: var(--lateral); background: var(--bg-2); border-right: 1px solid var(--borda); z-index: 70; padding: 1.1rem .85rem; overflow-y: auto; scrollbar-width: thin; }
  .lateral .marca { display: flex; align-items: center; gap: .7rem; padding: .2rem .45rem 1.2rem; color: var(--texto); }
  .lateral .marca img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; border: 1px solid var(--ouro-borda); }
  .lateral .marca b { display: block; font-family: var(--fonte-titulo); font-size: 1.08rem; line-height: 1.15; font-weight: 600; }
  .lateral .marca small { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
  .lateral .grupo { font-size: .66rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-weight: 700; padding: 1rem .75rem .35rem; opacity: .8; }
  .lateral nav a { display: flex; align-items: center; gap: .7rem; padding: .52rem .75rem; border-radius: var(--raio-p); color: var(--texto-2); font-weight: 500; font-size: .9rem; margin-bottom: 1px; position: relative; }
  .lateral nav a .ic { width: 18px; height: 18px; color: var(--muted); }
  .lateral nav a:hover { background: var(--card); color: var(--texto); }
  .lateral nav a.ativo { background: var(--ouro-fundo); color: var(--ouro-2); font-weight: 600; }
  .lateral nav a.ativo .ic { color: var(--ouro-2); }
  .lateral nav a.ativo::before { content: ""; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ouro); }
  .lateral .rodape { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--borda); }
  .com-lateral .conteudo-wrap { margin-left: var(--lateral); }
  .com-lateral .topo .marca { display: none; }
  .topo { padding: 0 1.75rem; }
  .topo .saudacao { display: block; font-size: .88rem; color: var(--muted); }
  .topo .saudacao b { color: var(--texto); font-weight: 600; }
  .nav-baixo { display: none; }
  .conteudo { padding: 1.6rem 1.75rem 2.5rem; }
  .toasts { bottom: 24px; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 1.85rem; }
}

/* ---------- modais (folha inferior no celular) ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); }
.modal.aberto { display: flex; animation: aparece .2s; }
.modal-caixa { background: var(--card); border: 1px solid var(--borda-2); border-radius: 22px 22px 0 0; width: 100%; max-height: 92vh; display: flex; flex-direction: column; animation: sobe-modal .25s ease; box-shadow: var(--sombra); }
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 1.05rem 1.15rem .75rem; border-bottom: 1px solid var(--borda); }
.modal-cab h2 { font-size: 1.12rem; font-family: var(--fonte-titulo); font-weight: 600; }
.modal-corpo { padding: 1.05rem 1.15rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-rodape { padding: .8rem 1.15rem calc(.8rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--borda); display: flex; gap: .6rem; flex-wrap: wrap; }
.modal-rodape .btn { flex: 1; }
@keyframes aparece { from { opacity: 0; } }
@keyframes sobe-modal { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 700px) {
  .modal { align-items: center; padding: 1.5rem; }
  .modal-caixa { border-radius: 20px; max-width: 560px; max-height: 88vh; }
  .modal-caixa.largo { max-width: 780px; }
  .modal-rodape { padding-bottom: .8rem; justify-content: flex-end; }
  .modal-rodape .btn { flex: 0 0 auto; min-width: 120px; }
}
body.travado { overflow: hidden; }

/* ---------- abas / chips ---------- */
.abas { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .2rem; margin-bottom: 1rem; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.aba { padding: .48rem .95rem; border-radius: 20px; background: var(--card); border: 1px solid var(--borda); color: var(--muted); font-weight: 600; font-size: .84rem; white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.aba:hover { color: var(--texto); }
.aba.ativa { background: var(--ouro-fundo); border-color: var(--ouro-borda); color: var(--ouro-2); }
.abas-linha { display: flex; gap: 1.2rem; border-bottom: 1px solid var(--borda); margin-bottom: 1.2rem; overflow-x: auto; scrollbar-width: none; }
.abas-linha .aba { background: none; border: 0; border-radius: 0; padding: .7rem 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.abas-linha .aba.ativa { border-bottom-color: var(--ouro); background: none; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { border: 1px solid var(--borda-2); background: var(--bg-2); padding: .52rem .9rem; border-radius: var(--raio-p); cursor: pointer; font-weight: 600; font-size: .9rem; transition: .12s; min-height: 42px; color: var(--texto); }
.chip:hover { border-color: var(--ouro); }
.chip.sel { background: var(--ouro); border-color: var(--ouro); color: var(--sobre-ouro); }
.chip:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- agenda ---------- */
.dias-semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: .3rem; margin-bottom: 1rem; }
.dia-btn { display: flex; flex-direction: column; align-items: center; padding: .5rem 0; border-radius: 12px; background: var(--card); border: 1px solid var(--borda); color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; position: relative; letter-spacing: .04em; }
.dia-btn b { font-size: 1.12rem; color: var(--texto); letter-spacing: 0; }
.dia-btn.hoje b { color: var(--ouro-2); }
.dia-btn.sel { background: var(--ouro); border-color: var(--ouro); color: var(--sobre-ouro); }
.dia-btn.sel b { color: var(--sobre-ouro); }
.dia-btn .pt { position: absolute; bottom: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--ouro); }
.dia-btn.sel .pt { background: var(--sobre-ouro); }
.ag-lista { display: flex; flex-direction: column; gap: .6rem; }
.ag { display: flex; gap: .85rem; background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: .85rem; cursor: pointer; transition: .12s; border-left: 3px solid var(--ouro); }
.ag:hover { border-color: var(--borda-2); border-left-color: var(--ouro-2); transform: translateX(2px); }
.ag .hora { min-width: 54px; text-align: center; padding-right: .7rem; border-right: 1px solid var(--borda); }
.ag .hora b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ag .hora small { color: var(--muted); font-size: .74rem; }
.ag.st-concluido { border-left-color: var(--verde); }
.ag.st-cancelado { border-left-color: var(--vermelho); opacity: .6; }
.ag.st-faltou { border-left-color: var(--muted); opacity: .7; }
.ag .nome { font-weight: 700; }
.ag .det { color: var(--muted); font-size: .83rem; }

/* ---------- gráfico de barras simples ---------- */
.barras { display: flex; align-items: flex-end; gap: .4rem; height: 130px; padding-top: .5rem; }
.barra { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; justify-content: flex-end; }
.barra i { width: 100%; max-width: 30px; background: linear-gradient(180deg, var(--ouro-2), var(--ouro-esc)); border-radius: 6px 6px 3px 3px; min-height: 3px; display: block; opacity: .85; }
.barra:hover i { opacity: 1; }
.barra span { font-size: .66rem; color: var(--muted); }
.barra.hoje span { color: var(--ouro-2); font-weight: 700; }

/* ---------- resumo/valores ---------- */
.resumo { background: var(--bg-2); border: 1px solid var(--borda); border-radius: 12px; padding: .8rem 1rem; }
.resumo .l { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-size: .9rem; }
.resumo .l > :last-child { text-align: right; font-variant-numeric: tabular-nums; }
.resumo .l.total { border-top: 1px dashed var(--borda-2); margin-top: .35rem; padding-top: .6rem; font-size: 1.1rem; font-weight: 800; }
.opcao { display: flex; align-items: center; gap: .7rem; padding: .75rem .85rem; border: 1px solid var(--borda-2); border-radius: 12px; cursor: pointer; background: var(--bg-2); margin-bottom: .5rem; }
.opcao input { accent-color: var(--ouro); width: 19px; height: 19px; flex-shrink: 0; }
.opcao.sel, .opcao:has(input:checked) { border-color: var(--ouro); background: var(--ouro-fundo); }
.opcao.desab { opacity: .5; cursor: not-allowed; }
.formas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.formas label { text-align: center; padding: .6rem .3rem; border: 1px solid var(--borda-2); border-radius: 10px; cursor: pointer; font-size: .84rem; font-weight: 600; background: var(--bg-2); }
.formas input { display: none; }
.formas label:has(input:checked) { border-color: var(--ouro); background: var(--ouro-fundo); color: var(--ouro-2); }

/* ---------- páginas simples (login, cadastro, erro) ---------- */
.pagina-simples { display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem; min-height: 100vh;
  background: radial-gradient(900px 520px at 50% -12%, rgba(var(--ouro-rgb), .16), transparent 62%), var(--bg); }
.caixa-central { width: 100%; max-width: 430px; }
.marca-topo { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-bottom: 1.4rem; font-size: 1.25rem; font-family: var(--fonte-titulo); color: var(--texto); }
.marca-topo img { border-radius: 12px; }
.caixa-central .card { padding: 1.6rem; box-shadow: var(--sombra); }
.caixa-central h1 { margin-bottom: .3rem; }
.lista-log { list-style: none; background: var(--bg-2); border-radius: 10px; padding: .8rem; margin: 1rem 0; font-size: .85rem; max-height: 260px; overflow: auto; }
.lista-log li::before { content: "✓ "; color: var(--verde); }
.separador { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; margin: 1.1rem 0; }
.separador::before, .separador::after { content: ""; flex: 1; height: 1px; background: var(--borda); }

/* ---------- utilidades extra ---------- */
.copiavel { display: flex; gap: .5rem; }
.copiavel input { font-size: .85rem; }
.aviso-topo { background: var(--ouro-fundo); border-bottom: 1px solid var(--ouro-borda); color: var(--ouro-2); padding: .55rem 1rem; font-size: .85rem; text-align: center; }
.aviso-topo a { font-weight: 700; text-decoration: underline; }
.aviso-topo.vermelho { background: var(--vermelho-fundo); color: var(--vermelho); border-color: rgba(240,100,100,.3); }
.grade-cards { display: grid; grid-template-columns: 1fr; gap: .85rem; }
@media (min-width: 640px) { .grade-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grade-cards.g3 { grid-template-columns: repeat(3, 1fr); } .grade-cards.g4 { grid-template-columns: repeat(4, 1fr); } }
.grade-cards .card + .card { margin-top: 0; }
.duas-colunas { display: grid; gap: 1rem; }
.duas-colunas > div > .card + .card { margin-top: 1rem; }
@media (min-width: 1000px) { .duas-colunas { grid-template-columns: 1.4fr 1fr; align-items: start; } .duas-colunas.iguais { grid-template-columns: 1fr 1fr; } .duas-colunas.lado { grid-template-columns: 1fr 380px; } }
.progresso { height: 8px; background: var(--bg-2); border-radius: 10px; overflow: hidden; border: 1px solid var(--borda); }
.progresso i { display: block; height: 100%; background: linear-gradient(90deg, var(--ouro-esc), var(--ouro-2)); border-radius: 10px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 55; width: 56px; height: 56px; border-radius: 18px; box-shadow: 0 10px 26px rgba(var(--ouro-rgb), .35); }
@media (min-width: 1000px) { .fab { display: none; } }
.so-desktop { display: none !important; }
.so-desktop-bloco { display: none; }
@media (min-width: 1000px) { .so-desktop { display: inline-flex !important; } .so-desktop-bloco { display: block; } .so-celular { display: none !important; } }
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filtros .campo { margin-bottom: 0; flex: 1; min-width: 130px; }
.paginacao { display: flex; justify-content: center; gap: .4rem; margin-top: 1rem; }
.miniatura { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--bg-2); border: 1px solid var(--borda); flex-shrink: 0; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.cor-bolinha { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.15); }
.contador { display: inline-flex; align-items: center; border: 1px solid var(--borda-2); border-radius: var(--raio-p); overflow: hidden; }
.contador button { width: 34px; height: 34px; background: var(--card-2); border: 0; cursor: pointer; display: grid; place-items: center; color: var(--texto); }
.contador span { min-width: 34px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.etiquetas { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ---------- dashboard ---------- */
.boas-vindas { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.boas-vindas h1 { font-size: 1.7rem; }
.atalhos { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-bottom: 1rem; }
.atalho { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .85rem .3rem; border-radius: var(--raio); background: var(--card); border: 1px solid var(--borda); color: var(--texto); font-size: .74rem; font-weight: 600; text-align: center; transition: .15s; }
.atalho .ic { width: 22px; height: 22px; color: var(--ouro-2); }
.atalho:hover { border-color: var(--ouro-borda); transform: translateY(-1px); }
@media (min-width: 1000px) { .atalhos { grid-template-columns: repeat(8, 1fr); } }
.linha-tempo { position: relative; padding-left: 1.1rem; }
.linha-tempo::before { content: ""; position: absolute; left: .3rem; top: .4rem; bottom: .4rem; width: 1px; background: var(--borda-2); }
.linha-tempo .item::before { content: ""; position: absolute; left: .05rem; width: 9px; height: 9px; border-radius: 50%; background: var(--ouro); box-shadow: 0 0 0 3px var(--card); }
.linha-tempo .item { position: relative; }

/* ---------- prévia do celular (personalizar) ---------- */
.celular { width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 38px; border: 10px solid #050506; background: #050506; box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 0 0 1px #2a2a2e; overflow: hidden; position: relative; }
.celular iframe { width: 100%; height: 100%; border: 0; border-radius: 28px; background: var(--bg); }
.celular::before { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 90px; height: 22px; background: #050506; border-radius: 14px; z-index: 2; }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.preset { border: 1px solid var(--borda-2); border-radius: 12px; padding: .6rem; cursor: pointer; background: var(--bg-2); text-align: left; transition: .12s; color: var(--texto); }
.preset:hover { border-color: var(--ouro-borda); }
.preset.sel { border-color: var(--ouro); box-shadow: 0 0 0 2px var(--ouro-fundo); }
.preset .amostra { height: 34px; border-radius: 8px; display: flex; align-items: flex-end; padding: 5px; margin-bottom: .45rem; }
.preset .amostra i { width: 40%; height: 8px; border-radius: 4px; display: block; }
.preset small { font-size: .74rem; font-weight: 600; }
.opcoes-visuais { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; }
.opcoes-visuais label { border: 1px solid var(--borda-2); border-radius: 10px; padding: .6rem .4rem; text-align: center; cursor: pointer; font-size: .8rem; background: var(--bg-2); }
.opcoes-visuais input { display: none; }
.opcoes-visuais label:has(input:checked) { border-color: var(--ouro); background: var(--ouro-fundo); color: var(--ouro-2); }
.opcoes-visuais b { display: block; font-size: 1.05rem; margin-bottom: .1rem; }

/* ---------- mensagens ---------- */
.msg-modelo { border: 1px solid var(--borda); border-radius: var(--raio); background: var(--card); margin-bottom: .7rem; overflow: hidden; }
.msg-modelo summary { list-style: none; display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; cursor: pointer; }
.msg-modelo summary::-webkit-details-marker { display: none; }
.msg-modelo[open] summary { border-bottom: 1px solid var(--borda); }
.msg-modelo .corpo { padding: 1rem; }
.vars { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 .6rem; }
.vars button { font-size: .72rem; padding: .2rem .5rem; border-radius: 6px; border: 1px dashed var(--ouro-borda); background: transparent; color: var(--ouro-2); cursor: pointer; font-family: ui-monospace, Menlo, monospace; }
.bolha { background: #0e2a20; color: #e8f5ee; border-radius: 4px 14px 14px 14px; padding: .7rem .85rem; font-size: .85rem; white-space: pre-wrap; line-height: 1.45; max-width: 420px; box-shadow: var(--sombra-p); word-break: break-word; }
.bolha b { color: #fff; }

@media print { .lateral, .topo, .nav-baixo, .fab, .btn { display: none !important; } .com-lateral .conteudo-wrap { margin: 0; } body { background: #fff; color: #000; } }
