/* ==========================================================================
   CUSTOMER 360° VIEW // ENTERPRISE STYLING (customer_view.css)
   ========================================================================== */

:root {
    --cust-view-primary: #0d6efd;
    --cust-view-surface: #ffffff;
    --cust-view-text: #334155;
    --cust-view-border: #e2e8f0;
    --cust-view-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --cust-view-hover-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Container & Overflow Protection */
body {
    overflow-x: hidden !important;
}

.customer-view-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Cards & Containers */
.card {
    border-radius: 0.85rem;
    border: 1px solid var(--cust-view-border);
    box-shadow: var(--cust-view-shadow);
    background-color: var(--cust-view-surface);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--cust-view-hover-shadow);
}

/* Tables & Responsive Wrapper */
.table-responsive {
    width: 100%;
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    color: var(--cust-view-text);
    vertical-align: middle;
    margin-bottom: 0;
    width: 100%;
}

.table > :not(caption) > * > * {
    padding: 0.75rem 0.75rem;
}

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background-color: #f8fafc;
    border-bottom: 2px solid var(--cust-view-border);
    white-space: nowrap;
}

/* ==========================================================================
   MOBILE RESPONSIVE STYLING & ZOOM RESILIENCE (Viewports <= 767.98px)
   ========================================================================== */

@media (max-width: 767.98px) {
    body {
        overflow-x: hidden !important;
    }

    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
        max-width: 100% !important;
    }

    .customer-view-container {
        padding: 0 !important;
    }

    /* Header & Action Button Grid Fix for Mobile */
    .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.85rem;
    }

    .mobile-action-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    .mobile-action-grid > * {
        width: 100% !important;
        display: block;
        text-align: center;
    }

    .mobile-action-grid form {
        display: block !important;
        width: 100%;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Prevents iOS auto-zoom on input focus */
    .form-control, .form-select {
        font-size: 16px !important;
    }
}