:root {
    --kupfer: #b87333;
    --kupfer-hell: #d48e4d;
    --anthrazit: #2c3e50;
    --bg: #fdfaf7;
}

body { font-family: 'Segoe UI', sans-serif; background: var(--bg); margin: 0; display: flex; flex-direction: column; }

header { background: var(--anthrazit); color: white; padding: 1.5rem; text-align: center; border-bottom: 4px solid var(--kupfer); box-shadow: 0 2px 10px rgba(0,0,0,0.2); position: relative; }

.main-container { display: flex; gap: 30px; padding: 30px; flex-wrap: wrap; }

/* LINKE SEITE: FORMULAR */
.input-section { flex: 1; min-width: 350px; max-width: 500px; }
.card { 
    background: white; padding: 25px; border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(184, 115, 51, 0.1); 
    border: 1px solid rgba(184, 115, 51, 0.2);
}

h2 { color: var(--kupfer); font-weight: 700; font-size: 1.4rem; letter-spacing: 1px; margin-bottom: 20px; text-align: center; }

/* Das Raster für die Dropdowns */
.form-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Zwei Spalten */
    gap: 15px; 
}

.full-width { grid-column: span 2; } /* Für Marke und Notizen */

label { font-size: 0.75rem; font-weight: bold; color: var(--kupfer); text-transform: uppercase; margin-bottom: 5px; display: block; }

select, input[type="text"], textarea { 
    width: 100%; padding: 10px; border: 1.5px solid #eee; border-radius: 10px; 
    background: #fff; font-size: 0.95rem; transition: 0.3s;
}

select:focus, input:focus { border-color: var(--kupfer); outline: none; box-shadow: 0 0 8px rgba(184, 115, 51, 0.2); }

.btn-kupfer { 
    background: linear-gradient(135deg, var(--kupfer), var(--kupfer-hell));
    color: white; border: none; padding: 15px; border-radius: 12px; 
    font-weight: bold; cursor: pointer; margin-top: 15px; width: auto;
}

/* Form-Submit-Button im Neuzugang-Formular soll weiterhin volle Breite haben */
.input-section .btn-kupfer { width: 100%; }

/* RECHTE SEITE: GALERIE */
.gallery-section { flex: 2; min-width: 400px; }

/* Filter-Panel */
.filter-panel {
    background: white;
    border-radius: 15px;
    padding: 18px 20px 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(184, 115, 51, 0.12);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.68rem;
    font-weight: bold;
    color: var(--kupfer);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 68px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-tag {
    background: #f8f5f0;
    border: 1.5px solid #e8e0d5;
    color: #777;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: 0.2s;
}

.filter-tag:hover {
    border-color: var(--kupfer);
    color: var(--kupfer);
}

.filter-tag.active {
    background: var(--kupfer);
    border-color: var(--kupfer);
    color: white;
    font-weight: bold;
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0ede9;
}

.filter-hinweis {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.btn-filter-reset {
    background: transparent;
    border: 1px solid #ddd;
    color: #aaa;
    padding: 4px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: 0.2s;
}

.btn-filter-reset:hover {
    border-color: #dc3545;
    color: #dc3545;
}

/* Trefferquoten-Badge auf Galeriekarten */
.treffer-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.62rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 20px;
    pointer-events: none;
}

.badge-perfekt { background: #198754; color: white; }
.badge-gut     { background: #ffc107; color: #333; }
.badge-schwach { background: #6c757d; color: white; }

.keine-treffer {
    color: #bbb;
    font-size: 0.9rem;
    padding: 40px;
    text-align: center;
    grid-column: 1 / -1;
}
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.shoe-item { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; position: relative; }
.shoe-item:hover { transform: scale(1.02); }
.preview {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    display: none;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.preview-thumb {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-thumb button {
    position: absolute;
    top: 5px;
    right: 5px;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    line-height: 0;
}

/* Galeriebild auf feste Höhe und Beschneidung */
.shoe-item img, .ordner-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Ordner-Items (ähnlich wie shoe-item) */
.ordner-item { 
    background: white; 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: 0.3s; 
    position: relative; 
    padding: 12px;
    max-width: 300px;
    width: 100%;
}
.ordner-item:hover { transform: scale(1.02); }

.ordner-item .btn-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-weight: bold;
}

.ordner-item h4 {
    margin: 10px 0 5px 0;
    color: var(--kupfer);
    font-size: 1rem;
}

.ordner-item .btn-open {
    background: var(--kupfer);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 10px;
    width: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 480px;
    max-width: 95%;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(184, 115, 51, 0.2);
}

#modalImages {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

#modalImages img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(184, 115, 51, 0.2);
}

.modal-img-wrap {
    position: relative;
    display: inline-block;
}

.modal-img-del {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}

.modal-add-img {
    width: 140px;
    height: 140px;
    border: 2px dashed rgba(184, 115, 51, 0.4);
    border-radius: 8px;
    background: transparent;
    color: var(--kupfer);
    font-size: 2.5rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: top;
}

.modal-add-img:hover {
    background: rgba(184, 115, 51, 0.08);
}

#modalNotizen {
    width: 100%;
    min-height: 80px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1.5px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
}

.modal-content .btn-kupfer {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    margin: 6px 4px;
    min-width: 140px;
    max-width: 220px;
    display: inline-block;
    line-height: 1;
}
.shoe-info { padding: 12px; }
.shoe-tag { font-size: 0.65rem; background: #f0ede9; color: #886b4d; padding: 3px 8px; border-radius: 20px; margin: 2px; display: inline-block; }
.farbe-section { margin-top: 15px; }

/* --- Login-Seite (Zweigeteiltes Layout) --- */
.login-overlay {
    position: fixed;
    z-index: 100;
    left: 0; top: 0;
    width: 100%; height: 100%;
    display: flex;
    flex-direction: row;
}

/* LINKE SEITE: Dunkel, Login-Formular */
.login-left {
    width: 420px;
    min-width: 320px;
    background: var(--anthrazit);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 50px 40px 30px 40px;
    box-shadow: 4px 0 30px rgba(0,0,0,0.3);
    z-index: 2;
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.login-logo-eis {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 6px;
    color: var(--kupfer);
    line-height: 1;
}

.login-logo-sub {
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    margin-top: 4px;
}

.login-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 35px 30px;
    border-radius: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.login-card h2 {
    color: white;
    font-weight: 400;
    font-size: 1.4rem;
    margin: 0 0 6px 0;
    text-align: left;
    letter-spacing: 0.5px;
}

.login-subtitle {
    color: rgba(255,255,255,0.45);
    font-size: 0.82rem;
    margin: 0 0 25px 0;
}

.login-card label {
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.15);
    color: white;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.95rem;
    margin-bottom: 16px;
    transition: 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.login-card input::placeholder { color: rgba(255,255,255,0.25); }

.login-card input:focus {
    border-color: var(--kupfer);
    outline: none;
    box-shadow: 0 0 0 3px rgba(184,115,51,0.2);
    background: rgba(255,255,255,0.12);
}

.login-card .btn-kupfer {
    width: 100%;
    padding: 13px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-top: 6px;
    border-radius: 10px;
}

.login-card .btn-kupfer:hover {
    opacity: 0.9;
}

.login-error {
    color: #ff7b7b;
    font-size: 0.82rem;
    margin-top: 10px;
    text-align: center;
    min-height: 1.2em;
}

.login-footer {
    color: rgba(255,255,255,0.2);
    font-size: 0.72rem;
    text-align: center;
    margin: 0;
}

.login-switch {
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 14px;
    margin-bottom: 0;
}

.login-switch a {
    color: var(--kupfer-hell);
    text-decoration: none;
}

.login-switch a:hover {
    text-decoration: underline;
}

/* Passwort-Feld mit Auge-Button */
.pwd-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.pwd-wrap input {
    margin-bottom: 0 !important;
    padding-right: 44px !important;
    flex: 1;
}

.eye-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.eye-btn:hover {
    color: var(--kupfer-hell);
}

/* Passwortstärke-Balken */
.strength-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.3s, background 0.3s;
}

.strength-label {
    font-size: 0.72rem;
    margin: 0 0 12px 0;
    min-height: 1em;
    transition: color 0.3s;
}

/* RECHTE SEITE: Hell, Informationen */
.login-right {
    flex: 1;
    background: linear-gradient(135deg, #fdfaf7 0%, #f5ede0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
    overflow-y: auto;
}

.login-info {
    max-width: 520px;
}

.under-construction {
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border-left: 4px solid #ffc107;
    color: #856404;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.login-info-title {
    font-size: 2.6rem;
    font-weight: 300;
    color: var(--anthrazit);
    line-height: 1.2;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.login-info-title span {
    color: var(--kupfer);
    font-weight: 600;
}

.login-info-desc {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 40px;
    border-left: 3px solid var(--kupfer);
    padding-left: 16px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: white;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 15px rgba(184, 115, 51, 0.08);
    border: 1px solid rgba(184, 115, 51, 0.12);
}

.feature-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--kupfer), var(--kupfer-hell));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-feature strong {
    display: block;
    color: var(--anthrazit);
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.login-feature p {
    color: #8b7355;
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.5;
}

/* Responsiv: auf kleinen Bildschirmen untereinander */
@media (max-width: 768px) {
    .login-overlay { flex-direction: column; }
    .login-left { width: 100%; min-width: unset; padding: 30px 20px; }
    .login-right { padding: 30px 20px; }
    .login-info-title { font-size: 1.8rem; }
}

/* --- Abmelden-Button --- */
.btn-logout {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* --- Seiten-Footer --- */
.site-footer {
    background: var(--anthrazit);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.82rem;
    margin-top: auto;
}

.site-footer .footer-note {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    margin: 0 0 0.6rem;
    font-style: italic;
}

.site-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin: 0.6rem 0;
    padding: 0;
}

.site-footer .footer-links a {
    color: var(--kupfer-hell);
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.site-footer .footer-links a:hover {
    text-decoration: underline;
}

.site-footer .footer-copy {
    color: rgba(255, 255, 255, 0.3);
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
}

/* Anklickbare Links im Login-Footer */
.login-footer a {
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    cursor: pointer;
}

.login-footer a:hover {
    color: var(--kupfer-hell);
    text-decoration: underline;
}

/* --- Rechtliche Modals (Impressum, Kontakt, Datenschutz) --- */
.legal-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.legal-modal.open {
    display: flex;
}

.legal-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 580px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.legal-modal-content h2 {
    color: var(--anthrazit);
    margin-top: 0;
    border-bottom: 3px solid var(--kupfer);
    padding-bottom: 0.6rem;
    font-size: 1.3rem;
}

.legal-modal-content h3 {
    color: var(--anthrazit);
    font-size: 1rem;
    margin: 1.2rem 0 0.3rem;
}

.legal-modal-content p {
    color: #555;
    line-height: 1.75;
    font-size: 0.92rem;
    margin: 0 0 0.8rem;
}

.legal-modal-content a {
    color: var(--kupfer);
}

.legal-modal-close {
    position: absolute;
    top: 0.8rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 0;
    width: auto;
    margin: 0;
}

.legal-modal-close:hover {
    color: var(--anthrazit);
}