.search-input {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    width: 260px;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
}

.clients-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--muted);
    padding: 12px 22px;
    border-bottom: 1px solid var(--border);
}

.clients-table td {
    padding: 14px 22px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.clients-table tbody tr:hover {
    background: #fafafa;
    cursor: pointer;
}

.table-loading, .table-empty {
    text-align: center;
    color: var(--muted);
    padding: 30px !important;
}

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-pill.active {
    background: #e7f7ef;
    color: #16a05d;
}

.status-pill.paused {
    background: #fff4df;
    color: #b8790a;
}

.status-pill.closed {
    background: #f0f0f0;
    color: #666;
}

.edit-link {
    color: var(--muted);
    font-size: 12px;
}

/* MODAL */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
}

.modal-close {
    background: transparent;
    font-size: 18px;
    color: var(--muted);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

.button-danger {
    background: #fdeaea;
    color: #b42318;
    padding: 9px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    #clientsTableWrapper,
    #partnersTableWrapper {
        overflow-x: auto;
    }

    .clients-table {
        min-width: 600px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .search-input {
        width: 100%;
    }

    .modal-box {
        max-width: calc(100% - 24px);
        max-height: 90vh;
    }

}
