/* style.css */

/* CSS Variablen (wie zuvor) */
:root {
    --primary-color: #d96464; --primary-hover-color: #c75353;
    --secondary-color: #e5e7eb; --secondary-hover-color: #d1d5db;
    --danger-color: #dc2626; --danger-hover-color: #b91c1c;
    --warning-color: #f59e0b; --warning-hover-color: #d97706;
    --success-color: #16a34a; --success-hover-color: #15803d;
    --text-color: #000000; --text-light-color: #4b5563;
    --background-color: #ffffff; --card-background: #ffffff;
    --border-color: #e5e7eb; --footer-background: #f9fafb;
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --border-radius: 0.375rem; --image-border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --box-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}

/* --- Globale Stile, Header, Footer, Links, Typo, Buttons, Forms etc. --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); background-color: var(--background-color); color: var(--text-color); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
.hidden { display: none !important; }
.container { max-width: 1200px; margin: 0 auto; padding: 1rem; flex-grow: 1; width: 100%; }
.site-header { padding: 1rem 0; text-align: center; border-bottom: 1px solid var(--border-color); margin-bottom: 1.5rem; }
.site-header img { height: 70px; width: auto; display: inline-block; }
.site-footer { background-color: var(--footer-background); color: var(--text-light-color); padding: 1.5rem 1rem; text-align: center; font-size: 0.875rem; border-top: 1px solid var(--border-color); margin-top: 2rem; }
.site-footer nav { margin-bottom: 0.75rem; } .site-footer nav a { color: var(--text-light-color); margin: 0 0.75rem; text-decoration: none; } .site-footer nav a:hover { color: var(--primary-color); text-decoration: underline; }
.site-footer .copyright a { color: var(--primary-color); font-weight: 500; } .site-footer .copyright a:hover { color: var(--primary-hover-color); }
a { color: var(--primary-color); text-decoration: none; } a:hover { text-decoration: underline; color: var(--primary-hover-color); }
h1, h2, h3, h4 { margin-bottom: 1rem; font-weight: 600; color: var(--text-color); } h1 { font-size: 1.875rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.25rem; } h4 { font-size: 1.1rem; margin-top: 1.5rem; }
p { margin-bottom: 1rem; }
.btn { display: inline-block; padding: 0.6rem 1.2rem; border: none; border-radius: var(--border-radius); font-weight: 600; text-align: center; cursor: pointer; transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out; color: white; font-size: 0.875rem; line-height: 1.25; }
.btn:disabled { background-color: var(--secondary-hover-color); cursor: not-allowed; opacity: 0.7; }
.btn-primary { background-color: var(--primary-color); } .btn-primary:hover:not(:disabled) { background-color: var(--primary-hover-color); }
.btn-secondary { background-color: var(--secondary-color); color: var(--text-color); } .btn-secondary:hover:not(:disabled) { background-color: var(--secondary-hover-color); }
.btn-danger { background-color: var(--danger-color); } .btn-danger:hover:not(:disabled) { background-color: var(--danger-hover-color); }
.btn-warning { background-color: var(--warning-color); } .btn-warning:hover:not(:disabled) { background-color: var(--warning-hover-color); }
.btn-success { background-color: var(--success-color); } .btn-success:hover:not(:disabled) { background-color: var(--success-hover-color); }
.btn-full-width { display: block; width: 100%; }
.btn-small { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; padding: 0.5rem; border-radius: 50%; line-height: 1; background-color: transparent; border: 1px solid transparent; transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out; }
.icon-button svg { width: 1em; height: 1em; stroke-width: 2.5; }
.icon-button.edit { color: var(--warning-hover-color); border-color: var(--warning-color); } .icon-button.edit:hover { background-color: var(--warning-color); color: white; border-color: var(--warning-color); }
.icon-button.mark-deceased-cross { color: var(--danger-hover-color); border-color: var(--danger-color); } .icon-button.mark-deceased-cross:hover { background-color: var(--danger-color); color: white; border-color: var(--danger-color); }
.icon-button.reactivate { color: var(--success-hover-color); border-color: var(--success-color); } .icon-button.reactivate:hover { background-color: var(--success-color); color: white; border-color: var(--success-color); }
.icon-button.delete-permanent { color: var(--text-light-color); border-color: var(--text-light-color); } .icon-button.delete-permanent:hover { background-color: var(--text-light-color); color: white; border-color: var(--text-light-color); }
.icon-button.weights { color: var(--primary-hover-color); border-color: var(--primary-color); } .icon-button.weights:hover { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--text-color); margin-bottom: 0.25rem; }
.form-input, .form-textarea, .form-select { display: block; width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--border-color); border-radius: var(--border-radius); background-color: var(--background-color); color: var(--text-color); font-size: 0.875rem; line-height: 1.25rem; box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.05); }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 2px var(--primary-color); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--text-light-color); margin-top: 0.25rem; }
.auth-form-container { max-width: 450px; margin: 2rem auto; }
.auth-form-container h2 { text-align: center; margin-bottom: 1.5rem; }
.auth-form-container .form-footer { text-align: center; font-size: 0.875rem; color: var(--text-light-color); margin-top: 1rem; }
.dashboard-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.dashboard-header .user-info { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
/* NEU: Styling für aktiven/deaktivierten Navigationsbutton */
.dashboard-header .user-info .btn.active {
    background-color: var(--primary-hover-color); /* Oder eine andere Farbe für aktiv */
    color: white;
    cursor: default;
    pointer-events: none; /* Nicht klickbar machen */
}
.dashboard-actions { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; padding: 1rem; }
.dashboard-actions .icon-toggle-btn { flex-shrink: 0; padding: 0.5rem; }
.dashboard-actions .icon-toggle-btn i { margin: 0; }
#collapsible-actions { flex-grow: 1; border-top: none; padding-top: 0; margin-top: 0; }
#collapsible-actions .collapsible-content { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
#collapsible-actions.hidden .collapsible-content { display: none; }
#collapsible-actions .filter-sort-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
#collapsible-actions .filter-group, #collapsible-actions .sort-group { display: flex; align-items: center; gap: 0.5rem; }
#collapsible-actions .form-label { margin-bottom: 0; white-space: nowrap; }
#collapsible-actions .form-select { width: auto; display: inline-block; }
.message-box { padding: 1rem; margin-bottom: 1.5rem; border: 1px solid transparent; border-radius: var(--border-radius); font-size: 0.9rem; }
.message-box.error { color: #991b1b; background-color: #fee2e2; border-color: #fecaca; }
.message-box.success { color: #14532d; background-color: #dcfce7; border-color: #bbf7d0; }
.card { background-color: var(--card-background); border-radius: var(--border-radius); box-shadow: var(--box-shadow); padding: 1.5rem; transition: box-shadow 0.3s ease-in-out; margin-bottom: 1.5rem; position: relative; border: 1px solid var(--border-color); overflow: hidden; }
.card:hover { box-shadow: var(--box-shadow-hover); }
.card img { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; margin-bottom: 1rem; border-radius: var(--image-border-radius); }
.card .card-content p { font-size: 0.875rem; color: var(--text-light-color); margin-bottom: 0.25rem; }
.card .card-content p span.label { font-weight: 600; color: var(--text-color); }
.card .card-actions { position: absolute; top: 1rem; right: 1rem; display: flex; gap: 0.5rem; opacity: 0; transition: opacity 0.2s ease-in-out; background-color: rgba(255, 255, 255, 0.7); padding: 0.25rem; border-radius: var(--border-radius); }
.card:hover .card-actions { opacity: 1; }
.degu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.deceased-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
.deceased-section h2 { color: var(--text-light-color); }
.deceased-section .card { opacity: 0.8; border-color: #d1d5db; }
.deceased-section .card h3 { color: var(--text-light-color); }
.degu-group { margin-bottom: 2.5rem; padding-top: 1rem; }
.group-title { font-size: 1.3rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-color); display: inline-block; }
.group-title-deceased { font-size: 1.1rem; font-weight: 600; color: var(--text-light-color); margin-bottom: 1rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border-color); display: inline-block; }
.degu-group.ungrouped .group-title { border-bottom-color: var(--border-color); font-style: italic; }
.modal { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 100; }
body.modal-open { overflow: hidden; }
.modal-content { background-color: var(--card-background); padding: 1.5rem 2rem; border-radius: var(--border-radius); box-shadow: var(--box-shadow-hover); width: 100%; max-width: 650px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-content.legal-modal { max-width: 90vw; width: 90vw; height: 90vh; max-height: 90vh; display: flex; flex-direction: column; }
.legal-modal .modal-body { flex-grow: 1; overflow-y: auto; padding-right: 1rem; margin-bottom: 1rem; }
.legal-modal .modal-body h4 { font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.legal-modal .modal-body ul { list-style: disc; margin-left: 1.5rem; margin-bottom: 1rem; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { margin-bottom: 0; font-size: 1.35rem; }
.modal-close-btn { background: none; border: none; font-size: 1.75rem; font-weight: bold; color: var(--text-light-color); cursor: pointer; padding: 0.5rem; line-height: 1; position: absolute; top: 0.75rem; right: 1rem; }
.modal-close-btn:hover { color: var(--text-color); }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.modal-form-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .modal-form-grid { grid-template-columns: 1fr 1fr; } .modal-form-grid .span-2 { grid-column: span 2 / span 2; } }
.group-list { list-style: none; padding: 0; margin-top: 0.5rem; }
.group-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.group-list li:last-child { border-bottom: none; }
.group-list .group-name { flex-grow: 1; margin-right: 1rem; }
.group-list .group-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.create-group-form { display: flex; gap: 0.75rem; align-items: flex-end; }
.create-group-form .form-group { flex-grow: 1; margin-bottom: 0; }
.sortable-ghost, .sortable-ghost-list { opacity: 0.4; background-color: #cfe2ff; }
.sortable-chosen, .sortable-drag, .sortable-chosen-list, .sortable-drag-list { opacity: 0.9; box-shadow: 0 10px 20px rgba(0,0,0,0.2); cursor: grabbing !important; }
.degu-grid.sortable .card { cursor: grab; touch-action: pan-y; }
.group-list.sortable li { cursor: grab; } .group-list.sortable .group-name { cursor: grab; }
#vet-modal .modal-content { max-width: 700px; }
#vet-display-view p { margin-bottom: 0.5rem; }
#vet-display-view span.label { font-weight: 600; min-width: 120px; display: inline-block; }
#vet-display-view .vet-notes { white-space: pre-wrap; background-color: #f9f9f9; padding: 0.75rem; border-radius: var(--border-radius); border: 1px solid var(--border-color); margin-top: 0.5rem; }
#weights-modal .modal-content { max-width: 800px; }
.weight-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }
.weight-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
.weight-table th, .weight-table td { border: 1px solid var(--border-color); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.weight-table th { background-color: var(--footer-background); font-weight: 600; }
.weight-table tbody tr:nth-child(even) { background-color: var(--footer-background); }
.weight-table .weight-diff-pos { color: var(--success-color); font-weight: 500; }
.weight-table .weight-diff-neg { color: var(--danger-color); font-weight: 500; }
.weight-table .actions { text-align: center; white-space: nowrap; }
.weight-table .actions button { padding: 0.2rem 0.4rem; font-size: 0.7rem; margin: 0 0.1rem; cursor: pointer;}
#weight-chart-container { margin-top: 1.5rem; min-height: 300px; border: 1px solid var(--border-color); padding: 1rem; border-radius: var(--border-radius); position: relative; }
#weightChartCanvas { max-height: 300px; }
.delete-confirmation-box { max-width: 550px; margin: 3rem auto; text-align: center; }
.delete-confirmation-box h2 { color: var(--danger-color); }
.delete-confirmation-box p { margin-bottom: 1.5rem; color: var(--text-light-color); font-size: 1rem; }
.delete-confirmation-box strong { color: var(--danger-hover-color); font-weight: 600; }
.delete-confirmation-box .checkbox-group { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.delete-confirmation-box .checkbox-group input[type="checkbox"] { width: auto; accent-color: var(--danger-color); transform: scale(1.2); }
.delete-confirmation-box .checkbox-group label { margin-bottom: 0; font-size: 0.9rem; color: var(--text-color); cursor: pointer; }
.delete-confirmation-box .button-group { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.delete-confirmation-box .button-group .btn { flex-grow: 1; }
#notes-section h2 { margin-bottom: 1.5rem; }
.note-card { margin-bottom: 1rem; border-left: 5px solid var(--secondary-color); }
.note-card .card-content { padding: 1rem 1.5rem; }
.note-card h3 { margin-bottom: 0.25rem; font-size: 1.15rem; }
.note-meta { font-size: 0.75rem; color: var(--text-light-color); margin-bottom: 0.75rem; }
.note-content { margin-bottom: 0.75rem; font-size: 0.9rem; }
.note-degus { font-size: 0.8rem; }
.note-card .card-actions { position: static; opacity: 1; background: none; padding: 0; margin-top: 1rem; justify-content: flex-end; }
.note-card.completed { opacity: 0.7; background-color: #f9f9f9; }
.note-card.completed h3 { text-decoration: line-through; color: var(--text-light-color); }
.category-list { list-style: none; padding: 0; margin-top: 0.5rem; }
.category-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.category-list li:last-child { border-bottom: none; }
.category-list .category-color-indicator { width: 15px; height: 15px; border-radius: 50%; display: inline-block; margin-right: 0.5rem; border: 1px solid rgba(0,0,0,0.1); }
.category-list .category-name { flex-grow: 1; margin-right: 1rem; }
.category-list .category-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.create-category-form { display: flex; gap: 0.75rem; align-items: flex-end; }
.create-category-form .form-group { flex-grow: 1; margin-bottom: 0; }
#note-degu-selection div { margin-bottom: 0.25rem; }

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .dashboard-header .user-info { width: 100%; }
    .dashboard-actions { flex-direction: column; align-items: stretch; padding: 0.75rem; }
    .dashboard-actions .icon-toggle-btn { align-self: flex-end; margin-bottom: 0.5rem; }
    #collapsible-actions { flex-direction: column; align-items: stretch; margin-top: 0.75rem; padding-top: 0.75rem;}
    #collapsible-actions .filter-sort-form { flex-direction: column; align-items: stretch; }
    #collapsible-actions .form-select { width: 100%; }
    .modal-content.legal-modal { max-width: 95vw; width: 95vw; height: 95vh; max-height: 95vh; padding: 1rem; }
    .modal-close-btn { top: 0.5rem; right: 0.5rem; }
    .create-group-form { flex-direction: column; align-items: stretch; }
    #weights-modal .modal-content { padding: 1rem; max-width: 95vw; }
    .weight-controls { flex-direction: column; align-items: stretch; }
    .weight-table th, .weight-table td { padding: 0.4rem 0.5rem; }
    .delete-confirmation-box .button-group { flex-direction: column; }
    .create-category-form { flex-direction: column; align-items: stretch; }
}

