/* Estilos propios de Close Friends (lo demás viene de styles.css). */
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-pick { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 24px; border: 3px solid transparent; transition: transform .15s ease; }
.av-pick:active { transform: scale(.9); }
.av-pick.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.auth-card { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.choice { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.choice b { font-size: 17px; }
.choice span { color: var(--muted); font-size: 14px; }
.person-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; }
.person-row .grow { flex: 1; min-width: 0; font-weight: 700; }
.person-row small { display: block; color: var(--muted); font-weight: 500; }
.tag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.link-box { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px; word-break: break-all; }
.soon { text-align: center; padding: 60px 20px; color: var(--muted); }
.soon .big { font-size: 46px; margin-bottom: 8px; }
.group-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--primary); padding: 4px 0; }
.lang-select { width: 100%; }
.card.tap.set-hero { display: flex; }

/* desplegable propio */
.dd { position: relative; }
.dd.open { z-index: 30; }
.dd-btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 14px; font-weight: 500; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.dd.open .dd-btn { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.dd-val { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap; }
.dd-val > span, .dd-opt > span { overflow: hidden; text-overflow: ellipsis; }
.dd-ph { color: var(--muted); }
.dd-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; transition: transform .2s ease; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-list { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: ddin .14s ease; }
.dd-opts { max-height: 248px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.dd-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 11px; text-align: left; font-weight: 600; min-height: 42px; color: var(--ink); }
.dd-opt:hover { background: var(--surface-2); }
.dd-opt.on { background: var(--primary-soft); color: var(--primary); }
.dd-search { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; outline: none; background: transparent; min-height: 46px; color: var(--ink); }
.dd-empty { padding: 14px; text-align: center; color: var(--muted); font-size: 14px; }
.flag { width: 24px; height: 18px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1); flex-shrink: 0; }
.field-row .dd-btn { padding: 10px 12px; }
@keyframes ddin { from { opacity: 0; transform: translateY(-4px); } }
.field-row .dd-list { min-width: 160px; }
.field-row .dd:last-child .dd-list { left: auto; right: 0; }

/* ===== calendario ===== */
.cf-cal { padding: 14px 12px 10px; }
.cf-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 18px; }
.cf-cal-head .icon-btn { width: 38px; height: 38px; font-size: 22px; line-height: 1; }
.cf-dows, .cf-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cf-dows span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0 6px; }
.cf-cell { position: relative; aspect-ratio: 1 / 1.08; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; padding: 5px 0 0; border-radius: 12px; font-weight: 700; font-size: 14px; color: var(--ink); }
.cf-cell:active { background: var(--surface-2); }
.cf-cell.out { color: var(--muted); opacity: .45; }
.cf-cell.today .n { background: var(--grad); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.cf-cell .n { width: 26px; height: 26px; display: grid; place-items: center; }
.cf-cell .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 90%; min-height: 6px; }
.d { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mc, var(--primary)); }
.d.plan { background: var(--primary); }
.cf-cell .bd { position: absolute; right: 2px; top: 1px; font-size: 10px; }
.cf-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 8px 4px 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.cf-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cf-legend .btn { margin-left: auto; min-height: 30px; padding: 4px 10px; }
.abs-list { display: flex; flex-direction: column; gap: 2px; }
.abs-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 4px 9px 10px; border-left: 4px solid var(--mc, var(--line)); border-radius: 10px; }
.abs-row .grow { flex: 1; min-width: 0; }
.abs-row b { display: block; }
.abs-row small { color: var(--muted); font-weight: 600; }
.abs-row.mine:active { background: var(--surface-2); }
.abs-range { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* ===== planes ===== */
.card.tap.cf-ev { display: flex; gap: 14px; align-items: flex-start; width: 100%; }
.cf-ev.past { opacity: .72; }
.ev-date { flex-shrink: 0; width: 54px; height: 58px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.ev-date b { font-size: 22px; font-weight: 800; }
.ev-date span { font-size: 11px; font-weight: 800; text-transform: capitalize; }
.ev-date.idea { font-size: 26px; background: var(--sun-soft); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-title { font-weight: 800; font-size: 16px; line-height: 1.25; }
.ev-sub { color: var(--muted); font-size: 13.5px; font-weight: 500; }
.cf-ev .ev-foot { margin-top: 4px; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
.cf-ev .ev-foot .join-pill { margin-left: auto; }
.open-tag.lock { background: var(--surface-2); }
.quorum { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.quorum.big { margin: 2px 0 6px; }
.q-bar { height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.q-bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.quorum small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.quick .btn.small { min-height: 34px; padding: 6px 12px; flex: 0 0 auto; }
.ev-row { font-weight: 600; }
.ev-desc { color: var(--ink); white-space: pre-wrap; margin: 0; }
.warn { background: color-mix(in srgb, var(--sun) 22%, transparent); border: 1px solid color-mix(in srgb, var(--sun) 60%, transparent); border-radius: 14px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.seg.resp button { padding: 11px 6px; font-size: 14px; }
.seg.tabs3 button { padding: 9px 4px; font-size: 13px; line-height: 1.15; }
.seg.tabs3 button:last-child { flex: 1.5; }
.who-group .label { margin-bottom: 6px; }
.who-list { display: flex; flex-wrap: wrap; gap: 6px; }
.who { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.who .avatar { border: 0; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pick-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface); border: 2px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted); }
.pick-chip .avatar { border: 0; opacity: .6; }
.pick-chip.on { border-color: var(--primary); color: var(--ink); background: var(--primary-soft); }
.pick-chip.on .avatar { opacity: 1; }
.pick-chip:disabled { opacity: .7; cursor: default; }
.link-btn { color: var(--primary); font-weight: 800; font-size: 13px; padding: 0; }
.field textarea { resize: vertical; font: inherit; }
.field input[type=date], .field input[type=time] { min-height: 48px; font: inherit; color: var(--ink); }
.slim-note { display: block; width: 100%; text-align: left; padding: 11px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
button.slim-note { cursor: pointer; }

/* ===== gastos ===== */
.x-balance { text-align: center; padding: 22px 16px; }
.x-balance .label { letter-spacing: .08em; font-size: 12px; font-weight: 800; }
.x-big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0; }
.x-balance.pos .x-big, .pos { color: var(--ok); }
.x-balance.neg .x-big, .neg { color: var(--bad); }
.x-state { color: var(--muted); font-weight: 700; }
.x-tr { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.x-tr .grow { flex: 1; min-width: 0; }
.x-tr small { display: block; color: var(--muted); font-weight: 700; }
.x-list { padding: 4px 6px; }
.x-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 6px; border-radius: 12px; }
button.x-item:active { background: var(--surface-2); }
.x-item + .x-item { border-top: 1px solid var(--line); }
.x-ic { font-size: 22px; width: 34px; text-align: center; }
.x-item .grow { flex: 1; min-width: 0; }
.x-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-item small { color: var(--muted); font-weight: 600; }
.x-right { display: flex; flex-direction: column; align-items: flex-end; }
.x-amt { font-weight: 800; white-space: nowrap; }
.x-del { color: var(--muted); font-size: 14px; padding: 6px; }
.x-mini { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.x-mini .label { font-size: 12px; letter-spacing: .08em; font-weight: 800; color: var(--muted); }
.x-mini b { font-size: 20px; }
.x-exrow { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.x-exrow .grow { flex: 1; min-width: 0; font-weight: 700; }
.x-exrow input { width: 110px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 9px 10px; text-align: right; min-height: 42px; outline: none; }
.x-exrow input:focus { border-color: var(--primary); }
#x-sum { min-height: 20px; font-weight: 700; }
.person-row b.muted { font-weight: 600; }
/* Calendario a todo el ancho; en pantallas grandes cada día muestra nombres en vez de puntos */
.cf-cell .chips { display: none; }
@media (min-width: 760px) {
  .cf-cal { padding: 18px 18px 12px; }
  .cf-grid { gap: 4px; }
  .cf-cell { aspect-ratio: auto; min-height: 104px; align-items: stretch; padding: 8px 6px 6px; border: 1px solid var(--line); border-radius: 14px; }
  .cf-cell .n { align-self: flex-start; }
  .cf-cell .dots { display: none; }
  .cf-cell .chips { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
  .cf-cell .chips b { display: block; font-size: 11px; font-weight: 700; line-height: 17px; padding: 0 6px; border-radius: 6px; color: #fff; background: var(--mc, var(--primary)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .cf-cell .chips b.plan { background: var(--grad); }
  .cf-cell .bd { right: 6px; top: 6px; font-size: 13px; }
}

/* ---------- selector de fecha propio ---------- */
.dp-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 700; text-align: left; }
.dp-btn .dp-text { flex: 1; }
.dp-btn .dd-chev { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.dp.open .dp-btn { border-color: var(--primary); }
.dp.open .dp-btn .dd-chev { transform: rotate(180deg); }
.dp-ic { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-quick { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.dp-quick::-webkit-scrollbar { display: none; }
.dp-chip { flex: 0 0 auto; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 13px; font-weight: 700; }
.dp-chip.on { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.dp-pop { margin-top: 8px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head .icon-btn { width: 38px; height: 38px; font-size: 22px; line-height: 1; }
.dp-dows, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-dows span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.dp-day { height: 40px; margin: 2px 0; font-weight: 700; font-size: 14px; color: var(--ink); border-radius: 12px; }
.dp-day.out { opacity: .4; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.dp-day.in { background: var(--primary-soft); color: var(--primary); border-radius: 0; }
.dp-day.start, .dp-day.end { background: var(--grad); color: #fff; box-shadow: none; }
.dp-day.start { border-radius: 12px 0 0 12px; }
.dp-day.end { border-radius: 0 12px 12px 0; }
.dp-day.start.end { border-radius: 12px; }
.dp-hint { margin: 6px 2px 0; min-height: 18px; font-size: 12px; color: var(--muted); font-weight: 600; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.dp-foot .btn { min-height: 36px; padding: 6px 18px; }

.side-brand .q, .login h1 .q { color: var(--primary-2); }
