/**
 * VendSight360™ - Dashboard Styles
 */

.vendsight-container {
    padding: 20px;
    background-color: #f8f9fa;
    min-height: 100vh;
.stat-card-icon i {
    font-size: 26px;
}

.vendsight-stat-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Hero Header */
.vendsight-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.vendsight-hero .header-title-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 18px;
}

.vendsight-hero .header-title-group h3 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.vendsight-hero .header-title-group p {
    font-size: 15px;
    opacity: 0.85;
    margin: 0;
}

.vendsight-hero .header-search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.vendsight-hero .header-search {
    position: relative;
    width: 280px;
}

.vendsight-hero .search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.vendsight-hero .search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.85);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.vendsight-hero .search-input::placeholder {
    color: #666;
}

.network-card {
    color: #fff;
    border: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.network-card .card-body {
    color: inherit;
}

.network-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.1);
}

.network-card-mtn {
    background: linear-gradient(135deg, #fcbf49 0%, #f77f00 100%) !important;
}

.network-card-airtel {
    background: linear-gradient(135deg, #ff4b5c 0%, #c81d25 100%) !important;
}

.network-card-glo {
    background: linear-gradient(135deg, #00c853 0%, #009624 100%) !important;
}

.network-card-9mobile {
    background: linear-gradient(135deg, #6c757d 0%, #343a40 100%) !important;
}

.network-card-default {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%) !important;
}

.vendsight-hero .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #666;
}

.vendsight-hero .header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.section-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    padding: 6px;
}

.section-pill {
    border: none;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.section-pill:hover,
.section-pill:focus {
    background: rgba(255, 255, 255, 0.45);
    outline: none;
}

.section-pill.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.section-pill.action-pill {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.section-pill.action-pill:hover,
.section-pill.action-pill:focus {
    background: rgba(255, 255, 255, 0.35);
}

.section-pill.export-pill {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #0b2d6f;
}

.section-pill.export-pill:hover,
.section-pill.export-pill:focus {
    background: linear-gradient(135deg, #3f9ae5 0%, #00d4e4 100%);
    color: #072553;
}

.section-pill.filter-pill {
    background: var(--warning, linear-gradient(135deg, #ffd166 0%, #f4a261 100%));
    color: #3a2800;
}

.section-pill.filter-pill:hover,
.section-pill.filter-pill:focus {
    background: var(--warning-hover, linear-gradient(135deg, #ffc447 0%, #f08a24 100%));
    color: #261a00;
}

.stat-dual-label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.vendsight-stat-card {
    min-height: 170px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    display: flex;
}

.vendsight-stat-card .card-body {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    padding: 20px 48px 20px 20px;
}

.vendsight-stat-card .stat-card-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0.85;
}

.vendsight-stat-card .stat-card-icon i {
    font-size: 26px;
}

.vendsight-stat-card h3 {
    font-size: 24px !important;
    font-weight: 700;
    margin-bottom: 4px;
}

@media (max-width: 992px) {
    .vendsight-stat-card h3 {
        font-size: 20px !important;
    }
}

#auditDateRangeLabel {
    font-weight: 600;
    color: #6c757d;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.action-btn i {
    font-size: 14px;
}

.btn-info-action {
    background: rgba(255, 255, 255, 0.18);
    color: white;
}

.btn-warning-action {
    background: linear-gradient(135deg, #ffeb3b 0%, #ff9800 100%);
    color: #7a4b00;
}

.btn-primary-action {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #0b2d6f;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.action-btn:focus {
    outline: none;
}

.quick-range-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-range-buttons .btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 8px 16px;
}

.quick-range-buttons .btn.active {
    background: var(--primary);
    color: white;
}

@media (max-width: 991.98px) {
    .vendsight-hero {
        padding: 20px;
    }
}

@media (max-width: 575.98px) {
    .vendsight-hero .header-search {
        width: 100%;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Section Management */
.vendsight-section {
    display: none;
}

.vendsight-section[data-section="main"] {
    display: block;
}

.vendsight-container .card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vendsight-container .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vendsight-container .card-header {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    border-radius: 8px 8px 0 0 !important;
    padding: 15px 20px;
}

.vendsight-container .card-body {
    padding: 20px;
}

/* Metric Cards */
.vendsight-container .card.bg-primary,
.vendsight-container .card.bg-success,
.vendsight-container .card.bg-info,
.vendsight-container .card.bg-danger {
    color: white;
    border: none;
    transition: transform 0.2s ease;
}

.vendsight-container .card.bg-primary:hover,
.vendsight-container .card.bg-success:hover,
.vendsight-container .card.bg-info:hover,
.vendsight-container .card.bg-danger:hover {
    transform: scale(1.05);
}

.vendsight-container .card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.vendsight-container .card.bg-success {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.vendsight-container .card.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.vendsight-container .card.bg-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.vendsight-container .card-title {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.vendsight-container .card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.vendsight-container .card small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Date Filter Section */
.vendsight-container .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.vendsight-container .form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.vendsight-container .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Buttons */
.vendsight-container .btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vendsight-container .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.vendsight-container .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
}

.vendsight-container .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.vendsight-container .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.vendsight-container .btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.vendsight-container .btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

/* Charts */
.vendsight-container canvas {
    max-height: 400px;
}

/* Bundle Popularity List */
.vendsight-container .list-group-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.vendsight-container .list-group-item:hover {
    background-color: #f8f9fa;
}

.vendsight-container .list-group-item h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.vendsight-container .list-group-item p {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Badges */
.vendsight-container .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
}

.vendsight-container .badge.bg-success {
    background-color: #28a745 !important;
}

.vendsight-container .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.vendsight-container .badge.bg-danger {
    background-color: #dc3545 !important;
}

.vendsight-container .badge.bg-primary {
    background-color: var(--primary) !important;
}

/* SIM Status Table */
.vendsight-container .table {
    margin-bottom: 0;
}

.vendsight-container .table thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 15px;
}

.vendsight-container .table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 0.875rem;
}

.vendsight-container .table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Wallet Info */
.vendsight-container .wallet-info {
    padding: 10px 0;
}

.vendsight-container .wallet-info label {
    font-size: 0.85rem;
    color: #6c757d;
    display: block;
    margin-bottom: 0.25rem;
}

.vendsight-container .wallet-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 0;
}

/* Best/Worst Bundle Cards */
.vendsight-container .card.border-success {
    border: 2px solid #28a745 !important;
}

.vendsight-container .card.border-warning {
    border: 2px solid #ffc107 !important;
}

.vendsight-container .card-header.bg-success {
    background-color: #28a745 !important;
}

.vendsight-container .card-header.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* Loading States */
.vendsight-container .fa-spinner {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .vendsight-container {
        padding: 10px;
    }

    .vendsight-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .vendsight-actions .form-select {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }

    .vendsight-actions .btn {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

    .vendsight-container .card h3 {
        font-size: 1.5rem;
    }

    .vendsight-container .card-body {
        padding: 15px;
    }

    .vendsight-container .d-flex.gap-2 {
        flex-wrap: wrap;
    }

    .vendsight-container .btn {
        font-size: 0.875rem;
        padding: 0.4rem 0.8rem;
    }

    .vendsight-container canvas {
        max-height: 250px;
    }

    /* Fix mobile button overflow */
    .vendsight-container .d-flex.gap-2.flex-wrap {
        gap: 0.5rem !important;
    }

    .vendsight-container .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin-bottom: 0.25rem;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Stack buttons vertically on very small screens */
    @media (max-width: 480px) {
        .vendsight-container .d-flex.gap-2.flex-wrap {
            flex-direction: column;
        }
        
        .vendsight-container .btn-sm {
            width: 100%;
            margin-bottom: 0.5rem;
        }

        .vendsight-actions .form-select {
            font-size: 0.875rem;
        }
    }
}

/* Additional mobile fixes */
@media (max-width: 576px) {
    .vendsight-container .row {
        margin-left: -5px;
        margin-right: -5px;
    }

    .vendsight-container .col-md-3,
    .vendsight-container .col-md-6,
    .vendsight-container .col-12 {
        padding-left: 5px;
        padding-right: 5px;
    }

    .vendsight-container .card-body {
        padding: 10px;
    }

    .vendsight-container .form-control {
        font-size: 0.875rem;
    }

    .vendsight-container .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }

    /* Mobile metric cards */
    .vendsight-container .card h3 {
        font-size: 1.25rem;
    }

    .vendsight-container .card h6 {
        font-size: 0.75rem;
    }

    /* Mobile table responsiveness */
    .vendsight-container .table-responsive {
        font-size: 0.8rem;
    }

    .vendsight-container .table th,
    .vendsight-container .table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .vendsight-container {
        padding: 5px;
    }

    .vendsight-container .card-body {
        padding: 8px;
    }

    .vendsight-container .card h3 {
        font-size: 1.1rem;
    }

    .vendsight-container .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }

    .vendsight-container .btn-sm {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Print Styles */
@media print {
    .vendsight-container .card {
        page-break-inside: avoid;
    }

    .vendsight-container .btn,
    .vendsight-container .form-control {
        display: none;
    }
}

/* Opacity utility */
.opacity-75 {
    opacity: 0.75;
}

/* Gap utility for older browsers */
.gap-2 > * {
    margin-right: 0.5rem;
}

.gap-2 > *:last-child {
    margin-right: 0;
}

/* Quick buttons specific styling */
.vendsight-quick-buttons {
    gap: 0.5rem;
}

.vendsight-quick-buttons .btn-sm {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile-specific quick button fixes */
@media (max-width: 576px) {
    .vendsight-quick-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .vendsight-quick-buttons .btn-sm {
        width: 100%;
        margin-bottom: 0.25rem;
        flex: none;
    }
}

@media (max-width: 480px) {
    .vendsight-quick-buttons .btn-sm {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Text utilities */
.text-muted {
    color: #6c757d !important;
}

/* Spacing utilities */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

