/* Dashboard Layout */
.dashboard {
    display: none;
    min-height: 100%;
}

.dashboard.active {
    display: flex;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.status-card {
    padding: 20px;
    border-radius: 12px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.status-card.total {
    background: linear-gradient(135deg, var(--color-primary) 0%, #764ba2 100%);
}

.status-card.active {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.status-card.example {
    background: linear-gradient(135deg, #9b59b6 0%, #e74c3c 100%);
}

.status-card.invited {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.status-card.confirmed {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.status-card.inactive {
    background: linear-gradient(135deg, #01757e 0%, #7f8c8d 100%);
}

.status-card.cancelled {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.status-card.database {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.status-card.germany {
    background: linear-gradient(135deg, #000000 0%, #dd0000 50%, #ffce00 100%);
}

.status-card.austria {
    background: linear-gradient(135deg, #e71f2f 0%, #ffffff 50%, #015005 100%);
}

.status-card.switzerland {
    background: linear-gradient(135deg, #ff0000 0%, #ffffff 100%);
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(25px, -25px);
}

.status-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.status-label {
    font-size: 13px;
    opacity: 0.9;
    font-weight: 500;
}

/* Next Contacts Section */
.next-contacts-section {
    margin-top: 30px;
}

.chart-card {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 15px;
}

.chart-card h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 18px;
}

.next-contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.next-contacts-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-controls button {
    background: #3a3f52;
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pagination-controls button:hover:not(:disabled) {
    background: var(--color-primary);
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls span {
    color: #a0a4b8;
    font-size: 14px;
    min-width: 100px;
    text-align: center;
}

.next-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.next-contact-item {
    background: #3a3f52;
    border-radius: 10px;
    padding: 16px;
    border-left: 4px solid var(--color-primary);
    transition: all 0.3s ease;
}

.next-contact-item:hover {
    background: #404761;
    transform: translateX(2px);
}

.next-contact-item.priority-urgent {
    border-left-color: #e74c3c;
}

.next-contact-item.priority-high {
    border-left-color: #f39c12;
}

.next-contact-item.priority-medium {
    border-left-color: #3498db;
}

.next-contact-item.priority-low {
    border-left-color: #95a5a6;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.contact-info .practice-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
    margin-bottom: 2px;
}

.contact-info .doctor-name {
    color: #a0a4b8;
    font-size: 14px;
}

.contact-date {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 500;
    white-space: nowrap;
}

.contact-date.overdue {
    color: #e74c3c;
    font-weight: 600;
}

.contact-date.today {
    color: #f39c12;
    font-weight: 600;
}

.contact-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
}

.contact-note {
    color: #e2e5f1;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
    margin-right: 10px;
}

.contact-priority .priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-urgent {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.priority-high {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

.priority-medium {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.priority-low {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.contact-actions {
    display: flex;
    gap: 8px;
}

.btn-contact-action {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-complete {
    background: #27ae60;
    color: white;
}

.btn-complete:hover {
    background: #229954;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.no-contacts {
    text-align: center;
    color: #a0a4b8;
    padding: 40px 20px;
    font-style: italic;
}

.no-contacts svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-contacts div {
    font-size: 16px;
}

/* Next Contact Management in Practice Modal */
.next-contact-section {
    border-top: 1px solid #3a3f52;
    padding-top: 20px;
    margin-top: 20px;
}

.next-contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.next-contact-header h4 {
    color: var(--color-primary);
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 
.next-contact-header h4::before {
    content: '📅';
    font-size: 18px;
}
*/

.next-contact-display {
    background: #3a3f52;
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid var(--color-primary);
}

.next-contact-display .next-contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.next-contact-date {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
}

.next-contact-priority {
    display: flex;
    align-items: center;
}

.next-contact-note {
    color: #e2e5f1;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.next-contact-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.next-contact-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Meldungen */
.meldungen-container {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meldungen-list {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.no-meldungen {
    text-align: center;
    color: #a0a4b8;
    padding: 60px 40px;
    max-width: 500px;
}

.no-meldungen svg {
    margin-bottom: 20px;
    opacity: 0.5;
    color: var(--color-primary);
}

.no-meldungen p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ffffff;
}

.no-meldungen small {
    font-size: 14px;
    color: #a0a4b8;
    line-height: 1.4;
    max-width: 400px;
    display: inline-block;
}

.meldung-item {
    background: #3a3f52;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--color-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
}

.meldung-item:hover {
    background: #404761;
    transform: translateX(2px);
}
.meldung-item.meldung-type-bestaetigt {
    border-left-color: #27ae60;
    background: rgba(39, 174, 96, 0.05);
}

.meldung-item.meldung-type-rating {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.05);
}

.meldung-item.meldung-type-status {
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.meldung-item.meldung-type-system {
    border-left-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}


.meldung-item.meldung-type-notification {
    border-left-color: #9b59b6;
    background: rgba(155, 89, 182, 0.05);
}

.meldung-item.meldung-type-alert {
    border-left-color: #e67e22;
    background: rgba(230, 126, 34, 0.05);
}

.meldung-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 120px;
    margin-bottom: 0;
}

.meldung-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.meldung-time {
    color: #a0a4b8;
    font-size: 11px;
    line-height: 1;
}

.meldung-content {
    color: #e2e5f1;
    font-size: 13px;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.meldung-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
    margin-bottom: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}


.meldung-action {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.meldung-action:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}


/* Rating Modal */
.rating-modal-content {
    max-width: 600px;
    width: 90%;
}

.rating-info-section {
    background: #3a3f52;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--color-primary);
}

.rating-management-section {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-display {
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: 6px;
    color: #e2e5f1;
    font-weight: 500;
    min-height: 20px;
}

.rating-stars {
    font-size: 24px;
    color: #f1c40f;
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: 6px;
    letter-spacing: 2px;
}

.rating-comment-display {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 6px;
    color: #e2e5f1;
    line-height: 1.4;
    max-height: 120px;
    overflow-y: auto;
    font-style: italic;
    border-left: 3px solid var(--color-primary);
}

.ratings-section {
    padding: 0;
}

.ratings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3a3f52;
}

.ratings-header h4 {
    color: var(--color-primary);
    font-size: 16px;
    margin: 0;
}

.ratings-stats {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #a0a4b8;
    font-size: 14px;
}

.ratings-stats span {
    background: #3a3f52;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.ratings-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #4a4f62;
    border-radius: 8px;
    padding: 8px;
    background: rgba(58, 63, 82, 0.3);
}

.rating-item {
    background: #3a3f52;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--color-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
}

.rating-item:hover {
    background: #404761;
    transform: translateX(2px);
}

.rating-item:last-child {
    margin-bottom: 0;
}

.rating-item-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 80px;
    margin-bottom: 0;
}

.rating-stars-small {
    color: #f1c40f;
    font-size: 14px;
    letter-spacing: 1px;
    line-height: 1;
}

.rating-item-date {
    color: #a0a4b8;
    font-size: 11px;
    line-height: 1;
}

.rating-item-content {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
}

.rating-patient-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.rating-item-comment {
    color: #e2e5f1;
    font-size: 12px;
    line-height: 1.2;
    margin-bottom: 4px;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-item-status {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.rating-item-status .status-badge {
    font-size: 9px;
    padding: 2px 6px;
}

.has-answer {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    padding: 1px 4px;
    border-radius: 8px;
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
}

.rating-item-actions {
    display: flex;
    margin-left: auto;
    flex-shrink: 0;
}

.rating-item-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 60px;
}

.ratings-list::-webkit-scrollbar {
    width: 6px;
}

.ratings-list::-webkit-scrollbar-track {
    background: rgba(58, 63, 82, 0.3);
    border-radius: 3px;
}

.ratings-list::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 3px;
}

.ratings-list::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.no-ratings {
    text-align: center;
    color: #a0a4b8;
    padding: 30px 15px;
}

.no-ratings svg {
    margin-bottom: 8px;
    opacity: 0.5;
    color: #667eea;
}

.no-ratings p {
    margin: 0;
    font-style: italic;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .status-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .status-card {
        padding: 15px;
    }

    .status-number {
        font-size: 24px;
    }

    .status-label {
        font-size: 12px;
    }

    .next-contacts-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .pagination-controls {
        justify-content: center;
    }

    .contact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .contact-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .contact-actions {
        align-self: flex-end;
    }

    .next-contact-actions {
        flex-direction: column;
    }

    .no-meldungen {
        padding: 40px 20px;
    }
    
    .no-meldungen svg {
        width: 40px;
        height: 40px;
    }
    
    .no-meldungen p {
        font-size: 16px;
    }
    
    .no-meldungen small {
        font-size: 13px;
    }
    
    .meldung-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        min-height: auto;
        padding: 10px 12px;
    }
    
    .meldung-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: auto;
    }
    
    .meldung-footer {
        margin-left: 0;
        justify-content: space-between;
    }
    
    .meldung-content {
        margin: 0;
    }

    .rating-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .rating-info-section,
    .rating-management-section {
        padding: 15px;
    }
    
    .meldung-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .meldung-action {
        align-self: center;
        min-width: 120px;
    }
    
    .rating-stars {
        font-size: 20px;
        text-align: center;
    }

    .ratings-list {
        max-height: 200px;
    }
    
    .rating-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        min-height: auto;
    }
    
    .rating-item-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: auto;
    }
    
    .rating-item-actions {
        margin-left: 0;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .status-grid {
        grid-template-columns: 1fr 1fr;
    }

    .chart-card {
        padding: 15px;
    }

    .next-contact-item {
        padding: 12px;
    }

    .meldung-item {
        padding: 8px 10px;
    }
    
    .meldung-footer {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }
    
    .meldung-action {
        align-self: center;
        min-width: 80px;
    }

    .rating-item-comment {
        -webkit-line-clamp: 1;
    }
    
    .ratings-list {
        max-height: 180px;
    }

    .rating-item {
        padding: 8px 10px;
    }
}

.meldung-item.meldung-type-callback {
    border-left-color: #f39c12;
    background: rgba(243, 156, 18, 0.05);
}