/**
 * Universal Responsive Layout Architecture: Desktop, Laptop & Tablet
 * Strictly follows DESKTOP_LAYOUT_GUIDE.md & Reference Desktop Layout
 * Mobile (< 768px) is preserved 100% intact.
 */

:root {
  --brand-primary: #347928;
  --brand-primary-dark: #2a6120;
  --brand-primary-accent: #2FB141;
  --brand-primary-light: #EAF5EC;
  --brand-primary-fade: rgba(52, 121, 40, 0.08);
  --bg-body: #F7F9F6;
  --bg-sidebar: #FFFFFF;
  --bg-card: #FFFFFF;
  --border-color: #EEF0EB;
  --border-light: #F3F4F6;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
}

/* ==========================================================================
   MOBILE VIEW (< 768px) — PRESERVED 100% INTACT
   ========================================================================== */
@media (max-width: 767.98px) {
  .desktop-only,
  .desktop-sidebar,
  .desktop-topbar {
    display: none !important;
  }

  .desktop-dash-grid {
    display: contents !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
  }
}

/* ==========================================================================
   DESKTOP, LAPTOP & TABLET SHELL (min-width: 768px)
   ========================================================================== */
@media (min-width: 768px) {
  body {
    background-color: #F7F9F6 !important;
    overflow-x: hidden !important;
  }

  .mobile-only,
  .site-mobile-header,
  .mobile-bottom-nav,
  .bottom-nav,
  .phone-status-bar-safe-area,
  .page-wrapper .page-header,
  .page-wrapper .sidebar-wrapper {
    display: none !important;
  }

  .desktop-only {
    display: flex !important;
  }

  div.desktop-only {
    display: block !important;
  }

  div.desktop-only.desktop-topbar,
  aside.desktop-only.desktop-sidebar {
    display: flex !important;
  }

  /* Stationary Fixed Left Sidebar */
  .desktop-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    padding: 24px 16px !important;
    background-color: #FFFFFF !important;
    border-right: 1px solid #EEF0EB !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    z-index: 9999 !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
  }

  .desktop-sidebar::-webkit-scrollbar {
    display: none !important;
  }

  .desktop-sidebar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 4px 8px 20px 8px !important;
    text-decoration: none !important;
    margin-bottom: 8px !important;
  }

  .desktop-sidebar-logo {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
  }

  .desktop-sidebar-brand-name {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    letter-spacing: -0.4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  .desktop-sidebar-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
  }

  .desktop-nav-group-title {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #9CA3AF !important;
    padding: 18px 14px 6px 14px !important;
  }

  .desktop-nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.18s ease !important;
    white-space: nowrap !important;
  }

  .desktop-nav-link i {
    font-size: 18px !important;
    color: #4B5563 !important;
    flex-shrink: 0 !important;
    transition: color 0.18s ease !important;
  }

  .desktop-nav-link:hover {
    background-color: #F3F6F2 !important;
    color: #347928 !important;
  }

  .desktop-nav-link:hover i {
    color: #347928 !important;
  }

  .desktop-nav-link.active {
    background-color: #2FB141 !important;
    background: linear-gradient(135deg, #2FB141 0%, #347928 100%) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(47, 177, 65, 0.22) !important;
  }

  .desktop-nav-link.active i {
    color: #FFFFFF !important;
  }

  .desktop-nav-badge {
    margin-left: auto !important;
    background: #EF4444 !important;
    color: #FFFFFF !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 999px !important;
    line-height: 1.2 !important;
  }

  .desktop-sidebar-footer {
    padding-top: 16px !important;
    margin-top: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .desktop-user-pill {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    background: #F7F9F6 !important;
    border: 1px solid #EEF0EB !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
  }

  .desktop-user-pill:hover {
    border-color: rgba(52, 121, 40, 0.25) !important;
    background: #EFF5EE !important;
  }

  .desktop-user-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #347928 !important;
    color: #FFFFFF !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background-size: cover !important;
    background-position: center !important;
  }

  .desktop-user-info {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .desktop-user-name {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
  }

  .desktop-user-sub {
    font-size: 11px !important;
    color: #6B7280 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.25 !important;
  }

  .desktop-logout-link {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 9px 14px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: all 0.18s ease !important;
  }

  .desktop-logout-link:hover {
    background: #FEF2F2 !important;
    color: #DC2626 !important;
  }

  /* Dashboard Balance Card: Keep exact mobile design & color, only align margin in left column */
  .dashboard-balance-card {
    margin: 0 0 22px 0 !important;
  }

  .dashboard-promo-slider {
    margin: 0 0 24px 0 !important;
    border-radius: 20px !important;
    height: 170px !important;
  }

  .dashboard-section-title {
    margin: 0 0 14px 0 !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #111827 !important;
  }

  .dashboard-quick-grid {
    padding: 0 !important;
    margin: 0 0 24px 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .dashboard-quick-grid > a {
    background: #FFFFFF !important;
    border: 1px solid #EEF0EB !important;
    border-radius: 16px !important;
    padding: 18px 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
  }

  .dashboard-quick-grid > a:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(52, 121, 40, 0.3) !important;
    box-shadow: 0 6px 16px rgba(52, 121, 40, 0.08) !important;
  }

  /* Nested Topbar reset (when inside a container that is already offset) */
  .desktop-canvas-wrapper .desktop-topbar,
  .app-shell .desktop-topbar,
  .buy-shell .desktop-topbar,
  .fivesim-app-wrapper .desktop-topbar,
  .recharge-shell .desktop-topbar,
  .numbers-history-container .desktop-topbar,
  .track-referrals-app .desktop-topbar,
  .commission-app-shell .desktop-topbar,
  .profile-container .desktop-topbar {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 4px 0 24px 0 !important;
  }

  /* Buy Number: Sleek Desktop Redesign (Compact & Balanced Workspace) */
  .buy-shell {
    max-width: 1320px !important;
  }

  .buy-shell .provider-switch-bar,
  .provider-switch-bar {
    max-width: 280px !important;
    width: auto !important;
    display: inline-flex !important;
    margin-bottom: 18px !important;
  }

  .hero-slider-container {
    height: 125px !important;
    border-radius: 16px !important;
    margin-bottom: 22px !important;
  }

  .hero-slide-content {
    padding: 16px 24px !important;
  }

  .buy-eyebrow {
    font-size: 10.5px !important;
    margin-bottom: 2px !important;
  }

  .buy-title {
    font-size: 20px !important;
    margin-bottom: 2px !important;
  }

  .buy-subtitle {
    font-size: 12.5px !important;
  }

  .buy-panel {
    border-radius: 20px !important;
    background: #FFFFFF !important;
    border: 1px solid #EEF0EB !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03) !important;
  }

  .buy-panel-inner {
    padding: 22px !important;
  }

  .buy-desktop-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr) !important;
    gap: 28px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .buy-desktop-columns > div > .section-heading:first-child {
    margin-top: 0 !important;
  }

  .search-input {
    height: 44px !important;
    border-radius: 12px !important;
    border: 1.5px solid #E2E8F0 !important;
    font-size: 14px !important;
    padding: 0 14px !important;
  }

  .search-input:focus {
    border-color: #2FB141 !important;
    box-shadow: 0 0 0 3px rgba(47, 177, 65, 0.15) !important;
  }

  /* Compact Service Grid with Proportional App Icons (7-9 tiles per row instead of 5 massive ones) */
  .service-grid-container {
    max-height: 380px !important;
    background: #F8FAF6 !important;
    border: 1px solid #EEF0EB !important;
    border-radius: 16px !important;
    padding: 12px !important;
    margin: 0 0 18px 0 !important;
  }

  .service-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)) !important;
    gap: 10px !important;
  }

  .service-card {
    aspect-ratio: 1 / 1 !important;
    max-width: 74px !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 14px !important;
    padding: 8px !important;
    background: #FFFFFF !important;
    border: 1.5px solid #EEF0EB !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
  }

  .service-card:hover {
    transform: translateY(-2px) !important;
    border-color: #347928 !important;
    box-shadow: 0 4px 12px rgba(52, 121, 40, 0.12) !important;
  }

  .service-card.active {
    border-color: #2FB141 !important;
    background: #F0FDF4 !important;
    box-shadow: 0 0 0 2px rgba(47, 177, 65, 0.25) !important;
  }

  .service-icon {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 8px !important;
  }

  /* Choose Rank Segmented Control */
  .rank-container {
    display: flex !important;
    gap: 8px !important;
    background: #F1F5F9 !important;
    padding: 4px !important;
    border-radius: 12px !important;
    max-width: fit-content !important;
    margin-top: 8px !important;
  }

  .rank-pill {
    padding: 7px 16px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    border: none !important;
    color: #475569 !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
  }

  .rank-pill.active {
    background: #FFFFFF !important;
    color: #15803D !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  }

  /* Country Selection */
  .country-grid-container {
    max-height: 420px !important;
    background: #F8FAF6 !important;
    border: 1px solid #EEF0EB !important;
    border-radius: 16px !important;
    padding: 10px !important;
    margin: 0 !important;
  }

  .country-card-wrapper {
    background: #FFFFFF !important;
    border: 1px solid #EEF0EB !important;
    border-radius: 12px !important;
    padding: 10px 12px !important;
    margin-bottom: 8px !important;
    transition: all 0.18s ease !important;
  }

  .country-card-wrapper:hover {
    border-color: rgba(52, 121, 40, 0.4) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  }

  .country-card-wrapper.selected {
    border-color: #2FB141 !important;
    background: #F0FDF4 !important;
    box-shadow: 0 0 0 2px rgba(47, 177, 65, 0.2) !important;
  }

  .country-icon {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
  }

  .btn-buy-country {
    background: linear-gradient(135deg, #2FB141 0%, #347928 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 6px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.18s ease !important;
  }

  .btn-buy-country:hover {
    box-shadow: 0 2px 8px rgba(47, 177, 65, 0.3) !important;
  }

  /* Buy Summary: Clean Order Summary Card (Replaces giant full-width black box) */
  .buy-summary {
    position: static !important;
    margin-top: 22px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .buy-summary-inner {
    background: #FFFFFF !important;
    border: 1.5px solid #EEF0EB !important;
    border-radius: 18px !important;
    padding: 18px 26px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
  }

  .summary-grid {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    flex: 1 !important;
  }

  .summary-title {
    margin: 0 0 4px 0 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #111827 !important;
  }

  .summary-subtitle {
    margin: 0 !important;
    font-size: 13px !important;
    color: #6B7280 !important;
  }

  .summary-price {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #347928 !important;
    margin-left: auto !important;
    padding-right: 16px !important;
  }

  .btn-buy {
    background: linear-gradient(135deg, #2FB141 0%, #347928 100%) !important;
    color: #FFFFFF !important;
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(47, 177, 65, 0.28) !important;
    cursor: pointer !important;
    width: auto !important;
    min-width: 170px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
  }

  .btn-buy:disabled {
    background: #E2E8F0 !important;
    color: #94A3B8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
  }

  /* Active Numbers Section: Responsive Grid & Compact Card Actions */
  #active-numbers-section {
    margin-top: 24px !important;
  }

  #card-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    gap: 18px !important;
  }

  .number-card {
    background: #FFFFFF !important;
    border: 1px solid #EEF0EB !important;
    border-radius: 18px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
  }

  .number-card-actions {
    display: flex !important;
    gap: 10px !important;
  }

  .number-card-actions .btn-action {
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    flex: 1 !important;
  }

  .copy-number-btn {
    padding: 11px 18px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    margin-top: 10px !important;
  }

  /* Active Numbers History (numbers.php) */
  .numbers-history-container {
    background: #F7F9F6 !important;
  }

  .desktop-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
  }

  /* Refer & Earn (refer.php) and Commission (commission.php) */
  .track-referrals-app,
  .commission-app-shell {
    background: #F7F9F6 !important;
  }

  .track-referrals-app .top-nav-bar,
  .commission-app-shell .top-nav-bar {
    position: static !important;
    background: transparent !important;
    padding: 0 0 20px 0 !important;
  }

  .referral-desktop-header-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 24px !important;
    align-items: stretch !important;
  }

  .track-referrals-app .promo-banner-card,
  .track-referrals-app .earnings-summary-card,
  .track-referrals-app .tab-panel-card,
  .commission-app-shell .promo-banner-card,
  .commission-app-shell .earnings-summary-card,
  .commission-app-shell .tab-panel-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .referral-desktop-header-grid .promo-banner-card,
  .referral-desktop-header-grid .earnings-summary-card {
    margin-bottom: 0 !important;
    height: 100% !important;
    box-sizing: border-box !important;
  }

  .track-referrals-app .nav-tabs-bar,
  .commission-app-shell .nav-tabs-bar {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Profile Page (profile.php) */
  .profile-container {
    background: #F7F9F6 !important;
  }

  .profile-header {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 24px !important;
    padding: 36px 24px !important;
    box-sizing: border-box !important;
  }

  .profile-actions {
    max-width: 600px !important;
    margin: -25px auto 0 auto !important;
  }

  .profile-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 28px 0 !important;
    margin: 0 !important;
  }

  .profile-desktop-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: start !important;
    width: 100% !important;
  }

  /* Legacy Page Wrapper Reset (api-tool.php) */
  .page-wrapper.compact-wrapper,
  .page-wrapper .page-body-wrapper {
    background: #F7F9F6 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   BREAKPOINT 1: PORTRAIT TABLET (768px - 899px) -> 200px Sidebar
   ========================================================================== */
@media (min-width: 768px) and (max-width: 899.98px) {
  .desktop-sidebar {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    padding: 18px 12px !important;
  }

  body > .desktop-topbar {
    margin-left: 200px !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
    padding: 20px 20px 4px 20px !important;
    box-sizing: border-box !important;
  }

  .desktop-main-canvas,
  .desktop-main-content,
  .desktop-canvas-container,
  .desktop-canvas-wrapper,
  .app-shell,
  .dashboard-container,
  .buy-shell,
  .fivesim-app-wrapper,
  .track-referrals-app,
  .commission-app-shell,
  .recharge-shell,
  .profile-container,
  .numbers-shell,
  .numbers-history-container,
  .page-wrapper .page-body,
  body > .row {
    margin-left: 200px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
    padding: 20px 20px 60px 20px !important;
    box-sizing: border-box !important;
  }

  .crypto-shell {
    margin-left: 200px !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
    padding: 0 0 60px 0 !important;
    box-sizing: border-box !important;
  }

  #paymentProviderModal,
  #korapayModal,
  #korapayMomoModal {
    left: 200px !important;
    width: calc(100% - 200px) !important;
    max-width: calc(100% - 200px) !important;
  }

  .desktop-canvas-wrapper > .app-shell,
  .desktop-canvas-wrapper > .desktop-canvas-container,
  .app-shell > .row {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  body > .desktop-topbar ~ .buy-shell,
  body > .desktop-topbar ~ .fivesim-app-wrapper,
  body > .desktop-topbar ~ .recharge-shell,
  body > .desktop-topbar ~ .numbers-history-container,
  body > .desktop-topbar ~ .app-shell,
  body > .desktop-topbar ~ .row {
    padding-top: 12px !important;
  }

  .desktop-dash-grid,
  .buy-desktop-columns,
  .referral-desktop-header-grid,
  .profile-desktop-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   BREAKPOINT 2: LANDSCAPE TABLET & LAPTOP (900px - 1279px) -> 220px Sidebar
   ========================================================================== */
@media (min-width: 900px) and (max-width: 1279.98px) {
  .desktop-sidebar {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    padding: 20px 14px !important;
  }

  body > .desktop-topbar {
    margin-left: 220px !important;
    width: calc(100% - 220px) !important;
    max-width: calc(100% - 220px) !important;
    padding: 24px 24px 4px 24px !important;
    box-sizing: border-box !important;
  }

  .desktop-main-canvas,
  .desktop-main-content,
  .desktop-canvas-container,
  .desktop-canvas-wrapper,
  .app-shell,
  .dashboard-container,
  .buy-shell,
  .fivesim-app-wrapper,
  .track-referrals-app,
  .commission-app-shell,
  .recharge-shell,
  .profile-container,
  .numbers-shell,
  .numbers-history-container,
  .page-wrapper .page-body,
  body > .row {
    margin-left: 220px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    width: calc(100% - 220px) !important;
    max-width: calc(100% - 220px) !important;
    padding: 24px 24px 60px 24px !important;
    box-sizing: border-box !important;
  }

  .crypto-shell {
    margin-left: 220px !important;
    width: calc(100% - 220px) !important;
    max-width: calc(100% - 220px) !important;
    padding: 0 0 60px 0 !important;
    box-sizing: border-box !important;
  }

  #paymentProviderModal,
  #korapayModal,
  #korapayMomoModal {
    left: 220px !important;
    width: calc(100% - 220px) !important;
    max-width: calc(100% - 220px) !important;
  }

  .desktop-canvas-wrapper > .app-shell,
  .desktop-canvas-wrapper > .desktop-canvas-container,
  .app-shell > .row {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  body > .desktop-topbar ~ .buy-shell,
  body > .desktop-topbar ~ .fivesim-app-wrapper,
  body > .desktop-topbar ~ .recharge-shell,
  body > .desktop-topbar ~ .numbers-history-container,
  body > .desktop-topbar ~ .app-shell,
  body > .desktop-topbar ~ .row {
    padding-top: 12px !important;
  }

  .desktop-dash-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 22px !important;
    align-items: start !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   BREAKPOINT 3: STANDARD DESKTOP (1280px - 1599px) -> 250px Sidebar
   ========================================================================== */
@media (min-width: 1280px) and (max-width: 1599.98px) {
  .desktop-sidebar {
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    padding: 24px 16px !important;
  }

  body > .desktop-topbar {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
    max-width: calc(100% - 250px) !important;
    padding: 28px 34px 4px 34px !important;
    box-sizing: border-box !important;
  }

  .desktop-main-canvas,
  .desktop-main-content,
  .desktop-canvas-container,
  .desktop-canvas-wrapper,
  .app-shell,
  .dashboard-container,
  .buy-shell,
  .fivesim-app-wrapper,
  .track-referrals-app,
  .commission-app-shell,
  .recharge-shell,
  .profile-container,
  .numbers-shell,
  .numbers-history-container,
  .page-wrapper .page-body,
  body > .row {
    margin-left: 250px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    width: calc(100% - 250px) !important;
    max-width: calc(100% - 250px) !important;
    padding: 28px 34px 60px 34px !important;
    box-sizing: border-box !important;
  }

  .crypto-shell {
    margin-left: 250px !important;
    width: calc(100% - 250px) !important;
    max-width: calc(100% - 250px) !important;
    padding: 0 0 60px 0 !important;
    box-sizing: border-box !important;
  }

  #paymentProviderModal,
  #korapayModal,
  #korapayMomoModal {
    left: 250px !important;
    width: calc(100% - 250px) !important;
    max-width: calc(100% - 250px) !important;
  }

  .desktop-canvas-wrapper > .app-shell,
  .desktop-canvas-wrapper > .desktop-canvas-container,
  .app-shell > .row {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  body > .desktop-topbar ~ .buy-shell,
  body > .desktop-topbar ~ .fivesim-app-wrapper,
  body > .desktop-topbar ~ .recharge-shell,
  body > .desktop-topbar ~ .numbers-history-container,
  body > .desktop-topbar ~ .app-shell,
  body > .desktop-topbar ~ .row {
    padding-top: 12px !important;
  }

  .desktop-dash-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 380px !important;
    gap: 28px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .buy-desktop-columns {
    grid-template-columns: minmax(0, 1.35fr) 420px !important;
    gap: 32px !important;
  }
}

/* ==========================================================================
   BREAKPOINT 4: EXTRA LARGE / ULTRA-WIDE (>= 1600px) -> 270px Sidebar
   ========================================================================== */
@media (min-width: 1600px) {
  .desktop-sidebar {
    width: 270px !important;
    min-width: 270px !important;
    max-width: 270px !important;
    padding: 28px 20px !important;
  }

  body > .desktop-topbar {
    margin-left: 270px !important;
    width: calc(100% - 270px) !important;
    max-width: calc(100% - 270px) !important;
    padding: 32px 42px 4px 42px !important;
    box-sizing: border-box !important;
  }

  .desktop-main-canvas,
  .desktop-main-content,
  .desktop-canvas-container,
  .desktop-canvas-wrapper,
  .app-shell,
  .dashboard-container,
  .buy-shell,
  .fivesim-app-wrapper,
  .track-referrals-app,
  .commission-app-shell,
  .recharge-shell,
  .profile-container,
  .numbers-shell,
  .numbers-history-container,
  .page-wrapper .page-body,
  body > .row {
    margin-left: 270px !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    width: calc(100% - 270px) !important;
    max-width: calc(100% - 270px) !important;
    padding: 32px 42px 60px 42px !important;
    box-sizing: border-box !important;
  }

  .crypto-shell {
    margin-left: 270px !important;
    width: calc(100% - 270px) !important;
    max-width: calc(100% - 270px) !important;
    padding: 0 0 60px 0 !important;
    box-sizing: border-box !important;
  }

  #paymentProviderModal,
  #korapayModal,
  #korapayMomoModal {
    left: 270px !important;
    width: calc(100% - 270px) !important;
    max-width: calc(100% - 270px) !important;
  }

  .desktop-canvas-wrapper > .app-shell,
  .desktop-canvas-wrapper > .desktop-canvas-container,
  .app-shell > .row {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  body > .desktop-topbar ~ .buy-shell,
  body > .desktop-topbar ~ .fivesim-app-wrapper,
  body > .desktop-topbar ~ .recharge-shell,
  body > .desktop-topbar ~ .numbers-history-container,
  body > .desktop-topbar ~ .app-shell,
  body > .desktop-topbar ~ .row {
    padding-top: 12px !important;
  }

  .desktop-dash-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 420px !important;
    gap: 32px !important;
    align-items: start !important;
    width: 100% !important;
  }

  .buy-desktop-columns {
    grid-template-columns: minmax(0, 1.4fr) 440px !important;
    gap: 32px !important;
  }
}

/* ============================================================
   DESKTOP SPLIT-SCREEN AUTH LAYOUT (Login, Register, Forgot)
   ============================================================ */
@media (max-width: 767px) {
  .desktop-auth-left {
    display: none !important;
  }
  .desktop-auth-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .desktop-auth-right {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .desktop-only-auth {
    display: none !important;
  }
}

@media (min-width: 768px) {
  body.desktop-auth-body {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #f8faf9 !important;
  }

  .mobile-only-auth {
    display: none !important;
  }

  .desktop-auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
  }

  .desktop-auth-left {
    background: linear-gradient(145deg, #347928 0%, #24571c 100%);
    padding: 48px 56px;
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #ffffff;
  }

  /* Subtle concentric circles bottom-right (matching reference pattern) */
  .desktop-auth-left::before,
  .desktop-auth-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
  }
  .desktop-auth-left::before {
    width: 440px;
    height: 440px;
    bottom: -160px;
    right: -120px;
  }
  .desktop-auth-left::after {
    width: 300px;
    height: 300px;
    bottom: -110px;
    right: -60px;
  }

  .desktop-auth-left-body {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: auto 0;
    padding: 32px 0;
  }

  .desktop-auth-headline {
    font-size: clamp(32px, 3.2vw, 46px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: #ffffff;
    margin: 0 0 14px 0;
  }

  .desktop-auth-subtext {
    font-size: 15.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    max-width: 420px;
  }

  .desktop-auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 2;
  }

  .desktop-auth-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.94);
  }

  .desktop-auth-feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    color: #2d6a2e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
  }

  .desktop-auth-right {
    background: #f8faf9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    min-height: 100vh;
  }

  .desktop-auth-card {
    width: 100%;
    max-width: 420px !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
  }

  .desktop-auth-card .input-wrapper {
    background: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
  }
  .desktop-auth-card .input-wrapper:focus-within {
    border-color: #2d6a2e !important;
    box-shadow: 0 0 0 3px rgba(45, 106, 46, 0.1) !important;
  }

  .desktop-auth-card .btn-submit {
    border-radius: 999px !important;
    padding: 14px 24px !important;
    font-size: 15px !important;
    background: linear-gradient(135deg, #347928 0%, #24571c 100%) !important;
  }
}
