/* ALEXPOCKET Personal Quick Entry & Smart Category PRO v2.0 — additive stylesheet.
   Kept separate from styles.css and category-picker.css to preserve deployed theme patches. */
.ap-transaction-form-v2{gap:16px;padding-bottom:18px}
.ap-transaction-form-v2 .ap-entry-type{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px;padding:5px;border:1px solid var(--line);border-radius:14px;background:#f4f7fa}
.ap-transaction-form-v2 .ap-entry-type button{min-height:46px;display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;background:transparent;color:#66758b;font-size:14px;font-weight:800}
.ap-transaction-form-v2 .ap-entry-type button span{font-size:18px}
.ap-transaction-form-v2 .ap-entry-type button.active.expense{background:#fff0f1;color:#b84352;box-shadow:0 2px 8px rgba(40,50,70,.06)}
.ap-transaction-form-v2 .ap-entry-type button.active.income{background:#e9fbf4;color:#087d5b;box-shadow:0 2px 8px rgba(40,50,70,.06)}
.ap-transaction-form-v2 .ap-entry-type button.ap-entry-transfer-shortcut{background:#fff;color:#4d6b83;border:1px solid #e2e8ef;font-size:12px}
.ap-transaction-form-v2 .ap-entry-type button.ap-entry-transfer-shortcut span{font-size:17px}
.ap-entry-amount-block{display:grid;gap:7px;padding:17px 18px 15px;border:1px solid #dcebe5;border-radius:17px;background:linear-gradient(135deg,#f7fffb,#fff)}
.ap-entry-amount-block>label{color:#536278;font-size:13px;font-weight:800}
.ap-entry-amount-wrap{display:flex;align-items:center;gap:10px;min-width:0}
.ap-entry-amount-wrap input{width:100%;min-width:0;min-height:62px;padding:4px 0;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:var(--ink);font-size:clamp(30px,6vw,42px);font-weight:850;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.ap-entry-amount-wrap input::placeholder{color:#b8c4cf}
.ap-entry-amount-wrap>span{color:#7e8c9d;font-size:24px;font-weight:750}
.ap-entry-amount-block>small{color:var(--muted);font-size:12px}
.ap-entry-section{display:grid;gap:9px;min-width:0}
.ap-entry-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.ap-entry-section-head>strong,.ap-entry-section-head>label{margin:0;color:#33445a;font-size:14px;font-weight:800}
.ap-entry-section-head>span{color:#93a0af;font-size:11px}
.ap-entry-description>input{width:100%;min-height:51px;padding:12px 14px;border:1px solid #dfe5ed;border-radius:12px;background:#fff;color:var(--ink);font-size:16px}
.ap-entry-description>input:focus{border-color:#83d9ba;box-shadow:0 0 0 3px rgba(15,155,114,.09)}
.ap-entry-suggestions{display:grid;gap:6px;min-width:0}
.ap-entry-suggestions>span{color:var(--muted);font-size:11px;font-weight:750}
.ap-entry-suggestions>div{display:flex;gap:7px;overflow-x:auto;padding:1px 1px 4px;scrollbar-width:thin}
.ap-entry-suggestions button{flex:none;max-width:210px;min-height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#536278;font-size:12px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ap-entry-suggestions button:hover{border-color:#a8ddca;background:#f5fcf8;color:#087d5b}
/* Category summary: a compact row in the entry form, with an independent picker panel. */
.ap-tx-category-v2{display:grid;grid-template-columns:minmax(0,1fr) 38px;align-items:stretch;gap:7px;min-width:0}
.ap-category-selected-row{width:100%;min-width:0;min-height:67px;display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:11px;padding:9px 12px;border:1px solid var(--line);border-radius:13px;background:#fff;color:var(--ink);text-align:left}
.ap-category-selected-row:hover,.ap-category-selected-row:focus-visible{border-color:#8bd8bb;box-shadow:0 0 0 3px rgba(15,155,114,.08)}
.ap-category-selected-row.has-selection{border-color:#a6dfca;background:#f8fffb}
.ap-category-selected-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:color-mix(in srgb,var(--ap-category-color,#64748b) 14%,white);font-size:22px;line-height:1}
.ap-category-selected-copy{min-width:0;display:grid;gap:3px}
.ap-category-selected-copy small{color:var(--muted);font-size:11px;line-height:1.25}
.ap-category-selected-copy strong{color:var(--ink);font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.ap-category-selected-action{display:flex;align-items:center;gap:5px;color:#087d5b;font-size:12px;font-weight:800;white-space:nowrap}
.ap-category-selected-action span{font-size:18px;color:#8292a4}
.ap-category-clear-v2{width:38px;min-height:48px;align-self:center;border:1px solid var(--line);border-radius:11px;background:#fff;color:#8b96a5;font-size:22px}
.ap-category-clear-v2[hidden]{display:none!important}
.ap-category-picker-panel{grid-column:1/-1;display:grid;min-width:0;padding:13px;border:1px solid #dce8e2;border-radius:15px;background:#fbfdfc;box-shadow:0 5px 17px rgba(29,54,43,.045)}
.ap-category-picker-panel[hidden],.ap-category-picker-view[hidden]{display:none!important}
.ap-category-picker-view{display:grid;gap:12px;min-width:0}
.ap-category-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.ap-category-picker-heading>div{min-width:0;display:grid;gap:3px}
.ap-category-picker-heading>div>strong{color:var(--ink);font-size:15px;font-weight:850}
.ap-category-picker-heading>div>small{color:var(--muted);font-size:11px}
.ap-category-panel-close{width:34px;height:34px;flex:none;border:0;border-radius:10px;background:#edf1f5;color:#607086;font-size:22px;line-height:1}
.ap-category-sort-row{display:flex;gap:6px;overflow-x:auto;padding:1px 1px 3px;scrollbar-width:none}
.ap-category-sort-row::-webkit-scrollbar{display:none}
.ap-category-sort{flex:none;min-height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;color:#718096;font-size:11px;font-weight:750;white-space:nowrap}
.ap-category-sort.active{border-color:#a9e4cf;background:#eafaf3;color:#087d5b}
.ap-category-quick-grid-v2{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.ap-category-quick-card{position:relative;min-width:0}
.ap-category-quick-item{width:100%;min-width:0;min-height:82px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;padding:9px 25px 8px 9px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);text-align:left}
.ap-category-quick-item.active{border-color:#55c99e;background:#effcf6;box-shadow:inset 0 0 0 1px #55c99e}
.ap-category-quick-item .ap-category-icon{width:33px;height:33px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--ap-category-color,#64748b) 14%,white);font-size:18px}
.ap-category-quick-copy{display:grid;gap:2px;min-width:0;width:100%}
.ap-category-quick-copy strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:var(--ink);font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.ap-category-quick-copy small{display:none}
.ap-category-pin{position:absolute;top:4px;right:4px;width:23px;height:23px;display:grid;place-items:center;border:0;border-radius:7px;background:#f5f7fa;color:#9aa5b3;font-size:15px;line-height:1}
.ap-category-pin.pinned{background:#fff6d9;color:#b77908}
.ap-category-picker-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.ap-category-browse-button{min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 11px;border:1px solid #a8d8c6;border-radius:11px;background:#effaf5;color:#087d5b;font-size:12px;font-weight:800}
.ap-category-browse-button>span:first-child{font-size:17px}
.ap-category-action-count{color:#53836e;font-size:10px;font-weight:700}
.ap-category-search-button{min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#536278;font-size:12px;font-weight:750;white-space:nowrap}
.ap-category-back-quick{min-height:36px;padding:6px 9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#536278;font-size:11px;font-weight:800;white-space:nowrap}
.ap-category-search-wrap-v2{min-width:0;display:flex;align-items:center;gap:9px;padding:0 12px;border:1px solid #dce5e2;border-radius:11px;background:#fff;color:#7a899a}
.ap-category-search-wrap-v2>span{font-size:21px;line-height:1}
.ap-category-search-wrap-v2 input{width:100%;min-width:0;min-height:45px;padding:8px 0;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:var(--ink);font-size:14px}
.ap-category-browser-content{display:grid;gap:10px;min-width:0}
.ap-category-browser-heading-v2{display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--ink)}
.ap-category-browser-heading-v2 strong{font-size:13px}
.ap-category-browser-heading-v2 span{color:var(--muted);font-size:11px}
.ap-category-group-grid-v2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.ap-category-group-card{width:100%;min-width:0;min-height:61px;display:grid;grid-template-columns:37px minmax(0,1fr) 16px;align-items:center;gap:9px;padding:9px 10px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);text-align:left}
.ap-category-group-card>.ap-category-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:color-mix(in srgb,var(--ap-category-color,#64748b) 13%,white);font-size:19px}
.ap-category-group-card>span:nth-child(2){min-width:0;display:grid;gap:3px}
.ap-category-group-card strong{font-size:12px;line-height:1.3}
.ap-category-group-card small{color:var(--muted);font-size:10px}
.ap-category-group-arrow{color:#8292a4;font-size:20px;text-align:center}
.ap-category-result-list-v2{display:grid;gap:5px;max-height:min(42vh,360px);overflow:auto;overscroll-behavior:contain;padding-right:2px}
.ap-category-result-row{display:grid;grid-template-columns:minmax(0,1fr) 35px;align-items:center;gap:6px}
.ap-category-result-v2{width:100%;min-width:0;min-height:52px;display:grid;grid-template-columns:35px minmax(0,1fr) 18px;align-items:center;gap:9px;padding:7px 9px;border:1px solid transparent;border-radius:10px;background:#fff;color:var(--ink);text-align:left}
.ap-category-result-v2.active{border-color:#65cda6;background:#effcf6}
.ap-category-result-v2 .ap-category-icon{width:34px;height:34px;font-size:18px}
.ap-category-result-v2>span:nth-child(2){min-width:0;display:grid;gap:3px}
.ap-category-result-v2 strong{font-size:13px;line-height:1.3}
.ap-category-result-v2 small{color:var(--muted);font-size:10px;line-height:1.3;overflow-wrap:anywhere}
.ap-category-result-check{color:#0b9b70;font-weight:900;text-align:center}
.ap-category-result-expand{width:35px;height:35px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#64748b;font-size:21px}
.ap-category-browser-level-head{display:flex;align-items:center;gap:10px;min-width:0;padding:2px 0 5px}
.ap-category-browser-level-head>button{min-height:36px;padding:6px 9px;border:1px solid var(--line);border-radius:9px;background:#fff;color:#526176;font-size:11px;font-weight:800;white-space:nowrap}
.ap-category-browser-level-head>div{min-width:0;display:flex;align-items:center;gap:8px}
.ap-category-browser-level-head>div>span{min-width:0;display:grid;gap:2px}
.ap-category-browser-level-head strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ap-category-browser-level-head small{color:var(--muted);font-size:10px}
.ap-category-empty-v2{padding:14px;border:1px dashed #d7e1de;border-radius:10px;background:#fff;color:var(--muted);font-size:12px;line-height:1.55}
/* Account choices */
.ap-entry-account-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.ap-entry-account{width:100%;min-width:0;min-height:58px;display:grid;grid-template-columns:35px minmax(0,1fr) 17px;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);text-align:left}
.ap-entry-account.active{border-color:#62cda4;background:#f0fbf6;box-shadow:inset 0 0 0 1px #62cda4}
.ap-entry-account-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#edf4ff;font-size:19px}
.ap-entry-account-copy{min-width:0;display:grid;gap:3px}
.ap-entry-account-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.ap-entry-account-copy small{color:var(--muted);font-size:10px}
.ap-entry-account-check{color:#0b9b70;text-align:center;font-size:13px;font-weight:900}
.ap-entry-account[hidden]{display:none!important}
.ap-entry-account-more{justify-self:start;min-height:34px;padding:5px 0;border:0;background:transparent;color:#087d5b;font-size:12px;font-weight:800}
.ap-entry-date{width:100%;min-height:48px;padding:10px 12px;border:1px solid #dfe5ed;border-radius:11px;background:#fff;color:var(--ink);font:inherit;font-size:15px}
.ap-entry-advanced{border:1px solid var(--line);border-radius:13px;background:#fbfcfe}
.ap-entry-advanced>summary{min-height:56px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 13px;color:var(--ink);cursor:pointer;list-style:none}
.ap-entry-advanced>summary::-webkit-details-marker{display:none}
.ap-entry-advanced>summary:after{content:"＋";width:26px;height:26px;display:grid;place-items:center;border-radius:8px;background:#edf1f5;color:#627086;font-size:17px}
.ap-entry-advanced[open]>summary:after{content:"−"}
.ap-entry-advanced>summary span{font-size:13px;font-weight:800}
.ap-entry-advanced>summary small{margin-left:auto;color:var(--muted);font-size:10px}
.ap-entry-advanced-body{display:grid;gap:13px;padding:0 13px 14px;border-top:1px solid var(--line)}
.ap-entry-advanced-body>.field{margin-top:12px}
.ap-entry-advanced-body .field input,.ap-entry-advanced-body .field select,.ap-entry-advanced-body .field textarea{min-height:47px}
.ap-entry-actions{position:sticky;bottom:-18px;z-index:3;margin:0 -21px -18px;padding:12px 21px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(14px)}
.ap-entry-actions .btn{min-height:49px}
@media(max-width:600px){
  .ap-transaction-form-v2{gap:14px;padding:15px 15px calc(14px + env(safe-area-inset-bottom))}
  .ap-transaction-form-v2 .ap-entry-type button{min-height:48px;font-size:14px}
  .ap-entry-amount-block{padding:14px 15px 13px}
  .ap-entry-amount-wrap input{min-height:58px;font-size:34px}
  .ap-entry-section-head>strong,.ap-entry-section-head>label{font-size:14px}
  .ap-entry-description>input{min-height:52px;font-size:16px}
  .ap-entry-suggestions button{min-height:38px;font-size:12px}
  .ap-tx-category-v2{grid-template-columns:minmax(0,1fr) 34px;gap:5px}
  .ap-category-selected-row{grid-template-columns:40px minmax(0,1fr) auto;min-height:64px;gap:8px;padding:8px}
  .ap-category-selected-icon{width:38px;height:38px;font-size:20px}
  .ap-category-selected-copy strong{font-size:13px}
  .ap-category-selected-action{font-size:11px}
  .ap-category-clear-v2{width:34px;min-height:43px}
  .ap-category-picker-panel{padding:10px;gap:10px}
  .ap-category-quick-grid-v2{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .ap-category-quick-item{min-height:76px;padding:7px 21px 7px 7px;gap:5px}
  .ap-category-quick-item .ap-category-icon{width:29px;height:29px;font-size:16px}
  .ap-category-quick-copy strong{font-size:10px;line-height:1.2}
  .ap-category-pin{width:20px;height:20px;top:3px;right:3px;font-size:13px}
  .ap-category-picker-actions{grid-template-columns:1fr}
  .ap-category-browse-button,.ap-category-search-button{width:100%;min-height:46px;font-size:13px}
  .ap-category-group-grid-v2{grid-template-columns:1fr;gap:6px}
  .ap-category-group-card{min-height:58px}
  .ap-category-group-card strong{font-size:13px}
  .ap-category-group-card small{font-size:11px}
  .ap-category-result-list-v2{max-height:38vh}
  .ap-category-result-v2{min-height:56px}
  .ap-category-result-v2 strong{font-size:14px}
  .ap-category-result-v2 small{font-size:11px}
  .ap-entry-account{min-height:62px;padding:8px}
  .ap-entry-account-copy strong{font-size:12px}
  .ap-entry-account-copy small{font-size:11px}
  .ap-entry-date{min-height:50px;font-size:16px}
  .ap-entry-advanced>summary{min-height:58px}
  .ap-entry-advanced>summary span{font-size:14px}
  .ap-entry-advanced>summary small{font-size:11px}
  .ap-entry-actions{margin:0 -15px -15px;padding:11px 15px calc(11px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){
  .ap-category-quick-grid-v2{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ap-entry-account-grid{grid-template-columns:1fr}
  .ap-category-picker-heading>div>strong{font-size:14px}
}
@media(prefers-reduced-motion:reduce){.ap-entry-account,.ap-category-quick-item{transition:none!important}}
