.cash-page { min-height: 100%; }

body.apu-cash-theme .apu-app-header { background: #0d726a !important; }
body.apu-cash-theme .apu-header-brand-icon,
body.apu-cash-theme #apuHeaderDateRow { color: #d4ece9 !important; }
body.apu-cash-theme .apu-header-logout-btn { background: rgba(6, 61, 56, .55) !important; }
body.apu-cash-theme .apu-desktop-module-nav-btn:hover { background: rgba(6, 61, 56, .42) !important; }

.cash-dashboard-icon { background: #d9efec; color: #0d726a; }

.cash-wrap { max-width: 64rem; margin: 0 auto; width: 100%; padding: 16px 12px; }
@media (min-width: 768px) { .cash-wrap { padding: 20px; } }

.cash-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cash-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; }
.cash-tab-btn {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 12px; font-weight: 800;
}
.cash-tab-btn.active { background: #0d726a; border-color: #0d726a; color: #fff; }
.cash-toolbar-add {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 12px;
  background: #0d726a; color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap;
}
.cash-toolbar-add:hover { background: #0a5a54; }
.cash-back-row { margin-bottom: 12px; }

.cash-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.cash-section-title { font-size: 15px; font-weight: 800; color: #1e293b; }
.cash-muted { color: #64748b; font-size: 12px; font-weight: 600; }

.cash-date-card { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cash-date-icon { background: #d9efec; color: #0d726a; padding: 14px; border-radius: 14px; flex: 0 0 auto; }
.cash-date-body { min-width: 0; flex: 1; }
.cash-field-label { display: block; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #64748b; margin-bottom: 4px; }
.cash-date-box {
  position: relative; display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid #cbd5e1; background: #f8fafc; font-weight: 800; color: #1e293b; font-size: 14px; overflow: hidden;
}
.cash-date-box.is-button { cursor: pointer; }
.cash-date-box.is-button::after { content: "\f133"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; color: #94a3b8; font-size: .9em; }
.cash-date-box input[type="date"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
@supports (-webkit-touch-callout: none) {
  .cash-date-box input[type="date"] { display: block; -webkit-appearance: none; appearance: none; }
}

.cash-hero {
  background: linear-gradient(135deg, #118a80 0%, #0d726a 55%, #08514b 100%); color: #fff; border-radius: 26px;
  padding: 20px; box-shadow: 0 14px 30px -14px rgba(13, 114, 106, .7); margin-bottom: 14px;
}
.cash-hero-label { font-size: 12px; font-weight: 700; color: #bfe3df; padding-right: 44px; }
.cash-hero-total { font-size: 32px; line-height: 1.15; font-weight: 800; margin-top: 2px; letter-spacing: -.01em; padding-right: 44px; }
.cash-hero-total.is-negative, .cash-hero-value.is-negative { color: #fecaca; }
.cash-hero-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.cash-hero-box { background: rgba(255, 255, 255, .13); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.cash-hero-box-label { font-size: 11px; font-weight: 700; color: #bfe3df; }
.cash-hero-value { font-size: 16px; font-weight: 800; margin-top: 2px; overflow-wrap: anywhere; }
.cash-hero-box .cash-hero-value { font-size: 17px; }
.cash-hero-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.cash-hero-flow-item { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cash-hero-flow-icon { width: 28px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .16); flex: 0 0 auto; }
.cash-hero-flow-item.in .cash-hero-flow-icon { color: #bbf7d0; }
.cash-hero-flow-item.out .cash-hero-flow-icon { color: #fecdd3; }

.cash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; margin-bottom: 14px; }
.cash-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 16px;
  font-size: 14px; font-weight: 800; border: 1px solid transparent; transition: transform .1s;
}
.cash-action-btn:active { transform: scale(.98); }
.cash-action-btn.in { background: #e3f6e8; color: #15803d; border-color: #bfe8c9; }
.cash-action-btn.out { background: #fde8e8; color: #b91c1c; border-color: #f7c6c6; }
.cash-action-icon { width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: #fff; }
.cash-hero { position: relative; }
.cash-more-wrap { position: absolute; top: 12px; right: 12px; z-index: 5; }
.cash-more-btn {
  width: 36px; height: 36px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .22);
}
.cash-more-btn:hover { background: rgba(255, 255, 255, .26); }
.cash-more-menu {
  position: absolute; right: 0; top: 46px; width: max-content; min-width: 196px; max-width: 280px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  box-shadow: 0 18px 36px -12px rgba(15, 23, 42, .3); overflow: hidden; z-index: 30;
}
.cash-more-menu.hidden { display: none; }
.cash-more-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 13px; font-weight: 800; color: #334155; text-align: left; }
.cash-more-item + .cash-more-item { border-top: 1px solid #f1f5f9; }
.cash-more-item:hover { background: #f8fafc; }
.cash-more-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; color: #0d726a; flex: 0 0 auto; }
.cash-more-icon svg { width: 16px; height: 16px; }

.cash-notice { display: flex; align-items: flex-start; gap: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 16px; padding: 12px 14px; font-size: 12px; font-weight: 700; margin-bottom: 14px; }
.cash-notice button { margin-top: 6px; background: #d97706; color: #fff; border-radius: 10px; padding: 7px 12px; font-size: 12px; font-weight: 800; }

.cash-list-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 10px; }
.cash-list { display: flex; flex-direction: column; gap: 8px; }
.cash-empty { text-align: center; color: #94a3b8; font-size: 13px; font-weight: 700; padding: 28px 12px; }

.cash-tx-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 18px; padding: 12px 14px; transition: box-shadow .15s, transform .1s;
}
.cash-tx-card:hover { box-shadow: 0 6px 16px -8px rgba(15, 23, 42, .25); }
.cash-tx-card:active { transform: scale(.995); }
.cash-tx-icon { width: 42px; height: 42px; border-radius: 999px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 16px; }
.cash-tx-main { min-width: 0; flex: 1; }
.cash-tx-title { font-size: 14px; font-weight: 800; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cash-tx-sub { font-size: 12px; font-weight: 600; color: #64748b; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cash-tx-amount { font-size: 14px; font-weight: 800; text-align: right; flex: 0 0 auto; }
.cash-tx-amount small { display: block; font-size: 10px; font-weight: 700; color: #94a3b8; margin-top: 2px; }
.tone-in { background: #e3f6e8; color: #15803d; }
.tone-out { background: #fde8e8; color: #b91c1c; }
.tone-external { background: #d9efec; color: #0d726a; }
.tone-transfer { background: #e0e7ff; color: #4338ca; }
.tone-opening { background: #e2e8f0; color: #475569; }
.tone-fix { background: #fef3c7; color: #b45309; }
.amount-in { color: #15803d; }
.amount-out { color: #b91c1c; }
.amount-neutral { color: #334155; }
.cash-photo-dot { display: inline-block; margin-left: 6px; color: #94a3b8; font-size: 11px; }

.cash-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }

.cash-modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .7); z-index: 55; display: flex; align-items: center;
  justify-content: center; padding: 16px;
}
.cash-modal-overlay.hidden { display: none; }
.cash-modal-overlay.is-detail { z-index: 54; }
.cash-modal-overlay.is-photo { z-index: 60; background: rgba(2, 6, 23, .94); }
.cash-modal-overlay.is-confirm { z-index: 65; }
.cash-modal-card {
  width: 100%; max-width: 32rem; max-height: 92vh; max-height: 92dvh; background: #fff; border-radius: 22px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 30px 60px -20px rgba(2, 6, 23, .6);
}
.cash-modal-header { background: #0d726a; color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 0 0 auto; }
.cash-modal-header h3 { font-size: 16px; font-weight: 800; min-width: 0; }
.cash-modal-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cash-modal-close { width: 38px; height: 38px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.cash-modal-body { padding: 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; font-size: 13px; }
.cash-modal-body > * { flex-shrink: 0; }
.cash-modal-footer { padding: 12px 16px; border-top: 1px solid #e2e8f0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 0 0 auto; background: #fff; }
.cash-modal-footer.three { grid-template-columns: 1fr 1fr 1fr; }

.cash-btn { min-height: 46px; border-radius: 14px; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; }
.cash-btn.primary { background: #0d726a; color: #fff; }
.cash-btn.primary:hover { background: #0a5a54; }
.cash-btn.primary:disabled { opacity: .55; }
.cash-btn.ghost { background: #f1f5f9; color: #334155; }
.cash-btn.ghost:hover { background: #e2e8f0; }
.cash-btn.danger { background: #fee2e2; color: #b91c1c; }
.cash-btn.danger:hover { background: #fecaca; }

.cash-segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: #f1f5f9; border-radius: 14px; }
.cash-segment button { min-height: 40px; border-radius: 11px; font-size: 13px; font-weight: 800; color: #64748b; padding: 0 8px; }
.cash-segment button.active { background: #0d726a; color: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .18); }
.cash-segment.in button.active { background: #16a34a; color: #fff; }
.cash-segment.out button.active { background: #e11d48; color: #fff; }

.cash-field { display: flex; flex-direction: column; gap: 6px; }
.cash-input, .cash-textarea, .cash-select {
  width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; padding: 11px 12px; font-size: 16px; font-weight: 700;
  color: #1e293b; background: #f8fafc; outline: none;
}
.cash-input:focus, .cash-textarea:focus, .cash-select:focus { border-color: #0d726a; box-shadow: 0 0 0 3px rgba(13, 114, 106, .18); }
.cash-textarea { min-height: 78px; resize: vertical; font-weight: 600; }
.cash-amount-input { font-size: 22px; font-weight: 800; }
.cash-amount-wrap { position: relative; }
.cash-amount-wrap span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 800; color: #64748b; }
.cash-amount-wrap .cash-input { padding-left: 42px; }
.cash-hint { font-size: 12px; font-weight: 500; color: #64748b; }
.cash-hint.negative { color: #b91c1c; }
.cash-hint.positive { color: #15803d; }
.cash-count { text-align: right; font-size: 11px; color: #94a3b8; font-weight: 700; }

.cash-photo-box { border: 1px dashed #94a3b8; border-radius: 16px; padding: 12px; background: #f8fafc; }
.cash-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cash-photo-actions button { min-height: 42px; border-radius: 12px; background: #fff; border: 1px solid #cbd5e1; font-size: 12px; font-weight: 800; color: #334155; display: flex; align-items: center; justify-content: center; gap: 6px; }
.cash-photo-preview { position: relative; display: flex; align-items: center; gap: 12px; }
.cash-photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid #e2e8f0; background: #e2e8f0; }
.cash-photo-preview .info { flex: 1; min-width: 0; font-size: 12px; font-weight: 700; color: #475569; }
.cash-photo-remove { color: #b91c1c; font-size: 12px; font-weight: 800; padding: 8px 10px; border-radius: 10px; background: #fee2e2; }
.cash-photo-full { max-width: 100%; max-height: calc(100dvh - 240px); border-radius: 10px; object-fit: contain; touch-action: pinch-zoom; }
.cash-modal-overlay.is-photo .cash-modal-footer { background: #0f172a; border-top-color: #1e293b; }
.cash-modal-overlay.is-photo .cash-modal-footer .cash-btn.ghost { background: #1e293b; color: #e2e8f0; }

.cash-detail-amount { text-align: center; padding: 6px 0 2px; }
.cash-detail-amount .value { font-size: 30px; font-weight: 800; margin-top: 8px; }
.cash-detail-list { border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; background: #fff; }
.cash-detail-row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; font-size: 13px; }
.cash-detail-row + .cash-detail-row { border-top: 1px solid #f1f5f9; }
.cash-detail-row .label { color: #64748b; font-weight: 700; flex: 0 0 auto; }
.cash-detail-row .value { color: #1e293b; font-weight: 800; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.cash-detail-row .value small { display: block; color: #94a3b8; font-weight: 700; font-size: 11px; }
.cash-detail-balance { font-size: 11px; font-weight: 700; color: #8795a8; margin-top: 4px; }
.cash-detail-balance b { color: #475569; font-weight: 800; }
.cash-detail-balance b.amount-out { color: #b91c1c; }
.cash-photo-frame { display: flex; align-items: center; justify-content: center; width: 100%; height: 180px; border-radius: 14px; border: 1px solid #e2e8f0; background: #fff; overflow: hidden; cursor: pointer; }
.cash-detail-photo { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.cash-detail-photo.hidden { display: none; }
.cash-spinner { width: 30px; height: 30px; border: 3px solid #cbd5e1; border-top-color: #0d726a; border-radius: 50%; animation: cashSpin .75s linear infinite; flex: 0 0 auto; }
.cash-spinner.hidden { display: none; }
@keyframes cashSpin { to { transform: rotate(360deg); } }
.cash-photo-body { align-items: center; justify-content: center; background: #020617; padding: 8px; }
.cash-photo-body .cash-photo-full.hidden { display: none; }
.cash-faint-date { margin-left: 6px; font-size: 12px; font-weight: 700; color: #94a3b8; }
.cash-hint-small { font-size: 11px; color: #94a3b8; }
.cash-datetime-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 10px; }
.cash-datetime-row .cash-field { min-width: 0; }
.cash-datetime-note { margin-top: -6px; }
.cash-date-box-form { font-size: 15px; padding: 0 10px; white-space: nowrap; }
.cash-date-box-form span { overflow: hidden; text-overflow: ellipsis; }
.cash-date-box.cash-time-field::after { content: "\f017"; }
.cash-time-field input[type="time"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; -webkit-appearance: none; appearance: none; }

.cash-confirm-card { max-width: 24rem; border-radius: 28px; }
.cash-confirm-head { padding: 22px 20px 16px; text-align: center; border-bottom: 1px solid #e2e8f0; }
.cash-confirm-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.cash-confirm-head h3 { margin-top: 12px; font-size: 18px; font-weight: 800; color: #1e293b; }
.cash-confirm-head p { margin-top: 4px; font-size: 12px; color: #64748b; font-weight: 600; }
.cash-confirm-summary { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 12px 14px; font-size: 12px; }
.cash-confirm-summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.cash-confirm-summary .row span:first-child { color: #64748b; font-weight: 700; }
.cash-confirm-summary .row span:last-child { color: #1e293b; font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.cash-confirm-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.cash-confirm-body .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-teal { background: #d9efec; color: #0d726a; }
.confirm-rose { background: #fee2e2; color: #b91c1c; }
.confirm-amber { background: #fef3c7; color: #b45309; }
.cash-btn.rose { background: #e11d48; color: #fff; }
.cash-btn.rose:hover { background: #be123c; }

.cash-period-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: #e2e8f0; border-radius: 14px; margin-bottom: 12px; }
.cash-period-tabs button { min-height: 38px; border-radius: 11px; font-size: 12px; font-weight: 800; color: #64748b; }
.cash-period-tabs button.active { background: #0d726a; color: #fff; }
.cash-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.cash-filter-grid .wide { grid-column: 1 / -1; }
.cash-report-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.cash-report-tile { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 12px 14px; min-width: 0; }
.cash-report-tile .label { font-size: 11px; font-weight: 700; color: #64748b; }
.cash-report-tile .value { font-size: 16px; font-weight: 800; margin-top: 3px; color: #1e293b; overflow-wrap: anywhere; }
.cash-report-tile .value.negative, .cash-report-tile .value.expense { color: #b91c1c; }
.cash-report-tile .value.income { color: #15803d; }
.cash-report-tile .sub { font-size: 11px; font-weight: 700; color: #94a3b8; margin-top: 2px; }
.cash-flow-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; font-weight: 700; color: #334155; }
.cash-flow-row + .cash-flow-row { border-top: 1px solid #f1f5f9; }
.cash-flow-row .value { font-weight: 800; color: #1e293b; text-align: right; }
.cash-bar-row { padding: 8px 0; }
.cash-bar-row + .cash-bar-row { border-top: 1px solid #f1f5f9; }
.cash-bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; color: #1e293b; }
.cash-bar-top small { color: #64748b; font-weight: 700; }
.cash-bar-track { height: 8px; border-radius: 999px; background: #e2e8f0; margin-top: 6px; overflow: hidden; }
.cash-bar-fill { height: 100%; border-radius: 999px; background: #0d726a; }
.cash-bar-fill.out { background: #e11d48; }
.cash-bar-fill.in { background: #16a34a; }
.cash-bar-button { width: 100%; text-align: left; }
.cash-trend { display: flex; align-items: flex-end; gap: 3px; height: 130px; overflow-x: auto; padding-bottom: 2px; }
.cash-trend-col { flex: 1 0 14px; min-width: 14px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.cash-trend-bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; height: 104px; flex: none; justify-content: center; }
.cash-trend-bars i { display: block; width: 45%; min-height: 0; border-radius: 3px 3px 0 0; }
.cash-trend-bars i.in { background: #16a34a; }
.cash-trend-bars i.out { background: #e11d48; }
.cash-trend-label { font-size: 9px; font-weight: 700; color: #94a3b8; white-space: nowrap; }
.cash-legend { display: flex; gap: 14px; font-size: 11px; font-weight: 700; color: #64748b; margin-top: 8px; }
.cash-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.cash-legend .in::before { background: #16a34a; }
.cash-legend .out::before { background: #e11d48; }
.cash-report-section { margin-bottom: 14px; }
.cash-report-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cash-link-btn { flex: 0 0 auto; padding: 4px 0; color: #0d726a; font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.cash-report-search { position: relative; margin: 4px 0 12px; }
.cash-report-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 14px; pointer-events: none; }
.cash-report-search input { width: 100%; height: 46px; border: 1px solid #cbd5e1; border-radius: 14px; padding: 0 44px 0 40px; font-size: 16px; font-weight: 600; color: #1e293b; background: #fff; outline: none; -webkit-appearance: none; appearance: none; }
.cash-report-search input::-webkit-search-cancel-button { display: none; }
.cash-report-search input:focus { border-color: #0d726a; box-shadow: 0 0 0 3px rgba(13, 114, 106, .18); }
.cash-report-search button:not(.hidden) { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #64748b; }

.cash-category-list { display: flex; flex-direction: column; gap: 8px; }
.cash-category-item { display: flex; align-items: center; gap: 10px; border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 12px; }
.cash-category-item.inactive { opacity: .6; }
.cash-category-item .main { min-width: 0; flex: 1; }
.cash-category-item .name { font-size: 13px; font-weight: 800; color: #1e293b; }
.cash-category-item .meta { font-size: 11px; font-weight: 700; color: #64748b; }
.cash-mini-btn { padding: 7px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; background: #f1f5f9; color: #334155; }
.cash-mini-btn.danger { background: #fee2e2; color: #b91c1c; }

#cashBottomNav { display: none; }

@media (max-width: 640px) {
  .cash-modal-overlay { padding: 0; align-items: stretch; }
  .cash-modal-card { max-width: none; max-height: none; height: 100dvh; border-radius: 0; }
  .cash-modal-overlay.is-confirm { padding: 16px; align-items: center; }
  .cash-modal-overlay.is-confirm .cash-modal-card { height: auto; max-height: 92vh; max-height: 92dvh; border-radius: 28px; }
  .cash-modal-overlay.is-photo { padding: 0; }
  .cash-modal-overlay.is-photo .cash-modal-card { background: transparent; box-shadow: none; }
  .cash-toolbar { display: none; }

  body.apu-cash-nav-visible #cashBottomNav { display: grid !important; }
  body.apu-cash-nav-visible #cashPage { padding-bottom: 78px !important; }
  body.apu-ios-pwa.apu-cash-nav-visible #cashBottomNav {
    height: 82px !important; min-height: 82px !important; padding-bottom: 18px !important;
  }
  body:not(.apu-pwa-standalone).apu-cash-nav-visible #cashBottomNav { height: 58px; min-height: 58px; padding-bottom: 0; }
  body:not(.apu-pwa-standalone).apu-cash-nav-visible #cashBottomNav .apu-pwa-nav-item { min-height: 58px; }
  body:not(.apu-pwa-standalone).apu-cash-nav-visible #cashBottomNav .apu-pwa-nav-input {
    width: 44px; height: 44px; min-height: 44px; align-self: center; justify-self: center;
    border-radius: 13px; color: #fff; padding: 0;
  }
}
@media (min-width: 641px) {
  #cashBottomNav { display: none !important; }
}

#cashBottomNav .apu-pwa-nav-item.active { color: #0d726a !important; }
#cashBottomNav .apu-pwa-nav-input,
body.apu-pwa-standalone #cashBottomNav .apu-pwa-nav-input,
body:not(.apu-pwa-standalone) #cashBottomNav .apu-pwa-nav-input {
  background: #0d726a !important;
  color: #fff !important;
  box-shadow: none !important;
}
#cashBottomNav .apu-pwa-nav-input i { color: #fff !important; }

.cash-footer-row { grid-column: 1 / -1; display: flex; gap: 10px; }
.cash-detail-more { position: relative; flex: 0 0 54px; display: flex; }
.cash-detail-more-btn { width: 100%; padding: 0; }
.cash-detail-more-btn svg { width: 20px; height: 20px; }
.cash-detail-more-menu { position: absolute; right: 0; bottom: calc(100% + 8px); min-width: 150px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 14px 30px -12px rgba(15, 23, 42, .35); overflow: hidden; z-index: 6; }
.cash-detail-more-menu.hidden { display: none; }
.cash-detail-more-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 13px 16px; font-size: 13px; font-weight: 800; color: #1e293b; }
.cash-detail-more-menu button + button { border-top: 1px solid #f1f5f9; }
.cash-detail-more-menu button.danger { color: #be123c; }
.cash-detail-hint { margin-top: auto; padding-top: 4px; text-align: center; font-size: 11px; font-weight: 600; line-height: 1.5; color: #94a3b8; }

.cash-action-btn.is-disabled, .cash-toolbar-add.is-disabled, #cashNavAdd.is-disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.cash-action-btn.is-disabled:active { transform: none; }
.cash-detail-more-menu button.is-disabled { opacity: .45; cursor: not-allowed; }
.cash-date-card .cash-date-box { font-size: 16px; }
.cash-filter-grid .cash-date-box, .cash-filter-grid .cash-select { background: #fff; }
.cash-category-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cash-category-order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cash-mini-btn:disabled { opacity: .35; }
.cash-date-card { flex-wrap: wrap; }
.cash-date-nav-row { flex: 1 1 100%; min-width: 0; }
.cash-date-nav-row:empty { display: none; }
.cash-date-nav-row .stock-date-nav { margin-top: 2px; }
.cash-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #cbd5e1; border-radius: 14px; padding: 12px 14px; background: #fff; cursor: pointer; }
.cash-setting-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cash-setting-title { font-size: 14px; font-weight: 800; color: #1e293b; }
.cash-setting-hint { font-size: 12px; font-weight: 600; color: #64748b; line-height: 1.4; }
.cash-setting-switch { width: 22px; height: 22px; flex: 0 0 auto; accent-color: #0d726a; }
@media (max-width: 767px) {
  .cash-wrap.cash-view-report .apu-module-page-back { display: none; }
}

.cash-budget-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: -4px 0 14px; padding: 12px 14px; border-radius: 18px; background: #fff; border: 1px solid #e2e8f0; text-align: left; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.cash-budget-entry:active { transform: scale(.99); }
.cash-budget-entry-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; background: #d9efec; color: #0d726a; font-size: 16px; }
.cash-budget-entry-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cash-budget-entry-text strong { font-size: 14px; font-weight: 800; color: #1e293b; }
.cash-budget-entry-text small { font-size: 12px; font-weight: 600; color: #64748b; }
.cash-budget-entry-arrow { color: #94a3b8; font-size: 13px; }
@media (min-width: 641px) { .cash-budget-entry { display: none; } }

.cash-budget-month { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; margin-bottom: 14px; }
.cash-budget-month button { width: 40px; height: 40px; border-radius: 12px; background: #f1f5f9; color: #0d726a; flex: 0 0 auto; }
.cash-budget-month button:disabled { opacity: .35; }
.cash-budget-month-text { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cash-budget-month-text span { font-size: 11px; font-weight: 700; color: #64748b; }
.cash-budget-month-text strong { font-size: 16px; font-weight: 800; color: #1e293b; }

.cash-budget-summary { margin-bottom: 14px; }
.cash-budget-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cash-budget-tiles > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cash-budget-tiles span { font-size: 11px; font-weight: 700; color: #64748b; }
.cash-budget-tiles strong { font-size: 15px; font-weight: 800; color: #1e293b; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.cash-budget-tiles strong.is-over { color: #b91c1c; }
.cash-budget-summary .cash-budget-track { height: 10px; margin-top: 12px; }
.cash-budget-summary-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-top: 6px; font-size: 12px; font-weight: 700; color: #64748b; }

.cash-budget-track { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.cash-budget-fill { height: 100%; border-radius: 999px; transition: width .3s ease; }
.cash-budget-fill.is-ok { background: #16a34a; }
.cash-budget-fill.is-warning { background: #f59e0b; }
.cash-budget-fill.is-over { background: #dc2626; }

.cash-budget-alert { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.cash-budget-tip { margin-top: 2px; }
.cash-budget-list { display: grid; gap: 10px; margin-top: 10px; }
@media (min-width: 768px) { .cash-budget-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cash-budget-empty { grid-column: 1 / -1; padding: 12px; }
.cash-budget-item { display: flex; flex-direction: column; gap: 6px; width: 100%; min-width: 0; text-align: left; padding: 12px 14px; border-radius: 16px; border: 1px solid #e2e8f0; background: #f8fafc; }
button.cash-budget-item { cursor: pointer; }
button.cash-budget-item:hover { border-color: #99d1ca; }
.cash-budget-item.is-warning { border-color: #fde68a; background: #fffdf5; }
.cash-budget-item.is-over { border-color: #fecaca; background: #fff8f8; }
.cash-budget-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cash-budget-name { min-width: 0; font-size: 14px; font-weight: 800; color: #1e293b; overflow-wrap: anywhere; }
.cash-budget-name small, .cash-budget-unset-main small { font-weight: 600; color: #94a3b8; }
.cash-budget-chip { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.cash-budget-chip.is-ok { background: #dcfce7; color: #15803d; }
.cash-budget-chip.is-warning { background: #fef3c7; color: #b45309; }
.cash-budget-chip.is-over { background: #fee2e2; color: #b91c1c; }
.cash-budget-amounts { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; font-variant-numeric: tabular-nums; }
.cash-budget-amounts strong { font-size: 16px; font-weight: 800; color: #1e293b; }
.cash-budget-amounts span { font-size: 14px; font-weight: 700; color: #64748b; }
.cash-budget-item-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; color: #64748b; font-variant-numeric: tabular-nums; }
.cash-budget-item.is-ok .cash-budget-left { color: #15803d; }
.cash-budget-item.is-warning .cash-budget-left { color: #b45309; }
.cash-budget-item.is-over .cash-budget-left { color: #b91c1c; }
.cash-budget-since { font-size: 11px; font-weight: 600; color: #94a3b8; }

.cash-budget-unset { margin-top: 6px; }
.cash-budget-unset-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; }
.cash-budget-unset-row + .cash-budget-unset-row { border-top: 1px solid #f1f5f9; }
.cash-budget-unset-main { display: flex; flex-direction: column; min-width: 0; }
.cash-budget-unset-main span { font-size: 13px; font-weight: 800; color: #1e293b; overflow-wrap: anywhere; }
.cash-budget-unset-main > small { font-size: 12px; color: #64748b; }

.cash-budget-edit-head { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #f1f5f9; }
.cash-budget-edit-head strong { font-size: 15px; font-weight: 800; color: #1e293b; }
.cash-budget-edit-head span { font-size: 12px; font-weight: 700; color: #64748b; }
.cash-budget-remove { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; background: #fee2e2; color: #b91c1c; font-size: 13px; font-weight: 800; }

.cash-form-budget { margin-top: 8px; padding: 10px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 1.4; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.cash-form-budget.is-warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.cash-form-budget.is-over { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.cash-form-budget-title { font-size: 12px; font-weight: 800; }
.cash-form-budget-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.cash-form-budget-stat { min-width: 0; }
.cash-form-budget-stat span { display: block; font-size: 11px; font-weight: 700; opacity: .75; }
.cash-form-budget-stat strong { display: block; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.cash-form-budget-after { margin-top: 8px; padding-top: 8px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 20%, transparent); font-weight: 800; }

@media (max-width: 767px) {
  .cash-wrap.cash-view-budget .apu-module-page-back { display: none; }
}
