/* ══════════════════════════════════════════════════════
       DESIGN TOKENS — 4px base grid
    ══════════════════════════════════════════════════════ */
    :root {
      --primary:          #3B6FF7;
      --primary-hover:    #2856E0;
      --primary-light:    #EEF2FF;
      --primary-glow:     rgba(59,111,247,0.16);

      --wa:               #25D366;
      --wa-hover:         #1aab52;

      --bg-page:          #F0F2F8;
      --bg-card:          #FFFFFF;
      --bg-card-hover:    #FAFBFF;

      --sidebar-bg:       #161F38;
      --sidebar-border:   rgba(255,255,255,0.06);
      --sidebar-text:     rgba(255,255,255,0.55);
      --sidebar-text-h:   #FFFFFF;

      --text-strong:      #0F172A;
      --text-body:        #374151;
      --text-muted:       #6B7280;
      --text-faint:       #9CA3AF;

      --border:           #E5E7EB;
      --border-strong:    #D1D5DB;

      --pending-bg:       #FFFBEB;
      --pending-text:     #92400E;
      --pending-border:   #FDE68A;
      --overdue-bg:       #FFF1F2;
      --overdue-text:     #9F1239;
      --overdue-border:   #FECDD3;

      --icon-warn:        linear-gradient(135deg,#FEF3C7,#FDE68A);
      --icon-blue:        linear-gradient(135deg,#DBEAFE,#BFDBFE);
      --icon-teal:        linear-gradient(135deg,#D1FAE5,#A7F3D0);

      --r-sm:   6px;
      --r-md:   10px;
      --r-lg:   14px;
      --r-pill: 100px;

      --sh-xs:  0 1px 2px rgba(0,0,0,0.04);
      --sh-sm:  0 1px 3px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
      --sh-md:  0 2px 6px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.06);
      --sh-card-hover: 0 0 0 2px var(--primary-light),
                       0 8px 28px rgba(59,111,247,0.13),
                       0 2px 8px rgba(0,0,0,0.05);
      --sh-btn: 0 2px 8px rgba(59,111,247,0.26);

      --sidebar-w:  258px;
      --topbar-h:   66px;

      --ease-out:  cubic-bezier(0.22,1,0.36,1);
      --ease-back: cubic-bezier(0.34,1.56,0.64,1);
    }

    /* ══════════════════════════════════════════════════════
       BASE
    ══════════════════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg-page);
      color: var(--text-body);
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }

    /* ══════════════════════════════════════════════════════
       LAYOUT
    ══════════════════════════════════════════════════════ */
    .tms-layout { display: flex; min-height: 100vh; }

    /* ══════════════════════════════════════════════════════
       SIDEBAR
    ══════════════════════════════════════════════════════ */
    .tms-sidebar {
      width: var(--sidebar-w);
      background: var(--sidebar-bg);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0; left: 0;
      height: 100vh;
      z-index: 100;
      overflow-y: auto;
      overflow-x: hidden;
      border-right: 1px solid var(--sidebar-border);
    }

    .sidebar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 22px 20px 18px;
      color: #fff;
      font-weight: 700;
      font-size: 1rem;
      letter-spacing: -0.3px;
      border-bottom: 1px solid var(--sidebar-border);
      text-decoration: none;
      flex-shrink: 0;
      transition: opacity 0.15s;
    }
    .sidebar-brand:hover { opacity: 0.88; }

    .sidebar-brand-icon {
      width: 34px; height: 34px;
      background: linear-gradient(135deg,#4F82F8,#2A5BD7);
      border-radius: var(--r-md);
      display: flex; align-items: center; justify-content: center;
      font-size: 0.95rem; color: #fff; flex-shrink: 0;
      box-shadow: 0 2px 8px rgba(59,111,247,0.42);
    }

    .sidebar-nav {
      padding: 10px 8px;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 1px;
    }

    .sidebar-nav-label {
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: rgba(255,255,255,0.22);
      padding: 10px 10px 4px;
      margin-top: 4px;
    }

    .sidebar-nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 11px;
      border-radius: var(--r-md);
      color: var(--sidebar-text);
      text-decoration: none;
      font-size: 0.84rem;
      font-weight: 500;
      transition: background 0.16s var(--ease-out),
                  color 0.16s var(--ease-out);
      cursor: pointer;
      position: relative;
    }

    .sidebar-nav-item i {
      font-size: 0.975rem;
      width: 18px;
      text-align: center;
      flex-shrink: 0;
      opacity: 0.65;
      transition: opacity 0.15s;
    }

    .sidebar-nav-item:hover {
      background: rgba(255,255,255,0.06);
      color: var(--sidebar-text-h);
    }
    .sidebar-nav-item:hover i { opacity: 1; }

    .sidebar-nav-item.active {
      background: rgba(59,111,247,0.16);
      color: #fff;
      font-weight: 600;
    }
    .sidebar-nav-item.active i { opacity: 1; }

    .sidebar-nav-item.active::before {
      content: '';
      position: absolute;
      left: 0; top: 7px; bottom: 7px;
      width: 3px;
      background: var(--primary);
      border-radius: 0 3px 3px 0;
    }

    .sidebar-nav-item .badge-count {
      margin-left: auto;
      background: rgba(59,111,247,0.22);
      color: #93C5FD;
      font-size: 0.67rem;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: var(--r-pill);
    }

    .sidebar-footer {
      padding: 12px 8px;
      border-top: 1px solid var(--sidebar-border);
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }

    .sidebar-avatar {
      width: 34px; height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg,#667eea,#764ba2);
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-size: 0.76rem; font-weight: 700;
      flex-shrink: 0;
      box-shadow: 0 2px 6px rgba(102,126,234,0.32);
    }

    .sidebar-user-info { flex: 1; min-width: 0; }

    .sidebar-user-name {
      color: #fff; font-size: 0.82rem; font-weight: 600;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      line-height: 1.3;
    }

    .sidebar-user-role {
      color: rgba(255,255,255,0.32);
      font-size: 0.69rem;
      margin-top: 1px;
    }

    /* ══════════════════════════════════════════════════════
       MAIN
    ══════════════════════════════════════════════════════ */
    .tms-main {
      margin-left: var(--sidebar-w);
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    /* ══════════════════════════════════════════════════════
       TOPBAR
    ══════════════════════════════════════════════════════ */
    .tms-topbar {
      height: var(--topbar-h);
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 28px;
      position: sticky;
      top: 0; z-index: 50;
      box-shadow: var(--sh-xs);
    }

    .topbar-back-btn {
      width: 38px;
      height: 38px;
      border: none;
      background: var(--primary-light);
      color: var(--primary);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      cursor: pointer;
      margin-right: 12px;
      transition: all 0.2s var(--ease-out);
      flex-shrink: 0;
    }
    .topbar-back-btn:hover {
      background: var(--primary);
      color: #fff;
      transform: scale(1.05);
    }
    .topbar-back-btn:active {
      transform: scale(0.95);
    }

    /* PWA Mode immersive tweaks */
    body.is-pwa .tms-topbar {
      padding-top: env(safe-area-inset-top, 0px);
      height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
    }

    .topbar-search {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--bg-page);
      border: 1.5px solid var(--border);
      border-radius: var(--r-md);
      padding: 0 14px;
      height: 38px;
      min-width: 286px;
      transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    }

    .topbar-search:focus-within {
      border-color: var(--primary);
      background: var(--bg-card);
      box-shadow: 0 0 0 3px var(--primary-glow);
    }

    .topbar-search i {
      color: var(--text-faint);
      font-size: 0.85rem;
      flex-shrink: 0;
      transition: color 0.18s;
    }
    .topbar-search:focus-within i { color: var(--primary); }

    .topbar-search input {
      border: none; background: transparent; outline: none;
      font-family: 'Inter', sans-serif;
      font-size: 0.84rem;
      color: var(--text-body);
      width: 100%;
    }
    .topbar-search input::placeholder { color: var(--text-faint); }

    .topbar-actions {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .topbar-icon-btn {
      width: 36px; height: 36px;
      border-radius: var(--r-md);
      border: 1.5px solid var(--border);
      background: transparent;
      display: flex; align-items: center; justify-content: center;
      color: var(--text-muted);
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s,
                  color 0.15s, transform 0.14s var(--ease-back);
      position: relative;
    }
    .topbar-icon-btn:hover {
      background: var(--bg-page);
      border-color: var(--border-strong);
      color: var(--text-body);
      transform: translateY(-1px);
    }

    .topbar-icon-btn .notif-dot {
      width: 7px; height: 7px;
      background: #EF4444;
      border-radius: 50%;
      border: 1.5px solid #fff;
      position: absolute;
      top: 7px; right: 7px;
    }

    .topbar-user {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      padding: 5px 10px 5px 6px;
      border-radius: var(--r-md);
      border: 1.5px solid transparent;
      transition: background 0.15s, border-color 0.15s;
      margin-left: 4px;
    }
    .topbar-user:hover {
      background: var(--bg-page);
      border-color: var(--border);
    }

    .topbar-user-avatar {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: linear-gradient(135deg,#667eea,#764ba2);
      display: flex; align-items: center; justify-content: center;
      color: #fff; font-size: 0.74rem; font-weight: 700;
    }

    .topbar-user-name {
      font-size: 0.84rem;
      font-weight: 600;
      color: var(--text-strong);
    }

    /* ══════════════════════════════════════════════════════
       PAGE CONTENT
    ══════════════════════════════════════════════════════ */
    .tms-page {
      padding: 28px 32px;
      flex: 1;
    }

    .page-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 28px;
    }

    .page-title {
      font-size: 1.28rem;
      font-weight: 800;
      color: var(--text-strong);
      letter-spacing: -0.5px;
      line-height: 1.2;
    }

    .page-subtitle {
      font-size: 0.78rem;
      color: var(--text-faint);
      margin-top: 3px;
      font-weight: 400;
    }

    /* ══════════════════════════════════════════════════════
       BUTTONS
    ══════════════════════════════════════════════════════ */
    .btn-primary-tms {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: var(--r-md);
      padding: 0 20px;
      height: 38px;
      font-family: 'Inter', sans-serif;
      font-size: 0.84rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      cursor: pointer;
      text-decoration: none;
      white-space: nowrap;
      box-shadow: var(--sh-btn);
      transition: background 0.18s var(--ease-out),
                  box-shadow 0.18s var(--ease-out),
                  transform 0.14s var(--ease-back);
    }
    .btn-primary-tms:hover {
      background: var(--primary-hover);
      box-shadow: 0 4px 16px rgba(59,111,247,0.36);
      transform: translateY(-2px);
      color: #fff;
    }
    .btn-primary-tms:active { transform: translateY(0); }

    .btn-addpayment {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: var(--r-md);
      padding: 0 13px;
      height: 34px;
      font-family: 'Inter', sans-serif;
      font-size: 0.79rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      cursor: pointer;
      white-space: nowrap;
      text-decoration: none;
      box-shadow: 0 1px 4px rgba(59,111,247,0.2);
      transition: background 0.18s var(--ease-out),
                  box-shadow 0.18s var(--ease-out),
                  transform 0.14s var(--ease-back);
    }
    .btn-addpayment:hover {
      background: var(--primary-hover);
      box-shadow: 0 4px 14px rgba(59,111,247,0.34);
      transform: translateY(-2px);
      color: #fff;
    }
    .btn-addpayment:active { transform: translateY(0); }

    .btn-remind {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      background: transparent;
      color: var(--wa);
      border: 1.5px solid var(--wa);
      border-radius: var(--r-md);
      padding: 0 12px;
      height: 34px;
      font-family: 'Inter', sans-serif;
      font-size: 0.79rem;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: background 0.18s var(--ease-out),
                  color 0.18s var(--ease-out),
                  box-shadow 0.18s var(--ease-out),
                  transform 0.14s var(--ease-back),
                  border-color 0.18s;
    }
    .btn-remind:hover {
      background: var(--wa);
      color: #fff;
      border-color: var(--wa);
      box-shadow: 0 4px 12px rgba(37,211,102,0.28);
      transform: translateY(-2px);
    }
    .btn-remind:active { transform: translateY(0); }

    /* ══════════════════════════════════════════════════════
       STAT CARDS
    ══════════════════════════════════════════════════════ */
    .stat-cards-row {
      display: grid;
      grid-template-columns: repeat(3,1fr);
      gap: 16px;
      margin-bottom: 32px;
    }

    .stat-card {
      background: var(--bg-card);
      border-radius: var(--r-lg);
      padding: 22px 20px 20px;
      box-shadow: var(--sh-sm);
      display: flex;
      align-items: flex-start;
      gap: 16px;
      border: 1px solid var(--border);
      cursor: default;
      transition: box-shadow 0.22s var(--ease-out),
                  transform 0.2s var(--ease-out),
                  border-color 0.22s;
    }
    .stat-card:hover {
      box-shadow: var(--sh-md);
      transform: translateY(-3px);
      border-color: #C7D2FE;
    }

    .stat-icon {
      width: 48px; height: 48px;
      border-radius: var(--r-md);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.15rem;
      flex-shrink: 0;
    }
    .stat-icon-yellow { background: var(--icon-warn); color: #B45309; }
    .stat-icon-blue   { background: var(--icon-blue); color: #1D4ED8; }
    .stat-icon-teal   { background: var(--icon-teal); color: #047857; }

    .stat-info { flex: 1; min-width: 0; }

    .stat-label {
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--text-faint);
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.07em;
    }

    .stat-value {
      font-size: 1.7rem;
      font-weight: 800;
      color: var(--text-strong);
      letter-spacing: -0.8px;
      line-height: 1.1;
    }

    .stat-sub {
      font-size: 0.72rem;
      font-weight: 500;
      margin-top: 6px;
      display: inline-flex;
      align-items: center;
      gap: 4px;
    }
    .stat-sub-warn { color: #DC2626; }
    .stat-sub-ok   { color: var(--text-faint); }

    /* ══════════════════════════════════════════════════════
       SECTION HEADER
    ══════════════════════════════════════════════════════ */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .section-title {
      font-size: 0.96rem;
      font-weight: 700;
      color: var(--text-strong);
      letter-spacing: -0.25px;
    }

    .section-viewall {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 0.77rem;
      font-weight: 600;
      color: var(--primary);
      text-decoration: none;
      padding: 4px 10px;
      border-radius: var(--r-pill);
      border: 1.5px solid transparent;
      transition: background 0.15s, border-color 0.15s;
    }
    .section-viewall:hover {
      background: var(--primary-light);
      border-color: #C7D2FE;
      color: var(--primary);
    }

    .section-count {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--primary-light);
      color: var(--primary);
      font-size: 0.67rem;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: var(--r-pill);
    }

    .section-block { margin-bottom: 8px; }

    /* ══════════════════════════════════════════════════════
       DUE CARDS GRID
    ══════════════════════════════════════════════════════ */
    .due-cards-grid {
      display: grid;
      grid-template-columns: repeat(3,1fr);
      gap: 16px;
    }

    .due-card {
      background: var(--bg-card);
      border-radius: var(--r-lg);
      padding: 18px 18px 16px;
      box-shadow: var(--sh-sm);
      border: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      transition: box-shadow 0.22s var(--ease-out),
                  transform 0.2s var(--ease-out),
                  border-color 0.22s,
                  background 0.2s;
    }
    .due-card:hover {
      box-shadow: var(--sh-card-hover);
      transform: translateY(-3px);
      background: var(--bg-card-hover);
    }

    .due-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px;
    }

    .due-card-names { flex: 1; min-width: 0; }

    .due-child-name {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--text-strong);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.3;
      letter-spacing: -0.2px;
    }

    .due-parent-name {
      font-size: 0.75rem;
      color: var(--text-muted);
      font-weight: 500;
      margin-top: 3px;
    }
    .due-parent-name span {
      color: var(--text-faint);
      font-weight: 400;
    }

    .due-route {
      font-size: 0.69rem;
      color: var(--text-faint);
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    /* Status Badges */
    .status-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: var(--r-pill);
      font-size: 0.67rem;
      font-weight: 700;
      white-space: nowrap;
      flex-shrink: 0;
      letter-spacing: 0.03em;
      border: 1px solid transparent;
    }

    .status-badge-pending {
      background: var(--pending-bg);
      color: var(--pending-text);
      border-color: var(--pending-border);
    }

    .status-badge-overdue {
      background: var(--overdue-bg);
      color: var(--overdue-text);
      border-color: var(--overdue-border);
    }

    .due-card-divider {
      height: 1px;
      background: var(--border);
      margin: 14px 0;
      opacity: 0.7;
    }

    .due-card-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .due-amount {
      font-size: 1.05rem;
      font-weight: 800;
      color: var(--text-strong);
      letter-spacing: -0.5px;
      white-space: nowrap;
    }

    .due-actions {
      display: flex;
      align-items: center;
      gap: 6px;
      flex-shrink: 0;
    }

    /* ══════════════════════════════════════════════════════
       RESPONSIVE
    ══════════════════════════════════════════════════════ */
    @media (max-width: 1280px) { .tms-page { padding: 24px; } }

    @media (max-width: 1100px) {
      .stat-cards-row { grid-template-columns: repeat(2,1fr); }
      .due-cards-grid { grid-template-columns: repeat(2,1fr); }
    }

    @media (max-width: 768px) {
      .tms-sidebar    { transform: translateX(-100%); transition: transform 0.28s var(--ease-out); }
      .tms-main       { margin-left: 0; }
      .stat-cards-row { grid-template-columns: 1fr; }
      .due-cards-grid { grid-template-columns: 1fr; }
      .tms-page       { padding: 16px; padding-bottom: 88px; } /* space for bottom nav */
      .topbar-search  { display: none; }
      
      /* Mobile Card Table Conversion */
      .table-mobile-cards, .table-mobile-cards tbody, .table-mobile-cards tr, .table-mobile-cards td {
          display: block;
          width: 100%;
      }
      .table-mobile-cards thead { display: none; }
      .table-mobile-cards tr {
          background: #fff;
          border-radius: var(--r-md);
          box-shadow: 0 1px 4px rgba(0,0,0,0.06);
          margin-bottom: 16px;
          border: 1px solid var(--border);
          padding: 12px;
      }
      .table-mobile-cards td {
          border: none;
          padding: 8px 4px !important;
          position: relative;
          text-align: left !important;
          display: flex;
          align-items: center;
          justify-content: space-between;
      }
      /* Fake Headers */
      .table-mobile-cards td::before {
          content: attr(data-label);
          font-weight: 600;
          font-size: 0.75rem;
          color: var(--text-faint);
          text-transform: uppercase;
          margin-right: 16px;
      }
      .table-mobile-cards td.actions-cell {
          justify-content: flex-end;
          gap: 6px;
          margin-top: 8px;
          border-top: 1px solid var(--border-strong);
          padding-top: 12px !important;
      }
      .table-mobile-cards td.actions-cell::before { display: none; }
    }

    /* ══════════════════════════════════════════════════════
       SCROLLBAR
    ══════════════════════════════════════════════════════ */
    ::-webkit-scrollbar { width: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 10px; }
    ::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

    /* ══════════════════════════════════════════════════════
       MOBILE BOTTOM NAVIGATION BAR
       — hidden on desktop, visible on mobile only
    ══════════════════════════════════════════════════════ */
    .mobile-bottom-nav {
      display: none; /* hidden by default (desktop) */
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 200;
      background: var(--bg-card);
      border-radius: 20px 20px 0 0;
      box-shadow: 0 -4px 24px rgba(0,0,0,0.09),
                  0 -1px 6px rgba(0,0,0,0.05);
      border-top: 1px solid var(--border);
      /* iOS safe area for home indicator */
      padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .mob-nav-inner {
      display: flex;
      align-items: stretch;
      height: 60px;
    }

    .mob-nav-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      text-decoration: none;
      color: var(--text-faint);
      position: relative;
      padding: 8px 4px 6px;
      /* Expand tap target (thumb-friendly) */
      min-width: 44px;
      min-height: 44px;
      transition: color 0.18s var(--ease-out),
                  background 0.15s;
      border-radius: 0;
      -webkit-tap-highlight-color: transparent;
    }

    /* Rounded corners on first/last items */
    .mob-nav-item:first-child {
      border-radius: 20px 0 0 0;
    }
    .mob-nav-item:last-child {
      border-radius: 0 20px 0 0;
    }

    .mob-nav-item:hover {
      background: var(--primary-light);
      color: var(--primary);
    }

    /* Active indicator pill above icon */
    .mob-nav-item.active::before {
      content: '';
      position: absolute;
      top: 0;
      left: 50%;
      transform: translateX(-50%);
      width: 32px;
      height: 3px;
      background: var(--primary);
      border-radius: 0 0 var(--r-pill) var(--r-pill);
      animation: mob-indicator-in 0.22s var(--ease-back) both;
    }

    @keyframes mob-indicator-in {
      from { width: 0; opacity: 0; }
      to   { width: 32px; opacity: 1; }
    }

    /* Active icon + label */
    .mob-nav-item.active {
      color: var(--primary);
    }

    .mob-nav-item.active .mob-nav-icon {
      transform: translateY(-1px);
    }

    .mob-nav-icon {
      font-size: 1.25rem;
      line-height: 1;
      transition: transform 0.18s var(--ease-back);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .mob-nav-label {
      font-size: 0.62rem;
      font-weight: 600;
      letter-spacing: 0.01em;
      line-height: 1;
      white-space: nowrap;
    }

    /* Badge on Due Payments icon */
    .mob-nav-badge {
      position: absolute;
      top: 6px;
      right: calc(50% - 14px);
      background: #EF4444;
      color: #fff;
      font-size: 0.55rem;
      font-weight: 700;
      min-width: 15px;
      height: 15px;
      border-radius: var(--r-pill);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      border: 2px solid var(--bg-card);
      line-height: 1;
    }

    /* Show only on mobile */
    @media (max-width: 768px) {
      .mobile-bottom-nav { display: block; }
    }