/* ============================================================
   Clientes · lista, ficha y expediente clínico
   ============================================================ */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.client-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; cursor: pointer; transition: var(--transition);
}
.client-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.client-card__top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.client-card__avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 17px; }
.client-card__name { font-weight: 700; font-size: 15px; }
.client-card__meta { font-size: 12px; color: var(--text-soft); }
.client-card__stats { display: flex; gap: 8px; margin-top: 10px; }
.client-tag { font-size: 11px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-soft); font-weight: 600; }

/* Ficha del cliente */
.profile { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
.profile__side { display: flex; flex-direction: column; gap: 16px; }
.profile__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.profile__avatar { width: 90px; height: 90px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 32px; margin: 0 auto 12px; }
.profile__name { text-align: center; font-size: 18px; font-weight: 700; }
.profile__sub { text-align: center; color: var(--text-soft); font-size: 12px; margin-bottom: 14px; }
.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-soft); }
.info-row .v { font-weight: 600; text-align: right; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 10px 16px; border: none; background: none; color: var(--text-soft); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Timeline de historial */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.tl-date { font-size: 11px; color: var(--text-soft); font-weight: 700; }
.tl-title { font-weight: 700; font-size: 14px; margin: 2px 0; }

/* Galería de fotos antes/después */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-slot { aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); display: grid; place-items: center; color: var(--text-soft); font-size: 12px; text-align: center; }
.photo-slot.filled { background: var(--brand-grad); color: #fff; border-style: solid; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(168,85,247,.1); color: var(--brand); font-weight: 600; }
.chip--warn { background: rgba(245,158,11,.12); color: var(--warn); }

@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } }
