/* =========================================================
   MZIMMERMANN PORTAL
   TEIL 1: Grundlayout, Farben, Navigation und Banner
   ========================================================= */


/* =========================
   Farbvariablen
   ========================= */

:root {
    --background: #07120d;
    --background-soft: #0b1a12;
    --surface: #10251a;
    --surface-hover: #153321;

    --green-dark: #14532d;
    --green-main: #16a34a;
    --green-bright: #22c55e;
    --green-light: #86efac;
    --green-pale: #dcfce7;

    --text-main: #f0fdf4;
    --text-soft: #bbf7d0;
    --text-muted: #94a3b8;

    --danger: #ef4444;
    --danger-light: #fca5a5;
    --warning: #f59e0b;

    --border: rgba(134, 239, 172, 0.18);
    --border-strong: rgba(134, 239, 172, 0.35);

    --shadow-small: 0 8px 24px rgba(0, 0, 0, 0.2);
    --shadow-large: 0 24px 60px rgba(0, 0, 0, 0.35);

    --radius-small: 10px;
    --radius-medium: 16px;
    --radius-large: 26px;

    --content-width: 1180px;
}


/* =========================
   Basis-Reset
   ========================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            rgba(34, 197, 94, 0.09),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            var(--background),
            var(--background-soft)
        );

    color: var(--text-main);
    line-height: 1.55;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--green-light);
    text-decoration: none;
}

a:hover {
    color: var(--green-pale);
}


/* =========================
   Seitencontainer
   ========================= */

.container {
    width: min(92%, var(--content-width));
    margin: 0 auto;
    padding: 38px 0 70px;
}

main {
    width: min(92%, var(--content-width));
    margin: 0 auto;
    padding: 35px 0 70px;
}


/* =========================
   Überschriften und Texte
   ========================= */

h1,
h2,
h3,
h4 {
    color: var(--text-main);
    line-height: 1.2;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.2rem);
}

h2 {
    margin: 0 0 14px;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

p {
    margin-top: 0;
}

.subtitle {
    margin-top: 10px;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.eyebrow {
    margin: 0 0 8px;

    color: var(--green-bright);

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--green-light);
}

.text-danger {
    color: var(--danger-light);
}


/* =========================
   Hauptkopf und Navigation
   ========================= */

header:not(.page-header) {
    width: min(92%, var(--content-width));
    margin: 28px auto 0;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;

    padding: 18px 0;

    border-bottom: 1px solid var(--border);
}

header:not(.page-header) h1 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
}

header:not(.page-header) nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

header:not(.page-header) a {
    color: var(--text-soft);
    font-weight: 650;
}

header:not(.page-header) a:hover {
    color: var(--green-bright);
}


/* =========================
   Seitenkopf
   ========================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;

    margin-bottom: 42px;
}

.page-header h1 {
    margin: 0;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}


/* =========================
   Banner
   ========================= */

.header {
    position: relative;
    overflow: hidden;

    min-height: 245px;
    padding: 42px;

    display: flex;
    align-items: center;

    border-radius: var(--radius-large);

    background:
        linear-gradient(
            115deg,
            rgba(20, 83, 45, 0.97),
            rgba(22, 163, 74, 0.9)
        );

    box-shadow: var(--shadow-large);
}

.header::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 80% 25%,
            rgba(255, 255, 255, 0.15),
            transparent 34%
        );

    pointer-events: none;
}

.banner-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.profile {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 28px;
}

.avatar {
    width: 104px;
    height: 104px;
    flex: 0 0 104px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    border: 4px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.18);

    color: white;
    font-size: 50px;

    box-shadow: var(--shadow-small);
}

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

.header h1 {
    color: white;
}

.header p {
    margin: 10px 0 0;
    color: var(--green-pale);
}


/* =========================
   Begrüßungsbereich
   ========================= */

.welcome {
    margin-top: 38px;
    padding: 0;

    background: transparent;
    border: 0;
    box-shadow: none;
}

.welcome h2 {
    margin-bottom: 8px;
}

.welcome p {
    color: var(--text-soft);
}


/* =========================
   Globale Meldungen
   ========================= */

.messages {
    margin: 24px 0 30px;
}

.message {
    margin: 8px 0;
    padding: 12px 16px;

    border-left: 4px solid var(--green-bright);

    background: rgba(34, 197, 94, 0.08);
    color: var(--green-pale);

    border-radius: 0 var(--radius-small) var(--radius-small) 0;
}

.message.success {
    border-left-color: var(--green-bright);
}

.message.error {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-light);
}

.message.warning {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.08);
}

/* =========================================================
   MZIMMERMANN PORTAL
   TEIL 2: Dashboard, Status, Buttons, Formulare und Tabellen
   ========================================================= */


/* =========================
   Dashboard-Raster
   ========================= */

.grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 34px;

    margin-top: 42px;
}

.card {
    padding: 4px 0;

    background: transparent;
    border: none;
    box-shadow: none;

    transition:
        transform 160ms ease,
        color 160ms ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card h2 {
    margin: 0 0 7px;
    font-size: 1.35rem;
}

.card p {
    margin: 0;
    color: var(--text-soft);
}

.card-link {
    display: block;
    color: inherit;
}

.card-link:hover h2 {
    color: var(--green-bright);
}


/* =========================
   Punkte statt Symbole
   ========================= */

.dot,
.list-dot,
.status-dot {
    display: inline-block;

    width: 11px;
    height: 11px;

    flex: 0 0 11px;

    border-radius: 50%;
    background: var(--green-bright);
}

.dot {
    margin-bottom: 16px;
}

.status-dot.warning {
    background: var(--warning);
}

.status-dot.danger {
    background: var(--danger);
}


/* =========================
   Statusbereiche
   ========================= */

.status {
    margin-top: 48px;
    padding: 0;

    background: transparent;
    border: none;
    box-shadow: none;
}

.status h2 {
    margin-bottom: 18px;
    color: var(--green-light);
}

.status p {
    margin: 10px 0;
    padding: 0;

    background: transparent;
    border: none;

    color: var(--text-soft);
}

.status-list {
    display: grid;
    gap: 12px;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 12px;

    color: var(--text-soft);
}

.ok {
    color: var(--green-light);
    font-weight: 650;
}


/* =========================
   Systemwerte
   ========================= */

.system-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(200px, 1fr));

    gap: 24px;

    margin-top: 22px;
}

.metric {
    padding: 0;

    background: transparent;
    border: 0;
}

.metric-label {
    margin-bottom: 6px;

    color: var(--text-muted);
    font-size: 0.9rem;
}

.metric-value {
    color: var(--text-main);
    font-size: 1.35rem;
    font-weight: 750;
}

.progress {
    width: 100%;
    height: 8px;

    margin-top: 10px;

    overflow: hidden;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--green-main),
            var(--green-bright)
        );
}


/* =========================
   Buttons
   ========================= */

.button,
button {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    min-height: 44px;
    padding: 11px 20px;

    border: none;
    border-radius: var(--radius-small);

    background:
        linear-gradient(
            135deg,
            var(--green-main),
            var(--green-bright)
        );

    color: #052e16;

    font-weight: 750;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 150ms ease,
        filter 150ms ease,
        background 150ms ease;
}

.button:hover,
button:hover {
    color: #052e16;
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.button.secondary {
    border: 1px solid var(--border-strong);

    background: transparent;
    color: var(--green-light);
}

.button.secondary:hover {
    background: rgba(34, 197, 94, 0.09);
    color: var(--green-pale);
}

.button.danger,
button.danger {
    background: var(--danger);
    color: white;
}

.button-small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.88rem;
}

.text-link {
    color: var(--green-bright);
    font-weight: 650;
}

.text-link:hover {
    text-decoration: underline;
}

.danger-link {
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: var(--danger-light);

    font-weight: 650;
}

.danger-link:hover {
    background: transparent;
    color: #fecaca;
    text-decoration: underline;
    transform: none;
}


/* =========================
   Formulare
   ========================= */

form {
    margin: 0;
}

label {
    display: block;

    margin-bottom: 7px;

    color: var(--green-light);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    outline: none;

    background: rgba(255, 255, 255, 0.055);
    color: var(--text-main);

    transition:
        border-color 150ms ease,
        background 150ms ease,
        box-shadow 150ms ease;
}

input::placeholder,
textarea::placeholder {
    color: #64748b;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green-bright);

    background: rgba(255, 255, 255, 0.075);

    box-shadow:
        0 0 0 3px rgba(34, 197, 94, 0.12);
}

select option {
    background: var(--surface);
    color: var(--text-main);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group {
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 26px;
}


/* =========================
   Login und Passwortseite
   ========================= */

.login-box,
.auth-panel {
    width: min(92%, 430px);

    margin: 9vh auto 0;

    padding: 36px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(16, 37, 26, 0.94),
            rgba(7, 18, 13, 0.96)
        );

    box-shadow: var(--shadow-large);
}

.login-box h1,
.auth-panel h1 {
    margin-bottom: 10px;
    font-size: 2rem;
}

.login-box p,
.auth-panel p {
    color: var(--text-soft);
}

.login-box button,
.auth-panel button {
    width: 100%;
    margin-top: 12px;
}


/* Kompatibilität mit alten Templates, die .box verwenden */

.box {
    width: min(92%, 620px);

    margin: 8vh auto;
    padding: 34px;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background: rgba(16, 37, 26, 0.92);

    box-shadow: var(--shadow-large);
}


/* =========================
   Tabellen
   ========================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;
    border-spacing: 0;

    margin-top: 24px;
}

th,
td {
    padding: 15px 12px;

    text-align: left;

    border-bottom: 1px solid var(--border);
}

th {
    color: var(--green-light);

    font-size: 0.83rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

td {
    color: var(--text-soft);
}

tbody tr {
    transition: background 150ms ease;
}

tbody tr:hover {
    background: rgba(34, 197, 94, 0.045);
}

td a {
    margin-right: 8px;
}


/* =========================
   Benutzerverwaltung
   ========================= */

.user-list {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-top: 28px;
}

.user-row {
    display: grid;

    grid-template-columns:
        minmax(160px, 1fr)
        minmax(110px, 160px)
        auto;

    align-items: center;
    gap: 20px;

    padding: 15px 0;

    border-bottom: 1px solid var(--border);
}

.user-name {
    color: var(--text-main);
    font-weight: 750;
}

.user-role {
    color: var(--text-muted);
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}


/* =========================
   Abschnittsüberschriften
   ========================= */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;

    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
    color: var(--green-light);
}

.section-heading span {
    color: var(--text-muted);
}

.empty-state {
    margin: 18px 0;
    color: var(--text-muted);
}


/* =========================
   Tablet und Smartphone
   ========================= */

@media (max-width: 760px) {
    .container,
    main {
        width: 90%;
        padding-top: 24px;
    }

    .header {
        min-height: 210px;
        padding: 30px;
    }

    .profile {
        flex-direction: column;
        align-items: flex-start;
    }

    .avatar {
        width: 86px;
        height: 86px;
        flex-basis: 86px;
    }

    .page-header {
        flex-direction: column;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .user-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .user-actions {
        justify-content: flex-start;
    }

    header:not(.page-header) {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 24px;
        border-radius: var(--radius-medium);
    }

    .login-box,
    .auth-panel,
    .box {
        width: 92%;
        padding: 26px 22px;
    }

    .button,
    button {
        width: 100%;
    }

    .page-actions,
    .form-actions {
        width: 100%;
        flex-direction: column;
    }
}

/* =========================================================
   MZIMMERMANN PORTAL
   TEIL 3: Dateimanager
   ========================================================= */


/* =========================
   Werkzeugleiste
   ========================= */

.file-toolbar {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(280px, 1fr));

    gap: 34px;

    margin: 35px 0 40px;
}

.upload-form,
.folder-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-form button,
.folder-form button {
    align-self: flex-start;
}


/* =========================
   Dateiauswahl
   ========================= */

input[type="file"] {
    padding: 10px;

    border: 1px dashed var(--border-strong);

    background: rgba(34, 197, 94, 0.035);

    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 9px 14px;

    border: none;
    border-radius: 8px;

    background: var(--green-main);
    color: white;

    font-weight: 700;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background: var(--green-bright);
    color: #052e16;
}


/* =========================
   Pfadnavigation
   ========================= */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;

    margin: 28px 0;

    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--green-bright);
    font-weight: 650;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.directory-navigation {
    margin-bottom: 28px;
}


/* =========================
   Bereiche
   ========================= */

.file-section {
    margin-top: 48px;
}

.folder-list,
.file-list {
    display: flex;
    flex-direction: column;

    gap: 4px;
}


/* =========================
   Ordner
   ========================= */

.folder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    min-height: 66px;
    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.folder-link {
    display: flex;
    align-items: center;

    flex: 1;
    gap: 14px;

    min-width: 0;

    color: inherit;
}

.folder-link:hover strong {
    color: var(--green-bright);
}

.folder-link strong {
    display: block;

    overflow: hidden;

    color: var(--text-main);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-link small {
    display: block;

    margin-top: 4px;

    color: var(--text-muted);
}


/* =========================
   Dateien
   ========================= */

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    min-height: 66px;
    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.file-information {
    display: flex;
    align-items: center;

    flex: 1;
    gap: 14px;

    min-width: 0;
}

.file-information > div {
    min-width: 0;
}

.file-information strong {
    display: block;

    overflow: hidden;

    color: var(--text-main);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-information small {
    display: block;

    margin-top: 4px;

    color: var(--text-muted);
}

.file-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 16px;
}

.file-actions form,
.folder-item form {
    margin: 0;
}


/* =========================
   Dateitypen
   ========================= */

.file-extension {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    min-width: 42px;
    height: 30px;
    padding: 0 8px;

    border: 1px solid var(--border);
    border-radius: 7px;

    background: rgba(34, 197, 94, 0.06);

    color: var(--green-light);

    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}


/* =========================
   Speicherübersicht
   ========================= */

.storage-summary {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 24px;

    margin: 35px 0;
}

.storage-item {
    padding: 0;

    background: transparent;
}

.storage-label {
    margin-bottom: 6px;

    color: var(--text-muted);
    font-size: 0.9rem;
}

.storage-value {
    color: var(--text-main);

    font-size: 1.25rem;
    font-weight: 750;
}


/* =========================
   Aktionsleiste
   ========================= */

.manager-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 12px;

    margin: 25px 0 36px;
}


/* =========================
   Suchfeld
   ========================= */

.search-form {
    display: flex;
    gap: 10px;

    width: min(100%, 520px);
}

.search-form input {
    flex: 1;
}

.search-form button {
    flex: 0 0 auto;
}


/* =========================
   Kompakte Liste
   ========================= */

.compact-list {
    display: flex;
    flex-direction: column;
}

.compact-list > * {
    border-bottom: 1px solid var(--border);
}

.compact-list > *:last-child {
    border-bottom: none;
}


/* =========================
   Uploadfortschritt
   ========================= */

.upload-progress {
    display: none;

    margin-top: 14px;
}

.upload-progress.active {
    display: block;
}

.upload-progress-text {
    margin-bottom: 7px;

    color: var(--text-muted);
    font-size: 0.9rem;
}


/* =========================
   Dateimanager mobil
   ========================= */

@media (max-width: 760px) {
    .file-toolbar {
        grid-template-columns: 1fr;
    }

    .folder-item,
    .file-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .folder-link,
    .file-information {
        width: 100%;
    }

    .file-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .upload-form button,
    .folder-form button {
        align-self: stretch;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }
}

/* =========================================================
   MZIMMERMANN PORTAL
   TEIL 4: Galerie und Bildvorschau
   ========================================================= */


/* =========================
   Galerie-Werkzeugleiste
   ========================= */

.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;

    gap: 24px;

    margin: 34px 0 40px;
}

.gallery-upload-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;

    gap: 12px;

    width: min(100%, 680px);
}

.gallery-upload-form .form-group {
    flex: 1 1 220px;
    margin: 0;
}

.gallery-upload-form button {
    flex: 0 0 auto;
}


/* =========================
   Galerie-Raster
   ========================= */

.gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(220px, 1fr));

    gap: 28px;

    margin-top: 30px;
}


/* =========================
   Einzelnes Galeriebild
   ========================= */

.gallery-item {
    position: relative;

    min-width: 0;
}

.gallery-preview {
    position: relative;

    display: block;

    overflow: hidden;

    aspect-ratio: 4 / 3;

    border-radius: var(--radius-medium);

    background:
        linear-gradient(
            145deg,
            rgba(34, 197, 94, 0.08),
            rgba(255, 255, 255, 0.025)
        );

    border: 1px solid var(--border);

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.gallery-preview:hover {
    transform: translateY(-3px);

    border-color: var(--border-strong);

    box-shadow: var(--shadow-small);
}

.gallery-preview img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 220ms ease;
}

.gallery-preview:hover img {
    transform: scale(1.035);
}


/* =========================
   Bildüberlagerung
   ========================= */

.gallery-overlay {
    position: absolute;
    inset: auto 0 0;

    padding: 34px 16px 14px;

    background:
        linear-gradient(
            to top,
            rgba(2, 8, 5, 0.88),
            transparent
        );

    color: white;

    opacity: 0;

    transition: opacity 180ms ease;
}

.gallery-preview:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-overlay small {
    display: block;

    margin-top: 4px;

    color: var(--green-pale);
}


/* =========================
   Bildinformationen
   ========================= */

.gallery-information {
    padding-top: 14px;
}

.gallery-information h3 {
    margin: 0;

    overflow: hidden;

    color: var(--text-main);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-information p {
    margin: 7px 0 0;

    color: var(--text-muted);
    font-size: 0.92rem;
}

.gallery-description {
    display: -webkit-box;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* =========================
   Galerie-Aktionen
   ========================= */

.gallery-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: 12px;
}

.gallery-actions form {
    margin: 0;
}


/* =========================
   Vorschau ohne Bild
   ========================= */

.image-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    color: var(--text-muted);

    font-size: 0.95rem;
    text-align: center;
}


/* =========================
   Einzelbildansicht
   ========================= */

.image-detail {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(260px, 0.7fr);

    gap: 38px;

    align-items: start;

    margin-top: 34px;
}

.image-detail-preview {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background: rgba(255, 255, 255, 0.025);

    box-shadow: var(--shadow-large);
}

.image-detail-preview img {
    width: 100%;
    height: auto;

    display: block;

    object-fit: contain;
}

.image-detail-meta h2 {
    margin-bottom: 12px;
}

.image-detail-meta p {
    color: var(--text-soft);
}

.image-meta-list {
    display: flex;
    flex-direction: column;

    gap: 12px;

    margin-top: 24px;
}

.image-meta-row {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    padding-bottom: 10px;

    border-bottom: 1px solid var(--border);
}

.image-meta-row span:first-child {
    color: var(--text-muted);
}

.image-meta-row span:last-child {
    color: var(--text-main);
    text-align: right;
}


/* =========================
   Vollbildvorschau / Lightbox
   ========================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: none;
    justify-content: center;
    align-items: center;

    padding: 30px;

    background: rgba(1, 5, 3, 0.93);
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;

    width: min(96vw, 1300px);
    max-height: 92vh;

    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;

    object-fit: contain;

    border-radius: var(--radius-medium);

    box-shadow: var(--shadow-large);
}

.lightbox-close {
    position: absolute;
    top: -18px;
    right: -10px;

    width: 44px;
    height: 44px;
    padding: 0;

    border-radius: 50%;

    background: var(--green-bright);
    color: #052e16;

    font-size: 1.45rem;
    font-weight: 900;
}


/* =========================
   Galerie-Filter
   ========================= */

.gallery-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin: 25px 0;
}

.filter-button {
    min-height: 36px;
    padding: 7px 13px;

    border: 1px solid var(--border);

    background: transparent;
    color: var(--text-soft);

    font-size: 0.9rem;
}

.filter-button:hover,
.filter-button.active {
    border-color: var(--green-bright);

    background: rgba(34, 197, 94, 0.1);
    color: var(--green-pale);

    transform: none;
}


/* =========================
   Galerie-Leerzustand
   ========================= */

.gallery-empty {
    margin-top: 38px;

    color: var(--text-muted);
    text-align: center;
}

.gallery-empty strong {
    display: block;

    margin-bottom: 8px;

    color: var(--green-light);
    font-size: 1.15rem;
}


/* =========================
   Galerie auf Tablets
   ========================= */

@media (max-width: 900px) {
    .image-detail {
        grid-template-columns: 1fr;
    }
}


/* =========================
   Galerie auf Smartphones
   ========================= */

@media (max-width: 760px) {
    .gallery-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-upload-form {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .gallery-upload-form button {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns:
            repeat(auto-fill, minmax(160px, 1fr));

        gap: 18px;
    }

    .gallery-overlay {
        opacity: 1;
    }

    .lightbox {
        padding: 16px;
    }

    .lightbox-close {
        top: -12px;
        right: 0;
    }
}


/* =========================
   Sehr kleine Displays
   ========================= */

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-preview {
        aspect-ratio: 16 / 10;
    }

    .gallery-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-actions .button,
    .gallery-actions button {
        width: 100%;
    }

    .image-meta-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .image-meta-row span:last-child {
        text-align: left;
    }
}
/* =========================
   Datenschutz und Freigaben
   ========================= */

.privacy-option {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 4px 0;

    color: var(--text-soft);
    font-weight: 600;

    cursor: pointer;
}

.privacy-option input {
    width: 18px;
    height: 18px;
    margin: 0;

    accent-color: var(--green-bright);
}

.privacy-hint {
    margin: 24px 0 34px;
    padding: 14px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);

    color: var(--text-muted);
}

.privacy-hint p {
    margin: 7px 0;
}

.privacy-hint strong {
    color: var(--green-light);
}

.text-action {
    min-height: auto;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: var(--green-bright);

    font-weight: 650;
}

.text-action:hover {
    background: transparent;
    color: var(--green-pale);
    text-decoration: underline;
    transform: none;
}

.shared-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}
/* ==========================
   LOGIN
========================== */

.login-page{

    min-height:100vh;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:40px;

}

.login-card{

    width:100%;
    max-width:460px;

    background:#1f2937;

    border-radius:24px;

    padding:45px;

    box-shadow:0 20px 60px rgba(0,0,0,.35);

}

.logo-area{

    text-align:center;

    margin-bottom:35px;

}

.site-logo{

    width:120px;

    margin-bottom:18px;

    filter:drop-shadow(0 12px 28px rgba(0,0,0,.35));

}

.logo-area h1{

    margin:0;

    color:white;

    font-size:34px;

}

.logo-area p{

    color:#b6c2d0;

    margin-top:10px;

}

.login-footer{

    margin-top:30px;

    text-align:center;

    color:#8ea1b4;

    font-size:14px;

}

.login-button{

    width:100%;

    margin-top:20px;

}

/* =========================================================
   EINKAUFSLISTE
   ========================================================= */

.shopping-summary {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin: 30px 0 42px;
}

.shopping-add {
    margin-top: 38px;
}

.shopping-form {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.2fr)
        minmax(130px, 0.6fr)
        minmax(180px, 1fr)
        auto;
    gap: 18px;
    align-items: end;
}

.shopping-form .form-group {
    margin: 0;
}

.shopping-form .form-actions {
    margin: 0;
}

.shopping-list-section {
    margin-top: 48px;
}

.shopping-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shopping-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;

    padding: 16px 0;

    border-bottom: 1px solid var(--border);
}

.shopping-item.completed {
    opacity: 0.7;
}

.shopping-item.completed .shopping-content h3 {
    text-decoration: line-through;
    color: var(--text-muted);
}

.shopping-check-form {
    margin: 0;
}

.shopping-check {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border-strong);
    border-radius: 50%;

    background: transparent;
    color: var(--green-light);

    font-size: 1.4rem;
    line-height: 1;
}

.shopping-check:hover {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-pale);
    transform: none;
}

.shopping-check.checked {
    background: var(--green-bright);
    color: #052e16;
}

.shopping-content {
    min-width: 0;
}

.shopping-content h3 {
    margin: 0;

    overflow: hidden;

    color: var(--text-main);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-content p {
    margin: 6px 0;

    color: var(--text-soft);
}

.shopping-content small {
    color: var(--text-muted);
}

.shopping-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.shopping-actions form {
    margin: 0;
}

.completed-list {
    margin-bottom: 24px;
}


/* =========================
   Freigaben
   ========================= */

.access-list {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-top: 30px;
}

.access-user {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 15px 0;

    border-bottom: 1px solid var(--border);

    color: var(--text-main);

    cursor: pointer;
}

.access-user input {
    width: 20px;
    height: 20px;
    margin: 0;

    accent-color: var(--green-bright);
}

.access-user span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.access-user strong {
    color: var(--text-main);
}

.access-user small {
    color: var(--text-muted);
}


/* =========================
   Einkaufsliste mobil
   ========================= */

@media (max-width: 900px) {
    .shopping-form {
        grid-template-columns: 1fr 1fr;
    }

    .shopping-form .form-actions {
        align-self: stretch;
    }
}

@media (max-width: 700px) {
    .shopping-form {
        grid-template-columns: 1fr;
    }

    .shopping-form .form-actions,
    .shopping-form button {
        width: 100%;
    }

    .shopping-item {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: flex-start;
    }

    .shopping-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-left: 60px;
    }
}

@media (max-width: 480px) {
    .shopping-item {
        gap: 12px;
    }

    .shopping-actions {
        padding-left: 54px;
    }

    .shopping-actions .text-link,
    .shopping-actions button {
        width: auto;
    }
}
