/* ---------- Typography / page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 6px; cursor: pointer; background: none; border: 0; padding: 0; }
.back-link:hover { color: var(--accent); }
h2.section { font-size: 15px; font-weight: 700; margin: 28px 0 12px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
h2.section .count { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.muted-p { color: var(--text-2); margin: 0; }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); }
.neg { color: var(--text); }
.danger-t { color: var(--danger); }
.warn-t { color: var(--warn); }
.accent-t { color: var(--accent); }
.spacer { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .08s, background .15s, border-color .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: var(--on-accent); border-color: transparent; box-shadow: 0 6px 18px rgba(45,212,191,.22); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(45,212,191,.38); border-color: transparent; }
.btn-soft { background: var(--accent-soft); color: var(--accent); border-color: rgba(45,212,191,.28); }
.btn-soft:hover { border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(248,113,113,.35); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent-3); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 9px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; font-size: inherit; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } .g4 { gap: 10px; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; min-width: 0; }
.card.click { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.click:hover { border-color: var(--accent-3); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ic { color: var(--accent); }
.card.glow { border-color: rgba(45,212,191,.3); background: linear-gradient(160deg, rgba(45,212,191,.09), var(--surface) 55%); }

.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.kpi .value { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .value.sm { font-size: 17px; }
.kpi .line2 { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.accent { border-color: rgba(45,212,191,.35); background: linear-gradient(160deg, rgba(45,212,191,.12), var(--surface) 70%); }
@media (max-width: 700px) { .kpi .value { font-size: 18px; } .kpi { padding: 12px; } }

/* ---------- Chips / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.muted { background: var(--surface-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; }
.month-nav .label { min-width: 138px; text-align: center; font-weight: 700; font-size: 14.5px; }
.month-nav .icon-btn { border: 0; background: transparent; width: 34px; height: 34px; }
.month-nav .icon-btn:hover { background: var(--surface-2); }
.search { position: relative; flex: 1; min-width: 200px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 140px; }
@media (max-width: 700px) { .filters select, .filters input[type=date] { flex: 1 1 calc(50% - 4px); min-width: 0; } .filters .btn { flex: 1 1 100%; } .filters { width: 100%; } .page-head h1 { font-size: 24px; } }

.filters-toggle { display: none; }
@media (max-width: 700px) { .filters-toggle { display: inline-flex; padding: 10px 12px; } .toolbar[data-toolbar]:not(.show) .filters { display: none; } .search { min-width: 0; } }
.tabs { display: inline-flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 4px; margin-bottom: 18px; max-width: 100%; overflow-x: auto; }
.tab { padding: 8px 14px; border-radius: 10px; border: 0; background: none; color: var(--text-2); font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.tab.active { background: var(--accent-soft); color: var(--accent); }

/* ---------- Forms ---------- */
input, select, textarea {
  width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 76px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2376848f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
input[type=checkbox] { width: auto; }
input[type=date] { color-scheme: dark; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { grid-column: span 2; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.half { grid-column: span 1; }
.field > label, .field .lbl { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--muted); }
.field.req > label::after { content: " *"; color: var(--accent); }
@media (max-width: 520px) { .field.half { grid-column: span 2; } }
.form-error { grid-column: span 2; background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; }
.form-preview { grid-column: span 2; }
.preview-box { background: var(--accent-softer); border: 1px dashed rgba(45,212,191,.35); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--text-2); }
.money-input { position: relative; }
.money-input input { font-variant-numeric: tabular-nums; font-weight: 700; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: max-content; }
.seg input { display: none; }
.seg span { display: block; text-align: center; padding: 9px 12px; border-radius: 11px; border: 1px solid var(--border-strong); background: var(--bg-2); font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--text-2); }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { display: none; }
.switch .track { width: 42px; height: 24px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); transition: .2s; }
.switch input:checked + .track { background: var(--accent-2); border-color: var(--accent-2); }
.switch input:checked + .track::after { left: 20px; background: #fff; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 8px; padding: 0; border: 0; border-radius: 99px; background: var(--surface-3); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); border: 4px solid #062e2a; box-shadow: 0 0 0 2px var(--accent); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 4px solid #062e2a; cursor: pointer; }
.file-drop { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 12px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.file-drop:hover { border-color: var(--accent); color: var(--accent); }
.file-drop input { display: none; }
.day-picks { display: flex; gap: 6px; }
.day-picks label input { display: none; }
.day-picks label span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1px solid var(--border-strong); color: var(--muted); cursor: pointer; }
.day-picks label input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ---------- Table (responsive → cards) ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr[data-id] { cursor: pointer; }
.table tbody tr:hover { background: var(--accent-softer); }
.table .r { text-align: right; }
.table td.r { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .desc { font-weight: 600; }
.table .meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.table tr.pending td { background: rgba(251,191,36,.03); }
@media (max-width: 760px) {
  .table-wrap { background: none; border: 0; border-radius: 0; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody { display: block; }
  .table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
  .table td { display: block; padding: 0; border: 0; font-size: 13px; color: var(--text-2); }
  .table td.td-primary { grid-column: 1; grid-row: 1; color: var(--text); font-size: 14.5px; }
  .table td.td-amount { grid-column: 2; grid-row: 1; font-size: 15px; font-weight: 800; color: var(--text); text-align: right; }
  .table td.td-hide-m { display: none; }
  .table td:not(.td-primary):not(.td-amount) { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; }
  .table td:not(.td-primary):not(.td-amount)::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; }
  .table td.td-actions::before { content: none !important; }
  .table td.td-actions { justify-content: flex-end !important; margin-top: 6px; }
  .table tr.pending { border-color: rgba(251,191,36,.35); }
  .table tr.pending td { background: none; }
  .table td.td-actions:empty { display: none; }
}

/* ---------- List items ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .li-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.li .li-ic.accent { background: var(--accent-soft); color: var(--accent); }
.li .li-ic.warn { background: var(--warn-soft); color: var(--warn); }
.li .li-ic.danger { background: var(--danger-soft); color: var(--danger); }
.li .li-ic.ok { background: var(--ok-soft); color: var(--ok); }
.li .li-body { flex: 1; min-width: 0; }
.li .li-title { font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.li .li-sub { font-size: 12.5px; color: var(--muted); }
.li .li-end { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; flex: none; display: flex; gap: 6px; align-items: center; }

/* ---------- Progress ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--grad); transition: width .4s ease; }
.progress.ok > i { background: var(--ok); }
.progress.warn > i { background: var(--warn); }
.progress.danger > i { background: var(--danger); }
.progress.lg { height: 12px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Empty / loading ---------- */
.empty { text-align: center; padding: 34px 16px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty .ic { color: var(--accent); opacity: .7; }
.empty p { margin: 8px 0 0; font-size: 14px; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
.loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--accent-softer); border: 1px solid rgba(45,212,191,.22); color: var(--text-2); font-size: 13.5px; }
.notice .ic { color: var(--accent); flex: none; margin-top: 2px; }
.notice.warn { background: var(--warn-soft); border-color: rgba(251,191,36,.25); }
.notice.warn .ic { color: var(--warn); }

/* ---------- Modal ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,4,6,.7); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal { position: relative; width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; box-shadow: var(--shadow); transform: translateY(12px) scale(.98); opacity: 0; transition: .18s ease; }
.modal-wrap.open .modal-backdrop { opacity: 1; }
.modal-wrap.open .modal { transform: none; opacity: 1; }
.modal-sm { max-width: 420px; } .modal-md { max-width: 560px; } .modal-lg { max-width: 820px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.modal-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.modal-body { padding: 4px 18px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; align-items: center; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
@media (max-width: 640px) {
  .modal-wrap { place-items: end stretch; padding: 0; }
  .modal { max-width: none !important; border-radius: 22px 22px 0 0; max-height: 92vh; transform: translateY(40px); }
  .modal-foot { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .modal-foot .spacer { display: none; }
}
.chooser { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.chooser button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text); cursor: pointer; text-align: left; font-weight: 700; }
.chooser button:hover { border-color: var(--accent); background: var(--accent-softer); }
.chooser button .ic { color: var(--accent); }
.chooser button small { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; transform: translateY(10px); opacity: 0; transition: .25s; }
.toast.show { transform: none; opacity: 1; }
.toast-ok .ic { color: var(--accent); }
.toast-error .ic { color: var(--danger); }
@media (max-width: 899px) { #toast-root { left: 16px; right: 16px; bottom: calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom)); } }

/* ---------- Attachments ---------- */
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); }
.attach .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); flex: none; overflow: hidden; }
.attach .thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach .name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach .size { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.clip { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 12px; font-weight: 700; }
.preview-img { max-width: 100%; border-radius: 12px; display: block; margin: 0 auto; }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; gap: 8px; }
.hbar .top b { font-weight: 700; font-variant-numeric: tabular-nums; }
.hbar .bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar .bar i { display: block; height: 100%; border-radius: 99px; }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; text-align: center; line-height: 1.1; }
.ring .ring-label b { display: block; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring .ring-label small { color: var(--muted); font-size: 12px; font-weight: 600; }

/* ---------- Mi Día ---------- */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-strip .d { text-align: center; }
.week-strip .d b { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.week-strip .d i { display: grid; place-items: center; height: 36px; border-radius: 10px; background: var(--surface-3); font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); }
.week-strip .d i.won { background: var(--ok-soft); color: var(--ok); }
.week-strip .d i.draw { background: var(--warn-soft); color: var(--warn); }
.week-strip .d i.lost { background: var(--danger-soft); color: var(--danger); }
.week-strip .d i.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.week-strip .d i.future { opacity: .35; }

.res-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.res-badge.won { background: var(--ok-soft); color: var(--ok); }
.res-badge.draw { background: var(--warn-soft); color: var(--warn); }
.res-badge.lost { background: var(--danger-soft); color: var(--danger); }
.res-badge.none { background: var(--surface-3); color: var(--muted); }

.cierre { max-width: 760px; margin: 0 auto; }
.day-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.day-nav .label { flex: 1; text-align: center; }
.day-nav .label strong { display: block; font-size: 18px; font-weight: 800; }
.day-nav .label span { font-size: 12.5px; color: var(--muted); }
.pillar-block { margin-bottom: 18px; }
.pillar-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin: 0 4px 10px; }
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px; margin-bottom: 10px; transition: border-color .2s; }
.q-card.answered { border-color: rgba(45,212,191,.25); }
.q-card.excluded { opacity: .55; }
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.q-head h4 { margin: 0; font-size: 16px; font-weight: 800; }
.q-head .q-sub { font-size: 12.5px; color: var(--muted); }
.opts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opts.yn { grid-template-columns: 1fr 1fr; }
.opts.scale { grid-template-columns: repeat(5, 1fr); }
.opt { min-height: 54px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--bg-2); color: var(--text-2); font-weight: 700; font-size: 14px; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 10px; transition: .12s; line-height: 1.25; }
.opt:active { transform: scale(.98); }
.opt .val { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 800; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--text); box-shadow: 0 0 0 3px rgba(45,212,191,.1); }
.opt.sel .val { color: var(--accent); }
.opts.scale .opt, .opts.yn .opt { justify-content: center; text-align: center; flex-direction: column; gap: 2px; font-size: 18px; }
.opts.scale .opt small, .opts.yn .opt small { font-size: 11px; color: var(--muted); font-weight: 700; }
.meal { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.meal .opt { min-width: 132px; min-height: 48px; }
.meal input { min-height: 48px; font-size: 14px; }
.slider-box { padding: 6px 4px 2px; }
.slider-box .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 10px; }
.slider-box .big { text-align: center; font-size: 28px; font-weight: 800; color: var(--accent); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.slider-box.untouched .big { color: var(--muted); font-size: 15px; font-weight: 600; }
.slider-box.untouched input::-webkit-slider-thumb { background: var(--muted); box-shadow: 0 0 0 2px var(--muted); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--bg-2); color: var(--text); font-size: 24px; font-weight: 700; cursor: pointer; }
.stepper button:active { transform: scale(.96); }
.stepper .n { min-width: 56px; text-align: center; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wildcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1.5px dashed var(--border-strong); margin-bottom: 10px; }
.wildcard.on { border-color: var(--warn); background: var(--warn-soft); border-style: solid; }
.wildcard .w-body { flex: 1; }
.wildcard .w-body strong { display: block; font-size: 14.5px; }
.wildcard .w-body span { font-size: 12.5px; color: var(--muted); }
.save-bar-wrap { position: sticky; bottom: 12px; z-index: 20; }
.save-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgba(21,28,35,.95); backdrop-filter: blur(12px); border: 1px solid var(--border-strong); box-shadow: var(--shadow); margin-top: 18px; }
.save-bar .live { flex: 1; min-width: 0; }
.save-bar .live b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.save-bar .live span { font-size: 12px; color: var(--muted); display: block; }
@media (max-width: 899px) { .save-bar-wrap { bottom: calc(var(--bottom-nav-h) + 10px + env(safe-area-inset-bottom)); } .cierre .tab { padding: 8px 6px; font-size: 12.5px; } }
@media (max-width: 520px) { .opts { grid-template-columns: 1fr; } .opts.yn { grid-template-columns: 1fr 1fr; } .meal { grid-template-columns: 1fr; } }

.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: var(--surface-3); display: block; }
.heat i.na { background: transparent; border: 1px solid var(--border); }
.heat i.fut { background: transparent; }
.heat-wrap { overflow-x: auto; padding-bottom: 2px; }
.habit-card .top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.habit-card .pct { margin-left: auto; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 700; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); } .delta.eq { color: var(--muted); }
.light { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.light .bulb { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 12px currentColor; background: currentColor; }
.light.ok { color: var(--ok); } .light.behind { color: var(--warn); } .light.risk, .light.failed { color: var(--danger); } .light.approved { color: var(--warn); }
.summary-hero { text-align: center; padding: 6px 0 4px; }
.summary-hero .res-badge { font-size: 15px; margin-top: 8px; }
.sw { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.sw > div { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--border); }
.sw small { display: block; color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sw b { font-size: 14.5px; }
.cfg-q { border: 1px solid var(--border); border-radius: 16px; padding: 14px; margin-bottom: 10px; background: var(--bg-2); }
.cfg-q .opt-row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; margin-top: 6px; }
