/* 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; }
}
