/* ════════════════════════════════
   LINA — Design System
   ════════════════════════════════ */
:root {
  --bg:       #060d1a;
  --bg2:      #0d1b2e;
  --bg3:      #152236;
  --bg4:      #1c2d43;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.13);

  --txt:      #e2e8f0;
  --txt2:     #8899aa;
  --txt3:     #4a5f78;

  --purple:   #7c6dfa;
  --purple2:  #c084fc;
  --green:    #22d472;
  --green2:   rgba(34,212,114,0.12);
  --red:      #f4516a;
  --red2:     rgba(244,81,106,0.12);
  --blue:     #5b9cf6;
  --blue2:    rgba(91,156,246,0.12);
  --amber:    #f5a623;
  --amber2:   rgba(245,166,35,0.12);

  --r:  12px;
  --r2: 18px;
  --font: 'Outfit', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { height:100%; -webkit-text-size-adjust:100%; }
body {
  font-family: var(--font);
  background:  var(--bg);
  color:       var(--txt);
  min-height:  100vh;
  font-size:   15px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
.hidden { display:none!important; }
::-webkit-scrollbar { width:3px; }
::-webkit-scrollbar-thumb { background:var(--bg4); border-radius:3px; }

/* ══════════════════════════════
   LOGIN
══════════════════════════════ */
#screen-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(124,109,250,0.22) 0%, transparent 70%),
    var(--bg);
}
.login-bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 400px at 50% 0%, rgba(124,109,250,0.08), transparent);
}
.login-wrap {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.lina-logo { margin-bottom: 1rem; }
.logo-ring {
  width: 72px; height: 72px;
  border-radius: 22px;
  background: linear-gradient(135deg,rgba(124,109,250,.2),rgba(192,132,252,.2));
  border: 1px solid rgba(124,109,250,.3);
  display: flex; align-items: center; justify-content: center;
}
.lina-name { font-size: 32px; font-weight: 700; letter-spacing: 0.08em; color: var(--txt); }
.lina-sub  { font-size: 14px; color: var(--txt2); margin-top: 4px; margin-bottom: 2rem; }

.pin-dots { display:flex; gap:16px; margin-bottom:10px; }
.dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border2);
  background: transparent;
  transition: all 0.15s;
}
.dot.active {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 0 14px rgba(124,109,250,0.6);
}
@keyframes shake {
  0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)}
}
.dot.shake { animation: shake 0.4s ease; }

.pin-hint  { font-size: 12px; color: var(--txt3); margin-bottom: 1.75rem; }
.pin-error { min-height: 18px; font-size: 13px; color: var(--red); margin-top: 0.75rem; }

.numpad {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  width: 100%;
  max-width: 260px;
}
.nkey {
  padding: 16px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--txt);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.nkey:active { background: var(--bg3); transform: scale(0.93); }
.nkey-sym    { font-size: 15px; color: var(--txt2); }

/* ══════════════════════════════
   APP SHELL
══════════════════════════════ */
#app { display:flex; flex-direction:column; min-height:100vh; }

/* TOPBAR */
.topbar {
  height: 56px;
  position: sticky; top:0; z-index:50;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6,13,26,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.topbar-back {
  display: flex; align-items: center; gap:6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 6px 12px;
  color: var(--txt2);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.topbar-back:hover { background: var(--bg3); }
.topbar-center { display:flex; align-items:center; gap:8px; }
.topbar-logo   { display:flex; align-items:center; }
.topbar-title  { font-size:16px; font-weight:700; letter-spacing:0.06em; }
.topbar-right  { display:flex; align-items:center; gap:8px; }
.month-sel     { display:flex; gap:6px; }
.sel {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 5px 7px;
  background: var(--bg2);
  color: var(--txt);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.sel:focus { border-color: var(--purple); }
.btn-icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: none;
  color: var(--txt2);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--red2); color: var(--red); }

/* PAGE */
.page {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 1rem 1rem 8rem;
}

/* ══════════════════════════════
   SUMMARY CARDS
══════════════════════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.1rem;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1rem;
  transition: transform 0.15s, border-color 0.2s;
}
.card.tappable { cursor:pointer; }
.card.tappable:hover  { transform: translateY(-2px); }
.card.tappable:active { transform: scale(0.97); }
.card-income:hover  { border-color: rgba(34,212,114,0.3); }
.card-expense:hover { border-color: rgba(244,81,106,0.3); }

.card-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.65rem;
}
.ico-up   { background: var(--green2);  color: var(--green); }
.ico-dn   { background: var(--red2);    color: var(--red); }
.ico-bal  { background: var(--blue2);   color: var(--blue); }
.ico-paid { background: var(--amber2);  color: var(--amber); }

.card-label { font-size: 11px; font-weight:500; text-transform:uppercase; letter-spacing:0.06em; color:var(--txt2); margin-bottom:4px; }
.card-val   { font-family: var(--mono); font-size:18px; font-weight:500; line-height:1; }
.card-sub   { font-size: 11px; color:var(--txt3); margin-top:4px; }

.green { color: var(--green); }
.red   { color: var(--red);   }
.blue  { color: var(--blue);  }
.amber { color: var(--amber); }
.muted { color: var(--txt2);  }

/* TABS */
.tabs {
  display: flex; gap:4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 4px;
  margin-bottom: 1rem;
}
.tab {
  flex:1; padding:9px;
  border: none; border-radius: calc(var(--r) - 3px);
  background: transparent;
  color: var(--txt2);
  font-family: var(--font);
  font-size: 13px; font-weight:500;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tab.active { background: var(--purple); color:#fff; }
.tab:not(.active):hover { background: var(--bg3); color:var(--txt); }

/* ADD FORM */
.add-form {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1rem;
  margin-bottom: 1rem;
}
.add-form-label {
  font-size: 11px; font-weight:500; text-transform:uppercase; letter-spacing:0.06em;
  color: var(--txt3); margin-bottom: 0.75rem;
}
.add-row { display:flex; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
.add-row input {
  flex:1; min-width:100px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
  background: var(--bg3);
  color: var(--txt);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.add-row input:focus { border-color: var(--purple); background: var(--bg2); }
.add-row input::placeholder { color: var(--txt3); }
.add-btn {
  width:100%; padding:11px;
  border:none; border-radius:var(--r);
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color:#fff;
  font-family:var(--font); font-size:14px; font-weight:600;
  cursor:pointer;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.add-btn:active { transform:scale(0.98); opacity:0.88; }

/* LIST */
.list-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
}
.empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--txt3);
  font-size: 13px;
}
.empty-ico { font-size: 30px; margin-bottom: 8px; opacity:0.5; }

.item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.item-row:last-child { border-bottom:none; }
.item-row:hover { background:rgba(255,255,255,0.02); }

.item-dot {
  width:10px; height:10px; border-radius:50%;
  margin-top:4px; flex-shrink:0;
}
.dot-b { background:#5b9cf6; box-shadow:0 0 8px rgba(91,156,246,0.5); }
.dot-g { background:#22d472; box-shadow:0 0 8px rgba(34,212,114,0.4); }
.dot-r { background:#f4516a; box-shadow:0 0 8px rgba(244,81,106,0.4); }

.item-body { flex:1; min-width:0; }
.item-name { font-size:14px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.item-meta { font-size:11px; color:var(--txt3); margin-top:2px; }

.item-right { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex-shrink:0; }
.item-amt   { font-family:var(--mono); font-size:14px; font-weight:500; white-space:nowrap; }
.item-btns  { display:flex; gap:5px; }

.ibtn {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 4px 9px;
  font-family: var(--font); font-size:11px; font-weight:500;
  background: transparent;
  color: var(--txt2);
  cursor: pointer;
  transition: all 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.ibtn:hover  { background: var(--bg3); }
.ibtn-g      { color:var(--green); border-color:rgba(34,212,114,0.3); }
.ibtn-g:hover { background: var(--green2); }
.ibtn-r      { color:var(--red); border-color:rgba(244,81,106,0.25); }
.ibtn-r:hover { background: var(--red2); }

/* DETAIL HERO */
.detail-hero {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 1.75rem 1.25rem;
  text-align: center;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
}
.detail-hero::before {
  content:'';
  position:absolute; top:-50px; left:50%; transform:translateX(-50%);
  width:250px; height:250px; border-radius:50%;
  background: radial-gradient(circle, rgba(124,109,250,0.12), transparent);
  pointer-events:none;
}
.detail-hero-label { font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:0.07em; color:var(--txt2); margin-bottom:8px; }
.detail-hero-val   { font-family:var(--mono); font-size:42px; font-weight:500; line-height:1; margin-bottom:6px; }
.detail-hero-sub   { font-size:13px; color:var(--txt3); }

/* ══════════════════════════════
   LINA FAB
══════════════════════════════ */
.lina-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lina-fab-inner {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 24px rgba(124,109,250,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.lina-fab:hover .lina-fab-inner  { transform: scale(1.07); }
.lina-fab:active .lina-fab-inner { transform: scale(0.94); }
.lina-fab.active .lina-fab-inner {
  background: linear-gradient(135deg,#5046e0,#9f3fd9);
  box-shadow: 0 4px 24px rgba(124,109,250,0.3);
}
.lina-label {
  font-size: 10px; font-weight:700; letter-spacing:0.08em;
  color: var(--purple2);
}

/* ══════════════════════════════
   LINA PANEL
══════════════════════════════ */
.lina-panel {
  position: fixed;
  bottom: 0; left:0; right:0;
  height: 0;
  overflow: hidden;
  background: #080f1e;
  border-top: 1px solid var(--border2);
  border-radius: 22px 22px 0 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: height 0.38s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -12px 50px rgba(0,0,0,0.6);
}
.lina-panel.open { height: 76vh; max-height: 680px; }

@media (min-width: 600px) {
  .lina-panel {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 390px;
    border-radius: 22px;
    border: 1px solid var(--border2);
  }
  .lina-panel.open { height: 560px; max-height: none; }
  /* En desktop el FAB no desaparece */
}

/* Ocultar FAB en mobile cuando panel está abierto */
@media (max-width: 599px) {
  .lina-fab.active { display: none; }
}

.lina-panel-handle {
  width: 36px; height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 10px auto 4px;
  flex-shrink: 0;
}

/* Header */
.lina-header {
  display: flex; align-items: center; gap:10px;
  padding: 10px 14px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lina-avatar {
  width: 38px; height:38px;
  border-radius: 12px;
  display: flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  flex-shrink: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}
.lina-hinfo { flex:1; min-width:0; }
.lina-hname   { font-size:14px; font-weight:700; letter-spacing:0.05em; }
.lina-hstatus { font-size:11px; color:var(--txt3); margin-top:1px; }
.lina-hbtn {
  width:30px; height:30px;
  border-radius:9px;
  border:1px solid var(--border);
  background:none; color:var(--txt2);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:all 0.15s; flex-shrink:0;
}
.lina-hbtn:hover { background:var(--bg3); color:var(--purple2); }

/* Chat */
.lina-chat {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.lmsg { display:flex; }
.lmsg-user { justify-content:flex-end; }
.lmsg-lina { justify-content:flex-start; }
.lbubble {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.6;
}
.lmsg-user .lbubble {
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color:#fff;
  border-bottom-right-radius:4px;
}
.lmsg-lina .lbubble {
  background: var(--bg3);
  color: var(--txt);
  border: 1px solid var(--border);
  border-bottom-left-radius:4px;
}
.ltyping { display:flex; align-items:center; gap:6px; padding:14px; }
.ltyping span {
  width:7px; height:7px; border-radius:50%;
  background: var(--txt3);
  animation: typeDot 1.2s infinite;
}
.ltyping span:nth-child(2){ animation-delay:0.2s; }
.ltyping span:nth-child(3){ animation-delay:0.4s; }
@keyframes typeDot {
  0%,60%,100%{ opacity:0.25; transform:translateY(0); }
  30%        { opacity:1;    transform:translateY(-5px); }
}

/* Listening overlay */
.lina-listening-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,15,30,0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10;
  backdrop-filter: blur(4px);
  border-radius: inherit;
}
.listen-waves {
  position: relative;
  width: 100px; height:100px;
  display:flex; align-items:center; justify-content:center;
}
.wave {
  position:absolute;
  border-radius:50%;
  border: 2px solid var(--purple);
  animation: wavePulse 2s infinite;
  opacity:0;
}
.wave:nth-child(1){ width:60px;  height:60px;  animation-delay:0s; }
.wave:nth-child(2){ width:80px;  height:80px;  animation-delay:0.5s; }
.wave:nth-child(3){ width:100px; height:100px; animation-delay:1s; }
@keyframes wavePulse {
  0%  { transform:scale(0.8); opacity:0.8; }
  100%{ transform:scale(1.2); opacity:0; }
}
.listen-icon {
  position:relative; z-index:1;
  width:52px; height:52px;
  border-radius:50%;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  display:flex; align-items:center; justify-content:center;
  color:#fff;
}
.listen-text  { font-size:15px; font-weight:500; color:var(--txt2); }
.listen-stop  {
  padding:9px 24px;
  border-radius:var(--r);
  border: 1px solid var(--border2);
  background:var(--bg3);
  color:var(--txt2);
  font-family:var(--font); font-size:13px;
  cursor:pointer;
  transition:background 0.15s;
}
.listen-stop:hover { background:var(--red2); color:var(--red); }

/* Input row */
.lina-input-row {
  display: flex; align-items:center; gap:8px;
  padding: 10px 12px 18px;
  border-top: 1px solid var(--border);
  background: #080f1e;
  flex-shrink:0;
}
.lina-input {
  flex:1;
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--bg3);
  color: var(--txt);
  font-family: var(--font); font-size:14px;
  outline: none;
  transition: border-color 0.15s;
  min-width:0;
}
.lina-input:focus { border-color: var(--purple); }
.lina-input::placeholder { color:var(--txt3); }

.lina-mic,
.lina-send {
  width:46px; height:46px;
  border-radius: 13px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; flex-shrink:0;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lina-mic {
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--txt2);
}
.lina-mic:hover  { background:var(--bg4); color:var(--purple2); border-color:rgba(124,109,250,0.4); }
.lina-mic.listening {
  background: var(--red);
  border-color: var(--red);
  color:#fff;
  animation: micPulse 1s infinite;
}
.lina-mic:disabled { opacity:0.35; cursor:not-allowed; }
@keyframes micPulse {
  0%,100%{ box-shadow:0 0 0 0 rgba(244,81,106,0.5); }
  50%    { box-shadow:0 0 0 9px rgba(244,81,106,0); }
}
.lina-send {
  border: none;
  background: linear-gradient(135deg, var(--purple), var(--purple2));
  color: #fff;
  box-shadow: 0 2px 12px rgba(124,109,250,0.4);
}
.lina-send:hover   { opacity:0.88; }
.lina-send:active  { transform:scale(0.93); }
.lina-send:disabled{ opacity:0.4; cursor:not-allowed; }

/* ══════════════════════════════
   MODAL
══════════════════════════════ */
.modal-bg {
  position:fixed; inset:0;
  background:rgba(0,0,0,0.6);
  display:flex; align-items:flex-end; justify-content:center;
  z-index:300;
  backdrop-filter:blur(5px);
}
.modal-sheet {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 22px 22px 0 0;
  padding: 1rem 1.5rem 2rem;
  width:100%; max-width:640px;
}
.modal-handle { width:36px;height:4px;background:var(--border2);border-radius:2px;margin:0 auto 1.25rem; }
.modal-sheet h3 { font-size:16px;font-weight:600;margin-bottom:1.25rem; }
.mfield { margin-bottom:0.85rem; }
.mfield label { display:block;font-size:12px;color:var(--txt2);font-weight:500;margin-bottom:5px; }
.mfield input {
  width:100%;
  border:1px solid var(--border);border-radius:var(--r);
  padding:10px 12px;
  background:var(--bg3);color:var(--txt);
  font-family:var(--font);font-size:14px;
  outline:none;
  -webkit-appearance:none;
}
.mfield input:focus { border-color:var(--purple); }
.modal-actions { display:flex;gap:10px;margin-top:1.25rem; }
.mbtn {
  flex:1;padding:12px;border-radius:var(--r);
  font-family:var(--font);font-size:14px;font-weight:500;
  cursor:pointer;transition:opacity 0.15s;
}
.mbtn-sec { border:1px solid var(--border);background:transparent;color:var(--txt2); }
.mbtn-pri { border:none;background:linear-gradient(135deg,var(--purple),var(--purple2));color:#fff;flex:2; }
.mbtn:active { opacity:0.8; }

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.toast {
  position: fixed;
  bottom: 2rem; left:50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 99px;
  font-size:13px; font-weight:500;
  z-index:400;
  opacity:0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events:none;
  white-space:nowrap;
}
.toast-ok  { background:var(--bg4); border:1px solid var(--border2); color:var(--txt); opacity:1; transform:translateX(-50%) translateY(0); }
.toast-err { background:var(--red2); border:1px solid var(--red); color:var(--red); opacity:1; transform:translateX(-50%) translateY(0); }
.toast.hidden { opacity:0!important; transform:translateX(-50%) translateY(20px)!important; }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media(max-width:480px) {
  .card-val     { font-size:15px; }
  .detail-hero-val { font-size:34px; }
  .topbar-title { display:none; }
  .month-sel .sel:first-child { max-width:88px; }
  .item-btns .ibtn { padding:3px 7px; font-size:10px; }
  .page { padding-bottom: 9rem; }
}
@media(max-width:350px) {
  .page { padding:0.75rem 0.75rem 9rem; }
  .nkey { padding:13px; font-size:19px; }
}

/* ══════════════════════════════
   CATEGORÍAS
══════════════════════════════ */

/* Ícono de categoría en item */
.item-cat-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

/* Tag de categoría en item meta */
.cat-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Badge contador de acumulación */
.item-count {
  display: inline-block;
  background: rgba(124,109,250,0.18);
  color: #a78bfa;
  border: 1px solid rgba(124,109,250,0.35);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 4px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

/* Select de categoría en formulario */
.sel-cat {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 10px;
  background: var(--bg3);
  color: var(--txt);
  font-family: var(--font);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: auto;
}
.sel-cat:focus { border-color: var(--purple); }

/* Resumen de categorías en detail view */
.cat-summary-wrap {
  margin-bottom: 1rem;
  overflow: hidden;
}
.cat-summary-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.cat-summary-scroll::-webkit-scrollbar { height: 3px; }
.cat-summary-scroll::-webkit-scrollbar-thumb { background: var(--bg4); border-radius: 3px; }

.cat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 99px;
  border: 1px solid;
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
}
.cat-pill-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--txt2);
}
.cat-pill-amt {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

/* Ajuste item-body para mostrar categoría */
.item-meta {
  font-size: 11px;
  color: var(--txt3);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Botón micrófono rápido en topbar */
.btn-icon-mic {
  background: linear-gradient(135deg, var(--purple), var(--purple2)) !important;
  border-color: transparent !important;
  color: #fff !important;
}
.btn-icon-mic:hover { opacity: 0.85; }
