/* settings.css – Settings-Seite (aus style.css ausgelagert, unveraendert) */

/* Settings Page Styles */
.settings-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.settings-section {
    display: none !important;
}

.settings-section.active {
    display: block !important;
}

.settings-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.settings-section p {
    color: #555;
    line-height: 1.6;
    font-size: 1.1rem;
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 30px;
}

.data-action {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    transition: border-color 0.3s ease;
}

.data-action:hover {
    border-color: #667eea;
}

.admin-action h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.admin-action p {
    margin-bottom: 20px;
    color: #666;
}

.import-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
}

.import-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.import-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.warning-details {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.warning-details ul {
    margin: 10px 0;
    padding-left: 20px;
}

.warning-details li {
    margin: 5px 0;
    color: #856404;
}

/* User Management Styles */
.user-list {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
}

.user-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.user-list-header h3 {
    color: #667eea;
    margin: 0;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    padding: 14px 18px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: bold;
    color: #333;
}

.user-username {
    font-size: 0.85rem;
    color: #6c757d;
}

.user-info small {
    font-size: 0.8rem;
    color: #adb5bd;
}

.user-role {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
}

.user-role.admin {
    background: #dc3545;
    color: white;
}

.user-role.user {
    background: #28a745;
    color: white;
}

.user-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.user-actions .btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 20px;
}

/* Add-User Modal */
.user-modal-content h3 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

#create-user-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#create-user-form input,
#create-user-form select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

#create-user-form input:focus,
#create-user-form select:focus {
    border-color: #667eea;
}

#create-user-form .form-buttons {
    margin-top: 5px;
}

#create-user-form .form-buttons .btn-primary {
    width: 100%;
}


/* Statistics Placeholder */
.statistics-placeholder {
    margin-top: 30px;
}

.placeholder-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-placeholder {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    font-size: 18px;
}

/* Admin-only elements */
.admin-only {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .user-item {
        flex-wrap: wrap;
    }

    .user-actions {
        width: 100%;
    }

    .user-actions .btn-small {
        flex: 1;
        text-align: center;
    }

    .placeholder-content {
        grid-template-columns: 1fr;
    }
}

.import-status.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* Rezept-Detail Bild Zentrierung */
.rezept-image-detail-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#rezept-detail-image {
    max-width: 300px;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

/* Statistics Styles */
.statistics-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.year-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 10px 20px;
}

#current-stats-year {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    min-width: 60px;
    text-align: center;
}

.stats-loading, .stats-error {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.stats-error {
    color: #dc3545;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: #667eea;
    font-size: 16px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stats-section {
    margin-bottom: 40px;
}

.stats-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 18px;
}

.stats-list {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-item-name {
    font-weight: 500;
    color: #333;
}

.stats-item-value {
    font-weight: bold;
    color: #667eea;
}

.stats-empty {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* General Settings Styles */
.general-settings {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.user-info-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
}

.user-info-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.user-info-section p {
    margin: 10px 0;
    color: #333;
}

.general-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* User Statistics Styles */
.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.user-comments-section {
    margin-top: 30px;
}

.user-comments-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.comments-list {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
}

.comment-item {
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-date {
    font-size: 0.9rem;
    color: #666;
}

.comment-stars {
    color: #ffd700;
    font-size: 1.1rem;
}

.comment-text {
    color: #333;
    line-height: 1.4;
}

/* Filter-Controls für Essen */
.filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    border-color: #667eea;
}

.filter-select option {
    padding: 4px;
}

/* Essen-Tabelle */
.essen-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.essen-table th,
.essen-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.essen-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.essen-table td:nth-child(3),
.essen-table td:nth-child(4),
.essen-table td:nth-child(5) {
    white-space: nowrap;
}

.essen-table td:nth-child(6) {
    text-align: center;
    white-space: nowrap;
}

.essen-table td:last-child {
    white-space: nowrap;
}

.essen-table td:last-child .btn-small {
    margin-bottom: 0;
}

.essen-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.essen-status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.essen-status-dot.on {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.essen-status-dot.off {
    background: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.essen-status-label {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
}

.essen-table tr:last-child td {
    border-bottom: none;
}

.essen-table tr:hover {
    background: #f8f9fa;
}

.essen-table .btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-right: 5px;
}
