/* ==========================================================================
   APP DEL DUEÑO · prototipo móvil (referencia de UI para Flutter)
   ========================================================================== */
html, body { height: 100%; }
body { background: #0b0b0c; }
.stage { min-height: 100dvh; display: grid; place-items: center; background: radial-gradient(900px 500px at 70% 10%, rgba(238, 161, 57, .18), transparent 60%), #0b0b0c; }
.device { position: relative; width: 100%; height: 100dvh; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
@media (min-width: 600px) {
  .device { width: 390px; height: 844px; border-radius: 54px; box-shadow: 0 0 0 12px #1b1b1d, 0 0 0 14px #2d2d31, 0 40px 90px -20px rgba(0, 0, 0, .8); }
  .device::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 120px; height: 34px; border-radius: 99px; background: #000; z-index: 100; }
  .side-note { display: block !important; }
}
/* Instalada en el celular: pantalla completa, sin el marco de teléfono */
@media (display-mode: standalone) {
  .device { width: 100% !important; height: 100dvh !important; border-radius: 0 !important; box-shadow: none !important; }
  .device::before, .side-note { display: none !important; }
  .scr { padding-top: calc(1rem + env(safe-area-inset-top)); }
  .scr.flush { padding-top: calc(.6rem + env(safe-area-inset-top)); }
}
.tabbar { margin-bottom: env(safe-area-inset-bottom); }
.inst-card { display: flex; gap: .7rem; align-items: center; padding: .8rem; border-radius: 18px; background: var(--surface); border: 1px dashed var(--brand); margin-bottom: 1rem; }
.inst-card img { width: 42px; height: 42px; border-radius: 12px; }
.side-note { display: none; position: fixed; left: 2rem; bottom: 2rem; max-width: 280px; color: #9ca3af; font-size: .8rem; }
.side-note b { color: #fff; }
.side-note a { color: var(--brand); }
.scr { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 3.2rem 1.1rem 6.5rem; scrollbar-width: none; }
.scr::-webkit-scrollbar { display: none; }
.scr.flush { padding: 3.2rem 0 0; display: flex; flex-direction: column; }
.tabbar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 68px; border-radius: 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 30; box-shadow: var(--sh-2); }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .64rem; font-weight: 600; color: var(--muted); position: relative; }
.tabbar button .ic { width: 22px; height: 22px; }
.tabbar button.on { color: var(--brand-600); }
.tabbar .ai-tab .ic { width: 26px; height: 26px; padding: 4px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #f6c56b); color: #111; }
.tabbar .dotn { position: absolute; top: 10px; right: calc(50% - 16px); min-width: 16px; height: 16px; border-radius: 99px; background: var(--err); color: #fff; font-size: .6rem; display: grid; place-items: center; padding: 0 4px; }
.hello { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hello h1 { font-size: 1.35rem; }
.hero-card { border-radius: 26px; padding: 1.2rem; background: linear-gradient(145deg, #1b1b1d, #2a2419); color: #fff; position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -80px; top: -90px; background: radial-gradient(circle, rgba(238, 161, 57, .35), transparent 70%); }
.hero-card .lbl { font-size: .78rem; color: #cbd5e1; display: flex; align-items: center; gap: .4rem; }
.hero-card .big { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; margin: .2rem 0 0; }
.hero-card .ves { color: #9ca3af; font-size: .82rem; }
.hero-card .spark { height: 70px; margin-top: .6rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: .8rem 0 1.2rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .75rem; }
.tile b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tile span { font-size: .68rem; color: var(--muted); }
.sect { display: flex; align-items: center; justify-content: space-between; margin: 1.2rem 0 .6rem; }
.sect h2 { font-size: 1rem; display: flex; align-items: center; gap: .4rem; }
.sect a, .sect button { font-size: .78rem; font-weight: 600; color: var(--brand-600); }
.feed { display: grid; gap: .5rem; }
.fi { display: flex; align-items: center; gap: .7rem; padding: .7rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); animation: fadeIn .35s var(--ease); }
.fi .type-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); flex: none; }
.ins { border-radius: 18px; padding: .9rem; border: 1px solid var(--line); background: var(--surface); display: grid; gap: .4rem; font-size: .84rem; }
.ins .h { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .86rem; }
.ins.err .h .ic { color: var(--err); } .ins.brand .h .ic { color: var(--brand-600); } .ins.warn .h .ic { color: var(--warn); }
.hscr { display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -1.1rem; padding: 0 1.1rem; }
.hscr::-webkit-scrollbar { display: none; }
.hscr > * { flex: 0 0 86%; scroll-snap-align: center; }
.news { border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.news .nb { padding: 1rem; }
.news .nh { height: 96px; display: grid; place-items: center; color: #111; }
.push { position: absolute; top: 54px; left: 10px; right: 10px; z-index: 90; border-radius: 20px; padding: .75rem .9rem; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(18px); box-shadow: var(--sh-3); border: 1px solid var(--line); display: flex; gap: .7rem; align-items: center; transform: translateY(-160%); transition: transform .45s var(--ease); cursor: pointer; }
.push.show { transform: none; }
.push .pi { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); display: grid; place-items: center; flex: none; }
.push .pi img { width: 24px; }
.login { min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; padding: 2rem 1.4rem; background: linear-gradient(180deg, #111 0%, #1b1b1d 100%); color: #fff; }
.login .input { background: #232326; border-color: #333; color: #fff; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.otp input { height: 54px; text-align: center; font-size: 1.3rem; font-weight: 700; border-radius: 14px; background: #232326; border: 1px solid #333; color: #fff; }
.otp input:focus { outline: none; border-color: var(--brand); }
.appr { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: .9rem; display: grid; gap: .6rem; }
.chat-wrap { flex: 1; display: flex; min-height: 0; padding: 0 .6rem 5.6rem; }
.chat-wrap .ai-chat { border-radius: 22px; min-height: 0; }
.list-item { display: flex; align-items: center; gap: .8rem; padding: .9rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.list-item:last-child { border-bottom: 0; }
