
:root{--ah-field-border:#d6e5dc;--ah-field-bg:#fffefa}
.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea,.modal input:not([type=checkbox]):not([type=radio]),.modal select,.modal textarea{font-family:inherit;min-width:0;max-width:100%;border:1.5px solid var(--ah-field-border);background:var(--ah-field-bg);border-radius:15px;outline:none;transition:border-color .15s,box-shadow .15s;color:var(--v9-text,#153a31)}
.field input:focus,.field select:focus,.field textarea:focus,.modal input:focus,.modal select:focus{border-color:#11a98c;box-shadow:0 0 0 3px #11a98c22}
#view-reportes .cards,#view-inicio .cards{min-width:0}
.card,.panel,.statrow,.v10-account-card{min-width:0}
.card .v,.v10-card-amount,.statrow .sum,.table-wrap td .sum,.table-wrap td,.v7-period-value,[id^="reportIncome"],[id^="reportExpense"],[id^="reportDifference"]{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;font-variant-numeric:tabular-nums;letter-spacing:-.045em}
.card .v,[id^="reportIncome"],[id^="reportExpense"],[id^="reportDifference"]{font-size:clamp(14px,3.45vw,32px)!important;letter-spacing:-.05em!important}
.table-wrap{overflow-x:auto!important}
.table-wrap table{min-width:max-content}
.v10-card-amount{display:block;font-size:clamp(19px,4.1vw,35px)!important;max-width:100%;overflow:hidden;text-overflow:clip;letter-spacing:-.065em!important}
.v10-account-card.ah-wallet-custom{background:var(--ah-wallet-tone)!important;color:white!important;border-color:color-mix(in srgb,var(--ah-wallet-tone) 80%,white)!important}
.v10-account-card.ah-wallet-custom .v10-card-caption,.v10-account-card.ah-wallet-custom .v10-card-footer{color:rgba(255,255,255,.82)!important}
.v10-account-card.ah-wallet-custom .v10-card-name,.v10-account-card.ah-wallet-custom .v10-card-amount{color:#fff!important}
.ah-icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:7px;max-height:205px;overflow:auto;padding:8px;border:1px solid #d9e8df;border-radius:14px;background:#f8fcf9}
.ah-icon-choice{min-height:43px;border:1px solid #dae8df;border-radius:11px;background:white;color:#306557;display:grid;place-items:center;cursor:pointer}
.ah-icon-choice.selected{background:#ddf8eb;border:2px solid #0ba58b;color:#08735f}
.ah-customization{display:grid;gap:12px}
.ah-notice-actions .ah-notice-open,.notifications-sheet .ah-notice-open{width:auto!important;max-width:100%!important;flex:0 1 auto!important;min-height:44px!important;padding:11px 18px!important;border-radius:13px!important;white-space:nowrap!important;font-size:13px!important;box-shadow:none!important}
#pinpad button{border:1px solid #d0e6db!important;border-radius:17px!important;background:#eff9f4!important;color:#164638!important;font-size:24px!important;font-weight:700!important;box-shadow:0 3px 9px #123a2c0d!important}
#pinpad button:active{background:#c9f2df!important;transform:scale(.98)}
.ah-choice-shell{position:relative;min-width:0}
.ah-choice-trigger{width:100%;min-height:52px;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:12px;border:1.5px solid #d6e5dc;background:#fffefa;border-radius:15px;padding:12px 16px;color:inherit;font:inherit;cursor:pointer}
.ah-choice-trigger:after{content:'⌄';color:#178c75}
.ah-choice-menu{position:fixed;z-index:999999;background:#fff;border:1px solid #d7e6dc;border-radius:17px;box-shadow:0 16px 55px #143d2b2b;overflow:auto;max-height:min(55dvh,430px);padding:7px}
.ah-choice-menu button{display:block;width:100%;border:0;border-radius:10px;padding:11px 12px;text-align:left;background:transparent;color:#15392f;font:inherit;cursor:pointer}
.ah-choice-menu button[aria-selected=true],.ah-choice-menu button:hover{background:#e5f8ed;color:#087b65}
.ah-choice-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
html[data-theme=dark] .ah-choice-menu{background:#16372e;border-color:#376052}html[data-theme=dark] .ah-choice-menu button{color:#e6fff3}html[data-theme=dark] .ah-choice-trigger{background:#1a3e33;color:#ecfff6;border-color:#396655}
@media(max-width:560px){.card .v{font-size:clamp(13px,3.3vw,22px)!important}.v10-card-amount{font-size:clamp(18px,5vw,31px)!important}}

.ah-category-icon{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;min-width:38px!important;border-radius:12px!important;background:var(--cat-color,#dff5e9)!important;color:#fff!important}.ah-category-icon svg{width:21px;height:21px}.v101-category-item{min-width:0}

/* V12.5.1: acciones de notificaciones con altura uniforme y sin botones desplazados. */
.notifications-sheet.ah-notice-v1244 .ah-notice-actions{
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px!important;
 align-items:stretch!important;gap:8px!important;width:100%!important;
}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions button{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 width:100%!important;min-width:0!important;max-width:none!important;height:42px!important;
 min-height:42px!important;max-height:42px!important;box-sizing:border-box!important;
 margin:0!important;padding:0 9px!important;border-radius:12px!important;
 font-size:11px!important;line-height:1!important;font-weight:800!important;
 flex:none!important;white-space:nowrap!important;overflow:hidden!important;
 text-overflow:ellipsis!important;vertical-align:middle!important;
}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-open{
 background:linear-gradient(105deg,#086e65,#10b89b)!important;color:#fff!important;
 border:1px solid transparent!important;box-shadow:none!important;
}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-read{
 background:#fff!important;color:#126e5e!important;border:1px solid #d8eae2!important;
}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-delete{
 width:40px!important;min-width:40px!important;padding:0!important;
 background:#fff7f6!important;color:#bc5d54!important;border:1px solid #f1dfda!important;
}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions button svg{
 display:block!important;flex:0 0 15px!important;width:15px!important;height:15px!important;
}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions button::before,
.notifications-sheet.ah-notice-v1244 .ah-notice-actions button::after{content:none!important;display:none!important}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions:has(.ah-notice-open:not(:has(+ .ah-notice-read))){grid-template-columns:minmax(0,1fr) 40px!important}
@media(max-width:390px){.notifications-sheet.ah-notice-v1244 .ah-notice-actions{gap:6px!important}.notifications-sheet.ah-notice-v1244 .ah-notice-actions button{font-size:10px!important;padding:0 5px!important;gap:4px!important}}
html[data-theme="dark"] .notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-read{background:#16392e!important;color:#d3f9e6!important;border-color:#3c6e55!important}
html[data-theme="dark"] .notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-delete{background:#452922!important;color:#ffd5ce!important;border-color:#775249!important}

/* V12.5.2: controles propios con original fuera del flujo visible */
.ah-choice-shell{display:block;width:100%;position:relative;min-width:0!important;flex:1 1 auto}
.ah-choice-shell>.ah-choice-native{position:absolute!important;inset:auto!important;left:0!important;top:0!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:0!important;opacity:0!important;border:0!important;overflow:hidden!important;clip-path:inset(50%)!important;pointer-events:none!important;appearance:none!important}
.ah-choice-shell>.ah-choice-trigger{width:100%!important;min-width:0!important;height:50px!important;min-height:50px!important;max-height:50px!important;margin:0!important;box-sizing:border-box!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;background:#fffefa!important;color:#183f36!important;font-size:14px!important;text-align:left!important;display:flex!important;align-items:center!important;justify-content:space-between!important;padding:0 15px!important;border:1px solid #cddfd7!important;border-radius:15px!important}
.ah-choice-trigger:after{content:'⌄';font-size:18px;color:#0d987f;flex:none;padding-left:8px}
.ah-choice-menu{overscroll-behavior:contain;max-height:min(65dvh,480px);overflow-y:auto;box-sizing:border-box;padding:11px!important;z-index:2147483000!important}
.ah-picker-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.ah-picker-head button{width:40px!important;min-width:40px!important;text-align:center!important;font-size:22px!important;background:#e5f7ed!important;color:#146c5b!important;padding:5px!important}.ah-picker-title{font-weight:800;color:#133b30;text-align:center;text-transform:capitalize;font-size:15px}
.ah-month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.ah-month-grid button{text-align:center!important;padding:12px 4px!important;text-transform:capitalize}
.ah-calendar-week,.ah-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.ah-calendar-week span{font-size:11px;font-weight:800;padding:7px 0;color:#6d897e}.ah-date-grid button{width:100%!important;min-width:0!important;text-align:center!important;padding:10px 0!important;font-size:13px!important}.ah-date-grid button:disabled{opacity:.35;cursor:not-allowed}
.ah-month.selected,.ah-day.selected,.ah-option.selected{background:#0f987d!important;color:#fff!important}
.ah-option-list{max-height:370px;overflow-y:auto}.ah-option-search{position:sticky;top:0;width:100%;box-sizing:border-box;padding:12px;border:1px solid #cfe2d8;border-radius:12px;margin-bottom:8px;z-index:2;background:#fff;font:inherit}.ah-option[hidden]{display:none!important}
.ah-icon-choice svg{width:26px!important;height:26px!important;display:block!important}.ah-icon-choice{padding:5px!important;overflow:hidden}.ah-icon-grid{grid-template-columns:repeat(auto-fill,minmax(53px,1fr))!important;gap:8px!important}
html[data-theme=dark] .ah-choice-shell>.ah-choice-trigger{background:#1b3c33!important;color:#fff!important;border-color:#446e5d!important}html[data-theme=dark] .ah-picker-title{color:#f3fff8}

/* V12.5.4 — consistent desktop drag, theme cursor and scrollbars */
.v10-wallet-rail,.v9-wallet-cards.v10-wallet-rail{cursor:grab!important;user-select:none!important;-webkit-user-select:none!important;scrollbar-width:none!important;overscroll-behavior-x:contain}
.v10-wallet-rail *{cursor:inherit!important;-webkit-user-drag:none}
.v10-wallet-rail::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.v10-wallet-rail.ah-wallet-dragging,.v10-wallet-rail.ah-wallet-dragging *{cursor:grabbing!important;scroll-snap-type:none!important}
@media(pointer:fine){
 html,body{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32' viewBox='0 0 28 32'%3E%3Cpath d='M4 2v23l6-6 4 10 4-2-4-9h9z' fill='%230e8069' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2,auto}
 button,a,[role=button],label[for],summary{cursor:pointer}
 html{scrollbar-color:#74bfa9 #eef7f1;scrollbar-width:thin}
 *::-webkit-scrollbar{width:10px;height:10px}
 *::-webkit-scrollbar-track{background:#eef7f1;border-radius:12px}
 *::-webkit-scrollbar-thumb{background:#75bca8;border:2px solid #eef7f1;border-radius:12px}
 *::-webkit-scrollbar-thumb:hover{background:#168875}
 html[data-theme=dark]{scrollbar-color:#357d69 #142e27}
 html[data-theme=dark] *::-webkit-scrollbar-track{background:#142e27}
 html[data-theme=dark] *::-webkit-scrollbar-thumb{background:#357d69;border-color:#142e27}
}

/* V12.5.5: filtros buscables y múltiples */
.ah-multi-menu .ah-option-search{display:block;width:100%;box-sizing:border-box;margin:0 0 8px;padding:12px 13px;border:1px solid #c9e3d8;border-radius:12px;color:#15392f;background:#fffefa;font:inherit;outline:none}.ah-multi-menu .ah-option-search:focus{border-color:#0e9c80;box-shadow:0 0 0 3px #0e9c8022}.ah-multi-option{display:flex!important;align-items:center;gap:10px;text-align:left!important;white-space:normal;min-height:43px}.ah-filter-check{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border:1.5px solid #89bdb0;border-radius:6px;flex:none;font-size:14px;color:white}.ah-multi-option[aria-checked=true] .ah-filter-check{background:#0e9c80;border-color:#0e9c80}.ah-filter-empty{padding:12px;color:#69847a;margin:0}.ah-multi-menu .ah-option-list{max-height:min(43dvh,340px);overflow:auto}html[data-theme=dark] .ah-multi-menu .ah-option-search{background:#1b3c33;color:white;border-color:#446e5d}

/* V12.5.6: limpiar el extremo derecho del botón de apertura de avisos. */
.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-open{position:relative!important;isolation:isolate!important;overflow:hidden!important;background:#0c9b83!important;background-image:none!important;background-clip:padding-box!important;box-shadow:none!important;border-color:#0c9b83!important;gap:0!important;padding-inline:8px!important}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-open svg,.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-open i{display:none!important}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions .ah-notice-open-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2;pointer-events:none}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions{min-width:0!important;box-sizing:border-box!important}
.notifications-sheet.ah-notice-v1244 .ah-notice-actions>*{min-width:0!important;box-sizing:border-box!important}

/* 12.5.7: drag on cards is reliable in web and installed PWA */
.v10-wallet-rail,.v9-wallet-cards.v10-wallet-rail{scrollbar-width:none!important;-ms-overflow-style:none!important;cursor:grab!important;user-select:none!important;-webkit-user-select:none!important}
.v10-wallet-rail::-webkit-scrollbar,.v9-wallet-cards.v10-wallet-rail::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
.v10-wallet-rail .v10-account-card,.v10-wallet-rail .v10-account-card *{cursor:grab!important;-webkit-user-drag:none!important;user-select:none!important}
.v10-wallet-rail.ah-wallet-pressed,.v10-wallet-rail.ah-wallet-pressed *,.v10-wallet-rail.ah-wallet-dragging,.v10-wallet-rail.ah-wallet-dragging *{cursor:grabbing!important}
.v10-wallet-rail.ah-wallet-dragging{scroll-behavior:auto!important;scroll-snap-type:none!important}
html{scrollbar-color:#168e79 #e7f3ed;scrollbar-width:thin}
body::-webkit-scrollbar{width:9px}body::-webkit-scrollbar-thumb{background:#168e79;border:2px solid #e7f3ed;border-radius:12px}body::-webkit-scrollbar-track{background:#e7f3ed}

/* V12.5.8: legible amounts on narrow mobile cards */
.v9-category-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(105px,auto)!important;gap:5px 12px!important;align-items:center!important}
.v9-category-row>div:first-child{grid-column:1;grid-row:1;min-width:0}
.v9-category-row>.v9-category-track{grid-column:1/-1;grid-row:2;min-width:0}
.v9-category-row>strong{grid-column:2;grid-row:1;justify-self:end;text-align:right;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;min-width:0;font-size:clamp(12px,3.3vw,16px)!important;font-variant-numeric:tabular-nums}
.v9-category-row>span:last-child{grid-column:2;grid-row:2;justify-self:end;white-space:nowrap}
.v7-stat,.v7-stat>div,.v7-stat .v,.card,.card .v{min-width:0!important}
.v7-stat .v,.card .v,.v9-category-row>strong{font-variant-numeric:tabular-nums;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}
@media(max-width:680px){.v7-stat .v,.card .v{font-size:clamp(12px,3.45vw,25px)!important;letter-spacing:-.065em!important}.v9-category-row>strong{font-size:clamp(11px,3.1vw,15px)!important}}
/* Installed app gestures: text entry remains usable */
body.app-installed #appScreen :is(.v10-account-card,.nav-icon,.v10-card-icon),body.app-installed .mobile-nav .nav-icon{user-select:none!important;-webkit-user-select:none!important}
body.app-installed #appScreen input,body.app-installed #appScreen textarea,body.app-installed #appScreen [contenteditable="true"]{user-select:text!important;-webkit-user-select:text!important;-webkit-touch-callout:default!important}
body.app-installed #appScreen img,body.app-installed #appScreen a img{-webkit-user-drag:none!important;user-drag:none!important}

/* V12.5.9 — personalized icon badge always follows the wallet color. */
.v10-account-card.ah-wallet-custom .v10-card-icon{background:color-mix(in srgb,var(--ah-wallet-tone) 62%,white 38%)!important;color:#fff!important;border:1px solid #ffffff38!important}
.v10-account-card.ah-wallet-custom .v10-card-icon svg{color:inherit!important;stroke:currentColor!important}
.v10-account-card.ah-wallet-custom .v10-card-code{border-color:#ffffff72!important;color:#fff!important}

/* V12.6.1: iPhone PWA — let editable elements receive the complete native tap. */
body[data-mode="app"] :is(#authScreen,#lockScreen,#appScreen,#modalRoot) :is(input:not([type="hidden"]):not(.ah-choice-native),textarea,[contenteditable="true"]){
  -webkit-user-select:text!important;user-select:text!important;
  -webkit-touch-callout:default!important;touch-action:auto!important;
  pointer-events:auto!important;caret-color:#079d86!important;
}
body[data-mode="app"] :is(#authScreen,#lockScreen,#appScreen,#modalRoot) :is(input:not([type="hidden"]),textarea):focus{outline:2px solid #0da788;outline-offset:1px}
/* Auth and PIN screen must not inherit anti-selection rules from app cards. */
body[data-mode="app"] #authScreen .auth-card,
body[data-mode="app"] #authScreen form,
body[data-mode="app"] #authScreen .field,
body[data-mode="app"] #lockScreen .auth-card{touch-action:auto!important}
body[data-mode="app"] #authScreen input,
body[data-mode="app"] #authScreen textarea,
body[data-mode="app"] #lockScreen input{transform:none!important;-webkit-transform:none!important}
/* Only decorative app UI rejects text selection; never forms/editables. */
body.app-installed #appScreen .field :is(input,textarea,[contenteditable="true"]),
body.app-installed #modalRoot :is(input,textarea,[contenteditable="true"]){-webkit-user-select:text!important;user-select:text!important;-webkit-touch-callout:default!important}

.ah-login-repair{text-align:center;margin:12px 0 0;font-size:12px}.ah-login-repair a{color:#0b816b;text-decoration:underline;text-underline-offset:3px;touch-action:auto!important;pointer-events:auto!important}

/* V20: Native iOS keyboard has priority over decorative gesture treatments. */
body[data-mode="app"] :is(input:not([type="hidden"]):not(.ah-choice-native),textarea,[contenteditable="true"]){
  -webkit-user-select:text!important;user-select:text!important;
  -webkit-touch-callout:default!important;touch-action:auto!important;
  pointer-events:auto!important;caret-color:currentColor!important;
}
body[data-mode="app"] #authScreen :is(input,textarea),
body[data-mode="app"] #modalRoot :is(input,textarea),
body[data-mode="app"] #appScreen :is(input,textarea){
  transform:none!important;filter:none!important;backdrop-filter:none!important;
}
