* { box-sizing: border-box }
:root {
  color-scheme: light;
  --papel: #f4f5f0; --blanco: #fff; --tinta: #17312e; --texto: #253b38;
  --suave: #566b67; --linea: #dbe3dc; --verde: #16674e; --acento: #cff19a;
  --menta: #e9f3e4; --coral: #9b493a; --oscuro: #152c2b;
  font-family: "DM Sans","Segoe UI",system-ui,sans-serif;
}
body { margin: 0; color: var(--texto); background: var(--papel); line-height: 1.48 }
a { color: var(--verde); font-weight: 650; text-underline-offset: .18em }
a:hover { text-decoration: underline }
button, input, select { font: inherit }
button, .boton { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .68rem 1.12rem; min-height: 42px; color: var(--tinta); font-weight: 650; font-size: .89rem; line-height: 1.2; border: 1px solid var(--linea); border-radius: .7rem; background: var(--blanco); text-decoration: none; cursor: pointer }
button:hover, .boton:hover { border-color: #83a596; text-decoration: none }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #318879; outline-offset: 3px }
button[hidden] { display: none }
button:disabled { cursor: wait; opacity: .65 }
.principal, .boton.principal { background: var(--verde); border-color: var(--verde); color: white }
.principal:hover { background: #0f5540 }
h1,h2,h3,p { margin: 0 }
h1,h2,h3 { color: var(--tinta); letter-spacing: -.035em }
h1 { font-size: clamp(2rem,4vw,3.1rem); line-height: 1.08; font-weight: 650 }
h2 { font-size: 1.24rem; line-height: 1.25; font-weight: 680 }
h3 { font-size: 1rem; margin: 1.05rem 0 .4rem }
p { font-size: .94rem }
small { display: block; color: var(--suave); line-height: 1.42; font-size: .8rem }
b,strong { font-weight: 650 }
.marca { display: flex; align-items: center; gap: .68rem; font-weight: 720; letter-spacing: -.075em; font-size: 2.1rem; line-height: 1; color: var(--tinta) }
.marca img { border-radius: .7rem }
.punto { color: #77ad69 }
.estructura { display: grid; min-height: 100dvh; grid-template-columns: 218px minmax(0,1fr) }
.barra { position: sticky; height: 100dvh; top: 0; display: flex; flex-direction: column; padding: 2.1rem .9rem 1.2rem; background: var(--oscuro); color: white; overflow-y: auto }
.barra .marca { padding: .2rem .8rem 2.1rem; color: white }
.barra nav { display: grid; gap: .25rem }
.barra nav a { display: flex; gap: .75rem; align-items: center; min-height: 43px; padding: .6rem .85rem; color: #c6d4cb; font-weight: 550; font-size: .91rem; text-decoration: none; border-radius: .62rem }
.barra nav a:hover { background: #203d38; color: white }
.barra nav a[aria-current] { color: var(--acento); background: #28483d }
.barra nav i { font-style: normal; width: 1.2rem; text-align: center; font-size: 1.08rem }
.identidad { display: flex; align-items: center; gap: .7rem; margin: auto .45rem 0; padding-top: 1.2rem; border-top: 1px solid #46615a }
.identidad small { color: #b6c6bd }
.avatar { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; flex: none; background: #dbe8ce; color: var(--tinta); font: 650 1.08rem "Segoe UI",system-ui,sans-serif }
.principal-area { min-width: 0; width: 100%; max-width: 1470px; margin: 0 auto; padding: 0 clamp(1.2rem,3.3vw,3.6rem) 3rem }
.barra-superior { display: flex; align-items: center; justify-content: space-between; min-height: 4.6rem; font-size: .82rem; color: var(--suave); border-bottom: 1px solid var(--linea); margin-bottom: 1.55rem }
.barra-superior b { color: var(--tinta) }
.barra-superior a { text-decoration: none }
.titulo, .encabezado, .renglon { display: flex; align-items: center; justify-content: space-between; gap: 1rem }
.titulo { margin: 1.55rem 0 }
.titulo p, .tarjeta > p { margin: .55rem 0 0; color: var(--suave) }
.bienvenida { overflow: hidden; position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; min-height: 188px; background: linear-gradient(115deg,#153e35,#285743); padding: clamp(1.4rem,3vw,2.5rem); color: white; border-radius: 1.25rem; margin-bottom: 1.55rem }
.bienvenida:after { content: ""; position: absolute; width: 240px; height: 240px; border: 38px solid #57856138; border-radius: 56px; transform: rotate(38deg); top: -170px; right: 13%; z-index: -1 }
.bienvenida h1 { margin: .65rem 0 .25rem; color: #f8ffef; font-size: clamp(2.2rem,4.3vw,3.5rem) }
.bienvenida p,.fecha { color: #d1e6d3 }
.fecha { font-size: .83rem; font-weight: 580 }
.accesos, .acciones, .operaciones, .paginacion { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem }
.claro { background: var(--acento); border-color: transparent; color: #1c3a2a }
.borde { color: white; background: #305b49; border-color: #648674 }
.encabezado { margin: 0 0 .9rem }
.encabezado a { font-size: .83rem; text-decoration: none }
.tarjeta, .indicador { background: var(--blanco); border: 1px solid var(--linea); border-radius: 1rem; padding: clamp(1rem,2.25vw,1.5rem); box-shadow: 0 5px 18px #172e2510; min-width: 0; margin: 0 0 1rem }
.indicadores { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: .8rem }
.indicador small { font-size: .84rem; color: var(--texto) }
.indicador strong { display: block; margin: .6rem 0 .15rem; font-size: clamp(1.28rem,2.6vw,2.2rem); line-height: 1.12; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere }
.indicador em { font-style: normal; font-size: .68rem; font-weight: 650; color: var(--suave); letter-spacing: .1em }
.indicador.saldo { background: var(--menta); border-color: #cbdabe }
.positivo strong,.mas { color: var(--verde) }
.negativo strong,.menos { color: var(--coral) }
.columnas { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem }
.tarjeta h2 + .tabla, .tarjeta h2 + .grupo { margin-top: .8rem }
.fila { display: flex; align-items: flex-start; gap: .8rem; padding: .86rem 0; border-bottom: 1px solid var(--linea); font-size: .9rem }
.fila:last-child { border-bottom: 0; padding-bottom: .1rem }
.fila .crece { flex: 1; min-width: 0; overflow-wrap: anywhere }
.fila small { margin-top: .15rem }
.fila p { font-size: .87rem; margin: .3rem 0; color: var(--suave) }
.icono, .cita time { flex: none; background: #edf3e8; color: #385a41; border-radius: .6rem; padding: .32rem .5rem; font-size: .85rem; font-weight: 680 }
.cita time { color: var(--tinta); background: #f0f3eb; font-variant-numeric: tabular-nums }
.estado { display: inline-block; border-radius: 30px; padding: .18rem .55rem; margin-top: .38rem; color: #795d26; background: #fcf2d7; font-size: .72rem; font-weight: 650 }
.estado.confirmado { background: var(--menta); color: var(--verde) }
.operaciones { align-items: flex-end; flex-direction: column; gap: .2rem }
.ligero,.texto,.peligro { min-height: 36px; font-size: .82rem; padding: .4rem .65rem }
.texto,.peligro { background: transparent; border-color: transparent; color: var(--suave) }
.peligro { color: var(--coral); margin-top: .6rem }
.linea { display: inline-flex; margin: 0 }
.tabla { overflow: auto }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem }
th { color: var(--suave); font-size: .73rem; font-weight: 650; padding: .65rem .5rem; border-bottom: 1px solid var(--linea) }
td { padding: .73rem .5rem; border-bottom: 1px solid #e8eee7; vertical-align: top }
td small { margin-top: .1rem; overflow-wrap: anywhere }
tbody tr:last-child td { border-bottom: 0 }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums }
.grupo { margin: .75rem 0 }
.grupo div { display: flex; justify-content: space-between; gap: .7rem; font-size: .85rem }
.grupo small { display: inline; font-size: .72rem }
progress { width: 100%; height: .46rem; border: 0; border-radius: 2rem; overflow: hidden; accent-color: var(--verde); background: #edf0e9 }
progress::-webkit-progress-bar { background: #edf0e9 }
progress::-webkit-progress-value { background: var(--verde); border-radius: 2rem }
progress::-moz-progress-bar { background: var(--verde) }
progress.coral { accent-color: #c88e76 }
progress.coral::-webkit-progress-value { background: #c88e76 }
progress.coral::-moz-progress-bar { background: #c88e76 }
.formulario, .medida { max-width: 740px }
form:not(.linea) { display: grid; gap: .85rem }
label { display: grid; align-content: start; gap: .33rem; color: var(--texto); font-weight: 630; font-size: .83rem }
input, select { min-width: 0; width: 100%; min-height: 44px; padding: .6rem .72rem; border: 1px solid #bfcdc0; background: #fff; color: var(--tinta); border-radius: .55rem; font-size: 1rem }
.campos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .78rem }
.formulario form > button, details form > button, .medida form > button { justify-self: start }
.formulario > p { margin: .65rem 0 1.3rem }
.formulario h2 { margin: .7rem 0 0 }
.segmentos { display: flex; flex-wrap: wrap; gap: .3rem; padding: .27rem; margin: 0 0 .85rem; border-radius: .75rem; background: #e6ece3; width: fit-content }
.segmentos a { display: inline-flex; justify-content: center; align-items: center; min-height: 35px; padding: .35rem .8rem; border-radius: .5rem; color: var(--suave); font-size: .84rem; text-decoration: none }
.segmentos a[aria-current] { background: white; color: var(--tinta); box-shadow: 0 1px 4px #14291c1c }
form.filtros-fila { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem }
.filtros-fila label { flex: 1 1 135px }
.filtros-fila select { max-width: 100% }
.filtros-fila + .encabezado { margin-top: 1.4rem }
summary { cursor: pointer; color: var(--tinta); font-weight: 650; padding: .2rem 0 }
details[open] > summary { margin-bottom: 1rem }
.crear { background: #fafdF5 }
.interior { border: 1px solid var(--linea); border-radius: .7rem; padding: .65rem .8rem }
.interior summary { font-size: .85rem }
.categorias { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 1.2rem; margin-bottom: 1rem }
.renglon { padding: .4rem 0; font-size: .86rem; border-bottom: 1px solid var(--linea) }
.paginacion { justify-content: flex-end; font-size: .85rem; margin-top: .6rem }
.aviso { padding: .8rem 1rem; background: #e2f0dc; border: 1px solid #b6cfae; color: #284e35; border-radius: .7rem; margin: 0 0 1rem; font-size: .9rem }
.aviso.error { color: #7f392c; background: #faeae2; border-color: #e2b5a5 }
.entrada { max-width: 470px; margin: clamp(2rem,9vh,7rem) auto 2rem; padding: 0 1rem }
.entrada.amplia { max-width: 710px }
.entrada .marca { margin: 0 0 1.4rem .2rem }
.entrada .tarjeta { padding: clamp(1.3rem,4vw,2.2rem) }
.entrada h1 { font-size: clamp(1.9rem,5vw,2.45rem) }
.entrada .aviso { margin: .85rem 0 }
.pie-acceso { margin-top: 1.1rem; font-size: .88rem }
.vacio { color: var(--suave); font-size: .88rem; padding: .85rem 0 }
.codigo,.ruta { display: block; overflow-wrap: anywhere; padding: .7rem; margin: .7rem 0; color: var(--tinta); background: #eef2e9; border-radius: .55rem; user-select: all; font-size: .86rem }
.invitacion { border-color: #adc8a0 }
.acciones { margin: .9rem 0 }
.medida > form:not(.linea) { margin-top: .8rem }
@media(max-width:900px) {
 .estructura { grid-template-columns: 175px minmax(0,1fr) }
 .barra { padding: 1.5rem .6rem 1rem }
 .bienvenida { flex-wrap: wrap }
}
@media(max-width:700px) {
 .estructura { display: block }
 .barra { height: auto; position: static; padding: .65rem .85rem .5rem; overflow: visible }
 .barra .marca { padding: 0 0 .55rem; font-size: 1.55rem; gap: .45rem }
 .barra .marca img { width: 30px; height: 30px }
 .barra nav { display: flex; overflow-x: auto; scrollbar-width: thin }
 .barra nav a { flex: none; min-height: 39px; padding: .45rem .6rem; font-size: .84rem; gap: .32rem }
 .barra nav i { width: auto }
 .identidad { display: none }
 .principal-area { padding: 0 .9rem 2rem }
 .barra-superior { min-height: 2.8rem; margin-bottom: .85rem }
 .bienvenida { min-height: auto; padding: 1.25rem; margin-bottom: 1rem }
 .columnas { grid-template-columns: minmax(0,1fr); gap: 0 }
 .indicadores { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-bottom: .85rem }
 .indicador { margin: 0; padding: .9rem }
 .indicador.saldo { grid-column: 1/-1 }
 .indicador.saldo strong { font-size: 2rem }
 .titulo { flex-wrap: wrap; margin: 1rem 0 }
 .campos,.categorias { grid-template-columns: 1fr }
 .tarjeta { padding: 1rem }
 .segmentos a { padding: .35rem .55rem; font-size: .81rem }
 .fila { gap: .55rem; flex-wrap: wrap }
 .fila .crece { min-width: 7rem }
 .tabla th,.tabla td { padding: .6rem .28rem; font-size: .79rem }
 .filtros-fila label { flex-basis: 120px }
}
