:root {
  --primary: #4a90e2;
  --primary-dark: #357abd;
  --secondary: #f8f9fa;
  --text: #333;
  --border: #dee2e6;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
}

/* Auth Styles */
.auth-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

.form-group label {
  display: block;
  margin-bottom: .5rem;
}

.form-group input {
  width: 100%;
  padding: .375rem .75rem;
  border: 1px solid var(--border);
  border-radius: .25rem;
}

.error-message {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px;
  margin: 10px 0;
}

/* Navigation Styles */
#main-nav {
  display: flex;
  padding: 1rem;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
}

.nav-btn.active {
  color: var(--primary);
}

/* Content Section Styles */
.content-section {
  padding: 20px;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
  background: var(--secondary);
}

/* Status Badge Styles */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-open {
  background: #ffeeba;
  color: #856404;
}

.status-progress {
  background: #b8daff;
  color: #004085;
}

.status-done {
  background: #c3e6cb;
  color: #155724;
}

/* Action Button Styles */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 4px;
}

.edit-btn {
  background: var(--primary);
  color: white;
}

.delete-btn {
  background: #dc3545;
  color: white;
}

/* User Info Styles */
.user-header {
  position: relative;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: none;
}

.user-header.show-dropdown .user-dropdown {
  display: block;
}

.dropdown-content {
  padding: 8px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--text);
  text-decoration: none;
}

.dropdown-item:hover {
  background: var(--secondary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
/* Form Styles */
textarea {
    width: 100%;
    padding: .375rem .75rem;
    border: 1px solid var(--border);
    border-radius: .25rem;
    resize: vertical;
}

select {
    width: 100%;
    padding: .375rem .75rem;
    border: 1px solid var(--border);
    border-radius: .25rem;
    background-color: white;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: #5a6268;
}
/* Form Section Styles */
.form-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background-color: #fff;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 1.1rem;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 1rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: .25rem;
    font-size: 14px;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* Required Field Indicator */
label[for]::after {
    content: "";
}

label[for^="familyName"]::after,
label[for^="address"]::after,
label[for^="fileNumber"]::after,
label[for^="specialists"]::after,
label[for^="district"]::after,
label[for^="staffEmail"]::after,
label[for^="staffName"]::after,
label[for^="staffPhone"]::after,
label[for^="motherName"]::after,
label[for^="motherBirthdate"]::after,
label[for^="motherPhone"]::after,
label[for^="fatherName"]::after,
label[for^="fatherBirthdate"]::after,
label[for^="fatherPhone"]::after,
label[for^="child-name-"]::after,
label[for^="child-birthdate-"]::after,
label[for^="child-gender-"]::after,
label[for="status"]::after {
    content: "*";
    color: #dc3545;
    margin-left: 4px;
}

/* Child Entry Styles */
.child-entry {
    border: 1px solid var(--border);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.child-entry h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    margin-top: 1rem;
}

.btn-danger:hover {
    background-color: #c82333;
}
/* Fallnummer Styles */
input[readonly] {
    background-color: var(--secondary);
    cursor: not-allowed;
}

/* Fallnummer in der Tabelle */
td:first-child {
    font-family: monospace;
    font-size: 0.9em;
    color: var(--primary);
}
/* Fallnummer Input-Gruppe */
.input-group {
    display: flex;
    gap: 8px;
    align-items: start;
}

.case-number-group input {
    font-family: monospace;
}

.case-number-group .help-text {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 0.875em;
}

.case-number-group .error-message {
    margin-top: 4px;
    color: #dc3545;
    font-size: 0.875em;
}

/* Readonly-Stil anpassen */
input[readonly] {
    background-color: var(--secondary);
    cursor: not-allowed;
}

input[readonly]:focus {
    outline: none;
    box-shadow: none;
}

/* Aktiver Bearbeitungsmodus */
.case-number-group input:not([readonly]) {
    background-color: #fff;
    cursor: text;
    border-color: var(--primary);
}
@media (max-width: 600px) {
    .content-section {
        padding: 10px;
    }
    table {
        width: 100%;
        font-size: 0.8em;
    }
}
  
.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.5s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.custom-alert.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.custom-alert.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.custom-alert.info {
  background-color: #cce5ff;
  border: 1px solid #b8daff;
  color: #004085;
}

.custom-alert.warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.alert-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  margin-left: 10px;
  font-weight: bold;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Filter Styles */
.filter-container {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-container label {
    font-weight: 500;
}

/* Search Input Styles */
#searchInput {
    padding: .375rem .75rem;
    border: 1px solid var(--border);
    border-radius: .25rem;
    width: 300px; /* Set a fixed width for the search input */
}

/* Button Styles for Filters */
.filter-container select {
    padding: .375rem .75rem;
    border: 1px solid var(--border);
    border-radius: .25rem;
    background-color: white;
}

/* Table Column Widths */
table th:nth-child(1), /* Fallnummer */
table td:nth-child(1) {
    width: 15%; /* 15% der Gesamtbreite */
}

table th:nth-child(2), /* Familie */
table td:nth-child(2) {
    width: 25%; /* 25% der Gesamtbreite */
}

table th:nth-child(3), /* Jugendamt */
table td:nth-child(3) {
    width: 25%; /* 25% der Gesamtbreite */
}

table th:nth-child(4), /* Status */
table td:nth-child(4) {
    width: 20%; /* 20% der Gesamtbreite */
}

table th:nth-child(5), /* Aktionen */
table td:nth-child(5) {
    width: 15%; /* 15% der Gesamtbreite */
}

/* Spinner Styles */
.spinner {
    display: none; /* Standardmäßig ausblenden */
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto; /* Zentrieren */
}

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