/* put your own styles to customize and override the theme */

/* ========================================
   Dashboard Service Cards Grid - Auto Fit
   ======================================== */

/* Service Cards Row - Flexbox Auto Fit */
.row {
    display: flex;
    flex-wrap: wrap;
}

/* Auto-fit service cards - 6 per row on large screens */
.row > .col-lg-2.hand {
    flex: 0 0 16.666%;
    max-width: 16.666%;
    padding: 5px;
}

/* 5 per row on medium-large screens */
@media (max-width: 1400px) {
    .row > .col-lg-2.hand {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* 4 per row on medium screens */
@media (max-width: 1200px) {
    .row > .col-lg-2.hand {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* 3 per row on tablets */
@media (max-width: 992px) {
    .row > .col-lg-2.hand {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

/* 2 per row on mobile */
@media (max-width: 576px) {
    .row > .col-lg-2.hand {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 4px;
    }
}

/* ========================================
   Dashboard Service Cards - Consistent Styling
   ======================================== */

/* Service Cards Container */
.pmd-card {
    min-height: 140px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pmd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.pmd-card .card-body {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

/* Card Icons - Consistent Size */
.pmd-card .card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70px;
    width: 100%;
}

.pmd-card .card-icon img {
    height: 60px !important;
    width: 60px !important;
    object-fit: contain;
    max-width: 100%;
}

/* Card Text - Consistent */
.pmd-card .card-text {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0;
    text-align: center;
    line-height: 1.4;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

/* HR Line in Cards */
.pmd-card .hr {
    margin: 8px 0;
    border-color: rgba(255,255,255,0.2);
    width: 100%;
}

/* Card Figure Styling */
.card-figure.pmd-card {
    margin-bottom: 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 991px) {
    .pmd-card {
        min-height: 130px;
    }
    
    .pmd-card .card-icon img {
        height: 55px !important;
        width: 55px !important;
    }
    
    .pmd-card .card-text {
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    .pmd-card {
        min-height: 120px;
    }
    
    .pmd-card .card-icon {
        min-height: 60px;
    }
    
    .pmd-card .card-icon img {
        height: 50px !important;
        width: 50px !important;
    }
    
    .pmd-card .card-text {
        font-size: 10px;
        min-height: 30px;
    }
    
    .pmd-card .card-body {
        padding: 10px 8px;
    }
}

@media (max-width: 575px) {
    .col-6.hand {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .pmd-card {
        min-height: 110px;
    }
    
    .pmd-card .card-icon img {
        height: 45px !important;
        width: 45px !important;
    }
    
    .pmd-card .card-text {
        font-size: 9px;
    }
}

/* ========================================
   Additional Dashboard Improvements
   ======================================== */

/* Badge Styling */
.badge-subtle {
    font-weight: 500;
}

/* Table Improvements */
.table-responsive.scroll {
    max-height: 300px;
    overflow-y: auto;
}

/* Wallet Balance Button */
.btn-dark.btn-sm .fa-wallet {
    margin-right: 5px;
}

/* WhatsApp Float Button Improvements */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 55px;
    height: 55px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 30px;
    height: 30px;
}

/* Banner Carousel Improvements */
#carouselExampleControls .carousel-item img {
    border-radius: 8px;
    object-fit: cover;
}

/* Statistics Cards */
.bg-purple {
    background-color: #6f42c1 !important;
}

.bg-yellow {
    background-color: #ffc107 !important;
}

.bg-red {
    background-color: #dc3545 !important;
}

/* Activity Table */
.card-header.bg-primary {
    border-radius: 8px 8px 0 0;
}

/* Night Mode Improvements */
[data-skin="dark"] .pmd-card {
    background-color: #2d2d2d;
    border-color: #444;
}

[data-skin="dark"] .pmd-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}