body {
    background-color: #f9fafb;
    color: #1f2937;
}
.tab-active {
    border-bottom: 2px solid #3b82f6;
    color: #3b82f6;
}
.form-input, .form-select, .form-textarea {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}
.contact-card {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}
.modal-content {
    background-color: #ffffff;
    color: #1f2937;
}
.btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}
.btn-primary:hover {
    background-color: #2563eb;
}
#networkGraph {
    width: 100%;
    height: 400px;
}
#uploadProgress {
    margin-top: 10px;
    color: #1f2937;
}
.thumbnail-container {
    position: relative;
    display: inline-block;
    margin: 8px;
}
.thumbnail {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.thumbnail::after {
    content: '👁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}
.thumbnail:hover::after {
    opacity: 0.9;
}
.thumbnail:hover img {
    filter: brightness(0.7);
}
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.2s ease;
}
.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    font-size: 12px;
    text-align: center;
}
.thumbnail-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
}
.status-pending {
    background-color: #f59e0b;
}
.status-success {
    background-color: #10b981;
}
.status-error {
    background-color: #ef4444;
}
.contact-card {
    background-color: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}
.contact-card img {
    border: 1px solid #e5e7eb;
    object-fit: cover;
}

/* Add your custom styles here */

/* General Styles */
body {
    background-color: #f9fafb;
    color: #111827;
}

.container {
    max-width: 1280px;
}

.btn-primary {
    background-color: #6366f1;
    color: white;
}

.btn-primary:hover {
    background-color: #4f46e5;
}

.tab-active {
    color: #4f46e5;
    border-bottom: 2px solid #4f46e5;
}

/* Modal Styles */
.modal-content {
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Card Styles */
.contact-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Thumbnail Gallery */
.thumbnail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Contact card thumbnail image */
.thumbnail-image {
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    position: relative;
}

.thumbnail-image:hover {
    transform: scale(1.05);
    filter: brightness(0.9);
}

.thumbnail-image::after {
    content: '👁️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.thumbnail-image:hover::after {
    opacity: 0.9;
}

/* Original image modal */
#originalImageModal {
    transition: opacity 0.3s ease;
}

#originalImageModal.hidden {
    opacity: 0;
    pointer-events: none;
}

#originalImageModal:not(.hidden) {
    opacity: 1;
}

#originalImage {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.3s ease;
}

#closeImageModal {
    transition: transform 0.2s ease;
}

#closeImageModal:hover {
    transform: scale(1.1);
}

/* Loading indicator for images */
.image-loading {
    position: relative;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.image-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Tooltip styles */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: #374151;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    white-space: normal;
    width: 250px;
    text-align: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #374151 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 10;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Adjust tooltip position for dashboard cards */
.dashboard-card [data-tooltip]::before {
    bottom: auto;
    top: 100%;
    margin-top: 10px;
}

.dashboard-card [data-tooltip]::after {
    bottom: auto;
    top: 100%;
    margin-top: 4px;
    border-color: transparent transparent #374151 transparent;
}

/* Edit Modal Styles */
#editContactModal .modal-content {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    overflow: hidden;
}

#editContactModal .modal-content > div {
    flex-shrink: 0;
}

#editContactModal .modal-content > div:not(:first-child):not(:last-child) {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E0 #EDF2F7;
}

#editContactModal .modal-content > div:not(:first-child):not(:last-child)::-webkit-scrollbar {
    width: 6px;
}

#editContactModal .modal-content > div:not(:first-child):not(:last-child)::-webkit-scrollbar-track {
    background: #EDF2F7;
    border-radius: 3px;
}

#editContactModal .modal-content > div:not(:first-child):not(:last-child)::-webkit-scrollbar-thumb {
    background-color: #CBD5E0;
    border-radius: 3px;
}

#editContactModal .modal-content > div:not(:first-child):not(:last-child)::-webkit-scrollbar-thumb:hover {
    background-color: #A0AEC0;
}

#editContactModal .form-input,
#editContactModal .form-textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#editContactModal .form-input:focus,
#editContactModal .form-textarea:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#editContactModal label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

#editContactModal .space-y-4 > div {
    margin-bottom: 1rem;
}

#editContactModal .space-y-4 > div:last-child {
    margin-bottom: 0;
}