/* =========================
   RESET & BASISLAYOUT
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    padding: 1rem;
    background-color: #f5f5f5;
    color: #333;
    -webkit-font-smoothing: antialiased;
}

/* =========================
   CONTAINER
========================= */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease-in-out;
}

.container:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* =========================
   TYPOGRAFIE
========================= */
h1, h2, h3 {
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    color: #222;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
}

/* =========================
   FORMULARE
========================= */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input.input, select.input, textarea.input {
    width: 100%;
    padding: 0.7rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background-color: #fff;
}

/* =========================
   BUTTONS
========================= */
.btn {
    display: inline-block;
    padding: 0.7rem 1.2rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.25s ease, transform 0.1s ease;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background-color: #555;
    transform: translateY(-1px);
}

.btn.primary {
    background-color: #007bff;
}

.btn.primary:hover {
    background-color: #0069d9;
}

.btn.danger {
    background-color: #dc3545;
}

.btn.danger:hover {
    background-color: #b72a37;
}

.btn.secondary {
    background-color: #eee;
    color: #333;
}

.btn.secondary:hover {
    background-color: #ddd;
}

/* =========================
   FLASH MESSAGES
========================= */
.flashes {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.flashes li {
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.flashes li.success {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.flashes li.error {
    background-color: #fdecea;
    color: #c62828;
}

/* =========================
   TABELLEN
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 0.7rem;
    text-align: left;
}

table th {
    background-color: #f0f0f0;
    font-weight: 600;
}

/* =========================
   BILDKARTEN-LISTE (role.html)
========================= */
.image-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.image-card {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease;
}

.image-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.image-card h3 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: #111;
}

.image-card img.preview {
    display: block;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.image-card .meta {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    body {
        padding: 0.5rem;
    }

    .container {
        padding: 1rem;
    }

    .btn {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }

    .image-card {
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    h1, h2, h3 {
        font-size: 1.1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }

    table th, table td {
        font-size: 0.85rem;
        padding: 0.4rem;
    }
}

/* Buttons nebeneinander mit Abstand */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem; /* Abstand zwischen Buttons */
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.button-group .btn {
    flex: 1 1 auto;
    text-align: center;
}