/* ==========================================================================
   Let i know - Responsive Stylesheet (css/responsive.css)
   Handles Mobile, Tablet, and Desktop Breakpoints
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large Tablets & Small Laptops (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .cash-top-grid {
    grid-template-columns: 1fr;
  }

  .upi-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Tablets & Mobile Devices (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Sidebar Off-canvas Drawer */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .close-sidebar-btn {
    display: block;
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Main Wrapper takes full width */
  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Topbar Adjustments */
  .topbar {
    padding: 0 16px;
  }

  .page-title-box h2 {
    font-size: 1.15rem;
  }

  .page-title-box p {
    display: none;
  }

  .today-badge {
    display: none;
  }

  .content-area {
    padding: 18px 16px 40px;
  }

  /* Metrics Grid on Mobile */
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .metric-card {
    padding: 18px;
  }

  .metric-value {
    font-size: 1.5rem;
  }

  /* UPI Stats Row */
  .upi-stats-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .upi-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
    min-width: unset;
  }

  .app-filter-chips {
    overflow-x: auto;
    padding-bottom: 4px;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Quick Actions Bar */
  .quick-actions-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .quick-buttons-group {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    white-space: nowrap;
  }

  /* Budget Stats Row */
  .budget-stats-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Form row stacks on mobile */
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-card {
    padding: 20px;
    max-height: 95vh;
  }

  .savings-summary-banner {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .date-selector-card {
    flex-direction: column;
    align-items: stretch;
  }

  .date-nav-controls {
    justify-content: space-between;
  }

  .bar-chart-flex {
    height: 160px;
    gap: 8px;
    padding: 10px 10px 0;
  }

  .bar-column {
    max-width: 32px;
  }

  .notes-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .notes-header-bar .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .notes-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .notes-search-wrapper {
    width: 100%;
    min-width: 0;
  }

  .lending-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .lending-header-bar .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .lending-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .lending-search-wrapper {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .auto-delete-feature-box {
    width: 100%;
    justify-content: space-between;
  }
}

/* --------------------------------------------------------------------------
   Small Mobile Screens (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .btn-primary span, .btn-secondary span {
    font-size: 0.82rem;
  }

  .denom-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .denom-subtotal {
    text-align: left;
    width: 100%;
  }

  .goals-grid {
    grid-template-columns: 1fr;
  }

  .notes-grid {
    grid-template-columns: 1fr;
  }

  .lending-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .onboard-summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hide-mobile {
    display: none;
  }
}

