* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: #1e3a5f;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
}

header h1 a {
    color: white;
}

header h1 a:hover {
    text-decoration: none;
}

header nav a {
    color: #93c5fd;
    margin-left: 1.5rem;
}

header nav a:hover {
    color: white;
}

/* Main */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Buttons */
button, .btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-block;
}

button:hover, .btn:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
}

.btn-secondary:hover {
    background: #4b5563;
    text-decoration: none;
}

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

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: normal;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

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

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e3a5f;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Filters */
.filters {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form input[type="text"] {
    width: auto;
    min-width: 200px;
}

.filter-form select {
    width: auto;
}

/* Table */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
}

tr:hover {
    background: #f9fafb;
}

.datum {
    width: 120px;
    white-space: nowrap;
}

.actions {
    width: 180px;
}

.actions a {
    margin-right: 1rem;
}

.no-results {
    background: white;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
}

/* Detail View */
.arbeit-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.arbeit-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.arbeit-header h2 {
    margin-bottom: 0.5rem;
}

.meta {
    color: #6b7280;
    margin-bottom: 1rem;
}

.meta span {
    margin-right: 1.5rem;
}

.folgetermin {
    color: #b45309;
}

.kategorien {
    margin-bottom: 1.5rem;
}

.kategorie {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.beschreibung {
    white-space: pre-wrap;
    margin-bottom: 2rem;
}

/* Anhänge */
.anhaenge {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.anhaenge h3 {
    margin-bottom: 1rem;
}

.anhaenge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.anhang img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.anhang-beschreibung {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.file-link {
    display: block;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 4px;
    text-align: center;
}

.delete-form {
    margin-top: 0.5rem;
}

.btn-delete {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.btn-delete:hover {
    background: #b91c1c;
}

.upload-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.upload-section h3 {
    margin-bottom: 1rem;
}

/* Edit Form */
.arbeit-edit {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.arbeit-edit h2 {
    margin-bottom: 1.5rem;
}
