*,
*::before,
*::after {
    box-sizing: border-box;
}




/* ================= Breadcrumb ================= */
.breadcrumb-header {
    margin-bottom: 14px;
}

.breadcrumb-header .clients-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    font-weight: 600;
}

.breadcrumb-link {
    color: #1f2937;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9ca3af;
    font-weight: 400;
}

#breadcrumbClientName {
    color: #111827;
    font-weight: 600;
}

/* ================= Tabs ================= */
.client-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.client-tabs .tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}

.client-tabs .tab-btn:hover {
    background: #f3f4f6;
}

.client-tabs .tab-btn.active {
    background: #1f2937;
    color: #ffffff;
    border-color: #1f2937;
}

/* ================= Tab Content ================= */
.client-tab-content {
    margin-top: 10px;
}
.client-tab-content1 {
    margin-top: 10px;
}
.client-tab-content2 {
    margin-top: 10px;
}
/* ================= Client Detail Card ================= */
.client-detail-card {
    background: #f0f0f0;
    border-radius: 10px;
    padding: 20px;
}

/* Header */
.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.client-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* ================= Client Grid ================= */
.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.client-grid div {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
}

.client-grid strong {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}

/* ================= Address ================= */
.client-address {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
    background-color: #ffffff;
}

/* ================= Status Badge ================= */
.status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.status.active {
    background: #dcfce7;
    color: #166534;
}

.status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* ================= Actions ================= */
.client-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.client-actions button {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.client-actions .btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.client-actions .btn-secondary:hover {
    background: #d1d5db;
}

.client-actions .btn-warning {
    background: #1f2937;
    color: #ffffff;
}

.client-actions .btn-warning:hover {
    background: #111827;
}

/* ================= Mobile ================= */
@media (max-width: 768px) {

    .client-detail-card {
        padding: 14px;
    }

    .client-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .client-tabs {
        gap: 6px;
    }

    .client-tabs .tab-btn {
        flex: 1;
        text-align: center;
    }

    .client-actions button {
        width: 100%;
        text-align: center;
    }
}



/* =====================================================
   FAMILY RELATIONSHIP MODAL – ISOLATED CSS
   ===================================================== */

/* Overlay */
.fam-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.fam-modal-overlay.show {
    display: flex;
}

/* Modal box */
.fam-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 460px;
    padding: 22px;
    border-radius: 12px;

    position: relative;
    overflow: hidden; /* 🔥 prevents resize */

    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

/* Title & hint */
.fam-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.fam-modal-hint {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Form rows */
.fam-form-row {
    margin-bottom: 14px;
}

.fam-form-row label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.fam-form-row input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.fam-form-row input:focus {
    outline: none;
    border-color: #1f2937;
}

/* Search wrapper */
.fam-search-wrap {
    position: relative;
}

/* Floating dropdown */
.fam-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;

    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;

    max-height: 220px;
    overflow-y: auto;

    display: none;
    z-index: 9999;

    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* Search item */
.fam-search-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.fam-search-item:last-child {
    border-bottom: none;
}

.fam-search-item:hover {
    background: #f3f4f6;
}

/* Actions */
.fam-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.fam-btn-save {
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.fam-btn-save:hover {
    background: #15803d;
}

.fam-btn-cancel {
    background: #e5e7eb;
    color: #111827;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
}

.fam-btn-cancel:hover {
    background: #d1d5db;
}

/* Mobile */
@media (max-width: 768px) {
    .fam-modal-box {
        margin: 0 14px;
        max-width: 100%;
    }
}




/* ================= ACTIVATE / DEACTIVATE MODALS ================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-overlay.show {
    display: flex;
}

/* Modal box */
.modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 20px 22px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    animation: modalScale 0.2s ease;
}

/* Title */
.modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #111827;
}

/* Label */
.modal-box label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

/* Select */
.modal-box select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    outline: none;
    margin-bottom: 10px;
}

.modal-box select:focus {
    border-color: #1f2937;
}

/* Textarea (Other reason) */
.modal-box textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    resize: vertical;
}

.modal-box textarea:focus {
    outline: none;
    border-color: #1f2937;
}

/* Actions */
.modal-box .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}



#confirmDeactivateBtn{

    background-color: #dc2626;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;

}


#confirmActivateBtn{

    background-color: #16a34a;
    color: black;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box .btn-cancel {
    background: #e5e7eb;
    color: #111827;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box .btn-cancel:hover {
    background: #d1d5db;
}

/* Animation */
@keyframes modalScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ================= MOBILE ================= */
@media (max-width: 480px) {
    .modal-box {
        margin: 0 14px;
        max-width: 100%;
    }

    .modal-box .form-actions {
        flex-direction: column;
    }

    .modal-box .form-actions button {
        width: 100%;
    }
}