/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header */
.header {
    background-color: #2196F3;
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    margin-bottom: 0;
    font-size: 1.5rem;
    text-align: center;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-button {
    background: transparent;
    border: none;
    color: #757575;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    max-width: 120px;
}

.nav-button:hover {
    color: #2196F3;
    background-color: rgba(33, 150, 243, 0.1);
}

.nav-button.active {
    color: #2196F3;
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Main content */
.main {
    padding: 1rem 1rem 5rem 1rem; /* Added bottom padding for bottom nav */
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #333;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
}

.btn-primary:hover {
    background-color: #1976D2;
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-secondary:hover {
    background-color: #616161;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-success {
    background-color: #4CAF50;
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Search box */
.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    max-width: 400px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* List styles */
.list {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.list-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.list-item-subtitle {
    color: #666;
    font-size: 0.9rem;
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-empty {
    padding: 2rem;
    text-align: center;
    color: #666;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.signature-content {
    max-width: 600px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.close:hover {
    color: black;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Signature */
.signature-container {
    margin: 1rem 0;
    text-align: center;
}

#signature-canvas {
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-draft {
    background-color: #e0e0e0;
    color: #333;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-signed {
    background-color: #d4edda;
    color: #155724;
}

.status-completed {
    background-color: #cce5ff;
    color: #004085;
}

/* Responsive design */
@media (max-width: 768px) {
    .header {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .main {
        padding: 0.5rem 0.5rem 5rem 0.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-text {
        font-size: 0.7rem;
    }
    
    .nav-icon {
        width: 20px;
        height: 20px;
    }
    
    .list-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .list-item-actions {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .signature-actions {
        flex-direction: column;
    }
    
    #signature-canvas {
        width: 100%;
        height: 150px;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        width: auto;
    }
    
    /* Better mobile form layout */
    .client-form-section {
        margin-bottom: 1.5rem;
    }
    
    .client-form-section h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        color: #2196F3;
        border-bottom: 2px solid #e3f2fd;
        padding-bottom: 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        color: #555;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        transition: border-color 0.2s ease;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #2196F3;
        outline: none;
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    }
    
    /* Virtual Scroll Improvements */
.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: white;
    transition: background-color 0.2s ease;
    min-height: 120px;
    box-sizing: border-box;
}

.contact-item:hover {
    background-color: #f8f9fa;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    background-color: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2196F3;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
    min-width: 0;
}

.contact-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.contact-company {
    font-weight: 500;
    color: #2196F3;
    margin-bottom: 0.25rem;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: white;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-action-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}

.contact-action-btn.btn-success:hover {
    background-color: #e8f5e8;
    border-color: #4caf50;
    color: #4caf50;
}

.contact-action-btn.btn-info:hover {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #2196f3;
}

.contact-action-btn.btn-warning:hover {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #ffc107;
}

.contact-action-btn.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #6c757d;
    color: #6c757d;
}

.contact-action-btn.btn-danger:hover {
    background-color: #ffebee;
    border-color: #f44336;
    color: #f44336;
}

.contacts-stats {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.no-contacts {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Mobile responsive for contact items */
@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        min-height: auto;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .contact-actions {
        justify-content: center;
    }
}
    .contact-item {
        background-color: #f8f9fa;
        padding: 1rem;
        border-radius: 8px;
        margin-bottom: 1rem;
        border: 1px solid #e9ecef;
    }
    
    .contact-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .contact-header h5 {
        color: #2196F3;
        font-size: 1rem;
        margin: 0;
    }
    
    /* Button improvements for mobile */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 6px;
        font-weight: 500;
        text-align: center;
        min-height: 44px; /* iOS touch target minimum */
        border: 2px solid transparent;
        transition: all 0.2s ease;
    }
    
    .btn-primary {
        background-color: #2196F3;
        color: white;
        border-color: #2196F3;
    }
    
    .btn-primary:hover,
    .btn-primary:focus {
        background-color: #1976D2;
        border-color: #1976D2;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
    }
    
    .btn-secondary {
        background-color: #6c757d;
        color: white;
        border-color: #6c757d;
    }
    
    .btn-secondary:hover,
    .btn-secondary:focus {
        background-color: #5a6268;
        border-color: #5a6268;
        transform: translateY(-1px);
    }
    
    .btn-danger {
        background-color: #dc3545;
        color: white;
        border-color: #dc3545;
    }
    
    .btn-danger:hover,
    .btn-danger:focus {
        background-color: #c82333;
        border-color: #c82333;
        transform: translateY(-1px);
    }
    
    /* Search improvements */
    .search-box input {
        font-size: 16px;
        padding: 0.75rem 1rem;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        background-color: white;
        transition: all 0.2s ease;
    }
    
    .search-box input:focus {
        border-color: #2196F3;
        box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
        outline: none;
    }
    
    /* List items improvements */
    .client-list-item {
        background-color: white;
        border-radius: 12px;
        padding: 1rem;
        margin-bottom: 0.75rem;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        transition: all 0.2s ease;
    }
    
    .client-list-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-color: #2196F3;
    }
    
    .client-compact-info {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .client-main-info {
        flex: 1;
    }
    
    .client-name {
        font-size: 1rem;
        font-weight: 600;
        color: #333;
        margin-bottom: 0.25rem;
        line-height: 1.3;
    }
    
    .client-legal-badge {
        display: inline-block;
        background-color: #e3f2fd;
        color: #1976d2;
        padding: 0.125rem 0.5rem;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 500;
        margin-left: 0.5rem;
    }
    
    .client-subtitle {
        font-size: 0.85rem;
        color: #666;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }
    
    .client-quick-actions {
        display: flex;
        gap: 0.25rem;
        flex-shrink: 0;
    }
    
    .quick-action-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid #e0e0e0;
        background-color: white;
        color: #666;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        transition: all 0.2s ease;
    }
    
    .quick-action-btn:hover {
        background-color: #2196F3;
        color: white;
        border-color: #2196F3;
        transform: scale(1.1);
    }
    
    /* Document and map modal improvements */
    .document-view-modal-content,
    .map-modal-content {
        margin: 0.5rem;
        padding: 1rem;
        max-height: 95vh;
    }
    
    .map-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navigation-buttons {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .navigation-buttons .btn {
        font-size: 0.75rem;
        padding: 0.5rem;
        text-align: center;
    }
    
    .document-info p {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .document-info strong {
        min-width: auto;
        font-weight: 600;
        color: #333;
    }
}
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section.active {
    animation: fadeIn 0.3s ease;
}

/* Install prompt */
.install-prompt {
    background-color: #4CAF50;
    color: white;
    padding: 1rem;
    text-align: center;
    position: fixed;
    bottom: 70px; /* Above bottom navigation */
    left: 0;
    right: 0;
    z-index: 1001; /* Higher than bottom nav */
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.install-prompt.show {
    transform: translateY(0);
}

.install-prompt button {
    background: white;
    color: #4CAF50;
    border: none;
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Services selection */
.services-selection {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    background-color: #f9f9f9;
}

.service-item {
    margin-bottom: 0.5rem;
}

.service-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.service-item label:hover {
    background-color: #e8f4fd;
}

.service-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.service-name {
    font-weight: 500;
}

.service-price {
    color: #666;
    font-size: 0.9rem;
    margin-left: auto;
}

/* Enhanced service types and billing */
.service-type-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.service-type-subscription {
    background-color: #e3f2fd;
    color: #1976d2;
}

.service-type-location {
    background-color: #e8f5e8;
    color: #388e3c;
}

.service-type-package {
    background-color: #fff3e0;
    color: #f57c00;
}

.service-type-penalty {
    background-color: #ffebee;
    color: #d32f2f;
}

.service-type-option {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Service dates container */
.service-dates-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.5rem;
    background-color: #f9f9f9;
}

.service-date-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: white;
    border-radius: 4px;
}

.service-date-item h5 {
    margin: 0;
    min-width: 150px;
    font-size: 0.9rem;
}

.service-date-inputs {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.service-date-inputs input {
    flex: 1;
}

/* Device types display */
.device-types {
    margin-top: 0.5rem;
    font-style: italic;
    color: #666;
}

/* Contract status indicators */
.contract-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-draft {
    background-color: #e0e0e0;
    color: #424242;
}

.status-pending {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-signed {
    background-color: #e8f5e8;
    color: #388e3c;
}

.status-completed {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-renewal-needed {
    background-color: #ffebee;
    color: #d32f2f;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Contract management enhancements */
.contract-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contract-filters {
    margin-bottom: 1rem;
}

.contract-filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.contract-details h4 {
    margin: 1rem 0 0.5rem 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.25rem;
}

.contract-details h4:first-child {
    margin-top: 0;
}

.contract-services {
    margin-top: 0.5rem;
}

.service-detail {
    background-color: #f8f9fa;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #2196F3;
}

.contract-signature {
    text-align: center;
    margin-top: 1rem;
}

.service-details {
    flex: 1;
}

.service-meta {
    margin-top: 0.25rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .service-date-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .service-date-item h5 {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .service-date-inputs {
        flex-direction: column;
    }
    
    .contract-actions {
        flex-direction: column;
    }
    
    .service-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Client form styling */
.client-form-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
}

.client-form-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    position: relative;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-header h5 {
    margin: 0;
    color: #555;
    font-size: 1rem;
    font-weight: 500;
}

.remove-contact {
    margin-left: auto;
}

#add-contact {
    width: 100%;
    margin-top: 1rem;
}

/* Interactive contact elements */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-link {
    color: #2196F3;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.contact-link:hover {
    background-color: #e3f2fd;
    text-decoration: none;
}

.contact-link-icon {
    width: 16px;
    height: 16px;
}

.client-company-info {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.client-company-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.client-legal-badge {
    display: inline-block;
    background-color: #e8f4fd;
    color: #1976d2;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.client-contacts-section {
    margin-top: 1rem;
}

.client-contacts-section h5 {
    margin: 0 0 0.75rem 0;
    color: #555;
    font-size: 1rem;
    font-weight: 500;
}

.contact-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.contact-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.contact-name {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.contact-role {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .client-form-section {
        margin-bottom: 1.5rem;
        padding: 0.75rem;
    }
    
    .contact-item {
        padding: 0.75rem;
    }
    
    .contact-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .client-company-info {
        padding: 0.75rem;
    }
}

/* Simplified Client List Styles */
.client-list-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.client-list-item:hover {
    background-color: #f8f9fa;
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.client-compact-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.client-main-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-subtitle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

.primary-contact {
    font-weight: 500;
}

.client-city {
    color: #888;
}

.client-city::before {
    content: "•";
    margin-right: 0.5rem;
    color: #ccc;
}

.client-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-action-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
    text-decoration: none;
}

.edit-btn:hover {
    background-color: #e3f2fd;
    border-color: #2196F3;
    color: #2196F3;
}

.client-expand-indicator {
    margin-left: 1rem;
    color: #ccc;
    transition: transform 0.2s ease;
}

.client-list-item:hover .client-expand-indicator {
    color: #2196F3;
    transform: translateX(4px);
}

/* Client Details Modal */
.client-details-section {
    margin-bottom: 2rem;
}

.client-details-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: #555;
    min-width: 140px;
    margin-right: 1rem;
}

.detail-value {
    flex: 1;
    color: #333;
}

.address-actions {
    margin-top: 0.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: #2196F3;
    text-decoration: none;
    padding: 0.25rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
}

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

.contact-detail-card {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.contact-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-detail-header h5 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.contact-role-badge {
    background-color: #e8f4fd;
    color: #1976d2;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.contact-detail-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.contact-detail-item a {
    color: #2196F3;
    text-decoration: none;
}

.contact-detail-item a:hover {
    text-decoration: underline;
}

.client-details-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.client-details-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile responsiveness for simplified list */
@media (max-width: 768px) {
    .client-list-item {
        padding: 0.75rem;
    }
    
    .client-compact-info {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .client-quick-actions {
        justify-content: flex-end;
    }
    
    .client-expand-indicator {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .detail-label {
        min-width: auto;
        margin-right: 0;
        font-size: 0.9rem;
    }
    
    .client-details-actions {
        flex-direction: column;
    }
    
    .contact-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Address Autocomplete Styles */
.address-autocomplete-container {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.address-suggestions.show {
    display: block;
}

.address-suggestion {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.address-suggestion:hover,
.address-suggestion.suggestion-active {
    background-color: #f8f9fa;
}

.address-suggestion:last-child {
    border-bottom: none;
}

.suggestion-main {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.suggestion-context {
    font-size: 0.9rem;
    color: #666;
}

/* Ensure address input has proper styling */
#client-company-address {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

#client-company-address:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* Address autocomplete container focus state */
.address-autocomplete-container:focus-within .address-suggestions {
    border-color: #2196F3;
}

/* SIRET and validation styles */
.validation-message {
    font-size: 0.9rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.validation-message.success {
    background-color: #e8f5e8;
    color: #388e3c;
    border: 1px solid #4CAF50;
}

.validation-message.error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #f44336;
}

/* SIRET input formatting */
#client-siret {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Document Management Styles */
.documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.documents-header h4 {
    margin: 0;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background-color: #fafafa;
    transition: background-color 0.2s ease;
}

.document-item:hover {
    background-color: #f0f0f0;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.document-icon {
    flex-shrink: 0;
}

.document-details {
    min-width: 0;
    flex: 1;
}

.document-details h6 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    font-size: 0.8rem;
    color: #666;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
}

.btn-icon.btn-danger:hover {
    background-color: #ffebee;
    border-color: #f44336;
    color: #f44336;
}

.no-documents {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    border: 1px dashed #ddd;
}

/* File upload styling */
input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background-color: #fafafa;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

input[type="file"]:hover {
    border-color: #2196F3;
    background-color: #f8f9fa;
}

input[type="file"]:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

/* Mobile responsiveness for documents */
@media (max-width: 768px) {
    .documents-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .document-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .document-info {
        gap: 0.5rem;
    }
    
    .document-actions {
        justify-content: flex-end;
    }
}

/* Contact Management Styles */
.contacts-filters {
    margin-bottom: 1rem;
}

.contacts-filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    min-width: 200px;
}

.contact-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background-color: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.contact-list-item:hover {
    background-color: #f8f9fa;
    border-color: #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.contact-info-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.contact-avatar {
    width: 48px;
    height: 48px;
    background-color: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2196F3;
    flex-shrink: 0;
}

.contact-details {
    flex: 1;
    min-width: 0;
}

.contact-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.contact-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.company-name {
    font-weight: 500;
    color: #2196F3;
}

.contact-role {
    color: #666;
    font-style: italic;
}

.contact-role::before {
    content: "•";
    margin-right: 0.5rem;
    color: #ccc;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.contact-email,
.contact-phone {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: white;
    color: #666;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.contact-action-btn:hover {
    background-color: #f0f0f0;
    border-color: #999;
    color: #333;
    text-decoration: none;
}

.contact-action-btn.btn-danger:hover {
    background-color: #ffebee;
    border-color: #f44336;
    color: #f44336;
}

/* Mobile responsiveness for contacts */
@media (max-width: 768px) {
    .contact-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .contact-info-main {
        gap: 0.75rem;
    }
    
    .contact-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .contact-role::before {
        display: none;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .contact-actions {
        justify-content: flex-end;
    }
}

/* Company Search Styles */
.company-search-container {
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.company-search-container input {
    flex: 1;
}

/* Company search container */
.company-search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-search-container input {
    flex: 1;
}

.company-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    margin-top: -1px;
}

.company-suggestions.show {
    display: block;
}

.company-suggestion {
    padding: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.company-suggestion:hover {
    background-color: #f8f9fa;
}

.company-suggestion:last-child {
    border-bottom: none;
}

.company-suggestion-content {
    width: 100%;
}

.company-suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.company-suggestion-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.3;
}

.company-suggestion-siret {
    font-size: 0.8rem;
    color: #666;
    font-family: 'Courier New', monospace;
    background-color: #f5f5f5;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.company-suggestion-legal {
    font-size: 0.85rem;
    color: #007bff;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.company-suggestion-activity {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.company-suggestion-address {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.3;
}

.company-suggestion-address svg {
    flex-shrink: 0;
    color: #999;
    margin-top: 0.1rem;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Search button styling */
.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.company-suggestions-info {
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Improved button styles for maps and documents */
.btn svg {
    vertical-align: middle;
}

/* Mobile responsive design for company suggestions */
@media (max-width: 768px) {
    .company-search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .company-suggestions {
        position: fixed;
        top: 50%;
        left: 1rem;
        right: 1rem;
        transform: translateY(-50%);
        max-height: 60vh;
        border-radius: 8px;
        border: 1px solid #ddd;
        z-index: 10001;
    }

    .company-suggestion {
        padding: 0.75rem;
    }
    
    .company-suggestion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .company-suggestion-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .company-suggestion-siret {
        align-self: flex-start;
    }
    
    .company-suggestion-address {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    
    .btn-small {
        width: 100%;
        justify-content: center;
    }
}

#search-company {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Spinner for loading states */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Document View Modal Styles */
.document-view-modal-content {
    max-width: 800px;
    max-height: 90vh;
}

.document-preview {
    background-color: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.image-preview {
    text-align: center;
    padding: 1rem;
}

.pdf-preview {
    padding: 0;
}

.text-preview {
    padding: 2rem;
    text-align: center;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #666;
}

.document-icon-large {
    opacity: 0.7;
}

.document-info {
    background-color: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.document-info p {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-info p:last-child {
    margin-bottom: 0;
}

.document-info strong {
    min-width: 100px;
    color: #555;
}

/* Map Modal Styles */
.map-modal-content {
    max-width: 900px;
    max-height: 90vh;
}

.map-address {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    margin: 1rem 0;
    color: #666;
    font-style: italic;
}

.map-container {
    margin: 1rem 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.map-actions > .btn {
    align-self: flex-end;
}

.map-navigation-options h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

.navigation-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.navigation-buttons .btn {
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navigation-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-outline-primary {
    border: 1px solid #2196F3;
    color: #2196F3;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #2196F3;
    color: white;
}

.btn-outline-success {
    border: 1px solid #4CAF50;
    color: #4CAF50;
    background: transparent;
}

.btn-outline-success:hover {
    background: #4CAF50;
    color: white;
}

.btn-outline-info {
    border: 1px solid #17a2b8;
    color: #17a2b8;
    background: transparent;
}

.btn-outline-info:hover {
    background: #17a2b8;
    color: white;
}

.btn-outline-warning {
    border: 1px solid #ff9800;
    color: #ff9800;
    background: transparent;
}

.btn-outline-warning:hover {
    background: #ff9800;
    color: white;
}

.map-error,
.map-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    color: #666;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.map-error p,
.map-fallback p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Company suggestions info */
.company-suggestions-info {
    padding: 0.5rem 0.75rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Improved button styles for maps and documents */
.btn svg {
    vertical-align: middle;
}


/* Pagination Styles */
.pagination-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-buttons .btn {
    min-width: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.pagination-buttons .btn.active {
    background-color: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* Contact Management Improvements */
.other-companies {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.company-name.primary {
    font-weight: 600;
    color: #2196F3;
}

.contact-companies-container {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    background-color: #f8f9fa;
}

.selected-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.selected-company span {
    flex: 1;
    font-weight: 500;
}

.selected-company input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.selected-company label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: normal;
}

.add-company-section {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-company-section input {
    flex: 1;
}

/* Enhanced Autocomplete Styles */
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* Mobile responsiveness for new features */
@media (max-width: 768px) {
    .pagination-buttons {
        justify-content: center;
        gap: 0.25rem;
    }
    
    .pagination-buttons .btn {
        min-width: 36px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .contact-companies-container {
        padding: 0.75rem;
    }
    
    .selected-company {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .add-company-section {
        flex-direction: column;
    }
}

/* Contact Details Panel */
.contact-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    margin-bottom: 1rem;
    overflow: hidden;
}

.contact-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
}

.contact-details-panel {
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 1rem;
}

.contact-activities-reminders,
.client-activities-reminders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.activities-section,
.reminders-section {
    background-color: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

.activities-section h4,
.reminders-section h4 {
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 1rem;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 0.25rem;
}

.activity-item-compact,
.reminder-item-compact {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: #fff;
}

.activity-meta,
.reminder-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-type,
.reminder-title {
    font-weight: 600;
    color: #2196F3;
    font-size: 0.9rem;
}

.activity-date,
.reminder-date {
    font-size: 0.8rem;
    color: #666;
}

.reminder-date.overdue {
    color: #f44336;
    font-weight: 600;
}

.activity-description,
.reminder-description {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.reminder-actions {
    margin-top: 0.5rem;
}

.more-items {
    font-style: italic;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: center;
}

.no-data,
.loading {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 1rem;
}

/* Reminders Dashboard */
.reminders-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.reminders-filters select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.reminder-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.reminder-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.reminder-item.overdue {
    border-left: 4px solid #f44336;
    background-color: #fff5f5;
}

.reminder-item.today {
    border-left: 4px solid #ff9800;
    background-color: #fff8e1;
}

.reminder-item.completed {
    opacity: 0.7;
    background-color: #f1f8e9;
}

.reminder-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.reminder-title-section {
    flex: 1;
}

.reminder-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
}

.reminder-entity {
    color: #666;
    font-size: 0.9rem;
}

.reminder-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.reminder-type-badge {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.reminder-type-call { background-color: #e8f5e8; color: #2e7d32; }
.reminder-type-email { background-color: #fff3e0; color: #f57c00; }
.reminder-type-meeting { background-color: #f3e5f5; color: #7b1fa2; }
.reminder-type-follow-up { background-color: #e0f2f1; color: #00695c; }
.reminder-type-other { background-color: #fafafa; color: #424242; }

.reminder-date {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: #f5f5f5;
}

.reminder-date.overdue {
    background-color: #ffebee;
    color: #c62828;
    font-weight: 600;
}

.reminder-date.today {
    background-color: #fff3e0;
    color: #ef6c00;
    font-weight: 600;
}

.reminder-description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.reminder-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.completed-badge {
    color: #4caf50;
    font-weight: 500;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.no-reminders {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.no-reminders p {
    font-size: 1.1rem;
    margin: 0;
}

/* Responsive design for contact details */
@media (max-width: 768px) {
    .contact-activities-reminders,
    .client-activities-reminders {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .reminders-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reminder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .reminder-meta {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
    
    .reminder-actions {
        flex-wrap: wrap;
    }
}

