/* ===========================================
   Hans Dither Backend - Styles
   =========================================== */

/* Reset und Basis-Stile */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Überschriften */
h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin: 1.5rem 0 1rem 0;
}

h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
}

/* Absätze */
p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Formulare */
.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.form label {
    font-weight: 600;
    color: #2c3e50;
}

.form input[type="text"],
.form input[type="password"],
.form input[type="file"],
.form input[type="number"],
.form input[type="email"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form input[type="text"]:focus,
.form input[type="password"]:focus,
.form input[type="file"]:focus,
.form input[type="number"]:focus,
.form input[type="email"]:focus {
    outline: none;
    border-color: #3498db;
}

.form button {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form button:hover {
    background-color: #2980b9;
}

.form button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Tabellen */
.images-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

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

.images-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.images-table tr:hover {
    background-color: #f5f5f5;
}

.images-table a {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e8f4fc;
    border-radius: 3px;
    color: #2980b9;
}

.images-table a:hover {
    background-color: #d0e8ff;
    color: #1a5276;
    text-decoration: none;
}

.preview-image {
    width: 80px;
    height: 48px;
    object-fit: contain;
    image-rendering: pixelated;
    border: 1px solid #ddd;
    background: #fff;
}

/* Fehler und Erfolgsmeldungen */
.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.success {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
}

/* Pending Status */
.pending {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .form {
        gap: 0.75rem;
    }
    
    .images-table th,
    .images-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .images-table {
        display: block;
        overflow-x: auto;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Datei-Upload Stile */
input[type="file"] {
    cursor: pointer;
}

/* Fokus für Tastaturbenutzer */
:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}
