/* ==========================================================================
   CUSTOMER ONBOARDING & REQUEST MANAGEMENT STYLES
   ========================================================================== */

/* --- Status & Type Badges --- */
.badge-pending {
    background-color: #ffc107;
    color: #212529;
}
.badge-approved {
    background-color: #198754;
    color: #fff;
}
.badge-rejected {
    background-color: #dc3545;
    color: #fff;
}

/* --- Table Enhancements --- */
.table-responsive {
    border-radius: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table tbody tr td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* --- Detail View Elements --- */
.detail-label {
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: 600;
}

.detail-value {
    font-size: 0.9375rem;
    color: #212529;
}

.sig-box {
    border: 1px dashed #ced4da;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sig-box img {
    max-height: 75px;
    max-width: 100%;
    object-fit: contain;
}

.doc-preview-item {
    transition: background-color 0.15s ease-in-out;
}

.doc-preview-item:hover {
    background-color: #f8f9fa;
}

/* --- Subnet / CIDR Result Box --- */
#subnetBox {
    background: #f8f9fa;
    border-left: 4px solid #198754;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS (<= 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* --- Top Action Bars --- */
    .d-flex.justify-content-between.align-items-center.mb-3 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    .d-flex.justify-content-between.align-items-center.mb-3 > div,
    .d-flex.justify-content-between.align-items-center.mb-3 > a {
        width: 100%;
    }

    .d-flex.align-items-center.gap-2 {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .d-flex.align-items-center.gap-2 .btn {
        width: 100%;
        text-align: center;
        padding: 0.45rem 0.5rem;
        font-size: 0.8125rem;
    }

    /* --- Status Filter Buttons --- */
    .btn-group {
        display: flex;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        margin-bottom: 1rem;
    }

    .btn-group .btn {
        flex: 1 1 auto;
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    /* --- Request List Table Mobile Tuning --- */
    .table thead {
        font-size: 0.75rem;
    }

    .table td, .table th {
        padding: 0.5rem 0.4rem;
    }

    /* --- Detail Card Rows --- */
    .card-body .row.mb-3 {
        margin-bottom: 0.75rem !important;
        border-bottom: 1px dashed #edf2f7;
        padding-bottom: 0.5rem;
    }

    .card-body .row.mb-3:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .card-body .col-sm-4 {
        font-size: 0.75rem;
        margin-bottom: 0.15rem;
    }

    .card-body .col-sm-8 {
        font-size: 0.875rem;
    }

    /* --- Multi-tab Modal on Small Screens --- */
    #onboardingTab {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem !important;
        background-color: #f1f3f5 !important;
        border-bottom: 1px solid #dee2e6 !important;
    }

    /* Hide ugly scrollbar while keeping swipe functionality */
    #onboardingTab::-webkit-scrollbar {
        height: 3px;
    }
    #onboardingTab::-webkit-scrollbar-thumb {
        background: #ced4da;
        border-radius: 4px;
    }

    /* 2. Stop nav-fill from squishing each tab */
    #onboardingTab .nav-item {
        flex: 0 0 auto !important;
        width: auto !important;
    }

    /* 3. Transform tabs into clean, finger-tappable pills */
    #onboardingTab .nav-link {
        white-space: nowrap !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.825rem !important;
        border-radius: 50rem !important; /* Pill style */
        border: 1px solid #dee2e6 !important;
        background-color: #ffffff;
        color: #495057;
    }

    #onboardingTab .nav-link.active {
        background-color: #0d6efd !important;
        border-color: #0d6efd !important;
        color: #ffffff !important;
        box-shadow: 0 2px 4px rgba(13, 110, 253, 0.25);
    }

    /* Ensure active icons switch to white */
    #onboardingTab .nav-link.active i {
        color: #ffffff !important;
    }

    /* 4. Form and camera spacing improvements for mobile */
    .modal-body {
        padding: 1rem !important;
    }

    /* Keep signature scan boxes neat on small screens */
    .sig-scan-card {
        padding: 0.75rem !important;
    }
    .sig-scan-card button {
        font-size: 0.75rem !important;
        padding: 0.35rem 0.5rem !important;
    }
}