body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
    text-align: center;
}

body.login-page {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Überschriften */

h1 {
    color: #2c3e50;
    margin-top: 40px;
}

h2 {
    color: #2c3e50;
}

/* Einleitungstext */

.intro {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #555;
}
.topbar {
    background-color: #2c3e50;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-radius: 8px;
    max-width: 1200px;
    margin: 0 auto 28px auto;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar a {
    color: white;
    background: rgba(255, 255, 255, 0.16);
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.topbar a:hover {
    background: rgba(255, 255, 255, 0.25);
}

.topbar .danger-link {
    background-color: #c0392b;
}

.login-box {
    width: min(420px, 100%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(44, 62, 80, 0.16);
    padding: 32px;
    text-align: left;
}

.login-box h1 {
    margin: 0 0 18px 0;
    color: #2c3e50;
}

.eyebrow {
    margin: 0 0 8px 0;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.login-form,
.admin-create-form,
.admin-user-card,
.admin-password-form {
    display: grid;
    gap: 14px;
}

.login-form label,
.admin-create-form label,
.admin-user-card label,
.admin-password-form label {
    display: grid;
    gap: 6px;
    color: #2c3e50;
    font-weight: bold;
    text-align: left;
}

.login-form input,
.admin-create-form input,
.admin-create-form select,
.admin-user-card input,
.admin-user-card select,
.admin-password-form input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c9d1d9;
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}

.form-status {
    margin: 0 0 16px 0;
    padding: 10px 12px;
    border-radius: 6px;
    text-align: left;
}

.form-status.is-error {
    background: #fdecea;
    color: #922b21;
    border: 1px solid #f5b7b1;
}

.form-status.is-success {
    background: #e8f8f5;
    color: #117864;
    border: 1px solid #a3e4d7;
}

.admin-main {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 24px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.section-heading h1,
.section-heading h2 {
    margin-top: 0;
    margin-bottom: 0;
}

.admin-create-form {
    grid-template-columns: repeat(4, minmax(0, 1fr)) max-content;
    align-items: end;
    margin-top: 14px;
}

.admin-create-form label,
.admin-user-card label,
.admin-password-form label {
    grid-template-rows: 22px 44px;
    color: #666;
    font-size: 13px;
}

.admin-create-form label > span,
.admin-user-card label > span,
.admin-password-form label > span {
    display: flex;
    align-items: end;
}

.admin-create-form input,
.admin-create-form select,
.admin-user-card input,
.admin-user-card select,
.admin-password-form input {
    height: 44px;
    background: #fff;
}

.admin-user-list {
    container-type: inline-size;
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.admin-user-block {
    border: 1px solid #e1e7ec;
    border-radius: 8px;
    padding: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(120px, 0.55fr) minmax(150px, 0.55fr) max-content max-content;
    gap: 10px;
    text-align: left;
    background: #fff;
}

.admin-user-card,
.admin-password-form {
    display: contents;
}

.admin-password-form .button {
    grid-column: 2;
    justify-self: start;
}

.admin-readonly-field input {
    background: #f4f4f9;
    color: #666;
    cursor: default;
}

.checkbox-filter {
    display: flex !important;
    align-items: center;
    align-self: end;
    grid-column: 5;
    justify-self: start;
    height: 44px;
    gap: 8px !important;
    white-space: nowrap;
    grid-template-rows: none !important;
}

.checkbox-filter input {
    width: auto;
    height: auto;
    min-width: 14px;
}

.admin-user-actions {
    display: flex;
    align-items: end;
    align-self: end;
    height: auto;
    padding-top: 28px;
    box-sizing: border-box;
    grid-column: 6;
    justify-self: end;
}

.admin-user-actions .button,
.admin-password-form .button {
    width: auto;
    height: 44px;
    min-height: 44px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
}

.admin-user-actions .button {
    min-width: 112px;
}

.admin-password-form .button {
    margin-top: 28px;
}

.popup-select {
    position: relative;
}

.popup-select summary {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #c9d1d9;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    font: inherit;
    line-height: 1.35;
    list-style: none;
    white-space: nowrap;
}

.popup-select summary::-webkit-details-marker {
    display: none;
}

.popup-select summary::after {
    content: "";
    width: 0;
    height: 0;
    flex: 0 0 auto;
    border-top: 6px solid #666;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    transition: transform 160ms ease;
}

.popup-select[open] summary::after {
    transform: rotate(180deg);
}

.popup-select summary:focus-visible {
    outline: 3px solid rgba(44, 62, 80, 0.25);
    outline-offset: 2px;
}

.popup-select-options {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #c9d1d9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(44, 62, 80, 0.16);
}

.popup-select-option {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #333;
    cursor: pointer;
    font: inherit;
    text-align: left;
    white-space: nowrap;
}

.popup-select-option:hover {
    background: #f4f4f9;
}

.popup-select-option:focus-visible {
    outline: 3px solid rgba(44, 62, 80, 0.25);
    outline-offset: 2px;
}

.popup-select-option[aria-pressed="true"] {
    background: #2c3e50;
    color: white;
}

/* Grid für die Kacheln */

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Kacheln */

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 2 / 2;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #ddd;
}

.card-title {
    font-size: 1.3em;
    font-weight: bold;
    padding: 15px 10px 5px 10px;
    color: #2c3e50;
}

.card-desc {
    font-size: 0.9em;
    color: #666;
    padding: 0 15px 20px 15px;
}

/* Fehlermeldungsseite */

.error-container {
    max-width: 600px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.error-text {
    color: #666;
    margin-bottom: 30px;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background-color: #2c3e50;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: 0.3s;
}

.button:hover {
    background-color: #34495e;
}

.secondary-button {
    background-color: #6c757d;
}

.secondary-button:hover {
    background-color: #5a6268;
}
.home-button {
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.home-button:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.home-button:active {
    transform: translateY(0);
}
/* Stickmuster-Übersicht */

.stickmuster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 30px auto;
    padding: 10px;
}

.stickmuster-card {
    position: relative;
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stickmuster-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.stickmuster-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #ddd;
}

.stickmuster-title {
    font-size: 1em;
    font-weight: bold;
    padding: 12px;
    color: #2c3e50;
}

.stickmuster-hover {
    position: absolute;
    inset: 0;
    background: rgba(44, 62, 80, 0.92);
    color: white;
    padding: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9em;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stickmuster-card:hover .stickmuster-hover {
    opacity: 1;
}

.no-image {
    aspect-ratio: 1 / 1;
    background: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

/* Stickmuster-Detailansicht */
.detail-container {
    max-width: 1000px;
    margin: 30px auto;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.detail-image {
    max-width: 400px;
    width: 100%;
    border-radius: 12px;
    background: #ddd;
}

.detail-info {
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 800px) {
    .detail-container {
        flex-direction: column;
    }

    .topbar,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-create-form,
    .admin-user-block {
        grid-template-columns: 1fr;
    }

    .admin-password-form .button {
        grid-column: auto;
        justify-self: start;
        margin-top: 0;
    }

    .admin-user-actions {
        grid-column: auto;
        justify-self: start;
    }

}
/* Checkboxen für Suchfilter */
.filter-box {
    max-width: 1200px;
    margin: 30px auto;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left;
}

.filter-box h2 {
    margin-top: 0;
    text-align: center;
}

.filter-box h3 {
    margin-top: 20px;
    color: #2c3e50;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 15px;
}

.filter-checkbox {
    background: #f4f4f9;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.filter-checkbox input {
    margin-right: 6px;
}
/* Stickmuster bearbeiten */
.edit-form {
    max-width: 900px;
    margin: 30px auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left;
}

.edit-form label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
}

.edit-form input[type="text"],
.edit-form input[type="number"],
.edit-form input[type="date"],
.edit-form textarea {
    width: 100%;
    padding: 9px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.edit-form textarea {
    min-height: 100px;
}

.checkbox-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 20px;
}

.success-message {
    max-width: 900px;
    margin: 20px auto;
    padding: 12px;
    background: #e8f8e8;
    border: 1px solid #9bd49b;
    border-radius: 8px;
    color: #2e7d32;
}
/* plus-icon */
.icon-plus {
    color: #ffd700;
    font-weight: bold;
    margin-right: 4px;
}
/* new-button */
.button-new {
    display: inline-block;
    background-color: #2e7d32;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.button-new:hover {
    background-color: #388e3c;
}
/* Edit-Image-Container */
.edit-image-container {
    text-align: center;
    margin: 20px 0 30px 0;
}

.edit-image {
    max-width: 350px;
    max-height: 350px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
}
/* edit-image-placeholder */
.edit-image-placeholder {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 12px;
    border: 1px dashed #bbb;
    background: #f4f4f4;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
}
