/* Custom Button Styles for ClientFlow Navigation */
.add-stage-btn, .add-card-btn, .dashboard-btn {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0 5px;
    min-width: 140px;
    border: none;
    text-decoration: none;
}

.add-stage-btn, .add-card-btn {
    background: linear-gradient(to bottom, #4CAF50, #388E3C);
    color: white;
}

.add-stage-btn:hover, .add-card-btn:hover {
    background: linear-gradient(to bottom, #43A047, #2E7D32);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dashboard-btn {
    background: linear-gradient(to bottom, #2196F3, #1976D2);
    color: white;
}

.dashboard-btn:hover {
    background: linear-gradient(to bottom, #1E88E5, #1565C0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.kanban-board {
    display: flex;
    gap: 20px;
    padding: 20px;
    width: 98%;
    margin: 0 auto;
    height: calc(100vh - 100px);
    overflow-x: auto;
}

.stage {
    width: 300px;
    flex: 0 0 300px; /* Base size */
    background-color: #f4f4f4;
    border-radius: 5px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    border: 3px solid transparent; /* Add this for drop indicators */
}

.cards-container {
    flex: 1;
    min-height: 100px;
    padding: 10px;
    overflow-y: auto;
}

.card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-left-width: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    background: linear-gradient(to right, rgba(224,224,224,0.15), white 25%);
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    background: linear-gradient(to right, rgba(224,224,224,0.25), white 30%);
}

.card.expanded {
    background-color: white;
    border-color: #2196F3;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.card-details {
    display: none;
    margin-top: 12px;
    font-size: 0.85em;
}

.card.expanded .card-details {
    display: block;
    animation: fadeIn 0.2s ease;
}

.card-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.card-section:last-child {
    margin-bottom: 0;
}

.card-section strong {
    display: block;
    margin-bottom: 6px;
    color: #2c3e50;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-section div {
    color: #4a5568;
    line-height: 1.4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent drag when clicking edit button */
.edit-btn {
    position: relative;
    z-index: 2;
    background: none;
    width: auto;
    padding: 2px 4px;
    color: #666;
    font-size: 0.85em;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.edit-btn:hover {
    opacity: 1;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.card-preview {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8em;
}

.card h3 {
    margin: 0 0 6px 0;
    font-size: 1em;
}

.card p {
    margin: 0;
    color: #666;
}

button {
    width: 100%;
    padding: 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.kanban-board-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info {
    color: #666;
    font-size: 0.9em;
}

.logout-btn {
    background-color: #f44336;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s;
}

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

.add-stage-btn, .add-card-btn {
    max-width: 200px;
    flex: 0 0 auto;
}

.add-stage-btn {
    background-color: #4CAF50;
}

.add-stage-btn:hover {
    background-color: #388E3C;
}

.add-card-btn {
    background-color: #4CAF50;
}

.stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    cursor: move; /* Show move cursor on stage header */
}

.stage-title {
    cursor: pointer;
    margin: 0;
    padding: 5px;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-title:hover {
    background-color: #e0e0e0;
    border-radius: 3px;
}

.delete-stage-btn {
    background: none;
    border: none;
    color: #666;
    width: auto;
    height: auto;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.delete-stage-btn:hover {
    opacity: 1;
    background-color: #f5f5f5;
    color: #333;
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
    position: relative;
    padding-right: 80px;
}

.card-title-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
}

.card-header h3 {
    margin: 0;
    font-size: 0.95em;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
}

.card.urgency-low {
    border-left-color: #4caf50;
    background: linear-gradient(to right, rgba(76,175,80,0.10), white 25%);
}

.card.urgency-medium {
    border-left-color: #ed8936;
    background: linear-gradient(to right, rgba(237,137,54,0.10), white 25%);
}

.card.urgency-high {
    border-left-color: #e53e3e;
    background: linear-gradient(to right, rgba(229,62,62,0.10), white 25%);
}

.card.overdue {
    background-color: #ffebeb; /* Base color */
    background: linear-gradient(to right, rgba(229,62,62,0.15), #ffebeb 25%);
    border: 1px solid #e53e3e;
    border-left-width: 4px;
    border-left-color: #e53e3e;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15); /* Add red shadow for more emphasis */
}

.card.overdue:hover {
    background: linear-gradient(to right, rgba(229,62,62,0.25), #ffdbdb 30%);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.25); /* Enhanced shadow on hover */
}

.card.overdue.expanded {
    background-color: #ffebeb; /* Match the normal overdue background */
    box-shadow: 0 6px 12px rgba(229, 62, 62, 0.3); /* Enhanced shadow when expanded */
}

.overdue-badge {
    align-self: flex-start;
    background-color: #e53e3e; /* Red background */
    color: white; /* White text for better contrast */
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: -2px;
}

.card-deadline, .card-phone {
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #546e7a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-phone::before {
    content: none;
}

.card-phone span::before,
.card-phone i::before {
    display: none;
}

.card-deadline::before {
    content: none;
}

.card-notes {
    font-size: 0.85em;
    color: #666;
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding-top: 8px;
}

.card-controls {
    display: flex;
    gap: 4px;
    align-items: center;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.custom-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 40px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dialog-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    width: 80%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease-out;
    position: relative;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dialog-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-size: 1em;
}

.dialog-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

textarea.dialog-input {
    min-height: 120px;
    resize: vertical;
}

.dialog-buttons {
    position: sticky;
    bottom: -40px;
    background: white;
    margin: 32px -40px -40px -40px;
    padding: 20px 40px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    z-index: 10;
}

.dialog-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.2s ease;
}

.dialog-button.submit-btn {
    background-color: #2196F3;
    color: white;
}

.dialog-button.submit-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

.dialog-button:not(.submit-btn) {
    background-color: #f5f5f5;
    color: #333;
}

.dialog-button:not(.submit-btn):hover {
    background-color: #e0e0e0;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
}

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.attachment-item:hover {
    background-color: #f5f5f5;
}

.attachment-item a {
    color: #2196F3;
    text-decoration: none;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-attachment-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 0 4px;
    font-size: 1.2em;
    width: auto;
}

.delete-attachment-btn:hover {
    color: #cc0000;
}

.file-upload-area {
    border: 2px dashed #2196F3;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    background-color: rgba(33, 150, 243, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background-color: rgba(33, 150, 243, 0.1);
    border-color: #1976D2;
}

.file-list-item {
    background: #f8f9fa;
    padding: 12px 16px;
    margin-top: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.file-list-item small {
    color: #666;
    margin-left: 8px;
}

/* Dashboard Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    margin: 0;
    color: #333;
}

.back-btn {
    padding: 8px 16px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

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

.dashboard-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stats-card h3 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 1em;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #2196F3;
}

.stats-card.overdue-cards .stat-number {
    color: #e53e3e;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.2em;
}

.overdue-section {
    background: #fff5f5;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(220,38,38,0.1);
    margin-top: 50px;
    margin-bottom: 50px;
}

.overdue-section h2 {
    margin-top: 0;
    color: #333;
    margin-bottom: 20px;
}

.overdue-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.overdue-card {
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 15px;
}

.overdue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.overdue-card-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

.stage-badge {
    background: #2196F3;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.overdue-card-details {
    margin-bottom: 15px;
}

.overdue-card-details p {
    margin: 5px 0;
    color: #666;
}

.deadline {
    color: #e53e3e !important;
    font-weight: 500;
}

.view-card-btn {
    width: 100%;
    padding: 8px;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

/* Style the dashboard button with blue color */
.dashboard-btn {
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: background-color 0.2s;
    display: inline-block;
}

.dashboard-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

/* Login styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.login-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-btn {
    background-color: #2196F3;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* User management styles */
.users-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.users-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.add-user-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

.delete-user-btn {
    background-color: #f44336;
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.permission-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.permission-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.permission-badge.dashboard {
    background-color: #e3f2fd;
    color: #1976d2;
}

.permission-badge.edit {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.permission-badge.move {
    background-color: #fff3e0;
    color: #f57c00;
}

.permissions-group {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.permission-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.permission-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.edit-user-btn {
    background-color: #2196F3;
    margin-right: 8px;
}

.permission-option input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Installer Management Styles */
.installers-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.installers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.installers-table th,
.installers-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.installers-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.add-installer-btn {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
}

.edit-installer-btn {
    background-color: #2196F3;
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 8px;
}

.delete-installer-btn {
    background-color: #f44336;
    color: white;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.status-available {
    background-color: #e8f5e9;
    color: #2e7d32;
}

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

.status-on-leave {
    background-color: #ffebee;
    color: #c62828;
}

/* Installer Schedule Styles */
.schedule-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.schedule-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.schedule-select, .schedule-date {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.view-schedule-btn {
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: auto;
}

.schedule-display {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.schedule-header {
    margin-bottom: 20px;
}

.no-appointments {
    color: #666;
    text-align: center;
    padding: 20px;
}

.appointments {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.appointment-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #ddd;
}

.appointment-details h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.appointment-details p {
    margin: 5px 0;
    color: #666;
}

.view-card-btn {
    margin-top: 10px;
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: auto;
    display: inline-block;
}

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

.no-appointments {
    text-align: center;
    padding: 20px;
    color: #666;
    background: #f5f5f5;
    border-radius: 8px;
}

.client-info {
    margin-top: 4px;
}

.client-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.client-phone, .client-address, .client-notes {
    font-size: 0.9em;
    color: #666;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-calendar td {
    min-width: 150px;
    max-width: 200px;
}

.schedule-calendar td.has-schedule {
    background-color: #fff;
}

/* Add hover effect to show full details */
.schedule-item:hover {
    position: relative;
    z-index: 10;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.schedule-item:hover .client-phone,
.schedule-item:hover .client-address,
.schedule-item:hover .client-notes {
    white-space: normal;
    overflow: visible;
}

.has-schedule {
    background-color: #f8f9fa;
}

.time {
    font-weight: 500;
    margin-bottom: 2px;
}

.client {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archived-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.archived-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.archived-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}

.archived-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
}

.archive-date {
    font-size: 0.8em;
    color: #666;
}

.view-archived-btn {
    background-color: #673AB7;
    color: white;
    width: 100%;
    margin-top: 10px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.archive-btn {
    background-color: #9C27B0;
    color: white;
}

.archive-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.delete-btn {
    position: relative;
    z-index: 2;
    background: none;
    width: auto;
    padding: 2px 4px;
    color: #ff4444;
    font-size: 0.85em;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.delete-btn:hover {
    opacity: 1;
    background-color: #ffebee;
    border-radius: 4px;
}

.archive-controls {
    margin-bottom: 20px;
}

.search-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.archive-search, .archive-date-search {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.archive-search {
    flex: 2;
}

.archive-date-search {
    flex: 1;
}

.search-btn, .show-all-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #2196F3;
    color: white;
}

.show-all-btn {
    background-color: #673AB7;
}

.archive-info {
    text-align: center;
    color: #666;
    margin-top: 20px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.no-results {
    text-align: center;
    color: #666;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
}

.recent-archives h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Add these styles for collapsible sections */
.collapsible-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header:hover {
    background-color: #f8f9fa;
}

.section-header h2 {
    margin: 0;
}

.toggle-icon {
    font-size: 1.2em;
    color: #666;
    transition: transform 0.3s ease;
}

.section-content {
    background: white;
    border-radius: 0 0 8px 8px;
    margin-top: 2px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Add these styles for invoiced cards */
.card.invoiced {
    background-color: #f0fff4;
    border-color: #48bb78;
}

.card.invoiced:hover {
    background-color: #e6ffed;
}

.card.invoiced.expanded {
    background-color: #f0fff4;
    border-color: #48bb78;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.2);
}

.print-schedule-btn {
    background-color: #673AB7;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: auto;
}

.print-schedule-btn:hover {
    background-color: #5E35B1;
}

@media print {
    .schedule-controls,
    .view-card-btn {
        display: none !important;
    }
    
    .appointment-card {
        break-inside: avoid;
        border: 1px solid #000;
    }
    
    .schedule-display {
        padding: 0;
    }
}

/* Add this new style for better section spacing */
.dashboard-container > div {
    margin-bottom: 50px;
}

.dashboard-container > div:last-child {
    margin-bottom: 0;
}

/* Update archived section styles */
.recent-archives-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.archived-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.archived-card-details {
    flex-grow: 1;
    margin: 10px 0;
}

.view-archived-btn {
    margin-top: auto;
}

/* Update search results display */
.archive-search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.system-notes {
    background-color: #f8f9fa;
    cursor: not-allowed;
    color: #666;
}

.stage-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toggle-cards-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-cards-btn:hover {
    background-color: #e0e0e0;
    border-radius: 4px;
}

.toggle-icon {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.system-notes-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.invoiced-cards .stat-number {
    color: #48bb78;
}

.stat-subtext {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

/* Add a modern grid layout for the form */
#cardForm, #editCardForm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

/* Make certain fields span full width */
.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
}

.dialog-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-size: 1em;
}

.dialog-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    outline: none;
}

textarea.dialog-input {
    min-height: 120px;
    resize: vertical;
}

.dialog-buttons {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.dialog-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1em;
    transition: all 0.2s ease;
}

.dialog-button.submit-btn {
    background-color: #2196F3;
    color: white;
}

.dialog-button.submit-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}

.dialog-button:not(.submit-btn) {
    background-color: #f5f5f5;
    color: #333;
}

.dialog-button:not(.submit-btn):hover {
    background-color: #e0e0e0;
}

/* Style the file upload area */
.file-upload-area {
    border: 2px dashed #2196F3;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    background-color: rgba(33, 150, 243, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background-color: rgba(33, 150, 243, 0.1);
    border-color: #1976D2;
}

.file-list-item {
    background: #f8f9fa;
    padding: 12px 16px;
    margin-top: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

/* Update checkbox styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Make system notes section stand out */
.system-notes-section {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.system-notes {
    background: white;
    font-family: monospace;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Update phone number display */
.card-phone {
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #546e7a;
    display: flex;
    align-items: center;
}

/* Remove the automatic phone icon and use a single one */
.card-phone::before {
    content: none;
}

/* Add attachment count styles */
.attachments-count {
    display: flex;
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #546e7a;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.card.expanded .attachments-count {
    /* Keep existing display flex */
    display: flex;
}

.attachments-count::before {
    content: "📎";
}

/* Add this new style for client notes */
.client-notes {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.existing-attachments {
    margin-bottom: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.existing-attachments:empty {
    display: none;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border-bottom: 1px solid #eee;
}

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

.attachment-item:hover {
    background-color: #f5f5f5;
}

.attachment-item a {
    color: #2196F3;
    text-decoration: none;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-attachment-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 0 4px;
    font-size: 1.2em;
    width: auto;
}

.delete-attachment-btn:hover {
    color: #cc0000;
}

/* Update the attachments label style */
.form-group label:has(+ .existing-attachments) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 8px;
    color: #333;
}

/* Add these new styles for the notes section */
.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.add-note-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: auto;
}

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

.system-notes {
    min-height: 200px;
    font-family: monospace;
    white-space: pre-wrap;
    line-height: 1.5;
}

/* Update existing system-notes-section style */
.system-notes-section {
    grid-column: 1 / -1;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.system-notes-section label {
    font-weight: 500;
    color: #333;
    font-size: 0.95em;
}

.note-dialog .dialog-content {
    max-width: 500px;
}

.note-dialog textarea {
    min-height: 100px;
}

.note-dialog .checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.note-dialog .checkbox-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.invoice-fields {
    margin-top: 8px;
    padding-left: 24px;
}

.invoice-fields .dialog-input {
    width: 100%;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stage-count {
    font-size: 0.8em;
    color: #666;
    font-weight: normal;
    margin-left: 4px;
}

.stage-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

.reminders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.add-reminder-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: auto;
}

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

.reminders-list {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.reminder-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

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

.reminder-item:hover {
    background-color: #f5f5f5;
}

.reminder-content {
    flex: 1;
    min-width: 0;
}

.reminder-date {
    font-size: 0.8em;
    color: #666;
}

.reminder-item.completed .reminder-text {
    text-decoration: line-through;
    color: #666;
}

.delete-reminder-btn {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    padding: 0;
    font-size: 1em;
    opacity: 0.5;
    transition: opacity 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
}

.delete-reminder-btn:hover {
    opacity: 1;
}

.no-reminders {
    padding: 12px;
    color: #666;
    text-align: center;
    font-style: italic;
}

.reminder-bell {
    position: relative;
    cursor: pointer;
    padding: 5px;
}

.bell-icon {
    font-size: 1.2em;
}

.reminder-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.8em;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reminder-count:empty {
    display: none;
}

.reminders-popup {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    padding: 12px;
}

.reminder-popup-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

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

.reminder-popup-item .client-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.reminder-popup-item .reminder-message {
    color: #666;
    font-size: 0.9em;
}

.reminder-popup-item .reminder-time {
    font-size: 0.8em;
    color: #999;
    margin-top: 4px;
}

/* Add these new styles for the attachment viewer */
.attachment-viewer .dialog-content {
    display: flex;
    flex-direction: column;
    padding: 0;
    max-width: 95vw;
    max-height: 95vh;
    width: 95vw;
    height: 95vh;
}

.attachment-navigation {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px 4px 0 0;
    align-items: center;
}

.attachment-actions {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.print-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: bold;
}

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

.download-pdf-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.download-pdf-btn:hover {
    background-color: #0b7dda;
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.nav-btn:not(:disabled):hover {
    background-color: #1976D2;
}

.attachment-container {
    flex: 1;
    overflow: hidden;
    padding: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

/* Update PDF viewer styles */
.attachment-container iframe[src$=".pdf"] {
    width: 100%;
    height: calc(95vh - 80px);
    transform: rotate(0deg); /* Ensure no rotation */
}

/* Optional: Add specific styles for PDF containers */
.attachment-container:has(iframe[src$=".pdf"]) {
    padding: 0; /* Remove padding for PDFs to maximize space */
    overflow: auto; /* Allow scrolling if needed */
}

/* Add specific styles for image viewer */
.attachment-container iframe[src$=".jpg"],
.attachment-container iframe[src$=".jpeg"],
.attachment-container iframe[src$=".png"],
.attachment-container iframe[src$=".gif"] {
    min-width: 80%;
    min-height: 80%;
}

.attachment-viewer .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    width: auto;
    z-index: 1;
}

.attachment-viewer .close-btn:hover {
    background-color: #cc0000;
}

.installer-tag {
    font-size: 0.8em;
    font-weight: normal;
    background: #f0f4f8;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    color: #2d3748;
}

.column-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 4px;
}

.size-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
}

.size-btn:hover {
    background: #eee;
}

.size-display {
    min-width: 48px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
}

.search-box {
    position: relative;
    margin-right: 10px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 200px;
    font-size: 14px;
}

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

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

.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-name {
    font-weight: 500;
    color: #333;
}

.search-result-info {
    font-size: 0.85em;
    color: #666;
}

.search-result-stage {
    font-size: 0.8em;
    color: #2196F3;
}

/* Add these styles for the new sections */
.column-details-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.column-details-section h2 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.details-subtitle {
    color: #666;
    font-size: 0.9em;
    margin: 8px 0 20px 0;
}

.column-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.column-detail-card {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.detail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.detail-card-header h3 {
    margin: 0;
    color: #333;
    font-size: 1em;
    font-weight: normal;
}

.card-count {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    color: #666;
    font-size: 0.85em;
}

.most-recent {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.urgency-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.urgency-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: white;
}

.urgency-tag.high {
    background-color: #ffebee;
    color: #e53e3e;
}

.urgency-tag.medium {
    background-color: #fff3e0;
    color: #f6ad55;
}

.urgency-tag.low {
    background-color: #e8f5e9;
    color: #48bb78;
}

.no-cards-message {
    color: #666;
    font-size: 0.9em;
}

.no-cards-message p {
    margin: 4px 0;
}

/* Add styles for the overdue count */
.overdue-count {
    color: #e53e3e;
    font-size: 0.9em;
    margin-bottom: 8px;
    padding: 2px 8px;
    background-color: #fff5f5;
    border-radius: 4px;
    display: inline-block;
}

/* Add these styles for the reminders section */
.reminders-section {
    background: #fff5f5;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(220,38,38,0.1);
    margin-bottom: 30px;
}

.reminders-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2em;
}

.reminders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.reminder-card {
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

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

.reminder-header h3 {
    margin: 0;
    font-size: 1em;
    color: #333;
    font-weight: 500;
}

.reminder-date {
    background: #e3f2fd;
    color: #1976D2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.reminder-details {
    flex-grow: 1;
    margin: 10px 0;
}

.reminder-details p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

.no-reminders-message {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

/* Ensure the view card button matches other dashboard buttons */
.reminder-card .view-card-btn {
    margin-top: auto;
    padding: 8px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reminder-card .view-card-btn:hover {
    background: #1976D2;
}

/* Add this with your other stats-card styles */
.stats-card.avg-cards .stat-number {
    color: #9C27B0; /* Purple color to differentiate it */
}

/* Update the reminders and overdue sections styling */
.reminders-section,
.overdue-section {
    background: #fff5f5;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(220,38,38,0.1);
    margin-bottom: 30px;
}

.reminders-section h2,
.overdue-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.2em;
}

.reminders-grid,
.overdue-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Unified card styling for both reminders and overdue */
.reminder-card,
.overdue-card {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reminder-card:hover,
.overdue-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Header styling */
.reminder-header,
.overdue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.reminder-header h3,
.overdue-card-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #1a1a1a;
    font-weight: 500;
    line-height: 1.4;
}

/* Date badge styling */
.reminder-date,
.stage-badge {
    background: #f5f5f5;
    color: #666666;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 500;
    white-space: nowrap;
}

/* Details section styling */
.reminder-details,
.overdue-card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reminder-details p,
.overdue-card-details p {
    margin: 0;
    font-size: 0.95em;
    color: #666666;
    line-height: 1.5;
}

/* Client name and stage styling */
.client-name,
.stage-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Button styling */
.view-card-btn {
    width: 100%;
    padding: 10px;
    background: #f5f5f5;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.view-card-btn:hover {
    background: #e6e6e6;
}

/* Empty state styling */
.no-reminders-message {
    text-align: center;
    color: #666666;
    padding: 32px;
    font-size: 1em;
    background: #f9f9f9;
    border-radius: 12px;
}

/* Overdue specific styles */
.deadline {
    color: #dc2626;
    font-weight: 500;
}

.overdue-card .view-card-btn {
    background: #fee2e2;
    color: #dc2626;
}

.overdue-card .view-card-btn:hover {
    background: #fecaca;
}

/* List View Styles */
.list-view-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(220,38,38,0.1);
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.list-table th {
    background: #fff5f5;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #fee2e2;
}

.list-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #fee2e2;
    color: #444;
}

.list-table tr:last-child td {
    border-bottom: none;
}

.list-table .no-items {
    text-align: center;
    color: #666;
    padding: 24px;
    font-style: italic;
}

.view-btn {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background-color 0.2s;
}

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

/* Add these styles for stage dragging */
.stage.dragging {
    opacity: 0.7;
    cursor: move;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.stage.drop-left {
    border-left: 3px solid #2196F3;
}

.stage.drop-right {
    border-right: 3px solid #2196F3;
}

.card-installer, .card-install-date {
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: #546e7a;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-installer {
    background-color: #e3f2fd;
    color: #1976d2;
}

.card-install-date {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Add these styles for the tabs */
.card-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.card-tab {
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
}

.card-tab.active {
    background: #fff;
    color: #2196F3;
    border: 1px solid #e0e0e0;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}

.card-tab-content {
    display: none;
}

.card-tab-content.active {
    display: block;
}

.stage-rating-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.stage-rating-group h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.rating-options {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.rating-option {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.rating-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.rating-circle.green {
    background-color: #4CAF50;
}

.rating-circle.yellow {
    background-color: #FFC107;
}

.rating-circle.red {
    background-color: #F44336;
}

.rating-notes {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
    min-height: 60px;
}

.stage-ratings-section {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.stage-ratings-section h2 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.stage-ratings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stage-rating-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
}

.stage-rating-card h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 1em;
}

.rating-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar {
    height: 24px;
    border-radius: 4px;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.85em;
    min-width: 60px;
    transition: width 0.3s ease;
}

.rating-bar.green {
    background-color: #4CAF50;
}

.rating-bar.yellow {
    background-color: #FFC107;
    color: #333;
}

.rating-bar.red {
    background-color: #F44336;
}

.rating-label {
    white-space: nowrap;
}

.rating-summary {
    margin-top: 12px;
    font-size: 0.9em;
    color: #666;
    text-align: right;
}

.no-ratings-message {
    text-align: center;
    color: #666;
    padding: 32px;
    font-size: 1em;
    background: #f9f9f9;
    border-radius: 12px;
    margin-top: 20px;
}

.archived-ratings {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.archived-rating {
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
}

.archived-rating.green {
    background-color: #e8f5e9;
}

.archived-rating.yellow {
    background-color: #fff3e0;
}

.archived-rating.red {
    background-color: #ffebee;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stage-name {
    font-weight: 500;
    color: #333;
}

.rating-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.rating-badge.green {
    background-color: #4caf50;
    color: white;
}

.rating-badge.yellow {
    background-color: #ffc107;
    color: #333;
}

.rating-badge.red {
    background-color: #f44336;
    color: white;
}

.rating-notes {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.archived-detail-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.archived-detail-section strong {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

.system-notes {
    white-space: pre-wrap;
    font-family: monospace;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.archived-ratings {
    margin-top: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.archived-rating {
    border-bottom: 1px solid #e0e0e0;
}

.archived-rating:last-child {
    border-bottom: none;
}

/* Styles for the Finish stage cards with stronger styling */
.stage[data-name="Finish"] .card.invoiced-only,
.stage[data-name="Finish"] .card.invoiced-only.urgency-high,
.stage[data-name="Finish"] .card.invoiced-only.urgency-medium,
.stage[data-name="Finish"] .card.invoiced-only.urgency-low,
.stage[data-name="Finish"] .card.invoiced-only.overdue {
    background-color: #e8f5e9 !important; /* Light green */
    background: #e8f5e9 !important; /* Light green */
    background-image: none !important;
}

.stage[data-name="Finish"] .card.invoiced-only {
    border: 1px solid #4caf50 !important;
    border-left-width: 4px !important;
}

.stage[data-name="Finish"] .card.paid,
.stage[data-name="Finish"] .card.paid.urgency-high,
.stage[data-name="Finish"] .card.paid.urgency-medium,
.stage[data-name="Finish"] .card.paid.urgency-low,
.stage[data-name="Finish"] .card.paid.overdue {
    background-color: #ffecb3 !important; /* Light orange */
    background: #ffecb3 !important; /* Light orange */
    background-image: none !important;
}

.stage[data-name="Finish"] .card.paid {
    border: 1px solid #FF9800 !important;
    border-left-width: 4px !important;
}

/* Make sure child elements inherit background colors and override any other styling */
.card.invoiced-only,
.card.invoiced-only.urgency-high,
.card.invoiced-only.urgency-medium,
.card.invoiced-only.urgency-low,
.card.invoiced-only.overdue,
.card.invoiced-only > *,
.card.invoiced-only .card-preview,
.card.invoiced-only .card-header,
.card.invoiced-only .card-details,
.card.invoiced-only .card-tab-content {
    background-color: #e8f5e9 !important;
    background: #e8f5e9 !important;
    background-image: none !important;
}

.card.paid,
.card.paid.urgency-high,
.card.paid.urgency-medium,
.card.paid.urgency-low,
.card.paid.overdue,
.card.paid > *,
.card.paid .card-preview,
.card.paid .card-header,
.card.paid .card-details,
.card.paid .card-tab-content {
    background-color: #ffecb3 !important;
    background: #ffecb3 !important;
    background-image: none !important;
}

/* Add these styles for invoiced and paid cards with highest specificity */
.card.invoiced-only,
.card.invoiced-only.urgency-high,
.card.invoiced-only.urgency-medium,
.card.invoiced-only.urgency-low,
.card.invoiced-only.overdue {
    background-color: #e8f5e9 !important; /* Light green */
    background: #e8f5e9 !important;
    background-image: none !important;
    border: 1px solid #4CAF50; /* Darker green border */
    border-left-width: 4px;
}

.card.paid,
.card.paid.urgency-high,
.card.paid.urgency-medium,
.card.paid.urgency-low,
.card.paid.overdue {
    background-color: #ffecb3 !important; /* Light orange */
    background: #ffecb3 !important;
    background-image: none !important;
    border: 1px solid #FF9800; /* Darker orange border */
    border-left-width: 4px;
}

@media (max-width: 992px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .current-week-display {
        text-align: center;
        order: -1;
        margin-bottom: 10px;
    }
    
    .weekly-calendar-table {
        font-size: 0.9em;
    }
    
    .weekly-calendar-table th, 
    .weekly-calendar-table td {
        padding: 8px;
        height: 90px;
    }
    
    .appointment-item {
        padding: 8px;
    }
}

/* Improve the card dragging visual style */
.card.dragging {
    opacity: 0.85;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.1s ease-out;
    cursor: grabbing;
    border-width: 1px;
    border-style: solid;
    /* The transform will be set dynamically in JS */
}

/* Add these styles for invoiced and paid cards */
.card.invoiced-only {
    background-color: #e8f5e9 !important; /* Light green */
    border: 1px solid #4CAF50; /* Darker green border */
    border-left-width: 4px;
}

.card.paid {
    background-color: #ffecb3 !important; /* Light orange */
    border: 1px solid #FF9800; /* Darker orange border */
    border-left-width: 4px;
}

.card.invoiced-only {
    background-color: #e8f5e9 !important; /* Light green */
    border: 1px solid #4CAF50 !important; /* Darker green border */
    border-left-width: 4px !important;
}

.card.paid {
    background-color: #ffecb3 !important; /* Light orange */
    border: 1px solid #FF9800 !important; /* Darker orange border */
    border-left-width: 4px !important;
}

/* Override urgency and overdue styling for invoiced and paid cards */
.card.invoiced-only.urgency-high,
.card.invoiced-only.urgency-medium,
.card.invoiced-only.urgency-low,
.card.invoiced-only.overdue {
    background: #e8f5e9 !important;
    background-image: none !important;
    border: 1px solid #4CAF50 !important;
    border-left-width: 4px !important;
}

.card.paid.urgency-high,
.card.paid.urgency-medium,
.card.paid.urgency-low,
.card.paid.overdue {
    background: #ffecb3 !important;
    background-image: none !important;
    border: 1px solid #FF9800 !important;
    border-left-width: 4px !important;
}

/* Override specific card elements */
.card.invoiced-only .card-preview,
.card.invoiced-only .card-header,
.card.invoiced-only .card-details,
.card.invoiced-only .card-tab-content,
.card.invoiced-only.overdue .card-preview,
.card.invoiced-only.overdue .card-header {
    background-color: #e8f5e9 !important;
}

.card.paid .card-preview,
.card.paid .card-header,
.card.paid .card-details,
.card.paid .card-tab-content,
.card.paid.overdue .card-preview,
.card.paid.overdue .card-header {
    background-color: #ffecb3 !important;
}

/* Override the overdue styling completely for invoiced and paid cards */
.card.overdue.invoiced-only {
    background-color: #e8f5e9 !important; /* Light green */
    border: 1px solid #4CAF50 !important;
    border-left-width: 4px !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2) !important;
}

.card.overdue.invoiced-only:hover {
    background-color: #d7eeda !important; /* Slightly darker green on hover */
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
}

.card.overdue.paid {
    background-color: #ffecb3 !important; /* Light orange */
    border: 1px solid #FF9800 !important;
    border-left-width: 4px !important;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2) !important;
}

.card.overdue.paid:hover {
    background-color: #ffe29a !important; /* Slightly darker orange on hover */
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3) !important;
}

/* Make sure the overdue badge is still visible */
.card.overdue.invoiced-only .overdue-badge,
.card.overdue.paid .overdue-badge {
    display: inline-block !important;
}

.card.urgency-high:hover {
    background: linear-gradient(to right, rgba(229,62,62,0.15), white 30%);
}

.card.urgency-medium:hover {
    background: linear-gradient(to right, rgba(237,137,54,0.15), white 30%);
}

.card.urgency-low:hover {
    background: linear-gradient(to right, rgba(76,175,80,0.15), white 30%);
}

/* Add styling for card reminder icon */
.reminder-icon {
    color: #FFC107;
    font-size: 0.85em;
    margin-right: 5px;
    vertical-align: middle;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

/* Weekly Calendar Section Styling - Updated to match exactly */
.weekly-calendar-section {
    margin-bottom: 30px;
    width: 100%;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.weekly-calendar-section h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.4em;
    font-weight: bold;
}

.calendar-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    flex-direction: column;
    gap: 10px;
}

.week-nav-btn, 
.current-week-btn {
    background-color: #f5f5f5;
    color: #333;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: normal;
    width: 100%;
    text-align: center;
}

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

.current-week-display {
    font-weight: bold;
    padding: 8px 0;
    text-align: center;
    font-size: 1.1em;
    color: #333;
}

.weekly-calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* Changed from fixed to auto for dynamic sizing */
    border: 1px solid #e0e0e0;
}

.weekly-calendar-table th, 
.weekly-calendar-table td {
    border: 1px solid #e0e0e0;
    padding: 10px;
    vertical-align: top;
    height: 100px;
    background-color: #fff;
    position: relative;
}

/* Set the installer column to have a fixed width */
.installer-name-cell {
    font-weight: bold;
    background-color: #f9f9f9;
    color: #333;
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    white-space: nowrap;
}

/* Make calendar cells with no appointments smaller */
.weekly-calendar-table td:not(.has-appointments) {
    width: 8%;
}

/* Make cells with 1 appointment slightly larger */
.weekly-calendar-table td.has-appointments:has(.appointment-item:only-child) {
    width: 12%;
}

/* Make cells with 2-3 appointments even larger */
.weekly-calendar-table td.has-appointments:has(.appointment-item + .appointment-item) {
    width: 16%;
}

/* Make cells with 4+ appointments the largest */
.weekly-calendar-table td.has-appointments:has(.appointment-item + .appointment-item + .appointment-item + .appointment-item) {
    width: 20%;
}

.weekly-calendar-table th {
    background-color: #f9f9f9;
    text-align: center;
    padding: 10px 5px;
    font-weight: normal;
}

.day-header {
    font-weight: bold;
}

.day-date {
    font-size: 0.9em;
    color: #666;
    display: block;
    margin-top: 3px;
}

.today {
    background-color: #e3f2fd !important; /* Light blue background for today */
    position: relative;
}

.today-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #2196F3;
    color: white;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 3px;
}

.appointment-item {
    background-color: #fff;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 0px;
    border-left: 4px solid #FF9800; /* Orange left border */
    font-size: 0.9em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.appointment-client {
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
}

.appointment-time {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 3px;
    position: relative;
    padding-left: 18px;
}

.appointment-time::before {
    content: "🕒";
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 1em;
}

.appointment-address {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 18px;
}

.appointment-address::before {
    content: "📍";
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 1em;
}

.has-appointments {
    background-color: #fff;
    position: relative;
}

.no-installations {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Make sure the layout works well on mobile */
@media (max-width: 992px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .current-week-display {
        text-align: center;
        order: -1;
        margin-bottom: 10px;
    }
    
    .weekly-calendar-table {
        font-size: 0.9em;
    }
    
    .weekly-calendar-table th, 
    .weekly-calendar-table td {
        padding: 8px;
        height: 90px;
    }
    
    .appointment-item {
        padding: 8px;
    }
}

/* Archive Actions */
.archive-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.archive-count {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.admin-action-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.admin-action-btn:hover {
    background-color: #c0392b;
}

/* Archive card checkbox option */
.archive-options {
    margin-top: 15px;
}

.archive-options label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.archive-options input[type="checkbox"] {
    margin-right: 8px;
}

/* Delete archive dialog */
.delete-archive-dialog .dialog-content {
    max-width: 600px;
}

.delete-option {
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-option.selected {
    border-color: #3498db;
    background-color: #f0f9ff;
}

.delete-option h4 {
    margin-top: 0;
}

.delete-option p {
    margin-bottom: 10px;
}

.delete-option .dialog-input {
    margin-top: 5px;
    width: 100%;
}

/* Rating Section for Archive */
.rating-section {
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.rating-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stage-ratings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.stage-rating {
    display: flex;
    flex-direction: column;
}

.stage-rating label {
    font-weight: 500;
    margin-bottom: 5px;
}

.stage-rating select {
    margin-bottom: 5px;
}

.stage-rating textarea {
    height: 60px;
    min-height: 60px;
    resize: vertical;
}

.attachments-info {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}

.preview-attachment-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    transition: background-color 0.2s;
}

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

.ratings-info {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}

/* Archived Ratings */
.archived-ratings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.archived-rating {
    border-radius: 6px;
    padding: 12px;
    background-color: #f9f9f9;
    margin-bottom: 10px;
}

.archived-rating.green {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.archived-rating.yellow {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
}

.archived-rating.red {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.stage-name {
    font-weight: 500;
    color: #333;
}

.rating-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.rating-badge.green {
    background-color: #4caf50;
}

.rating-badge.yellow {
    background-color: #ffc107;
    color: #333;
}

.rating-badge.red {
    background-color: #f44336;
}

.rating-notes {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

/* Clickable rating bars */
.rating-bar {
    cursor: pointer;
    transition: opacity 0.2s;
}

.rating-bar:hover {
    opacity: 0.9;
}

/* Rating clients dialog */
.rating-clients-dialog .dialog-content {
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.rating-clients-header {
    padding: 15px;
    margin: -15px -15px 15px -15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating-clients-header h3 {
    margin: 0;
    color: white;
}

.rating-clients-header.green {
    background-color: #4caf50;
}

.rating-clients-header.yellow {
    background-color: #ffc107;
}

.rating-clients-header.yellow h3 {
    color: #333;
}

.rating-clients-header.red {
    background-color: #f44336;
}

.rating-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    color: white;
}

.rating-clients-header.yellow .rating-count {
    color: #333;
}

.rating-clients-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rating-client-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rating-client-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.rating-client-info h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.rating-date {
    font-size: 12px;
    color: #666;
}

.rating-client-notes {
    background-color: #fff;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    border-left: 3px solid #ddd;
}

.rating-client-notes strong {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

.rating-client-notes p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.no-notes {
    font-size: 14px;
    color: #999;
    font-style: italic;
    padding: 5px 0;
}

.rating-client-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.rating-client-actions button {
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.rating-client-actions button:hover {
    background-color: #1976D2;
}

.no-clients {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Add styling for client request icon */
.client-request-icon {
    color: #2196F3;
    font-size: 0.85em;
    margin-right: 5px;
    vertical-align: middle;
}

/* Notification for PDF generation */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 300px;
    transition: opacity 0.5s ease;
}

.notification p {
    margin: 5px 0;
}

.notification.success {
    background-color: #dff0d8;
    border: 1px solid #d0e9c6;
    color: #3c763d;
}

.notification.error {
    background-color: #f2dede;
    border: 1px solid #ebcccc;
    color: #a94442;
}

/* Loading overlay for PDF generation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    color: white;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin-bottom: 15px;
}

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

/* Generate PDF button in card edit dialog */
.attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.generate-pdf-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

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

/* Add these styles to your CSS file */

/* Loading Indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
    z-index: 9998;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.notification.fade-out {
    opacity: 0;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.notification-header h3 {
    margin: 0;
    font-size: 16px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.notification-body {
    padding: 10px 15px 15px;
}


.notification-body p {
    margin: 0;
}

/* Notification types */
.notification.success .notification-header {
    background-color: #4caf50;
    color: white;
}

.notification.error .notification-header {
    background-color: #f44336;
    color: white;
}

.notification.info .notification-header {
    background-color: #2196f3;
    color: white;
}

/* Add these styles for the Site Info PDF button */

.attachments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.generate-pdf-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-left: 10px; /* Add margin to separate from other elements */
}

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

.generate-pdf-btn:before {
    content: "📄";
    margin-right: 5px;
}

/* End of added styles */

/* Add styles for the print button */
.print-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 10px;
    display: flex;
    align-items: center;
    font-weight: bold;
}

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

/* Existing attachment viewer styles */
.attachment-navigation {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px 4px 0 0;
}

.attachment-actions {
    display: flex;
    gap: 15px; /* Increase gap between buttons in the attachment actions */
}

.nav-btn {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 5px; /* Add margin to all nav buttons */
}

.download-pdf-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.download-pdf-btn:hover {
    background-color: #0b7dda;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
  