.customers-summary {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}
.dt-container {
    padding: 1rem 0;
}
#section-comments .table-custom td:nth-child(3) {
    min-width: 260px;
    max-width: 380px;
    line-height: 1.8;
}

#section-comments .text-warning {
    letter-spacing: 2px;
    white-space: nowrap;
}
#modal-customer-details .card table td:hover {
    background: linear-gradient(rgb(13, 202, 240),#fff);
}

#modal-customer-details .card .bg-danger:hover {
    background: linear-gradient(#d82e2e,#fff);
}

#section-comments .btn,
#section-customers .btn,
#section-addresses .btn,
#section-orders .btn,
#section-tickets .btn {
    white-space: nowrap;
}

#section-customers td:last-child,
#section-addresses td:last-child,
#section-orders td:last-child,
#section-tickets td:last-child,
#section-comments td:last-child {
    white-space: nowrap;
}

#section-customers td:last-child > div,
#section-addresses td:last-child > div,
#section-orders td:last-child > div,
#section-tickets td:last-child > div,
#section-comments td:last-child > div {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
}

#section-customers td:last-child > button,
#section-addresses td:last-child > button,
#section-orders td:last-child > button,
#section-tickets td:last-child > button,
#section-comments td:last-child > button,
#section-customers td:last-child > div > button,
#section-addresses td:last-child > div > button,
#section-orders td:last-child > div > button,
#section-tickets td:last-child > div > button,
#section-comments td:last-child > div > button {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
    color: #64748b !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all .2s ease;
    font-size: 0;
}

#section-customers td:last-child > button i,
#section-addresses td:last-child > button i,
#section-orders td:last-child > button i,
#section-tickets td:last-child > button i,
#section-comments td:last-child > button i,
#section-customers td:last-child > div > button i,
#section-addresses td:last-child > div > button i,
#section-orders td:last-child > div > button i,
#section-tickets td:last-child > div > button i,
#section-comments td:last-child > div > button i {
    font-size: 1rem;
}

#section-customers td:last-child > button:hover,
#section-addresses td:last-child > button:hover,
#section-orders td:last-child > button:hover,
#section-tickets td:last-child > button:hover,
#section-comments td:last-child > button:hover,
#section-customers td:last-child > div > button:hover,
#section-addresses td:last-child > div > button:hover,
#section-orders td:last-child > div > button:hover,
#section-tickets td:last-child > div > button:hover,
#section-comments td:last-child > div > button:hover {
    background: #eef2ff !important;
    border-color: #a5b4fc !important;
    color: #4f46e5 !important;
    transform: translateY(-1px) !important;
}
.table-custom tbody td{
    padding:10px 5px;
    text-align:center;
    text-wrap:nowrap;
}

#tbl-customers th .dt-column-header, #tbl-customers td, #section-addresses table td {
    text-align: center !important;
}
#section-addresses table td:nth-child(5) {
    text-align: start !important;
}

.address-title-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
}

.address-title-cell small {
    flex-basis: 100%;
    color: #94a3b8;
    font-size: .72rem;
}

.address-expand-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #c7d2fe;
    border-radius: 7px;
    background: #eef2ff;
    color: #4f46e5;
    line-height: 1;
    transition: all .2s ease;
}

.address-expand-btn:hover,
.address-expand-btn.is-open {
    background: #4f46e5;
    color: #fff;
}

.address-child-wrapper {
    padding: 8px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.address-child-table {
    width: 100%;
    margin: 0;
}

.address-child-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 9px 8px;
    text-align: center !important;
    vertical-align: middle;
}

.address-child-table td:nth-child(3) {
    text-align: start !important;
}

.address-child-table tr:last-child td {
    border-bottom: 0;
}
#tbl-customers td:last-child .customer-status-btn,
#tbl-customers td:last-child .customer-details-btn {
    width: auto;
    min-width: 78px;
    padding: 0 10px !important;
    gap: 5px;
    font-size: .78rem;
}

#tbl-customers td:last-child .customer-details-btn {
    min-width: 82px;
}

#tbl-customers td:last-child .customer-status-btn i,
#tbl-customers td:last-child .customer-details-btn i {
    font-size: .9rem;
}

.customer-details-tabs {
    border: 0;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: thin;
}

.customer-details-tabs .nav-link {
    flex: 0 0 auto;
    color: #64748b;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    background: #f8fafc;
    padding: 9px 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: all .2s ease;
}

.customer-details-tabs .nav-link:hover {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #c7d2fe !important;
}

.customer-details-tabs .nav-link.active {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #818cf8 !important;
    box-shadow: 0 3px 8px rgba(79, 70, 229, .12);
}

.customer-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.customer-meta small {
    color: #94a3b8;
}

.customer-meta strong {
    color: #334155;
}

.customer-details-modal .modal-dialog {
    width: min(1120px, calc(100% - 32px));
    max-width: 1120px;
    min-height: 650px;
}

.customer-details-modal .modal-content {
    height: 650px;
    overflow: hidden;
    background: #ffffff;
}

.customer-details-modal .modal-header {
    min-height: 72px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    border-bottom: 1px solid #e2e8f0 !important;
}

.customer-details-modal .modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.customer-details-modal .modal-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.customer-details-modal .tab-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 4px 12px;
}

.customer-details-modal .table-responsive table {
    width: 100%;
}

.customer-details-modal .modal-body > .customer-details-tabs {
    flex: 0 0 auto;
}

#section-addresses table td:nth-child(5) {
    text-wrap:auto;
}

@media (max-width: 768px) {
    #section-comments .table-custom td:nth-child(3) {
        max-width: none;
    }

    #section-customers td:last-child,
    #section-addresses td:last-child,
    #section-orders td:last-child,
    #section-tickets td:last-child,
    #section-comments td:last-child {
        overflow-x: auto;
        justify-content: flex-start !important;
    }

    #tbl-customers td:last-child {
        min-width: 0;
    }

    .customer-details-modal .modal-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
    }

    .customer-details-modal .modal-content {
        height: calc(100vh - 16px);
        min-height: 0;
    }

}
