/* ==============================
   GRUNDLAYOUT
============================== */

* {
    box-sizing: border-box;
}

body {
    max-width: 1170px;
    width: 100%;
    margin: 0 auto;
    font-family: Vardena;
    color: #fff;
    text-align: center;
    background-image: url("../images/background.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #000;
}


/* ==============================
   HEADER
============================== */

.site-header {
    width: 100%;
    height: 465px;
    margin: 0 auto;
    background-image: url("../images/header.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    position: relative;
}

.header-bg {
    position: absolute;
    inset: 0;
    width: 100%;
}


/* ==============================
   TITEL
============================== */

.page-title {
    background-color: rgba(0,0,0,0.8);
    border-bottom: 2px solid #EE57FF;
    border-left: 2px solid #EE57FF;
    border-right: 2px solid #EE57FF;
}

.page-title h1 {
    width: 100%;
    margin: 0 auto 20px auto;
    font-size: 38px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px 0;
    background: linear-gradient(to right, #A4F0A7 0%, #ae8deb 50%, #A4F0A7 100%);
    border: 2px solid #EE57FF;
    color: #000;
    text-align: center;
    text-shadow:
        0 0 6px rgba(255,255,255,0.5),
        0 0 15px rgba(0,150,255,0.6),
        0 0 25px rgba(0,150,255,0.4);
    box-shadow:
        0 10px 30px rgba(0,0,0,0.6),
        0 0 20px rgba(0,150,255,0.2);
}


/* ==============================
   BUTTONS
============================== */

.btn,
button {
    display: inline-block;
    background: rgba(0,0,0,0.6);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: 0.2s;
    cursor: pointer;
}

.btn {
    padding: 6px 12px;
    font-size: 14px;
}

button {
    padding: 8px 14px;
}

.btn:hover,
button:hover {
    background: rgba(0,0,0,0.8);
}

.btn-small {
    padding: 4px 10px;
    margin-top: 5px;
}

.btn-danger,
.danger-btn {
	background: rgba(180, 0, 0, 0.8);
	color: #fff;
	border: 1px solid rgba(255, 80, 80, 0.3);
}

.red {
    border: 1px solid red;
}

.green {
    border: 1px solid green;    
}

.right {
    float: right;
}


/* ==============================
   KATEGORIE / ÜBERSCHRIFTEN
============================== */

h2 {
    padding: 10px 0;
    margin: 0;
    background: linear-gradient(to right, #A8E6F4 0%, #db84d2 50%, #A8E6F4 100%);
    text-align: center;
    color: #000;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}


/* ==============================
   GALERIE
============================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0 auto 20px auto;
    border-top: 5px solid #D986D3;
    border-right: 2px solid #A9E2F2;
    border-left: 2px solid #A9E2F2;
    border-bottom: 2px solid #D986D3;
    padding: 20px;
}

.imgbox {
    width: 100%;
}

.imgbox img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    cursor: pointer;
    border-radius: 6px;
}

.imgname {
    font-size: 16px;
    text-align: center;
    color: #fff;
    padding: 5px;
    background: rgba(0,0,0,0.75);
    border: 1px solid #EE57FF;
}

.inline-form {
    display: inline;
    margin: 0;
}


/* ==============================
   FOOTER
============================== */

.site-footer {
    margin: 30px auto 20px auto;
    padding: 20px;
    border: 1px solid #EE57FF;
    color: #fff;
    background: rgba(0,0,0,0.75);
}

.footer-copy a {
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
}

.footer-copy a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-version {
    margin-top: 8px;
    font-size: 14px;
    opacity: .9;
}


/* ==============================
   ADMIN PANEL
============================== */

.admin-topbar,
.admin-panel,
.site-footer,
.loginbox,
.notice,
.error,
.password-topbar,
.password-panel,
.password-notice,
.password-error {
    max-width: 100%;
}

.admin-topbar,
.password-topbar {
    margin: 20px auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.admin-panel {
    margin: 0 auto 20px auto;
}

.admin-wrap {
    background: rgba(0,0,0,0.8);
}

.notice,
.error,
.password-notice,
.password-error {
    margin: 20px auto;
    padding: 14px 20px;
}

.loginbox {
    width: 420px;
    margin: 60px auto;
    padding: 20px;
    border: 2px solid #EE57FF;
    background: rgba(0,0,0,0.8);
}

.login-form {
    display: grid;
    gap: 10px;
    max-width: 300px;
    margin: auto;
}

.password-error {
    border: 1px solid rgba(255,120,120,0.35);
    background: rgba(120,0,0,0.55);
}

.password-notice {
    border: 1px solid rgba(120,255,120,0.25);
    background: rgba(0,70,0,0.55);
}

.password-page {
    max-width: 100%;
    margin: 20px auto 40px;
}

.password-topbar h1 {
    margin: 0;
    font-size: 30px;
}

.password-subtitle {
    opacity: .85;
    font-size: 14px;
    margin-top: 6px;
}

.password-form label {
    display: block;
    margin: 14px 0 6px;
    font-weight: bold;
}

a {
	color: white;
	text-decoration: none;
}

/* ==============================
   FORMULARE / INPUTS
============================== */

.admin-form,
.password-form,
.data-table-wrap {
    border-top: 5px solid #D986D3;
    border-right: 2px solid #A9E2F2;
    border-left: 2px solid #A9E2F2;
    border-bottom: 2px solid #D986D3;
    padding: 20px;
}

.admin-form input,
.admin-form select,
.admin-form button,
.loginbox input,
.loginbox button,
.password-form input,
.password-form button {
    border-radius: 8px;
    max-width: 400px;
}

.loginbox input,
.admin-form input,
.admin-form select,
.password-form input[type="password"],
.password-form input[type="text"] {
    background: rgba(0,0,0,0.6);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 8px;
}

.loginbox input:focus,
.admin-form input:focus,
.admin-form select:focus,
.password-form input[type="password"]:focus,
.password-form input[type="text"]:focus {
    outline: none;
    border: 1px solid #ffcc00;
    background: #222;
    box-shadow: 0 0 6px rgba(255,204,0,0.4);
}

.users-grid {
	display: flex;
	gap: 10px;
	justify-content: center;
}

/* ==============================
   PASSWORD INPUT WRAP
============================== */

.password-input-wrap {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.password-input-wrap input {
    width: 100%;
    max-width: none;
    margin: 0;
}

.password-input-wrap button.toggle-password {
    width: auto;
    min-width: 54px;
    max-width: none;
    margin: 0;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    background: #1f1f1f;
    color: #fff;
    font-size: 18px;
    transition: 0.2s;
}

.password-input-wrap button.toggle-password:hover {
    background: #2b2b2b;
}

.password-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
}

.password-actions .btn,
.password-actions button {
    min-width: 170px;
    text-align: center;
}


/* ==============================
   DROPZONE / UPLOAD
============================== */

#dropzone {
    border: 2px dashed #777;
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
}

#dropzone input {
    display: block;
    margin: 15px auto 0 auto;
}

.progress-wrap {
    margin: 15px auto;
    width: 100%;
    max-width: 500px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 22px;
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.15);
}

#progressFill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg,#b00000,#ff2a2a);
}

#uploadStatus,
#fileNames {
    text-align: center;
    margin: 15px auto;
    width: 100%;
    max-width: 400px;
}


/* ==============================
   LIGHTBOX
============================== */

#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
}


/* ==============================
   RESPONSIVE DESIGN
============================== */

@media (min-width: 1100px) {
	
	.page-title h2,
		margin: 0 10px;
	}
	
	.gallery,
	h2,
	.admin-form,
	.data-table-wrap,
	.password-form,
	.users-table-wrap,
	footer	{
		width: calc(100% - 24px);
		margin: auto;
	}
	
	.gallery {
		margin-bottom: 20px;
	}
}

@media (max-width: 1100px) {
    .site-header,
    .page-title,
    .page-title h1,
    h2,
    .admin-topbar,
    .site-footer,
    .loginbox,
    .notice,
    .error,
    .password-topbar,
    .password-notice,
    .password-error {
        width: calc(100% - 24px);
    }

    .gallery {
        grid-template-columns: repeat(3,200px);
        gap: 14px;
    }
}

@media (max-width: 700px) {
    body {
        background-attachment: scroll;
    }

    .site-header {
        height: 230px;
        margin: 12px auto;
    }

    .page-title {
        margin: 0 10px;
    }

    .page-title h1 {
        font-size: 28px;
        padding: 16px 12px;
        width: auto;
    }

    h2 {
        font-size: 20px;
        line-height: 1.35;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 150px));
        gap: 12px;
    }

    .imgbox,
    .imgbox img {
        width: 150px;
    }

    .imgbox img {
        height: 180px;
    }

    .imgname {
        font-size: 16px;
        line-height: 1.25;
    }

    .admin-topbar,
    .password-topbar {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        align-items: flex-start;
    }

    .admin-topbar h1,
    .password-topbar h1 {
        margin: 0;
        font-size: 28px;
    }

    .btn,
    button {
        min-height: 30px;
    }

    #dropzone {
        padding: 16px 12px;
    }

    .password-actions {
        flex-direction: column;
    }

    .password-actions .btn,
    .password-actions button {
        width: 100%;
        min-width: 0;
    }

    /* Tabellen, Badges, Grids, Buttons */
    .users-table th,
    .users-table td,
    .data-table th,
    .data-table td {
        padding: 8px 5px;
        font-size: 13px;
    }

    .tag, .status-badge, .role-badge, .badge {
        padding: 2px 6px;
        font-size: 11px;
    }

    .users-grid {
		display: grid;
        gap: 10px;
    }

    .top-actions .btn,
    .top-actions button {
        width: 100%;
        margin: 2px 0;
    }
}

@media (max-width: 480px) {
	.gallery,
	h2,
	.admin-form,
	.users-table-wrap,
	.password-form,
	.data-table-wrap,
	footer	{
		width: calc(100% - 24px);
		margin: auto;
		overflow: hidden;
	}

    .site-header {
        height: 170px;
    }

    .page-title h1 {
        font-size: 18px;
        letter-spacing: 0.5px;
    }

    h2 {
		font-size: 14px;
    }

    .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
		margin-bottom: 20px;
    }

    .imgbox,
    .imgbox img {
        width: 100%;
        max-width: 160px;
    }

    .imgbox {
        justify-self: center;
    }

    .imgbox img {
        height: 160px;
    }

    .imgname {
        font-size: 12px;
    }

    .admin-topbar h1,
    .password-topbar h1 {
        font-size: 24px;
    }

    .admin-topbar > div,
    .password-topbar > div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .progress-label {
        font-size: 14px;
    }

    .loginbox {
        margin: 24px auto;
    }
}


/* ==============================
   BROWSER AUTOFILL DARK MODE
============================== */

.password-form input[type="password"],
.password-form input[type="text"],
.password-form input[type="password"]:-webkit-autofill,
.password-form input[type="password"]:-webkit-autofill:hover,
.password-form input[type="password"]:-webkit-autofill:focus,
.password-form input[type="text"]:-webkit-autofill,
.password-form input[type="text"]:-webkit-autofill:hover,
.password-form input[type="text"]:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px rgba(0,0,0,0.6) inset !important;
    box-shadow: 0 0 0px 1000px rgba(0,0,0,0.6) inset !important;
    background: rgba(0,0,0,0.6) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    caret-color: #ffffff !important;
}


/* ==============================
   BENUTZER- & AKTIVITÄTSTABELLEN
============================== */

/* Benutzerverwaltung */

.users-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px;
    border-top: 5px solid #D986D3;
    border-right: 2px solid #A9E2F2;
    border-left: 2px solid #A9E2F2;
    border-bottom: 2px solid #D986D3;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
}

.users-table thead th {
    background: rgba(0,0,0,0.7);
    font-weight: bold;
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.users-table tbody td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
   
