@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Dancing+Script:wght@600&display=swap');

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

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
}

.brand img {
    height: 46px;
    width: auto;
}

.brand .divider-v {
    width: 1px;
    height: 32px;
    background: #5D317E;
}

.brand .brand-text {
    display: flex;
    flex-direction: column;
}

.brand .brand-text .name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
}

.brand .brand-text .tagline {
    font-size: 0.7rem;
    font-weight: 300;
    color: #cfc2dc;
    letter-spacing: 0.5px;
}

.card {
    background: #0d0d0d;
    border: 1px solid #241a2c;
    border-radius: 14px;
    padding: 32px 28px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(93, 49, 126, 0.15);
}

.card h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.card .accent-line {
    width: 40px;
    height: 2px;
    background: #5D317E;
    margin: 10px 0 18px 0;
}

.card p.subtitle {
    color: #9d92a8;
    font-size: 0.9rem;
    margin-bottom: 24px;
    font-weight: 300;
}

label {
    display: block;
    font-size: 0.78rem;
    color: #b8adc4;
    margin-bottom: 6px;
    margin-top: 16px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 500;
}

input[type=text], input[type=password], input[type=number], select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #2a2130;
    background: #000000;
    color: #f2f2f2;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
}

input:focus, select:focus { outline: none; border-color: #5D317E; box-shadow: 0 0 0 3px rgba(93, 49, 126, 0.25); }

button, .btn {
    display: inline-block;
    margin-top: 24px;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: #5D317E;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s ease;
}

button:hover, .btn:hover { background: #4a2765; }

.btn-secondary {
    background: #1a1520;
    border: 1px solid #2a2130;
}
.btn-secondary:hover { background: #241a2c; }

.error {
    background: #2a1414;
    border: 1px solid #5c2626;
    color: #ff8a8a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-top: 16px;
}

.success {
    background: #1a1424;
    border: 1px solid #5D317E;
    color: #d5c2e8;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-top: 16px;
}

.wide { max-width: 780px; }

.top-bar {
    width: 100%;
    max-width: 780px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.top-bar h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.logout-link {
    color: #9d92a8;
    font-size: 0.85rem;
    text-decoration: none;
}
.logout-link:hover { color: #5D317E; }

/* Vorher/Nachher Slider */
.compare {
    position: relative;
    width: 100%;
    max-width: 700px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    margin: 20px 0;
    background: #000;
    touch-action: pan-y;
    border: 1px solid #241a2c;
}

.compare img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

.compare .after-wrap {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}

.compare .after-wrap img {
    width: var(--img-width);
    max-width: none;
}

.compare .divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: #5D317E;
    transform: translateX(-50%);
    pointer-events: none;
}

.compare .divider::after {
    content: '⇔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #5D317E;
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.compare .label-tag {
    position: absolute;
    top: 12px;
    background: rgba(0,0,0,0.55);
    border: 1px solid #5D317E;
    color: #fff;
    font-size: 0.68rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    pointer-events: none;
}
.compare .label-before { left: 12px; }
.compare .label-after { right: 12px; }

.compare input[type=range] {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
}

.set-label {
    font-size: 0.78rem;
    color: #9d92a8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 24px;
    margin-bottom: -4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}
th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #241a2c;
    font-size: 0.9rem;
}
th {
    color: #9d92a8;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-badge {
    background: #1a1424;
    border: 1px solid #5D317E;
    color: #d5c2e8;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: monospace;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
}

.thumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
.thumb {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #000000;
    border: 1px solid #241a2c;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .tag {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.75);
    font-size: 0.62rem;
    text-align: center;
    padding: 3px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.thumb form {
    position: absolute;
    top: 2px; right: 2px;
}
.thumb button {
    margin: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 0.7rem;
    border-radius: 50%;
    line-height: 1;
    background: #5D317E;
}

.empty-state {
    text-align: center;
    color: #9d92a8;
    padding: 40px 20px;
    font-size: 0.9rem;
}

.signature {
    font-family: 'Dancing Script', cursive;
    color: #d5c2e8;
    font-size: 1.1rem;
}

.footer-note {
    margin-top: 32px;
    text-align: center;
    color: #55495f;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

/* Rechtliche Seiten (Impressum, Datenschutz, AGB) */
.legal-content {
    max-width: 780px;
    width: 100%;
}

.legal-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.legal-content .updated {
    color: #9d92a8;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.legal-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 32px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #241a2c;
}

.legal-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #d5c2e8;
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-content h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: #b8adc4;
    margin-top: 16px;
    margin-bottom: 6px;
}

.legal-content p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #cfc9d4;
    margin-bottom: 12px;
    font-weight: 300;
}

.legal-content ul, .legal-content ol {
    margin: 0 0 14px 20px;
    color: #cfc9d4;
    font-size: 0.88rem;
    line-height: 1.65;
    font-weight: 300;
}

.legal-content li { margin-bottom: 6px; }

.legal-content a {
    color: #b48ed6;
    word-break: break-word;
}

.legal-content strong { color: #ffffff; font-weight: 600; }

/* Footer-Navigation mit Rechts-Links */
.legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #1a1520;
    width: 100%;
    max-width: 780px;
}

.legal-nav a {
    color: #6b6075;
    font-size: 0.78rem;
    text-decoration: none;
    letter-spacing: 0.3px;
    margin: 0 9px;
}
.legal-nav a:hover { color: #b48ed6; }

textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #2a2130;
    background: #000000;
    color: #f2f2f2;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
    min-height: 120px;
}
textarea:focus { outline: none; border-color: #5D317E; box-shadow: 0 0 0 3px rgba(93, 49, 126, 0.25); }

/* Foto-Galerie (Kundenansicht) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.photo-grid-item {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #241a2c;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.photo-grid-item:hover {
    border-color: #5D317E;
    transform: scale(1.02);
}
.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    width: auto;
    margin: 0;
    padding: 4px 10px;
}
.lightbox-close:hover { color: #b48ed6; background: none; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(93,49,126,0.5);
    border: 1px solid #5D317E;
    color: #fff;
    font-size: 1.8rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.lightbox-nav:hover { background: #5D317E; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #b8adc4;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.5);
    padding: 4px 12px;
    border-radius: 20px;
}

@media (max-width: 600px) {
    .lightbox-nav { width: 40px; height: 40px; font-size: 1.4rem; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* ============================================
   PORTAL v2: Kopf-Infos, Kategorien, Swipe-Galerien
   ============================================ */

.info-card {
    width: 100%;
    max-width: 780px;
    background: #0d0d0d;
    border: 1px solid #241a2c;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 32px;
}
.info-card .info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}
.info-item .info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9d92a8;
    margin-bottom: 3px;
}
.info-item .info-value {
    font-size: 0.95rem;
    color: #f2f2f2;
    font-weight: 500;
}
@media (max-width: 600px) {
    .info-card .info-row { grid-template-columns: 1fr; }
}

.category-block {
    width: 100%;
    max-width: 780px;
    margin-bottom: 40px;
}
.category-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.category-title .count-badge {
    font-size: 0.68rem;
    font-weight: 500;
    color: #b48ed6;
    background: #1a1424;
    border: 1px solid #5D317E;
    padding: 2px 9px;
    border-radius: 20px;
    text-transform: none;
    letter-spacing: 0;
}
.subgallery-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9d92a8;
    margin: 18px 0 8px 0;
}

.swipe-wrap { position: relative; }
.swipe-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: #5D317E #14161a;
}
.swipe-row::-webkit-scrollbar { height: 6px; }
.swipe-row::-webkit-scrollbar-thumb { background: #5D317E; border-radius: 10px; }
.swipe-row::-webkit-scrollbar-track { background: #14161a; }

.swipe-row .slide {
    flex: 0 0 82%;
    max-width: 420px;
    aspect-ratio: 4/3;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #241a2c;
    background: #000;
}
.swipe-row .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swipe-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    border: 1px solid #5D317E;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    z-index: 2;
    user-select: none;
}
.swipe-nav.prev { left: -6px; }
.swipe-nav.next { right: -6px; }
@media (max-width: 700px) { .swipe-nav { display: none; } }

/* Admin: Foto-Upload & Verwaltung */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) { .upload-grid { grid-template-columns: 1fr; } }

.admin-category-group {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid #1a1520;
}
.admin-category-group h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.admin-subtype-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #9d92a8;
    letter-spacing: 0.5px;
    margin: 10px 0 6px 0;
}

/* Header-Zeile: Logo (klickbar, scrollt nach oben) + Button zur Hauptseite */
.portal-header {
    width: 100%;
    max-width: 780px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.portal-header .brand {
    margin-bottom: 0;
}
.brand-link {
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    display: inline-block;
}
.home-btn {
    width: auto;
    margin: 0;
    padding: 9px 18px;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Header-Button-Gruppe (Zurück + Zur Hauptseite) */
.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Bilder in der Galerie klickbar machen */
.swipe-row .slide img { cursor: zoom-in; }

/* Lightbox: Bild groß anzeigen */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid #5D317E;
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
}
