    /* Cards */
    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 12px;
    }

    /* Stats */
    .sg {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-bottom: 14px;
    }

    .stc {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
    }

    .stl {
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 6px;
    }

    .stv {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -1px;
      font-family: var(--mono);
    }

    .ste {
      font-size: 12px;
      color: var(--muted);
      font-family: var(--mono);
      margin-top: 2px;
    }

    .sts {
      font-size: 12px;
      color: var(--muted);
      margin-top: 3px;
    }

    /* Section heads */
    .sh {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 16px 0 10px;
    }

    .sht {
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    /* Tx rows */
    .txl {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .txr {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .txn {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 2px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 180px;
    }

    .txm {
      font-size: 12px;
      color: var(--muted);
    }

    .txa {
      font-size: 14px;
      font-weight: 700;
      font-family: var(--mono);
      text-align: right;
    }

    .txe {
      font-size: 11px;
      color: var(--muted);
      font-family: var(--mono);
      text-align: right;
    }

    .tdel {
      background: none;
      border: none;
      color: var(--muted);
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
      font-size: 14px;
      flex-shrink: 0;
    }

    .tag {
      display: inline-block;
      padding: 2px 7px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 700;
      margin-left: 4px;
      vertical-align: middle;
    }

    .ti {
      background: #003d28;
      color: #00e5a0;
    }

    .te {
      background: #3d0a10;
      color: var(--danger);
    }

    .tr {
      background: #1a2a4a;
      color: var(--accent2);
    }

    /* Charts */
    .bc {
      width: 100%;
    }

    .chartleg {
      display: flex;
      flex-wrap: wrap;
      gap: 8px 16px;
      margin-top: 10px;
    }

    .legitem {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      color: var(--muted);
    }

    .legdot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .cr {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }

    .cn {
      font-size: 13px;
      width: 110px;
      flex-shrink: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .ct {
      flex: 1;
      background: var(--border);
      border-radius: 4px;
      height: 6px;
    }

    .cf {
      height: 6px;
      border-radius: 4px;
      background: var(--accent2);
      transition: width .5s;
    }

    .cv {
      font-size: 12px;
      color: var(--muted);
      font-family: var(--mono);
      width: 72px;
      text-align: right;
      flex-shrink: 0;
    }

    /* Parse */
    .pb {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px;
      margin-top: 12px;
    }

    .pt {
      font-size: 11px;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 12px;
    }

    .pr {
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      margin-bottom: 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
    }

    /* Settings */
    .sgl {
      font-size: 11px;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 8px;
    }

    .srow {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .srt {
      font-size: 14px;
      font-weight: 600;
    }

    .srs {
      font-size: 12px;
      color: var(--muted);
      margin-top: 2px;
      font-family: var(--mono);
    }

    .sra {
      background: var(--subtle);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 6px 12px;
      color: var(--text);
      font-family: 'Inter', sans-serif;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      flex-shrink: 0;
      white-space: nowrap;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 700;
    }

    .bok {
      background: #2a2200;
      color: var(--accent);
    }

    .bmiss {
      background: #3d0a10;
      color: var(--danger);
    }

    /* Recurring */
    .rrow {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
    }

    .due {
      background: #1a2a0a;
      color: #7adb4a;
      border-radius: 8px;
      padding: 2px 8px;
      font-size: 11px;
      font-weight: 700;
    }

    /* Filter */
    .frow {
      display: flex;
      gap: 8px;
      margin-bottom: 14px;
    }

    /* Custom month picker */
    .mpick {
      display: flex;
      align-items: center;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      flex: 1;
    }

    .mp-btn {
      background: none;
      border: none;
      color: var(--muted);
      padding: 0 14px;
      height: 38px;
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
      transition: color .15s;
      flex-shrink: 0;
    }

    .mp-btn:active {
      color: var(--text);
    }

    .mp-label {
      flex: 1;
      text-align: center;
      font-size: 13px;
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      letter-spacing: 0.2px;
    }

    /* View toggle pills */
    .vtabs {
      display: flex;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
      flex-shrink: 0;
    }

    .vt {
      background: none;
      border: none;
      color: var(--muted);
      font-family: 'Inter', sans-serif;
      font-size: 12px;
      font-weight: 600;
      padding: 0 12px;
      height: 38px;
      cursor: pointer;
      transition: all .15s;
      white-space: nowrap;
    }

    .vt+.vt {
      border-left: 1px solid var(--border);
    }

    .vt.active {
      background: var(--subtle);
      color: var(--text);
    }

    .vt[data-v="income"].active {
      color: var(--accent);
    }

    .vt[data-v="expense"].active {
      color: var(--danger);
    }

    /* Empty */
    .empty {
      text-align: center;
      padding: 40px 16px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.8;
    }

    /* Toast */
    #toast {
      position: fixed;
      bottom: 84px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--accent);
      color: #000;
      padding: 9px 18px;
      border-radius: 20px;
      font-size: 13px;
      font-weight: 700;
      z-index: 9999;
      opacity: 0;
      transition: opacity .3s;
      pointer-events: none;
      white-space: nowrap;
      max-width: calc(100vw - 32px);
    }

    #toast.show {
      opacity: 1;
    }

    #toast.err {
      background: var(--danger);
      color: #fff;
    }

    #toast.wrn {
      background: var(--warn);
      color: #000;
    }

    /* Loading */
    #loading {
      position: fixed;
      inset: 0;
      background: var(--bg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 16px;
      z-index: 999;
      transition: opacity .4s;
    }

    #loading.hide {
      opacity: 0;
      pointer-events: none;
    }

    .spin {
      width: 40px;
      height: 40px;
      border: 3px solid var(--border);
      border-top-color: var(--saffron);
      border-radius: 50%;
      animation: sp .8s linear infinite;
    }

    @keyframes sp {
      to {
        transform: rotate(360deg);
      }
    }

    .lt {
      font-size: 14px;
      color: var(--muted);
    }

    hr {
      border: none;
      border-top: 1px solid var(--border);
      margin: 14px 0;
    }
