/* ============================================================
 * budget.css — Budget bars, budget items, shared budget, expense sub-tabs
 * My Travel History v2.0 — Modular CSS
 * ============================================================ */

/* ========== Budget Bar ========== */
.budget-bar{margin-bottom:var(--sp-3);padding:14px 16px;border-radius:var(--r-xl);background:var(--g50);border:1px solid var(--g200)}
.budget-header{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:600;color:var(--g700);margin-bottom:10px}
.budget-track{height:12px;background:var(--g200);border-radius:6px;overflow:hidden}
.budget-fill{height:100%;border-radius:6px;transition:width .5s var(--ease)}
.budget-fill.budget-over{animation:budgetPulse 1.5s ease-in-out infinite}
.budget-footer{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--g500);margin-top:8px}
.budget-over-text{color:var(--error);font-weight:700}

/* Budget inline edit */
.budget-label{display:flex;align-items:center;gap:4px}
.budget-edit-btn{font-size:13px;padding:2px 6px;border-radius:var(--r);opacity:.5;transition:.2s}
.budget-edit-btn:hover{opacity:1;background:var(--g200)}
.budget-input-row{display:flex;gap:8px;align-items:center;margin-bottom:var(--sp-3)}
.budget-input-row .fi{min-height:44px}
.budget-input-row .btn,.budget-edit-row .btn{white-space:nowrap;flex-shrink:0}
.budgets-wrap{margin-bottom:var(--sp-3)}
.budget-item{padding:10px 14px;border-radius:var(--r-lg);background:var(--g50);border:1px solid var(--g200);margin-bottom:8px}
.budget-item-cur{font-size:15px;font-weight:700;color:var(--g500);margin-bottom:4px;letter-spacing:.02em}
.budget-item-head{display:flex;justify-content:space-between;align-items:center;font-size:15px;font-weight:600;color:var(--g700);margin-bottom:6px}
.budget-item-right{display:flex;align-items:center;gap:2px}
.budget-item-pct{font-size:16px;color:var(--g600);font-weight:700}
.budget-item-del{font-size:16px;width:36px;height:36px;border-radius:50%;border:none;background:transparent;
  color:var(--g400);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.2s}
.budget-item-del:hover{background:var(--error-bg);color:var(--error)}
.budget-item-foot{display:flex;justify-content:space-between;align-items:center;font-size:16px;font-weight:700;color:var(--g600);margin-top:5px}
.budget-add-row{display:flex;gap:8px;align-items:stretch;margin-bottom:var(--sp-3)}
.budget-add-row .fi,.budget-add-row .btn{height:44px;min-height:44px;max-height:44px;padding-top:0;padding-bottom:0}

/* Shared budget edit button */
.budget-item-edit{font-size:16px;width:36px;height:36px;border-radius:50%;border:none;background:transparent;
  color:var(--g400);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.2s}
.budget-item-edit:active{background:var(--primary-bg);color:var(--primary)}

/* Shared budget add row */
.sbudget-add-row{display:flex;gap:8px;align-items:stretch;margin-bottom:8px}
.sbudget-add-row .fi,.sbudget-add-row .btn{height:44px;min-height:44px;max-height:44px;padding-top:0;padding-bottom:0}

/* ========== Shared Expense Section ========== */
.shared-exp-section{padding:14px;border-radius:var(--r-xl);background:var(--g50);border:1px solid var(--g200)}

/* ========== Expense Sub-tabs ========== */
.exp-subtabs{display:flex;gap:6px;margin-bottom:14px;padding:5px;background:var(--g100);border-radius:var(--r-xl)}
.exp-subtab{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;
  padding:14px 16px;border-radius:var(--r-lg);font-size:18px;font-weight:700;
  color:var(--g500);cursor:pointer;border:none;background:none;transition:.2s;
  font-family:var(--font-h);-webkit-tap-highlight-color:transparent;min-height:48px}
.exp-subtab.on{background:var(--white);color:var(--g800);box-shadow:var(--shadow-md)}
.exp-subtab-count{font-size:12px;font-weight:700;padding:3px 10px;border-radius:var(--r-full);
  background:var(--g200);color:var(--g500)}
.exp-subtab.on .exp-subtab-count{background:var(--primary-bg);color:var(--primary)}
.exp-subpanel{display:none}.exp-subpanel.on{display:block}

/* ========== Add Expense Banner ========== */
.add-exp-banner{display:flex;align-items:center;gap:12px;padding:14px 16px;margin-bottom:12px;
  border-radius:var(--r-lg);background:linear-gradient(135deg,var(--primary-bg),#f0f9ff);
  border:1.5px solid #dbeafe;cursor:pointer;transition:all .2s;-webkit-tap-highlight-color:transparent}
.add-exp-banner:active{transform:scale(.98)}
.add-exp-banner-ic{width:38px;height:38px;border-radius:50%;
  background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:22px;flex-shrink:0}
.add-exp-banner-body{flex:1}
.add-exp-banner-title{font-size:16px;font-weight:700;color:var(--primary)}
.add-exp-banner-desc{font-size:11px;color:var(--g500);margin-top:1px}

/* ========== Expense Section Header ========== */
.exp-section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;padding:0 2px}
.exp-section-title{font-size:15px;font-weight:700;color:var(--g700);display:flex;align-items:center;gap:6px}
.exp-section-count{font-size:13px;font-weight:700;color:var(--g500);padding:2px 10px;background:var(--g100);border-radius:var(--r-full)}
