/* "Inicio" page. Sizes measured on Fresha (1440×900), see docs/fresha/panel.md. */
.home-app { --hm-grey: rgb(118, 118, 118); --hm-line: rgb(229, 229, 229); }
.team-page.home-page { padding: 32px; background: var(--db-f5f5f5, rgb(245, 245, 245)); }
.home-page > .hm-grid { max-width: 1024px; margin: 0 auto; }
.hm-h2, .home-back, .home-top-title, .home-bottom { display: none; }

.hm-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; row-gap: 16px; }
.hm-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--db-ffffff, #fff); }
.hm-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--hm-line); pointer-events: none; }
.hm-card.r12 { border-radius: 12px; padding: 24px; }
.hm-card.r8 { border-radius: 8px; padding: 24px 0 0; }
.hm-card p { margin: 0; }

.hm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 48px; }
.hm-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.2px; }
.hm-sub { font-size: 15px; line-height: 20px; letter-spacing: -0.1px; color: var(--hm-grey); }
.hm-ctitle { padding: 0 24px 16px; }
.hm-dots { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 999px; }
.hm-dots svg { width: 20px; height: 20px; }
.hm-dots:hover, .hm-dots[aria-expanded="true"] { background: var(--db-131313-6-h, rgba(19, 19, 19, 0.06)); }

/* Empty states */
.hm-empty { display: flex; align-items: center; justify-content: center; padding: 64px 24px; text-align: center; }
.hm-empty-body { flex: 1; }
.hm-empty-today { height: 300px; flex: none; }
.hm-empty-in { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hm-empty-icon { display: block; width: 56px; height: 56px; }
.hm-empty-icon svg { width: 56px; height: 56px; }
.hm-empty-body .hm-empty-icon, .hm-empty-cell .hm-empty-icon { color: rgb(74, 56, 170); }
.hm-empty-text { display: flex; flex-direction: column; gap: 4px; }
.hm-empty-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.2px; }
.hm-empty-sub { font-size: 15px; line-height: 20px; letter-spacing: -0.1px; color: var(--hm-grey); }
.hm-empty-sub a { color: var(--accent); text-decoration: none; border-radius: 4px; }
.hm-empty-sub a:hover { text-decoration: underline; }

/* Próximas citas */
.hm-count { padding: 0 0 36px; }
.hm-big { padding: 8px 0 24px; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.2px; }
.hm-line { font-size: 15px; line-height: 20px; letter-spacing: -0.1px; color: var(--hm-grey); }
.hm-line b { color: var(--ink); font-weight: 600; }
.hm-chart { position: relative; height: 300px; min-width: 0; }
.hm-svg { display: block; overflow: visible; }
.hm-svg text { font: 400 12px var(--font); }
.hm-bar { transform-box: fill-box; transform-origin: bottom; animation: hm-grow .6s ease-out; }
@keyframes hm-grow { from { transform: scaleY(0); } }
.hm-legend { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 16px; }
.hm-legend > div, .hm-tip > div { display: flex; align-items: center; gap: 8px; }
.hm-legend i, .hm-tip i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.hm-legend p { font-size: 15px; line-height: 20px; letter-spacing: -0.1px; }
.hm-tip { position: absolute; top: 0; left: 0; z-index: 2; padding: 8px 12px; background: var(--ink); color: var(--do-ffffff, #fff); pointer-events: none; transition: transform .4s; white-space: nowrap; }
.hm-tip p { font-size: 13px; line-height: 16px; letter-spacing: -0.1px; }

/* Appointment rows */
.hm-list { height: 400px; overflow-y: auto; }
.hm-appt { position: relative; padding: 16px 16px 17px; border-radius: 12px; }
.hm-appt:hover { background: var(--db-131313-4-h, rgba(19, 19, 19, 0.04)); }
.hm-appt > a { position: absolute; inset: 0; border-radius: 12px; }
.hm-appt hr { position: absolute; left: 16px; right: 16px; bottom: 1px; margin: 0; border: 0; border-top: 1px solid var(--hm-line); }
.hm-appt-in { position: relative; display: flex; align-items: center; gap: 12px; pointer-events: none; }
.hm-date { flex: none; width: 27px; white-space: nowrap; }
.hm-date p:first-child { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.2px; }
.hm-date p:last-child { font-size: 15px; line-height: 20px; letter-spacing: -0.1px; }
.hm-appt-text { min-width: 0; }
.hm-when { display: flex; align-items: center; gap: 4px; height: 24px; font-size: 15px; line-height: 20px; letter-spacing: -0.1px; color: var(--hm-grey); white-space: nowrap; }
.hm-svc { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -0.2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-who { font-size: 15px; line-height: 20px; letter-spacing: -0.1px; color: var(--hm-grey); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 999px; background: var(--db-eaf1fd, rgb(234, 241, 253)); box-shadow: inset 0 0 0 1px var(--ds-cce0ff, rgb(204, 224, 255)); color: var(--df-2d76ec, rgb(45, 118, 236)); font-size: 13px; line-height: 16px; font-weight: 500; letter-spacing: -0.1px; }
.hm-badge.bad { background: var(--db-feeceb, rgb(254, 236, 235)); box-shadow: inset 0 0 0 1px var(--ds-fee3e2, rgb(254, 227, 226)); color: var(--df-d4163a, rgb(212, 22, 58)); }
.hm-badge.done { background: var(--db-f2f2f2, rgb(242, 242, 242)); box-shadow: inset 0 0 0 1px var(--ds-e5e5e5, rgb(229, 229, 229)); color: var(--df-767676, rgb(118, 118, 118)); }

/* Tables */
.hm-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.hm-table th { padding: 16px; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.1px; text-align: right; border-bottom: 1px solid var(--hm-line); }
.hm-table td { height: 56px; padding: 1px 16px; font-size: 14px; line-height: 20px; letter-spacing: -0.1px; text-align: right; }
.hm-table .l { text-align: left; padding-left: 24px; }
.hm-table th:last-child, .hm-table td:last-child { padding-right: 24px; }
.hm-table .hm-empty-cell { height: auto; padding: 1px 16px; text-align: center; }
.hm-table .hm-empty-cell .hm-empty { padding: 64px 24px; }
.hm-table td.l { overflow-wrap: anywhere; }

/* ⋮ filters popover */
.hm-pop { position: fixed; z-index: 70; width: 340px; background: var(--db-ffffff, #fff); border: 1px solid transparent; border-radius: 12px; box-shadow: var(--pop-shadow); }
.hm-pop-body { padding: 17px 20px 8px; display: flex; flex-direction: column; gap: 24px; }
.hm-field label { display: block; margin-bottom: 4px; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.1px; }
.hm-select { position: relative; height: 48px; border: 1px solid var(--de-d3d3d3, rgb(211, 211, 211)); border-radius: 8px; background: var(--db-ffffff, #fff); }
.hm-select:focus-within { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hm-select select { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0 44px 0 16px; border: 0; border-radius: 8px; background: none; appearance: none; font: 400 15px/20px var(--font); letter-spacing: -0.1px; outline: none; cursor: pointer; }
.hm-select [data-icon] { position: absolute; right: 16px; top: 50%; margin-top: -10px; pointer-events: none; }
.hm-select [data-icon] svg { width: 20px; height: 20px; }
.hm-pop-foot { display: flex; gap: 16px; padding: 16px; }
.hm-pop-foot .tbtn:last-child { flex: 1; }

/* ---------- Mobile: no rail or top bar, back arrow and bottom bar ---------- */
@media (max-width: 767px) {
  .home-app { --topbar-h: 72px; }
  .home-app .topbar { padding: 0 20px; gap: 16px; border-bottom: 0; background: var(--db-f5f5f5, rgb(245, 245, 245)); }
  .home-app .brand, .home-app .topbar-actions { display: none; }
  .home-back { display: inline-grid; width: 24px; height: 24px; margin-left: 0; border-radius: 0; }
  .home-back svg { width: 24px; height: 24px; }
  .home-top-title { display: block; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.2px; opacity: 0; transition: opacity .15s; }
  .home-top-title.on { opacity: 1; }
  .team-page.home-page { padding: 0 20px 24px; }
  .hm-h2 { display: block; margin: 0 0 32px; font-size: 28px; line-height: 36px; font-weight: 600; letter-spacing: -0.2px; }
  .hm-grid { grid-template-columns: 1fr; }
  .home-bottom { display: flex; }
  .hm-pop { width: min(340px, calc(100vw - 16px)); }
}
.hm-title .db-i { margin-left: 6px; vertical-align: -2px; cursor: help; }
