/* Ordenador de gastos · Teclanube */
@font-face { font-family: "Inter"; src: url(/assets/fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
.og, .og-modal, .og-menu, .og-aviso { --nar: #FF5B14; --tinta: #1C1F24; --gris: #5A6069; --linea: #E6E2DD; --fondo: #F6F4F1; --verde: #16834F; --rojo: #C2352B; font-family: Inter, system-ui, sans-serif; color: var(--tinta); }
.og { max-width: 76rem; margin: 0 auto; padding: 1.25rem 1rem 3.5rem; }
.og [hidden], .og-modal[hidden], .og-menu [hidden] { display: none !important; }
.og *, .og-modal *, .og-menu * { box-sizing: border-box; }
.og h1, .og h3 { letter-spacing: -.02em; }
.pos { color: var(--verde); } .neg { color: var(--rojo); }

/* Botones */
.og-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 0; border-radius: 10px; padding: .68rem 1rem; font: 700 .9rem Inter, sans-serif; cursor: pointer; text-decoration: none; background: var(--tinta); color: #fff; white-space: nowrap; }
.og-btn.nar { background: var(--nar); }
.og-btn.sec { background: #fff; color: var(--tinta); border: 1.5px solid #D5D0C9; }
.og-btn.chico { padding: .42rem .7rem; font-size: .8rem; border-radius: 8px; }
.og-btn.grande { padding: .95rem 1.35rem; font-size: 1rem; border-radius: 12px; }
.og-btn:hover { filter: brightness(1.06); }
.og-link { background: none; border: 0; padding: 0; color: var(--gris); text-decoration: underline; text-underline-offset: 2px; font: 600 .8rem Inter, sans-serif; cursor: pointer; }
.og-fila { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.og-fila.centro { justify-content: center; }
.og-esp { flex: 1; }

/* Campos */
.og input[type=text], .og input[type=search], .og select, .og-modal input[type=text], .og-modal input[type=password], .og-modal select, .og-modal textarea, .og-menu input {
  font: 500 .9rem Inter, sans-serif; color: var(--tinta); padding: .55rem .65rem; border: 1.5px solid #D5D0C9; border-radius: 9px; background: #fff; min-width: 0; }
.og input:focus, .og select:focus, .og-modal input:focus, .og-modal select:focus, .og-modal textarea:focus, .og-menu input:focus { outline: none; border-color: var(--nar); box-shadow: 0 0 0 3px rgba(255,91,20,.15); }
.og-campo { display: grid; gap: .3rem; margin: 0 0 .8rem; }
.og-campo span { font: 700 .82rem Inter; }
.og-campo input, .og-campo select { width: 100%; }
.og-check { display: flex; gap: .5rem; align-items: center; font: 600 .86rem Inter; cursor: pointer; }
.og-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--nar); }
.og-check small { color: var(--gris); font-weight: 500; }

/* Aviso de prueba y de ejemplo */
.og-plan { background: var(--tinta); color: #fff; border-radius: 14px; padding: .85rem 1rem; font-size: .88rem; line-height: 1.45; display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1rem; }
.og-plan b { color: #FFB38F; }
.og-ejemplo { background: #FFF1E9; border: 1.5px solid #FFD2BC; border-radius: 12px; padding: .65rem .9rem; display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .88rem; margin-bottom: 1rem; }

/* Pantalla vacía */
.og-vacio { text-align: center; padding: 2.5rem 1rem 1rem; }
.og-vacio h1 { font: 800 clamp(2rem, 5vw, 3rem)/1.05 Inter; margin: 0 0 .7rem; }
.og-bajada { font-size: 1.08rem; color: var(--gris); max-width: 36rem; margin: 0 auto 1.8rem; line-height: 1.5; }
.og-pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; max-width: 48rem; margin: 0 auto 1.6rem; text-align: left; }
.og-pasos div { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 1rem; display: flex; gap: .7rem; align-items: flex-start; font: 700 .95rem/1.35 Inter; }
.og-pasos b { flex: 0 0 auto; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--nar); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.og-pasos small { font-weight: 500; color: var(--gris); font-size: .82rem; }
.og-priv { font-size: .84rem; color: var(--gris); margin: 1.1rem 0 0; }

/* Barra superior */
.og-barra { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.1rem; }
.og-tabs { display: flex; background: #EDEAE5; border-radius: 11px; padding: .22rem; gap: .2rem; }
.og-tab { border: 0; background: none; padding: .55rem .85rem; border-radius: 9px; font: 700 .86rem Inter; color: var(--gris); cursor: pointer; white-space: nowrap; }
.og-tab[aria-selected=true] { background: #fff; color: var(--tinta); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.og-filtros { display: flex; gap: .5rem; flex: 1; min-width: 14rem; }
.og-filtros select { flex: 1; max-width: 14rem; }
.og-acciones { display: flex; gap: .5rem; margin-left: auto; }
.og-mas-w { position: relative; }
.og-menu-mas { position: absolute; right: 0; top: calc(100% + .35rem); background: #fff; border: 1px solid var(--linea); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.14); padding: .35rem; z-index: 30; min-width: 14rem; display: grid; }
.og-menu-mas button { text-align: left; background: none; border: 0; padding: .6rem .7rem; border-radius: 8px; font: 600 .88rem Inter; cursor: pointer; color: var(--tinta); }
.og-menu-mas button:hover { background: var(--fondo); }
.og-menu-mas .peligro { color: var(--rojo); }

/* Resumen */
.og-tarjetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.og-t { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: .95rem 1rem; display: grid; gap: .2rem; text-align: left; font-family: Inter, sans-serif; color: var(--tinta); }
.og-t span { font: 600 .8rem Inter; color: var(--gris); }
.og-t b { font: 800 clamp(1.25rem, 2.4vw, 1.65rem)/1.1 Inter; letter-spacing: -.02em; }
.og-t small { font-size: .75rem; color: var(--gris); }
.og-t.in b, .og-t.pos b { color: var(--verde); } .og-t.out b, .og-t.neg b { color: var(--rojo); }
.og-t.pos { background: #EFF8F2; border-color: #CBE8D6; } .og-t.neg { background: #FCEFED; border-color: #F2CFCB; }
.og-t.sin { cursor: pointer; border: 1.5px dashed #F0A47F; background: #FFF6F1; } .og-t.sin b { color: var(--nar); }
.og-t.ok b { color: var(--verde); }
.og-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1rem; align-items: start; }
.og-caja { background: #fff; border: 1px solid var(--linea); border-radius: 16px; padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.og-caja h3 { font: 800 1.08rem Inter; margin: 0 0 .8rem; }
.og-caja h3 small { font-weight: 500; color: var(--gris); font-size: .8rem; }
.og-barras { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.og-barras button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: .25rem .8rem; background: none; border: 0; padding: .45rem .4rem; border-radius: 9px; cursor: pointer; text-align: left; font-family: Inter, sans-serif; color: var(--tinta); }
.og-barras button:hover { background: var(--fondo); }
.og-b-nom { font: 600 .88rem Inter; display: flex; align-items: center; gap: .45rem; min-width: 0; }
.og-b-nom i, .og-cat i, .og-pill i, .og-menu i, .og-evol th i { flex: 0 0 auto; width: .62rem; height: .62rem; border-radius: 3px; display: inline-block; }
.og-b-val { font: 700 .88rem Inter; white-space: nowrap; }
.og-b-val small { color: var(--gris); font-weight: 600; margin-left: .25rem; }
.og-b-bar { grid-column: 1 / -1; height: .5rem; background: #F1EEEA; border-radius: 99px; overflow: hidden; }
.og-b-bar span { display: block; height: 100%; border-radius: 99px; }
.og-nada { color: var(--gris); font-size: .9rem; margin: .3rem 0; }
.og-nota { font-size: .82rem; color: var(--gris); margin: -.3rem 0 1rem; }
.og-tabla-x { overflow-x: auto; margin: 0 -1.15rem -1.1rem; padding: 0 1.15rem 1.1rem; }
.og-evol table { border-collapse: collapse; width: 100%; font: 500 .84rem Inter; font-variant-numeric: tabular-nums; }
.og-evol th, .og-evol td { padding: .42rem .55rem; border-bottom: 1px solid #F0EDE9; text-align: right; white-space: nowrap; }
.og-evol tbody th { text-align: left; font-weight: 600; }
.og-evol thead th { font: 700 .78rem Inter; color: var(--gris); text-transform: uppercase; letter-spacing: .03em; }
.og-evol th i { margin-right: .4rem; }
.og-evol .og-grupo th { text-align: left; font: 800 .75rem Inter; text-transform: uppercase; letter-spacing: .05em; color: var(--gris); padding-top: .9rem; background: none; }
.og-evol .og-sub th, .og-evol .og-sub td { font-weight: 800; border-bottom: 2px solid #E4E0DA; }
.og-evol .og-sub.in td { color: var(--verde); } .og-evol .og-sub.out td { color: var(--rojo); }
.og-evol .og-res th, .og-evol .og-res td { font-weight: 800; font-size: .92rem; background: #FAF8F5; }
.og-evol .og-tot { background: #FAF8F5; font-weight: 700; }
.og-cero { color: #C9C4BD; }

/* Movimientos */
.og-movs-f { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .7rem; }
.og-movs-f input { flex: 1 1 14rem; }
.og-movs-f select { flex: 0 1 13rem; }
.og-cuenta-movs { font-size: .85rem; color: var(--gris); margin-left: auto; }
.og-sel { position: sticky; top: .5rem; z-index: 20; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; background: var(--tinta); color: #fff; border-radius: 12px; padding: .55rem .8rem; margin-bottom: .6rem; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.og-sel .og-btn.chico:not(.sec) { background: var(--nar); }
.og-sel .og-link { color: #D9DCE0; }
.og-lista { background: #fff; border: 1px solid var(--linea); border-radius: 16px; overflow: hidden; }
.og-mov { display: grid; grid-template-columns: 2rem 4.6rem minmax(0, 1fr) auto auto; gap: .6rem; align-items: center; padding: .55rem .8rem .55rem .5rem; border-bottom: 1px solid #F0EDE9; font-size: .9rem; }
.og-mov:last-child { border-bottom: 0; }
.og-mov:hover { background: #FCFBF9; }
.og-mov.marcado { background: #FFF4EE; }
.og-mov.rev { box-shadow: inset 3px 0 0 #F0B429; }
.og-chk { display: grid; place-items: center; cursor: pointer; padding: .3rem; }
.og-chk input { width: 1rem; height: 1rem; accent-color: var(--nar); }
.og-fecha { color: var(--gris); font-variant-numeric: tabular-nums; font-size: .84rem; }
.og-desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.og-cu { font-size: .7rem; color: var(--gris); background: #F1EEEA; border-radius: 5px; padding: .08rem .35rem; margin-left: .3rem; font-weight: 600; }
.og-rev { font-size: .7rem; color: #8A6100; background: #FFF4D6; border-radius: 5px; padding: .08rem .35rem; margin-left: .3rem; font-weight: 700; }
.og-cat { display: inline-flex; align-items: center; gap: .4rem; max-width: 15rem; border: 1px solid var(--linea); background: #fff; border-radius: 99px; padding: .3rem .65rem; font: 600 .78rem Inter; color: var(--tinta); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og-cat:hover { border-color: #C9C4BD; }
.og-cat.vacia { border: 1.5px dashed #F0A47F; color: var(--nar); background: #FFF8F4; }
.og-imp { border: 0; background: none; font: 700 .92rem Inter; font-variant-numeric: tabular-nums; cursor: pointer; padding: .25rem .3rem; border-radius: 6px; text-align: right; min-width: 7.5rem; white-space: nowrap; }
.og-imp.pos { color: var(--verde); } .og-imp.neg { color: var(--rojo); }
.og-imp:hover { background: #F4F1ED; }
.og-mas { display: flex; margin: .7rem auto; }

/* Menú de categorías */
.og-menu { position: absolute; z-index: 80; background: #fff; border: 1px solid var(--linea); border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.18); padding: .5rem; }
.og-menu input { width: 100%; margin-bottom: .35rem; }
.og-menu-l { max-height: 18rem; overflow: auto; display: grid; }
.og-menu-l p { margin: .5rem .45rem .2rem; font: 800 .68rem Inter; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.og-menu-l button { display: flex; align-items: center; gap: .5rem; text-align: left; background: none; border: 0; padding: .45rem .5rem; border-radius: 8px; font: 600 .86rem Inter; color: var(--tinta); cursor: pointer; }
.og-menu-l button:hover { background: var(--fondo); }
.og-menu-l .og-quitar { color: var(--gris); margin-top: .3rem; border-top: 1px solid var(--linea); border-radius: 0; }
.og-menu-l .og-nuevacat { color: var(--nar); }

/* Reglas y categorías */
.og-ayuda { font-size: .86rem; color: var(--gris); line-height: 1.5; margin: 0 0 .8rem; }
.og-reglas { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .1rem; }
.og-reglas li { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .5rem .2rem; border-bottom: 1px solid #F0EDE9; font-size: .88rem; }
.og-reglas small { color: var(--gris); margin-left: .3rem; }
.og-pill { display: inline-flex; align-items: center; gap: .35rem; background: #F4F1ED; border-radius: 99px; padding: .15rem .55rem; font-weight: 600; font-size: .8rem; }
.og-nueva-regla { display: flex; gap: .5rem; flex-wrap: wrap; }
.og-nueva-regla input { flex: 2 1 16rem; }
.og-nueva-regla select { flex: 1 1 12rem; }
.og-cats { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .35rem; }
.og-cats li { display: flex; gap: .5rem; align-items: center; }
.og-cats input[type=text] { flex: 1; }
.og-cats input[type=color] { width: 2.2rem; height: 2.2rem; border: 1.5px solid #D5D0C9; border-radius: 8px; padding: .15rem; background: #fff; cursor: pointer; }
.og-cats select { width: 8.5rem; }
.og-cats small { color: var(--gris); min-width: 3.5rem; text-align: right; font-size: .78rem; }
details.og-caja summary { cursor: pointer; font: 800 1rem Inter; }
details.og-caja[open] summary { margin-bottom: .7rem; }
.og-base { font-size: .8rem; color: var(--gris); line-height: 1.6; margin: 0; }
.og-base b { color: var(--tinta); }

/* Modal */
.og-modal { position: fixed; inset: 0; background: rgba(20,22,26,.55); display: grid; place-items: center; z-index: 70; padding: 1rem; }
.og-modal-caja { background: #fff; border-radius: 18px; max-width: 31rem; width: 100%; padding: 1.4rem 1.4rem 1.3rem; position: relative; max-height: 92vh; overflow: auto; }
.og-modal.grande .og-modal-caja { max-width: 52rem; }
.og-modal-caja h3 { font: 800 1.3rem/1.25 Inter; letter-spacing: -.02em; margin: 0 2rem .8rem 0; }
.og-modal-caja h3 small { display: block; font: 500 .8rem Inter; color: var(--gris); margin-top: .2rem; letter-spacing: 0; }
.og-modal-caja p { font-size: .92rem; line-height: 1.5; margin: 0 0 .8rem; }
.og-x { position: absolute; top: .7rem; right: .8rem; border: 0; background: #F1EEEA; width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.25rem; line-height: 1; cursor: pointer; color: var(--tinta); }
.og-checks { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .45rem; font-size: .9rem; line-height: 1.45; }
.og-checks li { padding-left: 1.3rem; position: relative; }
.og-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--nar); font-weight: 800; }
.og-ayuda-d ul.og-checks li::before { content: "•"; }
.og-drop { display: grid; gap: .35rem; place-items: center; text-align: center; border: 2px dashed #E5B9A3; background: #FFF8F4; border-radius: 16px; padding: 2.2rem 1rem; cursor: pointer; transition: background .15s; }
.og-drop.sobre { background: #FFEADF; border-color: var(--nar); }
.og-drop input { display: none; }
.og-drop b { font: 800 1.05rem Inter; }
.og-drop span { font-size: .86rem; color: var(--gris); max-width: 26rem; }
.og-pegar, .og-ayuda-d { margin-top: .9rem; font-size: .88rem; }
.og-pegar summary, .og-ayuda-d summary { cursor: pointer; font-weight: 700; color: var(--tinta); }
.og-pegar textarea { width: 100%; min-height: 9rem; margin: .6rem 0; font: 500 .82rem ui-monospace, Menlo, monospace; }
.og-cargando { height: .5rem; background: #F1EEEA; border-radius: 99px; overflow: hidden; }
.og-cargando span { display: block; height: 100%; width: 40%; background: var(--nar); border-radius: 99px; animation: og-ir 1s ease-in-out infinite alternate; }
@keyframes og-ir { from { transform: translateX(-10%); } to { transform: translateX(160%); } }

/* Revisión de lo importado */
.og-imp-cab { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: end; }
.og-imp-cab .og-campo { margin: 0; }
.og-imp-cab .og-check { margin-bottom: .55rem; }
.og-imp-res { font-size: .88rem; margin: .9rem 0 .5rem !important; }
.og-dup { color: var(--gris); font-size: .78rem; background: #F1EEEA; border-radius: 5px; padding: .05rem .35rem; }
.og-usd { color: #2F6FD6; font-size: .72rem; font-weight: 700; }
.og-alerta { background: #FFF4D6; border-radius: 10px; padding: .55rem .75rem; font-size: .85rem !important; }
.og-mapeo { background: var(--fondo); border-radius: 12px; padding: .6rem .8rem; margin-top: .8rem; font-size: .85rem; }
.og-mapeo summary { cursor: pointer; font-weight: 700; }
.og-mapeo-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem .7rem; margin-top: .6rem; }
.og-mapeo-g label { display: grid; gap: .2rem; font-weight: 600; font-size: .78rem; }
.og-imp-tabla { max-height: 46vh; overflow: auto; border: 1px solid var(--linea); border-radius: 12px; }
.og-imp-tabla table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.og-imp-tabla th { position: sticky; top: 0; background: #FAF8F5; text-align: left; font: 700 .75rem Inter; color: var(--gris); text-transform: uppercase; letter-spacing: .03em; padding: .5rem; z-index: 1; }
.og-imp-tabla td { padding: .35rem .5rem; border-top: 1px solid #F0EDE9; }
.og-imp-tabla td:nth-child(2) { white-space: nowrap; color: var(--gris); font-variant-numeric: tabular-nums; }
.og-imp-tabla .num { text-align: right; }
.og-imp-tabla tr.rev td:first-child { box-shadow: inset 3px 0 0 #F0B429; }
.og-imp-tabla tr.fuera td { opacity: .45; }
.og-imp-tabla input { accent-color: var(--nar); }
.og-imp-tabla .og-imp { min-width: 0; font-size: .85rem; }
.og-imp-pie { position: sticky; bottom: -1.3rem; background: #fff; padding: .7rem 0 .2rem; margin-bottom: -.2rem; }

/* Aviso flotante */
.og-aviso { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--tinta); color: #fff; padding: .75rem 1.1rem; border-radius: 12px; font: 600 .88rem Inter, sans-serif; z-index: 90; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100% - 2rem); text-align: center; animation: og-sube .25s ease-out; }
@keyframes og-sube { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Celular */
@media (max-width: 900px) {
  .og-tarjetas { grid-template-columns: 1fr 1fr; }
  .og-cols { grid-template-columns: 1fr; }
  .og-acciones { margin-left: 0; }
}
@media (max-width: 640px) {
  .og { padding: .9rem .7rem 3rem; }
  .og-pasos { grid-template-columns: 1fr; }
  .og-barra { gap: .55rem; }
  .og-tabs { width: 100%; overflow-x: auto; }
  .og-tab { flex: 1; padding: .55rem .5rem; font-size: .8rem; }
  .og-filtros { min-width: 0; width: 100%; flex: 1 1 100%; }
  .og-filtros select { max-width: none; }
  .og-acciones { width: 100%; }
  .og-acciones > .og-btn { flex: 1; }
  .og-mov { grid-template-columns: 1.8rem auto minmax(0, 1fr) auto; grid-template-areas: "c d d i" "c f k k"; row-gap: .3rem; padding: .65rem .7rem .65rem .35rem; }
  .og-mov .og-chk { grid-area: c; } .og-mov .og-desc { grid-area: d; white-space: normal; } .og-mov .og-imp { grid-area: i; min-width: 0; }
  .og-mov .og-fecha { grid-area: f; font-size: .76rem; } .og-mov .og-cat { grid-area: k; justify-self: end; max-width: 100%; }
  .og-largo { display: none; }
  .og-cuenta-movs { margin-left: 0; width: 100%; }
  .og-movs-f select { flex: 1 1 45%; }
  .og-imp-cab { grid-template-columns: 1fr; }
  .og-mapeo-g { grid-template-columns: 1fr 1fr; }
  .og-modal { padding: .5rem; }
  .og-modal-caja { padding: 1.1rem 1rem 1rem; }
  .og-cats li { flex-wrap: wrap; }
  .og-cats select { width: auto; flex: 1; }
}
