/* Fluxo Beleza — agenda, fichas e detalhes do salão (usa as variáveis do app.css) */
.ag-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ag-top .ag-dia { font-size: 18px; font-weight: 700; min-width: 220px; }
.ag-top input[type=date] { width: auto; }
.ag-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); max-height: calc(100vh - 210px); }
.ag-grid { display: grid; position: relative; min-width: 100%; }
.ag-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); padding: .55rem .5rem; font-weight: 700; display: flex; align-items: center; gap: .4rem; min-width: 0; }
.ag-head .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.ag-head small { font-weight: 500; }
.ag-corner { position: sticky; left: 0; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--border); }
.ag-hours { position: sticky; left: 0; z-index: 2; background: var(--surface-2); border-right: 1px solid var(--border); }
.ag-hours div { position: absolute; left: 0; right: 0; font-size: 11.5px; color: var(--muted); padding: 0 .4rem; transform: translateY(-.55em); text-align: right; }
.ag-col { position: relative; border-right: 1px solid var(--border); }
.ag-col .ln { position: absolute; left: 0; right: 0; border-top: 1px solid var(--border); }
.ag-col .ln.half { border-top-style: dashed; opacity: .6; }
.ag-col .off { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, var(--surface-3), var(--surface-3) 6px, transparent 6px, transparent 12px); opacity: .9; }
.ag-col .slot { position: absolute; left: 0; right: 0; cursor: pointer; }
.ag-col .slot:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.ag-col .slot:hover::after { content: '+ marcar'; position: absolute; left: 6px; top: 2px; font-size: 11px; color: var(--primary); font-weight: 600; }
.ag-ev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 7px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; color: var(--text);
  background: color-mix(in srgb, var(--c, var(--primary)) 16%, var(--surface)); border-left: 4px solid var(--c, var(--primary)); box-shadow: var(--shadow-sm); z-index: 1; }
.ag-ev:hover { z-index: 2; box-shadow: var(--shadow); }
.ag-ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.ag-ev.st-ATENDIDO { opacity: .62; }
.ag-ev.st-FALTOU { opacity: .5; text-decoration: line-through; }
.ag-ev.st-AGENDADO { border-left-style: dashed; }
.ag-ev .robo { float: right; font-size: 11px; }
.ag-bl { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 3px 7px; font-size: 11.5px; color: var(--muted); background: var(--surface-3); border: 1px dashed var(--border-strong); z-index: 1; cursor: pointer; overflow: hidden; }
.ag-now { position: absolute; left: 0; right: 0; border-top: 2px solid var(--danger); z-index: 2; pointer-events: none; }
.ag-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.ag-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }

.st { display: inline-block; padding: .12rem .5rem; border-radius: 99px; font-size: 11.5px; font-weight: 700; }
.st-b-AGENDADO { background: var(--warn-50); color: var(--warn); }
.st-b-CONFIRMADO { background: var(--info-50); color: var(--info); }
.st-b-ATENDIDO { background: var(--ok-50); color: var(--ok); }
.st-b-CANCELADO, .st-b-FALTOU { background: var(--danger-50); color: var(--danger); }

.slots { display: flex; flex-wrap: wrap; gap: .4rem; max-height: 220px; overflow: auto; }
.slots button { min-height: 32px; padding: .2rem .7rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font-weight: 600; }
.slots button.sel, .slots button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cor-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }
.badge-novo { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #f06595; color: #fff; font-size: 11.5px; font-weight: 700; margin-left: auto; }
.horas-grid { display: grid; grid-template-columns: 110px 1fr 1fr; gap: .45rem .7rem; align-items: center; }
.horas-grid input[type=time] { width: 100%; }
.link-box { display: flex; gap: .5rem; align-items: center; background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius); padding: .7rem .9rem; flex-wrap: wrap; }
.link-box code { font-family: var(--mono); font-size: 13.5px; font-weight: 600; word-break: break-all; flex: 1; min-width: 200px; }
.ficha-alerta { background: var(--danger-50); color: var(--danger); border-radius: var(--radius-sm); padding: .45rem .7rem; font-weight: 600; font-size: 13px; }
@media (max-width: 640px) {
  .ag-top .ag-dia { min-width: 0; width: 100%; font-size: 16px; }
  .horas-grid { grid-template-columns: 80px 1fr 1fr; }
}

/* ---------- Fluxo Estética: paleta verde-água (html.tema-estetica) ---------- */
:root.tema-estetica { --primary: #0f766e; --primary-600: #0d6560; --primary-700: #0b524e; --primary-50: #e8f7f5; --primary-100: #c5ebe6;
  --side-bg: #0f2f2d; --side-text: #dcf2ef; --side-muted: #86aaa6; --side-active: #1d4a46; }
:root.tema-estetica[data-theme="dark"] { --primary: #2dd4bf; --primary-600: #5eead4; --primary-700: #99f6e4; --primary-50: #0c2624; --primary-100: #123a37;
  --side-bg: #061514; --side-text: #d6eeeb; --side-muted: #6f908c; --side-active: #123a37; }
.tema-estetica .login-art { background: linear-gradient(150deg, #072624, #0f4f4a 55%, #0f766e); }
/* Assinatura, fotos e medidas */
.assinatura { border: 2px dashed var(--border); border-radius: var(--radius); background: #fff; width: 100%; height: 180px; touch-action: none; cursor: crosshair; display: block; }
.anam-q { display: grid; grid-template-columns: 1fr auto; gap: .3rem .8rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.anam-q .sn { display: flex; gap: .3rem; }
.anam-q .sn label { display: inline-flex; align-items: center; gap: .25rem; border: 1px solid var(--border); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; font-weight: 600; }
.anam-q .sn input { width: auto; margin: 0; }
.anam-q .sn label:has(input:checked) { background: var(--primary); border-color: var(--primary); color: #fff; }
.anam-q .det { grid-column: 1 / -1; }
.fotos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.foto-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); position: relative; cursor: pointer; }
.foto-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.foto-card div { padding: .35rem .5rem; font-size: 12px; }
.foto-card.sel { outline: 3px solid var(--primary); }
.comparar { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.comparar figure { margin: 0; text-align: center; }
.comparar img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius); background: #000; }
.ficha-tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: .8rem; }
.ficha-tabs button { background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .45rem .7rem; font-weight: 600; }
.ficha-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.sessoes-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; min-width: 80px; }
.sessoes-bar i { display: block; height: 100%; background: var(--primary); }
.diff-up { color: var(--danger); font-size: 11px; } .diff-down { color: var(--ok); font-size: 11px; }
