/* ========================================
   RESPONSIVE MERGED CSS - Selcom Business Theme
   Combined: responsive.css + media-queries.css + mobile-desktop-toggle.css
   ======================================== */

/* ========================================
   MOBILE NAVIGATION SIDEBAR
   ======================================== */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--primary-color);
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
    /* box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); */
}

.mobile-nav-sidebar.show {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-logo img {
    height: 40px;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav-content {
    padding: 0;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mobile-user-info {
    color: white;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 2px;
}

.mobile-user-email {
    font-size: 0.75rem;
    opacity: 0.8;
}

.mobile-nav-links {
    padding: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 30px;
}

.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
    font-weight: 600;
}

.mobile-nav-link i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
}

/* Prevent body scroll when mobile nav is open */
body.mobile-nav-open {
    overflow: hidden;
}

/* ========================================
   MOBILE BALANCE CARDS
   ======================================== */
.mobile-balance-cards {
    display: none;
    margin-bottom: 5px;
    padding: 0 15px;
}

.mobile-balance-card {
    background: linear-gradient(135deg, var(--secondary-color), #66BB6A);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: left;
    /* box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15); */
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-balance-card.mobile-balance-orange {
    background: linear-gradient(135deg, var(--warning-color), #FFB74D) !important;
    /* box-shadow: 0 4px 20px rgba(255, 152, 0, 0.15) !important; */
}

.mobile-balance-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 500;
}

.mobile-balance-amount {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.1;
}

.mobile-balance-account {
    font-size: 0.6875rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Fade in down animation for mobile balance cards */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   MOBILE/DESKTOP VIEW TOGGLE SYSTEM
   ======================================== */

/* Default: Hide mobile view, show desktop view */
.mobile-view {
    display: none !important;
}

.desktop-view {
    display: block !important;
}

/* ========================================
   MEDIA QUERIES - DESKTOP AND LARGE SCREENS
   ======================================== */

/* Hide mobile navigation elements on screens 992px and above, EXCEPT iPad Pro 12.9" */
@media (min-width: 992px) and not (screen and (width: 1024px) and (height: 1366px)) and not (screen and (width: 1366px) and (height: 1024px)) {
    .mobile-nav-toggle {
        display: none !important;
    }
    
    .mobile-nav-overlay,
    .mobile-nav-sidebar {
        display: none !important;
    }
    
    /* Always hide mobile balance cards on desktop */
    .mobile-balance-cards {
        display: none !important;
    }
}

/* Desktop Large (min-width: 1200px and max-width: 1430px) */
@media (min-width: 1200px) and (max-width: 1430px) {
    .container-fluid {
        max-width: 1400px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .navbar-balance-card {
        min-width: 260px;
        max-width: 280px;
    }
    
    .dashboard-card {
        padding: 28px;
    }
    
    .main-container {
        padding: 2rem 0;
    }
    
    .navbar-custom {
        padding: 0;
    }
    
    .fund-transfer-container {
        gap: 2rem;
    }
    
    .chart-container {
        height: 450px;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 300px !important;
        max-height: 300px !important;
        width: 300px !important;
        height: 300px !important;
    }
}

/* ========================================
   LARGE TABLETS AND SMALL DESKTOPS
   (992px - 1199px)
   ======================================== */
@media (max-width: 1199px) {
    .navbar-balance-card {
        min-width: 240px;
    }
    
    .navbar-balance-amount {
        font-size: 1.5rem;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .legend-label {
        font-size: 0.9375rem;
    }
    
    .legend-amount {
        font-size: 0.875rem;
    }
}

/* Show mobile navigation elements below 992px OR on iPad Pro 12.9" */
@media (max-width: 991px), 
       (screen and (width: 1024px) and (height: 1366px)), 
       (screen and (width: 1366px) and (height: 1024px)) {
    .mobile-nav-toggle {
        display: block !important;
    }
    
    /* Hide the desktop navigation menu below 992px */
    .navbar-nav.mx-auto {
        display: none !important;
    }
    
    /* Always show mobile balance cards below 992px */
    .mobile-balance-cards {
        display: block !important;
        animation: fadeInDown 0.4s ease;
    }
    
    /* Hide navbar row 2 (desktop balance cards) */
    .navbar-row-2 {
        display: none !important;
    }
}

/* ========================================
   MEDIUM SCREENS - TABLETS
   (768px - 991px)
   ======================================== */
@media (max-width: 991px) {
    .navbar-row-2 {
        display: none !important;
    }
    
    .customize-theme-container {
        display: none !important;
    }
    
    .fund-transfer-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        border: none;
        background: transparent;
    }
    
    .transfer-divider {
        display: none;
    }
    
    .transfer-section {
        padding: 20px;
        border: none;
        background: white;
        /* border-radius: 8px; */
        margin: 1px;
        transition: background-color 0.2s ease;
    }
    
    .transfer-section:hover {
        background: var(--gray-50);
    }
    
    .transfer-section:nth-child(odd) {
        /* border-right: 1px solid var(--gray-200); */
        border-bottom: 1px solid var(--gray-200);
    }
    
    .transfer-section:nth-child(even) {
        border-bottom: 1px solid var(--gray-200);
    }
    
    .combined-sections-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .vertical-divider {
        width: 100%;
        height: 2px;
        margin: 0;
    }
    
    .section-half {
        padding: 0;
    }
    
    .chart-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .pie-chart-wrapper {
        width: 100%;
        padding: 20px 20px 10px 20px;
    }
    
    .chart-legend {
        width: 100%;
        padding: 10px 20px 20px 20px;
    }
    
    .biller-row {
        gap: 15px;
        justify-content: center;
    }
    
    .biller-item {
        flex: 0 0 calc(16.66% - 15px);
        min-width: 80px;
    }
}

/* CRITICAL FIX: Approve/Reject buttons for 991px-1024px width range */
@media only screen and (min-width: 991px) and (max-width: 1024px) {
    .approval-actions .btn-approve,
    .approval-actions .btn-reject,
    .request-actions .btn-approve,
    .request-actions .btn-reject {
        padding: 7px 15px !important;
        font-size: 0.75rem !important;
        min-width: 95px !important;
        width: 95px !important;
        height: auto !important;
    }
    
    .card-request-item .btn-approve,
    .card-request-item .btn-reject {
        padding: 7px 15px !important;
        font-size: 0.75rem !important;
        min-width: 95px !important;
        width: 95px !important;
        height: auto !important;
    }
    
    /* Fix Fund Spending Overview legend styling */
    .chart-container {
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        height: 100% !important;
        flex-direction: row !important;
    }
    
    .pie-chart-wrapper {
        width: 50% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 25px !important;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 300px !important;
        max-height: 300px !important;
        width: 300px !important;
        height: 300px !important;
    }
    
    .chart-legend {
        width: 50% !important;
        padding: 25px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    
    .legend-item {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid var(--gray-100) !important;
        background: transparent !important;
        border-radius: 0 !important;
        transition: none !important;
    }
    
    .legend-item:last-child {
        border-bottom: none !important;
    }
    
    .legend-item:hover {
        background: transparent !important;
        transform: none !important;
    }
    
    .legend-dot {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }
    
    .legend-text {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0 !important;
    }
    
    .legend-label {
        font-size: 1rem !important;
        color: #667085 !important;
        font-weight: 400 !important;
        flex: 1 !important;
    }
    
    .legend-amount {
        font-weight: 600 !important;
        color: #000000 !important;
        font-size: 0.875rem !important;
        white-space: nowrap !important;
    }
    
    .dashboard-card.chart-card {
        height: 380px !important;
    }
}

/* ========================================
   SMALL TABLETS AND LARGE PHONES
   (576px - 767px)
   ======================================== */
@media (max-width: 767px) {
    .main-container {
        padding: 15px 0;
    }
    
    .navbar-custom {
        padding: 1rem 0 1rem 0;
    }
    
    .navbar-row-1 {
        margin-bottom: 15px;
    }
    
    .navbar-nav {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 10px;
        margin-top: 15px;
    }
    
    .navbar-nav .nav-link {
        margin: 2px 0;
        padding: 8px 12px !important;
    }
    
    .user-profile {
        margin-top: 10px;
        justify-content: center;
    }
    
    .balance-card, .transfer-card {
        height: auto;
        min-height: 100px;
    }
    
    .balance-amount {
        font-size: 1.5rem;
    }
    
    .fund-transfer-container {
        display: flex;
        flex-direction: column;
        gap: 0;
        border: none;
        background: transparent;
    }
    
    .transfer-divider {
        display: none;
    }
    
    .transfer-section {
        padding: 16px 24px;
        min-height: 80px;
        border: none;
        border-bottom: 1px solid var(--gray-200);
        background: white;
        border-radius: 0;
        margin-bottom: 0;
        transition: background-color 0.2s ease;
    }
    
    .transfer-section:hover {
        background: var(--gray-50);
    }
    
    .transfer-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .dashboard-card.transactions-card {
        height: auto !important;
        max-height: none !important;
    }
    
    .approval-item, .expense-item, .card-request-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-right: 0;
        position: relative;
    }
    
    .approval-user, .request-user {
        width: 100%;
    }
    
    .approval-date {
        align-self: flex-start;
        text-align: left;
        min-width: auto;
    }
    
    .approval-amount, .request-amount, .expense-amount {
        margin: 0;
        align-self: flex-start;
        min-width: auto;
    }
    
    .approval-actions, .request-actions {
        position: relative;
        right: auto;
        align-self: flex-end;
        margin-right: 0;
    }
    
    .transaction-table-container {
        overflow-x: auto;
    }
    
    .transaction-table {
        min-width: 600px;
    }
    
    .chart-filters {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .chart-filters .btn {
        flex: 1;
        min-width: 60px;
    }
    
    .dashboard-card.chart-card {
        height: auto;
        min-height: 400px;
    }
    
    .line-chart-container {
        max-height: 250px;
    }
    
    .biller-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .biller-item {
        flex: 1;
        padding: 15px 10px;
        margin: 0;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-select-sm {
        width: 100%;
        max-width: 200px;
    }
    
    /* MOBILE VIEW (max-width: 767px) - Hide desktop, show mobile */
    .desktop-view {
        display: none !important;
    }

    .mobile-view {
        display: block !important;
        background: var(--primary-color) !important;
        color: white !important;
        height: 100vh;
        overflow: hidden;
    }
    
    body {
        overflow: hidden;
    }
}

/* Mobile First - Small devices (max-width: 766px) */
@media (max-width: 766px) {
    .desktop-view {
        display: none !important;
    }

    .mobile-view {
        display: block !important;
        background-color: #FFF;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }
    
    /* Fix mobile view centering and content issues */
    .mobile-view .container-fluid {
        padding: 20px 15px;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-view .row {
        width: 100%;
        margin: 0;
        justify-content: center !important;
        align-items: center !important;
        min-height: auto !important;
    }
    
    .mobile-view .col-sm-2 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px;
    }
    
    .mobile-view .text-center {
        text-align: center !important;
        max-width: 400px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .mobile-view img {
        max-width: 120px !important;
        height: auto !important;
        margin-bottom: 20px !important;
    }
    
    .mobile-view h2 {
        font-size: 1.5rem !important;
        margin-bottom: 16px !important;
        color: #333 !important;
        font-weight: 600 !important;
    }
    
    .mobile-view p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        color: #666 !important;
        margin-bottom: 12px !important;
    }
    
    /* Fix body scroll on mobile view */
    body {
        overflow-x: hidden;
    }
}

/* Apply exact same mobile view styling from mobile-desktop-toggle.css for all devices below 767px */
@media (max-width: 766px) {
    .desktop-view {
        display: none !important;
    }

    .mobile-view {
        display: block !important;
        background-color: var(--primary-color) !important;
        background-image: url('../../img/login-bg.svg') !important;
        color: white !important;
        height: 100vh;
        overflow: hidden;
        background-size: cover !important;
        background-position: center !important;
    }
    
    /* Ensure all text elements inside mobile-view are white */
    .mobile-view * {
        color: white !important;
    }
    
    .mobile-view h1,
    .mobile-view h2,
    .mobile-view h3,
    .mobile-view h4,
    .mobile-view h5,
    .mobile-view h6 {
        color: white !important;
    }
    
    .mobile-view p {
        color: white !important;
    }
    
    .mobile-view span,
    .mobile-view div,
    .mobile-view a {
        color: white !important;
    }
    
    body {
        overflow: hidden;
    }
}

/* ========================================
   MOBILE PHONES
   (max-width: 576px)
   ======================================== */
@media (max-width: 576px) {
    /* Mobile Navigation Adjustments */
    .mobile-nav-sidebar {
        width: 260px;
        left: -260px;
    }
    
    /* Mobile Balance Cards Adjustments - Single card per row */
    .mobile-balance-cards {
        padding: 0 8px;
        margin-bottom: 16px;
    }
    
    .mobile-balance-cards .row {
        margin-left: -8px !important;
        margin-right: -8px !important;
    }
    
    .mobile-balance-cards .col-12 {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
    
    .mobile-balance-card {
        padding: 18px;
        height: 95px;
        width: 100%;
        margin-bottom: 0;
    }
    
    .mobile-balance-label {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .mobile-balance-amount {
        font-size: 1.125rem;
        margin-bottom: 2px;
    }
    
    .mobile-balance-account {
        font-size: 0.6875rem;
    }
    
    .mobile-nav-header {
        padding: 15px;
    }
    
    .mobile-nav-logo img {
        height: 35px;
    }
    
    .mobile-nav-close {
        font-size: 1.125rem;
    }
    
    .mobile-user-profile {
        padding: 15px;
    }
    
    .mobile-user-avatar img {
        width: 45px;
        height: 45px;
    }
    
    .mobile-user-name {
        font-size: 0.9375rem;
    }
    
    .mobile-nav-link {
        padding: 14px 15px;
        font-size: 0.875rem;
    }
    
    .mobile-nav-link:hover {
        padding-left: 25px;
    }

    .main-container {
        padding: 10px 0;
    }
    
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .dashboard-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .navbar-custom {
        padding: 0.8rem 0;
    }
    
    .navbar-row-1 {
        margin-bottom: 10px;
    }
    
    .logo {
        height: 40px;
    }
    
    .user-avatar img {
        width: 28px;
        height: 28px;
    }
    
    .user-name {
        font-size: 0.8125rem;
    }
    
    .user-email {
        font-size: 0.6875rem;
    }
    
    .sub-heading {
        font-size: 1rem !important;
    }
    
    .balance-card, .transfer-card {
        padding: 20px;
        height: auto;
        min-height: 120px;
    }
    
    .balance-amount {
        font-size: 1.375rem;
    }
    
    .transfer-section {
        padding: 15px 16px;
        min-height: 70px;
        border: none;
        border-bottom: 1px solid var(--gray-200) !important;
        background: white;
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .transfer-section:last-child {
        border-bottom: none !important;
        margin-bottom: 0;
    }
    
    .transfer-title {
        font-size: 0.9375rem;
    }
    
    .transfer-desc {
        font-size: 0.8125rem;
    }
    
    .transfer-icon-img {
        width: 40px;
        height: 40px;
    }
    
    .approval-item, .expense-item, .card-request-item {
        padding: 12px 0;
        gap: 8px;
    }
    
    .user-avatar-sm {
        width: 35px;
        height: 35px;
        font-size: 0.8125rem;
    }
    
    .title1 {
        font-size: 0.9375rem;
    }
    
    .sub-title1 {
        font-size: 0.8125rem;
    }
    
    .approval-date-day,
    .approval-date-time,
    .transaction-date-day,
    .transaction-date-time {
        font-size: 0.8125rem;
    }
    
    .approval-amount, .request-amount {
        font-size: 0.9375rem;
    }
    
    .expense-amount {
        font-size: 1rem;
        min-width: 100px;
    }
    
    .expense-date {
        font-size: 0.75rem;
        padding: 6px 10px;
        min-width: 90px;
    }
    
    .btn-approve, .btn-reject {
        padding: 6px 12px;
        font-size: 0.6875rem;
        min-width: 80px !important;
        width: 80px !important;
    }
    
    .card-request-item .btn-approve,
    .card-request-item .btn-reject {
        padding: 6px 12px;
        font-size: 0.6875rem;
        min-width: 80px !important;
        width: 80px !important;
    }
    
    .transaction-table {
        min-width: 500px;
    }
    
    .transaction-row td {
        padding: 12px 8px;
    }
    
    .transaction-amount {
        font-size: 0.875rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .form-select-sm {
        width: 100%;
        max-width: 180px;
        font-size: 0.6875rem;
        padding: 5px 25px 5px 10px;
    }
    
    .chart-filters {
        width: 100%;
        gap: 4px;
    }
    
    .chart-filters .btn {
        flex: 1;
        font-size: 0.6875rem;
        padding: 6px 8px;
    }
    
    .dashboard-card.chart-card {
        height: auto;
        min-height: 350px;
        padding: 16px 12px;
    }
    
    .pie-chart-wrapper {
        padding: 15px;
        max-height: 200px;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 180px !important;
        max-height: 180px !important;
        width: 180px !important;
        height: 180px !important;
    }
    
    .chart-legend {
        padding: 15px;
        gap: 8px;
    }
    
    .legend-item {
        padding: 8px 0;
    }
    
    .legend-label {
        font-size: 0.875rem;
    }
    
    .legend-amount {
        font-size: 0.8125rem;
    }
    
    .line-chart-container {
        max-height: 200px;
        padding: 10px;
    }
    
    .biller-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }
    
    .biller-item {
        flex: 0 0 calc(33.33% - 8px);
        padding: 12px 8px;
        min-width: 90px;
    }
    
    .biller-icon {
        width: 35px;
        height: 35px;
        margin-bottom: 6px;
    }
    
    .biller-icon img {
        width: 50px;
        height: 50px;
    }
    
    .biller-name {
        font-size: 0.75rem;
        margin-top: 8px;
    }
    
    .expense-card-icon img {
        width: 40px;
        height: 40px;
    }
    
    .expense-card-icon {
        width: 40px;
        height: 25px;
    }
    
    /* Navigation collapse for mobile */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        padding: 15px;
        margin-top: 15px;
    }
    
    .navbar-nav .nav-link.nav-item-custom {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
    
    /* Mobile-specific utility classes */
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-show {
        display: block !important;
    }
    
    /* Adjust spacing for mobile */
    .row {
        margin-left: -8px;
        margin-right: -8px;
    }
    
    .row > * {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .dashboard-card {
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .sub-heading {
        font-size: 0.9375rem !important;
    }
    
    .mobile-balance-cards {
        padding: 0 8px;
        margin-bottom: 16px;
    }
    
    .mobile-balance-card {
        padding: 16px;
        height: 90px;
        width: 100%;
    }
    
    .transfer-section {
        padding: 12px;
        min-height: 60px;
        border-bottom: 1px solid var(--gray-200) !important;
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .transfer-title {
        font-size: 0.875rem;
    }
    
    .transfer-desc {
        font-size: 0.75rem;
    }
}

/* ========================================
   EXTRA SMALL DEVICES
   (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    /* Mobile Balance Cards for Extra Small Screens - Single card per row */
    .mobile-balance-cards {
        padding: 0 6px;
        margin-bottom: 12px;
    }
    
    .mobile-balance-cards .row {
        margin-left: -6px !important;
        margin-right: -6px !important;
    }
    
    .mobile-balance-cards .col-12 {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }
    
    .mobile-balance-card {
        padding: 16px;
        height: 90px;
        width: 100%;
    }
    
    .mobile-balance-label {
        font-size: 0.6875rem;
        margin-bottom: 3px;
    }
    
    .mobile-balance-amount {
        font-size: 1rem;
        margin-bottom: 2px;
    }
    
    .mobile-balance-account {
        font-size: 0.625rem;
    }
    
    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .dashboard-card {
        padding: 12px;
    }
    
    .logo {
        height: 35px;
    }
    
    .user-name {
        font-size: 0.75rem;
    }
    
    .user-email {
        font-size: 0.625rem;
    }
    
    .sub-heading {
        font-size: 0.9375rem !important;
    }
    
    .transfer-section {
        padding: 12px;
        min-height: 60px;
        border: none;
        border-bottom: 1px solid var(--gray-200) !important;
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .transfer-section:last-child {
        border-bottom: none !important;
        margin-bottom: 0;
    }
    
    .transfer-title {
        font-size: 0.875rem;
    }
    
    .transfer-desc {
        font-size: 0.75rem;
    }
    
    .transfer-icon-img {
        width: 35px;
        height: 35px;
    }
    
    .user-avatar-sm {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    
    .title1 {
        font-size: 0.875rem;
    }
    
    .sub-title1 {
        font-size: 0.75rem;
    }
    
    .btn-approve, .btn-reject {
        padding: 5px 10px;
        font-size: 0.625rem;
        min-width: 70px !important;
        width: 70px !important;
    }
    
    .card-request-item .btn-approve,
    .card-request-item .btn-reject {
        padding: 5px 10px;
        font-size: 0.625rem;
        min-width: 70px !important;
        width: 70px !important;
    }
    
    .biller-item {
        flex: 0 0 calc(50% - 8px);
        padding: 10px 6px;
    }
    
    .biller-icon {
        width: 30px;
        height: 30px;
    }
    
    .biller-icon img {
        width: 40px;
        height: 40px;
    }
    
    .biller-name {
        font-size: 0.6875rem;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 150px !important;
        max-height: 150px !important;
        width: 150px !important;
        height: 150px !important;
    }
    
    .legend-label {
        font-size: 0.8125rem;
    }
    
    .legend-amount {
        font-size: 0.75rem;
    }
}

/* ========================================
   ULTRA SMALL DEVICES
   (max-width: 360px)
   ======================================== */
@media (max-width: 360px) {
    /* Mobile Balance Cards for Ultra Small Screens - Single card per row */
    .mobile-balance-cards {
        padding: 0 5px;
        margin-bottom: 10px;
    }
    
    .mobile-balance-cards .row {
        margin-left: -5px !important;
        margin-right: -5px !important;
    }
    
    .mobile-balance-cards .col-12 {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    .mobile-balance-card {
        padding: 14px;
        height: 85px;
        width: 100%;
    }
    
    .mobile-balance-label {
        font-size: 0.625rem;
        margin-bottom: 2px;
    }
    
    .mobile-balance-amount {
        font-size: 0.9375rem;
        margin-bottom: 1px;
    }
    
    .mobile-balance-account {
        font-size: 0.5625rem;
    }
    
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .dashboard-card {
        padding: 10px;
    }
    
    .navbar-custom {
        padding: 0.6rem 0;
    }
    
    .logo {
        height: 30px;
    }
    
    .user-avatar img {
        width: 24px;
        height: 24px;
    }
    
    .transfer-section {
        padding: 10px;
        min-height: 55px;
        border: none;
        border-bottom: 1px solid var(--gray-200) !important;
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .transfer-section:last-child {
        border-bottom: none !important;
        margin-bottom: 0;
    }
    
    .transfer-icon-img {
        width: 30px;
        height: 30px;
    }
    
    .approval-item, .expense-item, .card-request-item {
        padding: 10px 0;
    }
    
    .biller-item {
        padding: 8px 4px;
    }
    
    .biller-icon img {
        width: 35px;
        height: 35px;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 120px !important;
        max-height: 120px !important;
        width: 120px !important;
        height: 120px !important;
    }
    
    .chart-legend {
        padding: 10px;
    }
}

/* ========================================
   ENHANCED TABLET EXPERIENCE
   (767px - 1024px)
   ======================================== */

/* Large Tablets and Small Laptops (768px - 1024px) */
@media (min-width: 767px) and (max-width: 1024px) {
    /* Ensure desktop view is shown */
    .desktop-view {
        display: block !important;
    }
    
    .mobile-view {
        display: none !important;
    }
    
    /* Enhanced spacing for tablets */
    .container-fluid {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    /* Improve card layouts for tablet */
    .dashboard-card {
        padding: 24px;
        margin-bottom: 20px;
    }
    
    /* Better navigation spacing */
    .navbar-custom {
        padding: 1.2rem 0;
    }
    
    .main-container {
        padding: 1.5rem 0;
    }
    
    /* Optimize text sizes for tablet reading */
    .balance-amount {
        font-size: 1.75rem;
    }
    
    .transfer-title {
        font-size: 1.125rem;
    }
    
    .transfer-desc {
        font-size: 0.875rem;
    }
    
    /* Better button sizing for touch */
    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 8px 16px;
        font-size: 0.8125rem;
    }
}

/* Medium Tablets (768px - 991px) - Override previous styles */
@media (min-width: 767px) and (max-width: 991px) {
    /* Ensure consistent horizontal spacing for tablet view */
    .container-fluid {
        padding-left: 1.5rem !important; /* Match px-4 */
        padding-right: 1.5rem !important; /* Match px-4 */
    }
    
    /* Remove extra padding from mobile balance cards to match other sections */
    .mobile-balance-cards {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* Reset row margins to default bootstrap behavior for tablet */
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-12 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Make Fund Transfer section same as desktop on tablet view */
    .fund-transfer-container {
        display: flex !important;
        align-items: stretch !important;
        grid-template-columns: unset !important;
        gap: 0 !important;
    }
    
    .transfer-section {
        flex: 1 !important;
        padding: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        min-height: 120px !important;
        border: none !important;
        border-radius: 0 !important;
        background: white !important;
        margin: 0 !important;
    }
    
    .transfer-section:hover {
        background: var(--gray-50) !important;
        border-radius: 8px !important;
    }
    
    .transfer-divider {
        display: block !important;
        width: 1px !important;
        background: var(--gray-200) !important;
        margin: 20px 0 !important;
    }
    
    /* Make Fund Spending Overview same as desktop on tablet view */
    .chart-container {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        height: 100% !important;
        flex: 1 !important;
        flex-direction: row !important;
    }
    
    .pie-chart-wrapper {
        width: 50% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 20px 20px 20px 0px !important;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 300px !important;
        max-height: 300px !important;
        width: 300px !important;
        height: 300px !important;
    }
    
    .chart-legend {
        width: 50% !important;
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    
    .legend-item {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid var(--gray-100) !important;
        background: transparent !important;
        border-radius: 0 !important;
        /* box-shadow: none !important; */
        transition: none !important;
    }
    
    .legend-item:last-child {
        border-bottom: none !important;
    }
    
    .legend-item:hover {
        background: transparent !important;
        /* box-shadow: none !important; */
        transform: none !important;
    }
    
    .legend-dot {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        /* box-shadow: none !important; */
    }
    
    .legend-text {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0 !important;
    }
    
    .legend-label {
        font-size: 1.0625rem !important;
        color: #667085 !important;
        font-weight: 400 !important;
        flex: 1 !important;
    }
    
    .legend-amount {
        font-weight: 600 !important;
        color: #000000 !important;
        font-size: 0.9375rem !important;
        white-space: nowrap !important;
    }
    
    /* Set chart card height for tablet view */
    .dashboard-card.chart-card {
        height: 400px !important;
    }
    
    .navbar-container {
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
    }
    
    .navbar-custom {
        padding: 0; /* Remove default padding, let container handle it */
    }
    
    .main-container {
        padding: 1.2rem 0; /* Match navbar top/bottom spacing */
    }
    
    /* Fix approve/reject buttons in Awaiting Approvals section for tablet view */
    .approval-actions .btn-approve,
    .approval-actions .btn-reject {
        padding: 7px 15px !important;
        font-size: 0.75rem !important;
        min-width: 95px !important;
        width: 95px !important;
        height: auto !important;
    }
}

/* ========================================
   IPAD PRO 12.9" CUSTOM NAVBAR OVERRIDE
   Force tablet navigation instead of desktop
   ======================================== */
@media screen and (width: 1024px) and (height: 1366px),
       screen and (width: 1366px) and (height: 1024px) {
    /* Force hide desktop navigation elements */
    .navbar-nav.mx-auto {
        display: none !important;
    }
    
    .navbar-row-2 {
        display: none !important;
    }
    
    /* Force show mobile/tablet navigation elements */
    .mobile-nav-toggle {
        display: block !important;
    }
    
    .mobile-nav-overlay {
        display: block !important;
    }
    
    .mobile-nav-sidebar {
        display: block !important;
    }
    
    /* Force show mobile balance cards */
    .mobile-balance-cards {
        display: block !important;
        animation: fadeInDown 0.4s ease;
    }
    
    /* Ensure proper navbar layout for tablet view */
    .navbar-row-1 {
        justify-content: space-between !important;
    }
    
    .navbar-brand {
        flex-shrink: 0 !important;
    }
    
    .user-profile {
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Force single column layout for all dashboard sections */
    .col-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Override Bootstrap's col-lg-6 class specifically */
    .row .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Ensure proper spacing between stacked sections */
    .dashboard-card {
        margin-bottom: 1rem !important;
        width: 100% !important;
    }
    
    /* Force row to display as column */
    .row {
        flex-direction: column !important;
    }
}

/* ========================================
   IPAD PRO 12.9 INCH FIX (1024px width)
   Fix container width utilization
   ======================================== */
@media (min-width: 1024px) and (max-width: 1024px) {
    /* Force all containers to use full width */
    .container-fluid {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        margin: 0 !important;
    }
    
    .main-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 1.2rem 0 !important;
    }
    
    .main-container .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    /* Fix navbar container */
    .navbar-container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    /* Fix any Bootstrap container restrictions */
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Ensure body uses full width */
    body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Fix any row margins */
    .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .row > * {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Optimize navbar menu for iPad Pro 12.9 inch */
    .navbar-nav {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0.8rem !important;
        font-size: 0.875rem !important;
        white-space: nowrap !important;
        min-width: auto !important;
    }
    
    /* Adjust navbar balance cards for better fit */
    .navbar-balance-card {
        min-width: 200px !important;
        max-width: 220px !important;
        padding: 12px 16px !important;
        margin-right: 1rem !important;
    }
    
    .navbar-balance-amount {
        font-size: 1.375rem !important;
    }
    
    .navbar-balance-label {
        font-size: 0.6875rem !important;
    }
    
    .navbar-balance-account {
        font-size: 0.625rem !important;
    }
    
    /* User profile adjustments */
    .user-profile {
        margin-left: auto !important;
        flex-shrink: 0 !important;
    }
    
    .user-name {
        font-size: 0.8125rem !important;
    }
    
    .user-email {
        font-size: 0.6875rem !important;
    }
    
    /* Logo adjustments */
    .logo {
        height: 38px !important;
    }
    
    /* Navbar row spacing */
    .navbar-row-1 {
        gap: 1rem !important;
    }
    
    .navbar-row-2 {
        margin-top: 1rem !important;
    }
}

/* ========================================
   TABLET SPECIFIC MEDIA QUERIES
   ======================================== */

/* CRITICAL FIX: Force single row layout for mobile balance cards on tablets only */
@media only screen and (min-width: 600px) and (max-width: 991px) {
    .mobile-balance-cards {
        display: block !important;
    }
    
    .mobile-balance-cards .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6,
    .mobile-balance-cards .col-12 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        margin-bottom: 1rem !important;
    }
    
    .mobile-balance-card {
        width: 100% !important;
        display: block !important;
    }
}

/* SPECIFIC iPad DEVICE FIXES - Only show mobile balance cards when navbar menu is hidden */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px),
       only screen and (min-device-width: 834px) and (max-device-width: 1112px),
       only screen and (min-device-width: 834px) and (max-device-width: 1194px),
       only screen and (width: 1024px) and (height: 1366px),
       only screen and (width: 1366px) and (height: 1024px) {
    
    /* Show mobile balance cards only when desktop navbar is hidden */
    .mobile-balance-cards {
        display: block !important;
    }
    
    .mobile-balance-cards .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6,
    .mobile-balance-cards .col-12 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        margin-bottom: 1rem !important;
    }
    
    .mobile-balance-card {
        width: 100% !important;
        display: block !important;
    }
}

/* ========================================
   CUSTOMIZE THEME CONTAINER VISIBILITY
   ======================================== */

/* ADDITIONAL FIX: Hide customize theme container when mobile navigation is open */
body.mobile-nav-open .customize-theme-container {
    display: none !important;
}

.mobile-nav-sidebar.show ~ .customize-theme-container,
.mobile-nav-overlay.show ~ .customize-theme-container {
    display: none !important;
}

/* Tablets and Small Laptops (min-width: 600px and max-width: 1024px) */
@media only screen and (min-width: 600px) and (max-width: 1024px) {
    .container-fluid {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .dashboard-card {
        padding: 24px;
        margin-bottom: 8px;
    }
    
    .navbar-custom {
        padding: 0;
    }
    
    .mobile-balance-cards {
        padding-left: 0;
        padding-right: 0;
    }
    
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .mobile-balance-card {
        padding: 20px;
        height: 100px;
    }
    
    .fund-transfer-container {
        display: flex !important;
        align-items: stretch !important;
        gap: 0 !important;
    }
    
    .transfer-section {
        flex: 1 !important;
        padding: 24px !important;
        min-height: 120px !important;
        border-radius: 0 !important;
        background: white !important;
    }
    
    .transfer-section:hover {
        background: var(--gray-50) !important;
        border-radius: 8px !important;
    }
    
    .transfer-divider {
        display: block !important;
        width: 1px !important;
        background: var(--gray-200) !important;
        margin: 20px 0 !important;
    }
}

/* ========================================
   TABLET ORIENTATION-SPECIFIC STYLES
   ======================================== */

/* Tablets Portrait (min-width: 600px and max-width: 1024px and orientation: portrait) */
@media only screen and (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
    .col-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .row .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .chart-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .pie-chart-wrapper {
        width: 100%;
        padding: 20px;
    }
    
    .chart-legend {
        width: 100%;
        padding: 20px;
    }
    
    .combined-sections-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .vertical-divider {
        width: 100%;
        height: 2px;
        margin: 0;
    }
}

/* Tablets Landscape (min-width: 600px and max-width: 1024px and orientation: landscape) */
@media only screen and (min-width: 600px) and (max-width: 1024px) and (orientation: landscape) {
    .chart-container {
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        height: 100% !important;
        flex-direction: row !important;
    }
    
    .pie-chart-wrapper {
        width: 50% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 20px !important;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 280px !important;
        max-height: 280px !important;
        width: 280px !important;
        height: 280px !important;
    }
    
    .chart-legend {
        width: 50% !important;
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 12px !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0.8rem !important;
        font-size: 0.875rem !important;
    }
}

/* ========================================
   IPAD SPECIFIC DEVICE QUERIES
   ======================================== */

/* iPad Pro 13" Landscape (min-width: 1365px and max-width: 1367px and orientation: landscape) */
@media only screen and (min-width: 1365px) and (max-width: 1367px) and (orientation: landscape) {
    .container-fluid {
        max-width: 1340px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .navbar-balance-card {
        min-width: 250px;
        max-width: 270px;
    }
    
    .dashboard-card {
        padding: 26px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: 0.9375rem !important;
    }
    
    .fund-transfer-container {
        gap: 1.5rem;
    }
    
    .chart-container {
        height: 420px;
    }
}

/* iPad Standard Portrait (min-device-width: 768px and max-device-width: 1024px and orientation: portrait) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
    .navbar-nav.mx-auto {
        display: none !important;
    }
    
    .mobile-nav-toggle {
        display: block !important;
    }
    
    .mobile-balance-cards {
        display: block !important;
        animation: fadeInDown 0.4s ease;
    }
    
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .navbar-row-2 {
        display: none !important;
    }
    
    .col-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .dashboard-card {
        /* margin-bottom: 1rem !important; */
        width: 100% !important;
    }
    
    .transfer-section {
        padding: 20px;
        min-height: 100px;
    }
}

/* iPad Standard Landscape (min-device-width: 768px and max-device-width: 1024px and orientation: landscape) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
    .chart-container {
        display: flex;
        align-items: center;
        flex-direction: row;
        height: 100%;
    }
    
    .pie-chart-wrapper {
        width: 45%;
        padding: 20px;
    }
    
    .chart-legend {
        width: 55%;
        padding: 20px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.8125rem !important;
    }
    
    .fund-transfer-container {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .transfer-section {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 300px;
    }
    
    /* Hide balance cards in main container for iPad landscape */
    .main-container .mobile-balance-cards {
        display: none !important;
    }
}

/* iPad mini Landscape specific (1024x768) - Single line fund transfer */
@media only screen and (width: 1024px) and (height: 768px) and (orientation: landscape) {
    .fund-transfer-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
        gap: 1.5rem !important;
    }
    
    .transfer-section {
        flex: 1 !important;
        min-width: auto !important;
    }
}

/* iPad Pro 11" Portrait (min-device-width: 834px and max-device-width: 1112px and orientation: portrait) */
@media only screen and (min-device-width: 834px) and (max-device-width: 1112px) and (orientation: portrait) {
    .container-fluid {
        padding-left: 1.8rem;
        padding-right: 1.8rem;
    }
    
    .dashboard-card {
        padding: 22px;
    }
    
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .mobile-balance-card {
        padding: 22px;
        height: 105px;
    }
    
    .transfer-section {
        padding: 22px;
        min-height: 110px;
    }
    
    .navbar-custom {
        padding: 0;
    }
    
    .main-container {
        padding: 1.6rem 0;
    }
    
    .col-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* iPad Pro 11" Landscape (min-device-width: 834px and max-device-width: 1112px and orientation: landscape) */
@media only screen and (min-device-width: 834px) and (max-device-width: 1112px) and (orientation: landscape) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .chart-container {
        display: flex;
        flex-direction: row;
        height: 380px;
    }
    
    .pie-chart-wrapper {
        width: 50%;
        padding: 25px;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 320px !important;
        max-height: 320px !important;
        width: 320px !important;
        height: 320px !important;
    }
    
    .chart-legend {
        width: 50%;
        padding: 25px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.7rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    /* Hide balance cards in main container for iPad Pro 11" landscape */
    .main-container .mobile-balance-cards {
        display: none !important;
    }
}

/* iPad Pro 12.9" Portrait (min-device-width: 834px and max-device-width: 1194px and orientation: portrait) */
@media only screen and (min-device-width: 834px) and (max-device-width: 1194px) and (orientation: portrait) {
    .container-fluid {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .dashboard-card {
        padding: 26px;
    }
    
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .mobile-balance-card {
        padding: 24px;
        height: 110px;
    }
    
    .transfer-section {
        padding: 26px;
        min-height: 120px;
    }
    
    .navbar-custom {
        padding: 0;
    }
    
    .main-container {
        padding: 1.8rem 0;
    }
    
    .col-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .chart-container {
        flex-direction: column;
        gap: 25px;
    }
    
    .pie-chart-wrapper {
        width: 100%;
        padding: 25px;
    }
    
    .chart-legend {
        width: 100%;
        padding: 25px;
    }
}

/* iPad Pro 12.9" Landscape (min-device-width: 834px and max-device-width: 1194px and orientation: landscape) */
@media only screen and (min-device-width: 834px) and (max-device-width: 1194px) and (orientation: landscape) {
    .container-fluid {
        max-width: 1170px;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
    
    .chart-container {
        display: flex;
        flex-direction: row;
        height: 420px;
    }
    
    .pie-chart-wrapper {
        width: 45%;
        padding: 30px;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 350px !important;
        max-height: 350px !important;
        width: 350px !important;
        height: 350px !important;
    }
    
    .chart-legend {
        width: 55%;
        padding: 30px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.8rem 1.2rem !important;
        font-size: 0.9375rem !important;
    }
    
    .navbar-balance-card {
        min-width: 240px;
        max-width: 260px;
    }
}

/* Large Tablets Portrait (min-device-width: 1024px and max-device-width: 1366px and orientation: portrait) */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: portrait) {
    .container-fluid {
        max-width: 1340px;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        padding-top: 1.2rem !important;
        padding-bottom: 1.2rem !important;
    }
    
    .dashboard-card {
        padding: 28px;
    }
    
    .col-12.col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .chart-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .pie-chart-wrapper {
        width: 100%;
        padding: 30px;
    }
    
    .chart-legend {
        width: 100%;
        padding: 30px;
    }
    
    .transfer-section {
        padding: 28px;
        min-height: 130px;
    }
    
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .mobile-balance-card {
        padding: 26px;
        height: 115px;
    }

    .customize-theme-container {
        display: none !important;
    }
}

/* Large Tablets Landscape (min-device-width: 1024px and max-device-width: 1366px and orientation: landscape) */
@media only screen and (min-device-width: 1024px) and (max-device-width: 1366px) and (orientation: landscape) {
    .container-fluid {
        max-width: 1340px;
        padding-left: 2.2rem;
        padding-right: 2.2rem;
    }
    
    .chart-container {
        display: flex;
        flex-direction: row;
        height: 450px;
    }
    
    .pie-chart-wrapper {
        width: 45%;
        padding: 35px;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 330px !important;
        max-height: 330px !important;
        width: 330px !important;
        height: 330px !important;
    }
    
    .chart-legend {
        width: 55%;
        padding: 35px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.8rem 1.3rem !important;
        font-size: 0.9375rem !important;
    }
    
    .navbar-balance-card {
        min-width: 250px;
        max-width: 270px;
    }
    
    .dashboard-card {
        padding: 30px;
    }
}

/* All Tablets Portrait (min-device-width: 768px and max-device-width: 1366px and orientation: portrait) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1366px) and (orientation: portrait) {
    .navbar-nav.mx-auto {
        display: none !important;
    }
    
    .mobile-nav-toggle {
        display: block !important;
    }
    
    .mobile-balance-cards {
        display: block !important;
        animation: fadeInDown 0.4s ease;
    }
    
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .navbar-row-2 {
        display: none !important;
    }
    
    .col-12.col-lg-6 {
        flex: 0 0 auto !important;
        /* max-width: 100% !important; */
        width: 50% !important;
    }
    
    .dashboard-card {
        /* margin-bottom: 1rem !important; */
        width: 100% !important;
    }
    
    .combined-sections-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .vertical-divider {
        width: 100%;
        height: 2px;
        margin: 0;
    }
    
    .section-half {
        padding: 0;
    }
}

/* All Tablets Landscape (min-device-width: 768px and max-device-width: 1366px and orientation: landscape) */
@media only screen and (min-device-width: 768px) and (max-device-width: 1366px) and (orientation: landscape) {
    .mobile-balance-cards .row {
        margin-left: -12px !important;
        margin-right: -12px !important;
    }
    
    .mobile-balance-cards .col-md-6,
    .mobile-balance-cards .col-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .fund-transfer-container {
        display: flex !important;
        align-items: stretch !important;
        gap: 0 !important;
    }
    
    .transfer-section {
        flex: 1 !important;
        padding: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        min-height: 120px !important;
        border-radius: 0 !important;
        background: white !important;
    }
    
    .transfer-section:hover {
        background: var(--gray-50) !important;
        border-radius: 8px !important;
    }
    
    .transfer-divider {
        display: block !important;
        width: 1px !important;
        background: var(--gray-200) !important;
        margin: 20px 0 !important;
    }
    
    .chart-container {
        display: flex;
        align-items: center;
        flex-direction: row;
        height: 100%;
    }
    
    .biller-row {
        gap: 15px;
        justify-content: center;
    }
    
    .biller-item {
        flex: 0 0 calc(16.66% - 15px);
        min-width: 80px;
    }
}

/* Hide balance cards in main container for smaller iPads in landscape (exclude iPad Pro 12.9") */
@media only screen and (min-device-width: 768px) and (max-device-width: 1194px) and (orientation: landscape) {
    .main-container .mobile-balance-cards {
        display: none !important;
    }
}

/* Frequently Used Biller - Full Width on ALL iPad devices */
@media only screen and (min-device-width: 768px) and (max-device-width: 1366px) {
    /* Force Frequently Used Biller to full width */
    .col-lg-6:last-child,
    .col-lg-6:nth-last-child(1) {
        flex: 0 0 auto !important;
        /* max-width: 100% !important; */
        width: 50% !important;
    }
    
    /* Biller container full width styling */
    .biller-rows {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Biller items responsive layout */
    .biller-row {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
        justify-content: center !important;
    }
    
    .biller-item {
        flex: 0 0 calc(16.66% - 15px) !important;
        min-width: 80px !important;
        max-width: 100px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 15px 10px !important;
        background: var(--gray-50) !important;
        border-radius: 8px !important;
        text-align: center !important;
    }
    
    .biller-icon {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 8px !important;
    }
    
    .biller-name {
        font-size: 0.75rem !important;
        text-align: center !important;
        margin-top: 8px !important;
    }
}

/* Fix dashboard sections for smaller iPads landscape - use portrait mode styling (exclude iPad Pro 12.9") */
@media only screen and (min-device-width: 768px) and (max-device-width: 1194px) and (orientation: landscape) {
    /* Force mobile navigation like portrait */
    .navbar-nav.mx-auto {
        display: none !important;
    }
    
    .mobile-nav-toggle {
        display: block !important;
    }
    
    /* Column layout for grid - force single column like portrait */
    .col-12.col-lg-6,
    .col-lg-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Force Frequently Used Biller to full width */
    .col-lg-6:last-child,
    .col-lg-6:nth-last-child(1) {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Dashboard cards - full width like portrait */
    .dashboard-card {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    /* Combined sections container - use portrait column layout */
    .combined-sections-container {
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    /* Vertical divider - portrait style */
    .vertical-divider {
        width: 100% !important;
        height: 2px !important;
        margin: 0 !important;
    }
    
    /* Section halves - portrait style */
    .section-half {
        padding: 0 !important;
    }
    
    /* Fund Spending Overview & Spend Comparison Charts - Portrait Style */
    .chart-container {
        flex-direction: column !important;
        gap: 20px !important;
        height: auto !important;
    }
    
    .pie-chart-wrapper {
        width: 100% !important;
        padding: 20px !important;
        display: block !important;
        justify-content: center !important;
    }
    
    .pie-chart-wrapper canvas {
        max-width: 280px !important;
        max-height: 280px !important;
        width: 280px !important;
        height: 280px !important;
    }
    
    .chart-legend {
        width: 100% !important;
        padding: 20px !important;
        display: block !important;
    }
    
    .line-chart-container {
        max-height: 300px !important;
        padding: 15px !important;
    }
    
    /* Chart cards - auto height like portrait */
    .dashboard-card.chart-card {
        height: auto !important;
        min-height: 400px !important;
    }
    
    /* Frequently Used Biller - Full Width Portrait Style */
    .biller-rows {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .biller-row {
        flex-direction: column !important;
        gap: 20px !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }
    
    .biller-item {
        flex: 1 !important;
        padding: 15px 10px !important;
        margin: 0 !important;
        min-width: auto !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        background: var(--gray-50) !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        text-align: center !important;
    }
    
    .biller-icon {
        width: 48px !important;
        height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 8px !important;
    }
    
    .biller-name {
        font-size: 0.75rem !important;
        margin-top: 8px !important;
        text-align: center !important;
        color: var(--gray-700) !important;
    }
}


/* ========================================
   END OF MERGED RESPONSIVE CSS FILE
   ======================================== */